View Full Version : Discussion My servo tester
Richard Cox
Mar 06, 2007, 07:55 PM
I designed and built two of these servo testers for my friend Chuck and I about 2 years ago. I recently updated it to add a current measurement function. Here are the functions:
1. Move the servo in response to the joystick.
2. Cycle the servo continuously with the joystick controlling the cycle speed.
3. Move the servo to the minimum ( 1 mS pulse width )
4. Move the servo to the center (1.5 mS pulse width )
5. Move the servo to the maximum ( 2.0 mS pulse width )
6. Measure an incoming pulse width from the receiver. Pass the signal
through to a connected servo.
7. Measure the current with a quasi-peak detector while the joystick
is moving the servo.
It is designed around a PIC16F873 running at 16 MHz. The resolution on
the generated and measured pulses is 4 microseconds. The current measurement resolution is 10 mA. It uses a single pushbutton switch to select the mode (see above), and has 7 LEDs to show the mode, in addition
to a 4 digit seven segment LED readout.
I have attached a photo as well as the schematic. We built these on vector board using point to point wiring. If there is enough interest, I may do a PCB.
I will supply the hex file to anyone interested.
MatC
Mar 07, 2007, 02:44 PM
Good work... care to post up the hex file? Circuit not that much use without it :)
Richard Cox
Mar 07, 2007, 05:46 PM
Here is the hex file.
You will have to rename it to servtest.hex.
The file manager won't allow a hex file extension.
podavis
Mar 07, 2007, 08:47 PM
Richard, Have you measured the current of servos while they're on planes, what's the highest current you'd expect to see? I'm working on a tester for fun.
Richard Cox
Mar 07, 2007, 09:51 PM
It's hard to see the max current with the way I display it, but on the bench,
an HS-55 runs about 240 mA. When putting some pressure on the arm while
it's moving, it increases somewhat, but not significantly.
hshoe007
Mar 08, 2007, 04:46 PM
Richard,
Thanks for sharing your servo tester with us. It is an impressive device, with some innovative thought. Have ordered a PIC and am anxious to replicate your effort.
Hugh
podavis
Mar 08, 2007, 08:52 PM
Richard, that's what makes it interesting to me. In the small amount of experience I had with my first effort I discovered one servo out of several brands that was overloading the little 100ma TO-92 7805 on the prototype board (so I piggybacked another 7805), the servo was a GWS Nano. Others, including a HS-55, worked fine with the one 7805, including a larger Futuba. It seems worthwhile getting a good understanding a servo's current draw, maybe there's a lot of variation.
A coarse peak capture and averaging seems possible with the limited resources of the PIC if the peak is near the high end of an 8 bit range, I've been thinking about ways to do auto-ranging.
Acetronics
Mar 09, 2007, 04:07 AM
Richard, Have you measured the current of servos while they're on planes, what's the highest current you'd expect to see? I'm working on a tester for fun.
Hi,
Just see here :rolleyes: : http://www.rcgroups.com/forums/showthread.php?t=635443&highlight=servormances
Alain
Dan Baldwin
Mar 09, 2007, 11:59 AM
Richard, Have you measured the current of servos while they're on planes, what's the highest current you'd expect to see? I'm working on a tester for fun.
I tested a couple of servos using a scope, and a .1 ohm shunt to measure current. An HS55 driving a surface, but not in flight drew about 150 ma while moving, about 350 ma stalled. An HS300 drew about 200 ma moving, 500 ma stalled.
Dan
mem
Mar 09, 2007, 12:34 PM
Richard,
I really like your servo tester. It does just about everything I would like in a tester and I think I have all of the components in my parts box to make it :) .
It’s not a request, but if you are tempted to add more functionality there are two things that would add icing on the cake for me.
- One is to transmit the data displayed on the LEDs via the UART. Both pass-thru and current measurements would be interesting to plot on a PC.
- It would also be interesting to measure the non-linearity of a servo. This could be done by measuring the voltage on a pot that was coupled to the servo shaft. Some calibration would be required, for example measurement starts only after the stick is held briefly in minimum and then maximum positions. The output reading could be the percent difference between the expected and actual voltage across for a given pulse timing. This information is useful of matching servos in applications such as Heli CCPM.
Both of the above fall into that category known as ‘feature creep’ but if either strike your fancy for inclusion then please let me know before I start wiring because they would need a few minor changes to the circuit.
And thanks again posting this project.
bernie_w39
Mar 09, 2007, 12:37 PM
Richard,
Why don't you use CCP1 and CCP2 on PIC to connect servo signal in/out?
I think use hardware to generate PWM and measure signal will be more
precious than software.
BTW, use BJT to sharpen input pulse is not a very good idea. Since NPN
has a long "storage time", it makes BJT turn off delay time much longer than
turn on delay time. If you really need a BJT to re-form input pulse, I suggest
put one schottky between B/C pin of the BJT to keep BJT from saturated.
Bernie.
podavis
Mar 10, 2007, 09:23 AM
Alain, Dan, thanks for the data, it suggests a full scale range of 1 amp would do , with a 1ma resolution.
Richard, hope you don't mind me piggy backing this question in your thread.
Richard Cox
Mar 11, 2007, 04:35 PM
Bernie,
If you use the CCP module to generate the pulse, the period needs to be 20 mS.
with 10 bit resolution, you only get about 20 uS. resolution. Using Timers and
interrupts, I was able to get 4 uS. for measurement and pulse generation.
Regarding the input transistor, the storage time is on the order of 250 nanoseconds,
an order of magnitude less than I can resolve.
I didn't see the need for 1 mA resolution on the servo. To achieve that, you need
an input amplifier or an unreasonably large shunt resistor value, which interferes
with the servo's performance.
I thought about outputting serial data, but since adding the current measurement
function was a recent addition, I didn't want to rewire/recode to use the UART.
Sorry, but I have no plans to add that function.
By the way, everybody, I failed to label the LEDs on the schematic versus function.
The basically go from top to botton for the 7 functions which I described, in order.
Also, the bottom digit is the least significant.
Richard
mem
Mar 11, 2007, 06:22 PM
I thought about outputting serial data, but since adding the current measurement
function was a recent addition, I didn't want to rewire/recode to use the UART.
Sorry, but I have no plans to add that function.
RichardRichard, any chance you would make the source code available so I could add the serial support?
kfong
Mar 11, 2007, 11:06 PM
I would like to see the source code as well, then we can keep adding functionality such as USB, ect. I could layout the board and make a small run for those who would be interested and send you a couple for the effort if you don't plan to pursue it further. I'm currently using the one by rc-cam, even had some boards made. That one works good, but I like the display.
Kin
http://www.embeddedtronics.com/
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.