Instructables

Step 12: Rotation Sensors

Rotation sensors are key to the operation of this robot.  It has one rotation sensor per motor, so the robot knows the exact position of each leg at all times, allowing for precise control of the legs.  For my rotation sensors, I used four very thin trimpots I had lying around.  Pots are extremely easy to interface with the microcontroller, and are plenty precise for my purposes.  They were not, however, very easy to interface with the hardware of my robot.  

While designing and building the leg assemblies, I neglected to build in an easy way to connect the potentiometers to the legs.  In the solution I came up with, one side of the pot is fixed to the inside of the leg by the protruding screw heads.  The other side of the pot is fixed to the locknut on the end of the bolt that holds the leg in place.  When the leg turns, the side of the pot fixed to the leg turns, while the side fixed to the locknut is held in place.

To interface the pots and the legs, I first sanded the plastic side of the pots flat.  I took four squares of acrylic, approximately 3/4" on each side, and drilled four holes in each, corresponding to the four screw heads in each leg.  Then I glued a potentiometer to the center of each acrylic square.  

To fix the opposite side of the pots to the locknut I had to get even more creative.  First, I glued metal standoffs scavenged from a PowerMac G5 case to the metal side of the pots.  Then I glued the plastic shaft from a Bic pen to the metal side of the pots.  The other ends of each pen were cut to fit within the metal legs.  Then the pen shaft was forced over the square locknut and epoxied to it.
 
Remove these adsRemove these ads by Signing Up
That's a pretty clever setup-- the long pen allows some side-to-side movement during rotation, so the mounting doesn't have to be perfect.