Multiple R/C servo control

....
....
I also have designed a servo-controller board in the near past. I've used an
AVR microcontroller and not a PIC but that shouldn't really change the
theory. As other have pointed it out, the approach you're trying to do will
have a difficulty generating close, but not equal servo pulses. The other
problem, no one seems to have pointed out so far is that servos (at least
older/cheaper analog ones) tend to draw a lot of current at the start of the
pulse. If you start the pulse for all of your servos at the same time, you
can easily overload your power-supply but even if not, you would generate a
lot of noise on your power lines. Distributing the servo start-pulses over
the full 20ms repetition window like Wayne suggested is a good idea for this
reason as well.
Just for reference, you can take a look at my servo controller design at
http://www.modularcircuits.com/servo_32.htm . It uses HW de-multiplexing of
the signals to achieve even higher precision.
Regards,
Andras Tantos

<snip>
I realized that yesterday when I replaced my robot's stock steering servo by
a more powerfull digital one. If I input drastic changes (1ms to 2ms in one
step), it would draw so much current that my usb port would lock because of
the overload current. I know, for now I'm powering out of usb because I'm
using a development board that is usb programmable. I'll provide proper
current capabilities later when I put everything on a nice protoboard.
On the same subject, I was reading the specs on my digital servo (hitec
hsc-5997) and it says that additionally to providing high torque, it is also
possible to program it (speed, center, etc) using a "proprietary" hitec
programmer. Well, the servo only has 3 wires, whatever the program does, it
must be using the standard signal wire (and maybe the VCC line?).
Does anybody know the specs on how to do a home made programmer for those
digital servos?
Cheers
Padu

Hi Padu. I hadn't been following this thread previously, but the first
thing I did notice with your original scheme is exactly what Andras has
pointed out here. Some people have written how it's a good idea to
pulse all the servos simultaneously, but in fact then you "will" get a
large current surge, from all servos at the same time.
Several months ago on this forum, there was a thread about servo
internals, to which Gordon McComb and I made a #posts. I took one of my
"analog" servos apart and looked at the signals to the motor on a
scope. Basically, current flows into the motor for 2-7 msec or so,
every time it receives a pulse-in on the signal line. The length of
current output to the motor depends upon how much torque the servo must
generate to bring the horn back to the set point. For low torque
development, the motor current pulse is only 2-msec. For heavy torque,
the current lasts upwards to 7-8 msec or so.
In fact, as an aside, this figure is related to how often you can
update an analog servo - probably not faster than every 10-msec, or
100-hz, to be safe. I found that, if you updated the servo too fast,
and the torque development was high, the servo internal control loop
would crash.
In any case, it's obvious from this that you will generate current
surges, which can be upwards to 3-4 Amps if you're running 12+ servos
with heavy loads, like on a walker, if you pulse them all
simultaneously. Better to string the pulses out, sequentially one after
the other, as several poeople have mentioned. In addition, I always put
some filter and bypass caps on the servo buss lines for noise
filtering, just to be safe.
- dan michaels
www.oricomtech.com
======================

Ok, as of 3:30am my protoboard is done and properly controlling my platform.
Now, HITEC reccomends 6.0V for optimum performance on their digital
servos... what voltage do you guys use for r/c servos?
If I provide 6V, then I'd need to include one more vreg in my design with an
output of 6V (my DMM is arriving today, so I still don't know what are the
current requirements for my servos).
What if I power the servo (vcc and gnd) from a completely different source
that provides 6V and supply the signal line using the 5V of whatever source
I'm using for my protoboard? Does the GND wire need to be common to VCC and
signal?
I guess all these questions make up for cool experiments I'm gonna try next
;-)
Cheers
Padu

for RC servos, you need common
ground for servo and the controlling
electronics.
the pwm signal that the controller
outputs (between an output pin
which is + and ground which is - )
gets connected to the servo PWM
input and servo ground.
You can use another 6v source
(4 AA, C, or D batteries) to power
the servo. hook + of battery to
+ of servo. hook - of battery to
- of servo.
You still need ground ( - ) between
controlling electronics and
servo connected.

In my servo setup I use a 12v supply and a 5v regualtor with a
diode on the ground lead. This jacks the output voltage of the
regulator up to 5.7v to supply the servo (makes for pretty quick
servo response). I tap off of this output thru another doide to
supply the servo chip. This reduces the voltage to 5v. It also
supplys some isolation for voltage dips due to the servo moving.
A crude schematic at the bottom of the below page.
http://www.geocities.com/zoomkat/ezservo.htm

Thanks for the link. Could you explain a bit more what function the diode is
performing in your schematics? My knowledge in EE is very lame, so go slow
:)
What values are you using for the diodes?
Cheers
Padu

The diodes are the cheap small generic 1N914 type that have a .7v
voltage drop across them. Used on the gound pin of the voltage
regulator, they cause the voltage regulator output to increase by
.7v, for an output of 5.7v instead of 5.0v. Used on the regulator
output, it causes the 5.7v output to be reduced back to 5.0v for
use by the servo chip. It also acts like an electrical check
valve keeping the power stored in the down stream capacitor from
trying to back feed the servo motors. The large capacitor is
connected in parallel with the voltage input to the chip to act
as a power backup if the starting current of the servos causes a
big voltage dip on the regulator output. The capacitor temporarly
powers the chip during the voltage dip. Voltage dips on the power
to the servo chips can cause erratic operation of the chips.

Yes, interesting. After I posted I went and try attaching a diode the the
GND lead of a 3.3V voltage regulator. The voltage jumped from 3.29V to 3.97.
The diode has a "1N4" and "14*" marked on it (where * stands for "I can't
read it"). When I measure it using my dmm, it reads 580mV.
What I knew about diodes is that voltage will go through anode to cathode,
but won't go the other way. What is the theory behind the voltade increase
when you plug it to the ground lead of the vreg?

[snip]
The regulator tries to maintain 5.0V between its ground pin and its
output pin - it has no other external references (it does have an
internal reference, so it can keep the ground and output pins 5.0V
apart, but this reference is unchanged by the external diode). The
ground pin of the regulator is 0.7V above circuit ground thanks to the
diode, and the output pin is 5.0V above the ground pin, so the output
pin is 5.7V above circuit ground.
Tim

Nice explanation, thanks a lot. Now, at the risk of start being annoying,
there's one final thing that is still unclear in my mind. I see that if I
install a diode forward biased (is it the right way to say?) on a 5V line,
there will be a small voltage drop on the other side of the diode. So why
connecting it to the GND lead makes the voltage to actually raise?
Cheers
Padu

Also, have a look at the Silvertone site (www.silvertone.com.au) for a
description and circuit of a complete xmitter for controlling servos - there
was a construction article in Silicon Chip for the xmitter, and receiver etc -
I haven't read the article, but usually they explain the theory and workings of
their projects
David - trying to be helpful
Padu wrote:

Log in

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.