View Full Version : Discussion Spektrum receiver servo output signals?
foxflier
Aug 19, 2008, 10:27 PM
Hi All,
Been trying to track down a prob and thought I'd ask before I drag out the oscope and start looking at servo drive signals...
Is there any difference in the servo drive output signal from a Spektrum receiver and any other (FM) receiver?
I've been building various PIC based controllers driven by the servo signals from typical FM radios for years. Just got a DX7 and have a onboard glow drive system built that works great but is flaky on my AR6200. Seems like the routines I typically use to sense and measure the frames just doesn't work right with my AR6200. Works fine with every FM receiver I have so I suspect something is different.
Just hoping to save some time... :D
Thanks,
Ted
Tomapowa
Aug 19, 2008, 10:41 PM
I've designed many PIC circuit that work with both Futaba/Hitec and newer Spektrum-JR/Futaba FASST 2.4GHz systems and never had any big issues (typical pulse lengths betwen 1ms and 2ms, 1.5ms being center). Unlike older FM systems the newer 2.4GHz systems take a bit to output the proper servo signal (due to binding/linking of Tx & Rx). You just need to be sure to pause a bit upon a power-up, before measuring a valid servo signal. Some PCM systems can also cause similar issues (fail-safes, etc...). Out of curiosity, have you tried your PIC using a different Spektrum receiver like a AR7000 or AR9000?
foxflier
Aug 19, 2008, 10:52 PM
I've designed many PIC circuit that work with both Futaba/Hitec and newer Spektrum-JR/Futaba FASST 2.4GHz systems and never had any big issues (typical pulse lengths betwen 1ms and 2ms, 1.5ms being center). Unlike older FM systems the newer 2.4GHz systems take a bit to output the proper servo signal (due to binding/linking of Tx & Rx). You just need to be sure to pause a bit upon a power-up, before measuring a valid servo signal. Some PCM systems can also cause similar issues (fail-safes, etc...).
I'm actually pausing 3 seconds on power up before dropping into my count routines! Even then my code actually doesn't care what shape the signal is in to begin with. I do an edge detect then start measuring the pulsewidth. Anything outside the valid ~1 to 2ms range is rejected and it keeps on trucking. It's very odd. I thought it may be something to do with the drive levels, perhaps the AR6XXX output is falling outside TTL values or something?
I did notice some odd behavior. If I loaded up other servos by deflecting other controls, then I'd start sensing correctly. That's why I started questioning the output signal form...
Dang I hate to drag that scope out of the cabinet...
Tomapowa
Aug 19, 2008, 11:49 PM
I should had asked earlier... are you using a resistor inline (series) between the servo output and the PIC? You should have a 2.2K resistor (at least that is what I use sucessfully on both FM and Spektrum). A 10K might be too large, as I noticed it did not work on some JR/Airtronics stuff in the past... 2.2K works fine though. If I remember correctly, the max servo pulse/signal voltage of Futaba FM gear was around the supply voltage (~5v) while the max pulse voltage for JR/Spektrum stuff was only around 3.3-3.6 volts (it's been a while... I could be wrong). Oh... you'll also need a pull-down resistor connected to the PIC input also (I use a 10K).
Andrew McGregor
Aug 20, 2008, 03:05 AM
Spektrum receivers sometimes start several channel pulses simultaneously, depending on how the TX is configured. Maybe that's an issue for your code?
foxflier
Aug 20, 2008, 09:02 AM
I've got 10K in series and I had a pull down in there before I added the series resistance so probably should try both. I've wondered about signal levels all along but was too lazy to measure. :rolleyes:
Pulses outside the typical servo frame rate should be ignored by my code. My code is pretty much failsafe in that if I don't see a proper ~1 to 2ms pulse within about 72ms the WDT forces a reset and the process starts again. Worst case the PIC should be sitting there waiting and resetting until a recognized frame comes through.
Now, sitting here typing this I just realized a problem. If the WDT times out and forces a reset, that means another 3 second pause. 72ms pass pretty quickly (and loosing a few frames for something like a glow driver is no big deal) but with that 3 sec pause in there I may be hitting bad frames from time to time and continuing to reset and pause. I'm gonna have to look at that one... :eek:
Some time ago I knocked together a PWM measuring circuit with a little LCD readout using the same '628 PIC and code as in this project. I'm gonna stick that on there tonight, see what it reads, add in a pulldown to see if the signal needs squaring, and go from there.
Thanks gents.
Ted
Tomapowa
Aug 20, 2008, 02:03 PM
As I mentioned, a 10K in series might be too big for servo signals lower than 5 volts (as I think is the case with many JR/Spektrum gear). If you still experience problems, try changing the series resistor to 2.2K (10K as pulldown on PIC input).
Tomapowa
Aug 20, 2008, 02:51 PM
OK.... just took some measurements
Futaba (7ch) Servo Signal Frame = 22.5ms
Spektrum (9ch) Servo Signal Frame = 22ms
Futaba Servo Pulse Peak Voltage = 4.59 volts (almost supply V of 4.8v, 4 NiCd cells)
Spektrum Servo Pulse Peak Voltage = 3.34 volts
Another quick question I should had asked... has your PIC circuits previously worked on JR/Airtronics equipment?
darkith
Aug 20, 2008, 03:02 PM
If you're using a 16F628, you need to feed the signals in on TTL IO ports, not the Schmitt input ones, unless your power supply is < 3.3volts, as the Spektrum RXes (and many mcu based FM/PCM RXes) only output around 2.7-3.0 volt logic signals.
PORTB is the TTL port on '628.
D.
foxflier
Aug 20, 2008, 03:48 PM
If you're using a 16F628, you need to feed the signals in on TTL IO ports, not the Schmitt input ones, unless your power supply is < 3.3volts, as the Spektrum RXes (and many mcu based FM/PCM RXes) only output around 2.7-3.0 volt logic signals.
PORTB is the TTL port on '628.
D.
Right, I'm using PORTB.0 for input...
foxflier
Aug 20, 2008, 03:50 PM
OK.... just took some measurements
Futaba (7ch) Servo Signal Frame = 22.5ms
Spektrum (9ch) Servo Signal Frame = 22ms
Futaba Servo Pulse Peak Voltage = 4.59 volts (almost supply V of 4.8v, 4 NiCd cells)
Spektrum Servo Pulse Peak Voltage = 3.34 volts
Another quick question I should had asked... has your PIC circuits previously worked on JR/Airtronics equipment?
You know, I've always mainly used Futaba and Hitec. Never tried JR. That Spektrum peak looks low. I'm wondering if I'm correctly sensing the high transition? I'm going to try regulating Vcc to the PIC and see if that's why it seems to work fine when the receiver battery is loaded (seeing some voltage drop).
BTW, thanks much for taking the measurements!
foxflier
Aug 20, 2008, 07:29 PM
It's the Spektrum servo output level from the receiver...
Operating off the receiver pack at upwards of 5.5v (which is the PIC's Vcc max anyway), the PIC wasn't 'seeing' the HI pulse transition from the Spektrum receiver. By regulating the PIC at a little below 5V (I just stuck in a 78L05) it works flawless. Touch of rework and I'm in good shape. :D
Wasn't my well written and documented code after all...HA :rolleyes:
Thanks for all the inputs gents!
Regards,
Ted
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.