SSC-32 analog input/servo feedback

This post is to follow up on comments I made in the ssc-ng discussion. While waiting on a new design board, I think that maybe some of the things desired from the new board can be obtained from the current board. In particular I noticed that the ssc-32 chip has what appears to be an input for the analog reference voltage. Currently the input is tied to the chip +5.0v VCC, which probably sets the 8 bit range to 0.0v-5.0v. I also noticed that the pot output voltage from a standard servo I have varys from ~0.0v to ~2.0v. In other AD chips I’ve looked at, I think that the reference voltage sets the span of the digital output for the input. If this is correct, one could get 8 bit servo position input by cutting the 5v trace supplying the chip reference input and supplying the input with 2.0v. This might also be of interest for those that have sensors that output in ranges like 0.0v-3.3v and want full 8 bit resolution.

I just finished adding some wires to the pot in a futaba FP-S148 servo for position feedback testing. Connecting a multimeter to the output, I get an output range of .38v to 1.94v for full range of the servo (using a mini ssc II controller with a position range of 000 to 254). This is about ~7 mv per incriment, which matches with the observed change of ~6-8 mv per position increment. I don’t have an ssc32, but anybody actually interested in servo position feedback might try the following with a similar servo setup. Carefully remove the controller chip from the ssc32 board, and gently bend the AREF pin (21) out to the side (instead of cutting the board trace), then carefully reinsert the chip. Now one could connect to the now disconnected (from the normal 5.0v reference source) exposed AREF pin and connect an ~2.0v source (four diodes in series could be used to supply ~2.2v from the 5v on the board) to test the servo position feedback. I think now most anybody that has the ability to open a servo (the FP-S148 was not as easy as a generic S148), and solder a wire to the center leg of the pot can get useable position feedback from the servo (even the $10 ones). Anybody up to the challange?

Edit: added pix of the 1.28v output at position 128 (no real reason the mv output and position match).
http://web.comporium.net/~shb/pix/servo-fb.jpg

Just an update showing a fairly easy way to connect to the servo pot output without deeply digging into the servo and creating other issues (been there/done that!). In this setup, one carefully removes the four screws on the bottom of the servo and removes the bottom cover. Once the bottom is off, I use a rubberband around the servo to keep the top gear box cover in place (it also helps hold the wire in place for soldering). One can easily see the three servo pot solder connections on the bottom of the servo board near the servo control wires. In the inexpensive standard servos I’ve opened, the center solder connection is the one of interest from the servo pot output. In the picture I used a wire strand from a piece of cat3 phone wire. Lightly tin the wire end with solder, then place it flat against the servo board with the tip touching the servo pot center solder connection. Carefully heat the wire tip and solder connection until the wire solders to the connection. Once the wire is soldered, one then needs to notch the edge of the servo housing and the bottom cover to allow the wire to exit the servo. There is an existing notch in the pix above the servo wires where I have previously run wires out from the top of the board. With the new wire soldered flat against the board, there is sufficient clearance between the board bottom and the bottom servo cover to route the new wire around to where the notch will be. Once the new wire is routed out the notch, remove the rubberband and carefully reinstall the servo bottom cover. One needs a fine tipped soldering iron for this type of work. I use a 15 watt Radio Shack one (64-2051).

http://web.comporium.net/~shb/pix/servo-pot.jpg

Thanks for that tutorial. This is exactly what I am planning on doing for my robot. I’m going to use a mux with 3 servo ports acting as the line select so that I can read all the servos from one input port.

You may want to look at the below discussion. The inputs from the servos may need a diode in the line to prevent backfeeding from the other servos (dependso on your setup). The Schottky type of diode only has a .1v voltage drop.

lynxmotion.net/phpbb/viewtopic.php?t=2290

I have already thought about that, however wouldn’t the use of a multiplexer eliminate the need for that as it only allows the selected line to be active? that would mean there is no other lines connected that would allow a feedback voltage.

Weather or not you would need isolation diodes would depend on the electrical characteristics of what you are using for a multiplexer.

edit:
I looked a a data sheet for a 74HCT4066 switch chip and it probably has sufficient isolation on the outputs such that diodes probably wouldn’t be needed with it.

I tried this approach about two years ago when I was building the electronics around my 'bot.
Since i have one controller per leg, I have more than plenty of analog inputs.

Thing i noticed is that the voltage on the pot was very jittery, but that could have been just on my servo’s.

You may want to filter the input, either by hardware or software, is my point.

Great tutorial btw!

the other thing you should consider is if you bring only the wiper connection back from the feedback pot then the voltage drop over the ground connection is in your measurement. this additional voltage is proportional to the current being drawn by the servo at any given instant. ideally you would bring the wiper and one end of the feedback pot back and use a differential amplifier to subtract out the bias voltage on the end lead. the AD623 is a pretty common and simple to use diff-amp for this purpose and it is available in a DIP package for prototyping. you can even include some simple low-pass filtering at its input to smooth out the jitter without messing with how the servo works internally.

Under load, you should generally see the same output that the servo control board sees. If the servo is jittering or straining, then then the analog pot output will also be varing as expected. An appropriately sized capacitor might be all that is needed to adequately stabalize the pot output for reading by the ssc-32 or other AD device. I generally make a test setup to try to see what the actual issues will be, and then start trying various solutions to see what will work for the given situation. I start simple and work from there. In most bots, servo feedback would be of little value. If there is a real need for it, then a simple setup like this would be a place to start. If better accuracy than this is needed, then another solution would have to be developed. Bottom line is that one may get adequate feedback from an inexpensive analog servo and not have to buy a more expensive (and complex) digital servo to do the job.

Very well put Zoomkat.
I never meant to disagree with you on this point, just wanted to state my personal experience on the subject so maybe someone else could benefit from it :slight_smile:

Eddie, do you have a circuit that explain the voltage drop over ground that is in the measurement? Or circuit that implement the differential OpAmp for the voltage bias elimination? I’m new to electronic stuff.