ServoHackParts.jpg
        This Instructable brought to you by the kind folks a Rachel's Electronics
        Visit  www.rachelselectronics.com  for cool electronics kits and breadouts!

This hobby servo hack will add shaft position feedback by tapping into the servo's own internal potentiometer. The only parts that need are wire and a little bit of solder, making this hack practically free. Common electronics workshop tools are required, so if you're minimally set-up and already have a servo, it should take you less than an hour to make the modification and run the test code.
I thought of this after building projects with servos and getting frustrated by the fact that after restart, the servo would zoom around if it wasn't already at the first coded position. There are code samples below (arduino) that map the servo's range to the feedback with minimal offset.
    As with any hack, you assume some risk of wrecking your servo motor, so use a cheap one!

Discussion topics include: Collision Detection. Gestural Keyframing. Software Increase of Torque. Haptic Control.... (uuh, fill in the blank folks!)

Parts and tools needed to complete this mod:
>  Arduino (or other microcontroller) and it's attendant parts.
>  Hobby servo (Featured: HITEC-322HD)
>  Stranded wire (Should be smaller than 20 gauge. I use 24g)
>  Set of small screwdrivers.
>  Wire snips
>  Wire strippers
>  Soldering iron and solder.
>  Multimeter.
>  A few resistors (1K, 4.7K, 3.3K, 2.2K, or similar)
>  Small knife


 
Remove these adsRemove these ads by Signing Up

Step 1: Servo Surgery

servoOpened.jpg
pryPCB1.jpg
pryPCB2.jpg
WiperWire.jpg
solderBlobPosition.jpg
The Hitec servo comes apart very easily. Simply remove the four screws (bottom of servo, where wires come out). This also makes it possible to access the gear train (top of the servo, where the shaft comes out), so make sure that you keep the rest of the housing together. If you have a loose housing, put some tape over the seam to hold it together while you make this modification. Lift off the cover plate, and you will expose the bottom of the control PCB. We have to dig deeper to find out which one of these solder blobs is connected to the wiper pin of the internal potentiometer. Use a small flat screwdriver to pry up the PCB. start in one of the corners opposite from the cables. the PCB is soldered directly to the motor pins, and the whole unit should slide out smoothly. Careful not to let the gear housing open up! Now you can see that the yellow wire is the one that goes to the wiper, and also locate the solder blob that we will be attaching out sensor wire to.
Jayefuu says: May 26, 2010. 7:35 AM
Useful ible, lots of good information and well written. :)

There's a small mistake at the beginning of step 6, it will return 0-1023 not 0-1024.
Rachels Instructs (author) in reply to JayefuuMay 26, 2010. 9:46 AM
ha! sharp eye there jayefuu! changed it, thanks
xxx12321 in reply to Rachels InstructsOct 8, 2010. 6:03 AM
And there are also shortcomings in the code in Step 8. A few "for" commands have lack of arguments.
Rachels Instructs (author) in reply to xxx12321Oct 8, 2010. 12:22 PM
somehow they must have been dropped during the copy-paste...?
i have updated the code section and it compiles correctly.
jmsaavedra says: May 30, 2010. 5:44 AM
hey cool!!!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!