PDA

View Full Version : Discussion Servos PPM signals over long wires...


Superluminal
Jan 19, 2009, 11:39 AM
I’ve been playing with some PIC based hardware that drives fast RC helicopter tail servos via the built in PWM sub-system.

When driving Futaba servos (so far I’ve tested using 9251, 9254, 9256) everything works as expected. However, when driving a JR 8700G I experience a high level of ringing on the signal line, so much so that it disrupts the PIC (ground and/or power bounce perhaps?). Interestingly this servo is one of the old so called "Super Servos", i.e. is not digital/microprocessor based, but instead uses a custom analogue ASIC. I’ve not tried their digital equivalent, the 8900G, but will do so shortly once I get hold of one. However, I expect that this will work much like the Futaba servos.

My hardware (a home brew gyro) is actually connected to the receiver and tail servo via a 5 wire, 50cm long pigtail (implemented as a 24 AWG ribbon, much like the Spartan gyro).

The pigtail contains the following 5 signals: Rudder, +6v, 0v, Gain, and Servo Output. The +6v, 0v and rudder signal all come from one receiver socket (the rudder channel). The power for the servo connector is taken directly from the gain plug (i.e. it is drawn straight from the receiver and is thus decoupled from the gyro). The gain and servo output share the common 0v line. Hopefully that makes sense and you can see how I’m using the 5 wires in the pigtail...

Just out of interest, the gyro internally regulates the +6v down to 5v via an appropriate linear LDO regulator, as required by the PIC (dsPIC 30F3013) and gyro sensor.

As I said earlier, everything works well until I use the JR 8700G servo. However, if I add a small series resistor (1k) in the servo signal line the ringing is greatly reduced and the servo works with no disruption to the PIC. No real surprises here as this is what you might expect.

Now as a general rule should you always add such a series resistor when driving a servo? I appreciate that it’s probably a good idea for protecting the PIC output against short circuit etc., however here I’m more concerned about minimising ringing over longish wires and the associated problems that this causes. Or is there a better technique? Perhaps by increasing the PPM signal rise time via a simple RC network?

Any comments or input would be greatly appreciated!

AndyKunz
Jan 19, 2009, 02:19 PM
That's called "termination" and it's the right way to solve the problem. The problem arises from the long leads and probably somewhat of an impedance mismatch. Slowing the rise time would help (that's basically what you did).

http://www.pericom.com/pdf/applications/AB023.pdf might help some.

Andy

Superluminal
Jan 19, 2009, 05:07 PM
Thanks Andy,

Annoyingly my old stream powered scope isn't up to the job of allowing me to monitor what's actually happening on the offending signal line.

A 1K resistor seems to do the job, although I suspect I could probably lower its value a bit, but without any way to monitor the effect it's would only end up being guess work...

I think it's time for a chat with the wife and hopefully a new scope!

Do you have any suggestions as to what might be a good resistor value?

Many thanks,

Max

GlowFly
Jan 20, 2009, 08:28 AM
For this duty (driving servos from a PIC or just long lines from logic) I use a 100R-220R. I do the same when driving longish lines from an op-amp.
An alternative when slew rates aren't too sharp is small SMD nH sized inductors. The resistor is simpler and easily found in the toolbox...
--
Steve

Superluminal
Jan 20, 2009, 08:48 AM
Thanks Steve!

AndyKunz
Jan 20, 2009, 09:04 AM
On my PIC-based designs I always put a 330R in series. If the pin is ever shorted, it will keep it within the 20mA limit. If you've got it working, leave well enough alone. If you have time to play around, use longer wires and see just how long you can go. That will help determine if you can drop the R, but you probably don't need to since there isn't (or shouldn't be) any current in the signal line unless you have an opto in it.

When you touch your scope probe to the line, you just added 10pF - which just might be enough to stop the ringing. There's a long story on how I learned that...

Andy