Its like Aggrobots weapon in S3 - you just have a spring inside the arm and a catch to release the spike, and then some mechanism to wind it back in (an overvolted drill motor would do it)