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

Step 1: Servo Surgery

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.
<p>Nice One. </p>
So, this will allow me to get analog feedback in order to train my robot arm?
<p>Hello [Rachels Instructs]</p><p>I really like what you did here, but do you know whether it would be possible to make a live feed back, so, you move one servo by hand take that input and output it to another servo, therefore controlling the other servo live without a button record.</p><p>This is an awesome hack!</p>
nice. thx for that. is this also possible w/ a 360&deg; servo? mine just seemed to have a potentiometer for calibration but i couldnt find anything that resembled one connected to the motor itself...
Useful ible, lots of good information and well written. :)<br /> <br /> There's a small mistake at the beginning of step 6, it will return 0-1023 not 0-1024.<br />
ha! sharp eye there jayefuu! changed it, thanks<br />
And there are also shortcomings in the code in Step 8. A few &quot;for&quot; commands have lack of arguments.
somehow they must have been dropped during the copy-paste...?<br>i have updated the code section and it compiles correctly.
hey cool!!! <br />

About This Instructable




More by Rachels Instructs:7-Key Slider/Wheel Tutorial with Synthesizer Spooky Sounds With 555 Timer Stripping Small Jumper Wires 
Add instructable to: