Prop to RC Servo Interface Question
Drone
Posts: 433
The comments in the 4 servo driver on the Object Exchange says,
"normal servos are driven from a prop pin through a 4.7k resister".
Is this 4.7K resistor just to be absolutely safe, or is there an electrical requirement for it?
Typical servos have three wires:
1. Black - Ground
2. Red - 4.8-6.0VDC (use 5V)
3. White - Pulse width control input, 1-2ms pulse repeated every 20ms (connect to Prop pin).
Regards,
David
"normal servos are driven from a prop pin through a 4.7k resister".
Is this 4.7K resistor just to be absolutely safe, or is there an electrical requirement for it?
Typical servos have three wires:
1. Black - Ground
2. Red - 4.8-6.0VDC (use 5V)
3. White - Pulse width control input, 1-2ms pulse repeated every 20ms (connect to Prop pin).
Regards,
David
Comments
But it is a general issue what to do with "output" lines.
The outputs of the Propeller are relative short-circuit proof, driving 50 mA if forced to. But this might disturb another chip's output that has erroniously been connected to this Propeller pin
It is just good practice to limit this current to a value safe for standard situations, which will be 10mA = 220 to 470 Ohms
As generally no current is needed such output protection resistors can be made MUCH higher. But this resistor forms a low-pass filter with all capacitance around (input pin, traces, cords 10..100pF or even higher) this defines the limit.
I personally recommend 1k in all cases, except the signals go > 1Mhz or real current is needed
Post Edited (deSilva) : 1/13/2008 1:28:11 PM GMT
This is the first time I'm dealing with servos, never a need in the past - or future; but just taking a stab at it this weekend just for fun. Bought a handful of little 8 gram analog servos in Singapore on Saturday for around $7 USD ea. retail. The 4 servo driver from ObEx is working - sort of. 1ms to 2ms isn't giving full travel out-of-the box, but the servos do seem to center at 1.5ms. Never-mind... I'll write some simple code to test/verify/calibrate these little servos - they're quite generic: E_Sky 8 gram units, very often used in low-end helicopters.
Rgds, David
try my 24 channel driver (reference to the thread in propeller.wikispaces.com/pwm )
For modifying sevos to motors (I did that, too!) see here: www.seattlerobotics.org/guide/servohack.html
But I took a 30 g servo... much more tricky with the small ones...
"There is no need for the resistor." - This is generally true for short length runs between the Propeller, and servo, but using a 4.7K resistor for lengthy runs (> 12 inches) can make all the difference in the world by
attenuating any back emf generated from the servo itself or "noise" that might be picked up in the signal wire when it acts like an antenna.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
In an ideal circumstance you would place a resistor on BOTH ends.· When you increase the distance from the Propeller to the Servo, you essentially create what is called a transmission line.··A transmission line can be simplified as a PI filter.
Notice, that the IN and OUT can be interchanged.· The typical characteristic of this filter produces 2 frequency poles... One·tends to provide extreme gain, while the other tends to provide extreme attenuation.· To complicate matters, you can also see reflections within the transmission line that can create multiple frequency poles as you increase or decrease the physical length of the line.· It is unlikely that the actual servo pulse will hit a resonate frequency pole because of the relatively low frequency involved.· You could however see edge ringing between transitions, but you are more likely to hit a resonate frequency from dirty brush contacts on the motor as it spins.· But with that·said, as you increase the length of the transmission line, so do you increase the potential to receive (as an antenna) any stray external energy that would couple into the transmission line.· In this case, using a·resistor is also a·good practice that will·limit the input current and voltage from entering back into the I/O.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 1/15/2008 4:38:10 AM GMT
The discussed case however seems much simpler to me:
- the frequency involved is around 10kHz
- the stepper motors have no brushes
- the output is driving with quite low impedance <100 Ohm
- I just expect no back EMF.
But if you consider a 4k7 resistor a good safety belt I certainly agree; in fact - as said - I generally use a 1k, though I am not always fully aware why I do it
Now I've got four E_Sky 8g servos working fine using Bob's (from ObEx) 4-servo driver (thanks Bob). These are nice little servos, seen a offer on ebaY for 4 of them for less than $5 USD each. Yeah, I paid more for them in Singapore, but still around the retail price at a bit less than $10 USD a piece.
Anyway, the servos (all four of them) are waggling away happily. I wrote some simple .spin code to test the travel range and centering. The servos center around 1.5ms, and have +/-60 degrees of travel.
On the topic of series resistors: Initally I take the safe route by putting a series resistor on all output pins when experimenting (per Beau's commant). But ultimately you guys are right - no need in most cases for driving genric RC servos, if you want to risk it (oops, plugged a wire into the wrong pin on the protoboard).
The cap bypass comments from Beau seem to be warranted. When searching for a substantive datasheet for these E_Sky 6g servos (didn't find one) I saw a threads about how the E_Sky helicoper product suffers from RF interference from the (brush commutator) DC moters in these servos. Solutions seem to be bypass caps. Some state this interference can appear on the control input' but I can't imagine how, especially given relatively short lead length for servo interconnection.
Next step - try to hack one of these servos into 360 mode.
Thanks deSilva; will give your 24 driver a try, Gotta go for now...
Rgds, David