Hacking an RC transmitter PPM signal.

Hi,

The post is related to a recent one, so apologies if it looks like I’m covering some of the same ground.

I want to use an arduino to control a set of remote servos via a standard RC link. I’ve worked with connecting servos directly to arduinos, and have worked with off-the-shelf RC models in the past, so I do know a little of the basics.

To do this I believe I need to use one of these RC transmitter modules.......

or….

And then connect it to an arduino to provide a suitable PPM signal that will ultimately control the servos.

I know enough about servos to understand how the pulse width controls the servo position, what I don’t fully understand is the protocols that allow for the control of multiple servos over the same link. There’s a little bit about the protocols here……

But it doesn’t really give me everything I need (it doesn’t give precise timing information)

Ok, here’s my question. I figure the best way to work out exactly what the PPM signal looks like is to connect a normal RC controller up to one of these transmitters, and monitor the PPM signal and try to use this to work out the precise protocol and timings. So how can I do this without an oscilloscope or logic analyzer? Can I connect the signal to digital input pin of an arduino and monitor it’s state? Or is there a better way to do this?

Thanks

Your PPM stream is composed of the individual channels' PWM pulses, each separated by a low of about 2-300us, with a longer low (at least 5ms) between pulses, to give a full frame time of 20ms.

Your PPM stream is composed of the individual channels' PWM pulses, each separated by a low of about 2-300us, with a longer low (at least 5ms) between pulses, to give a full frame time of 20ms.

Is this an industry standard across fubata/spektrum and all the other manufacturers, or does it vary from manufacturer to manufacturer?

So the first pulse refers to channel 1, the 2nd to channel 2 and so on ????? - is this correct???

thanks

Was a guy on here awhile back that did a lot of RC stuff.

Here is a link to some of his work.

If I understand what you're asking correctly, you want to use a normal RC radio link (of pretty much any sort) with servos connected to the RX. You want to connect the arduino to the TX module to be able to drive said servos over the wireless link.

So, you need to feed a PPM signal into the TX module.

The PPM signal is a little strange is that it uses the same timing for each channel as the separated "PWM" channels would, except the timing is such for each channel that you need to count from the falling edge of the previous signal, scroll down to the PPM section here and look at the channel separators.

Actual timing between frames isn't actually specified by any system I'm aware of, you just need to make sure you can push all your channels down the link and have, I believe a 4ms pulse indicating the end of frame. As mentioned, timing is the same is "PWM" so 1.5ms is 50%, 1ms is 0% and 2ms is 100% and timing is from the falling edge of the previous channel, not the rising edge of this channel.

There is plenty of C code around for reading and writing PPM signals. MultiWii and Ardupilot code to read those streams (since a lot of receivers can also output it, sometimes calling it CPPM). OpenTX and er9x both have code to create it in the first place since they are firmware replacements for the popular Turnigy 9X series of radios

So, you need to feed a PPM signal into the TX module.

Last time I checked, RC transmitters don't a PPM SIGNAL IN jack. There is such a thing as
a "buddy cable" jack that might be made to work with some modifications to the Tx.
(specifically to the switch you have to hold to ENable the buddy cable. It's a "Dead Man" switch
arrangement so if the trainee screws up the Trainer lets go of the switch and immediately regains
control. I believe that is a momentary toggle and cannot simply be switched and let go like a SPST toggle.

I think it's a bit unrealistic to ask a newbie or suggest to him to do this. If he knew how to hack an RC transmitter he wouldn't be asking the question in the first place. Whether or not it is possible it isn't
going to do any good to tell him that. Telling him he needs to replace the tx pots with an analog interface
would be more realistic. There are different ways to control those pots via uC , one of which is replacing thewiper connection with a DAC and an RC FILTER so the output of the DAC is a smooth variable analog signal instead of a step staircase shape like you would normally see from a DAC. Another way is couple a stepper motor to a pot shaft and control the motor. A continuous rotation servo might be made to work in this application using the SERVO library. I'm not sure if digital pots will work for this because I don't
know the voltage range for the pot.

raschemmel:
If he knew how to hack an RC transmitter he wouldn't be asking the question in the first place.

If I understand what you're asking correctly, you want to use a normal RC radio link (of pretty much any sort) with servos connected to the RX. You want to connect the arduino to the TX module to be able to drive said servos over the wireless link.

Correct!

So, you need to feed a PPM signal into the TX module.

Thanks, that's what I though.

Assuming I can get the protocol sorted (thanks for the link by the way) What's the best way of implementing this, i.e. how do I create a suitable pulse-train? At the simplest level I guess I could configure a pin to be a digital output pin and use a set of delays to turn it on and off at the right times, but I expect there's a much more effective way?

Show us how you are physically going to connect the arduino to the Transmitter and the rest is pretty much
straight forward.

You want to connect the arduino to the TX module to be able to drive said servos over the wireless link.

How is a link showing how to hack a receiver going to help you do this ? Why do you even need to hack a receiver ? Simply connect the receiver channel directly to the arduino. No hack necessary.
The receiver shown in the photo is a 4-channel receiver (because it has a header with 4 rows of 3-pins each (+5V,GND, signal). Just plug a receiver cable into the header pins. The plastic case (removed for
the photo , has the channel labels on it).

I used PulseIn
to read the pulse width. The challenge is hacking the Tx to get it to send the signal from the arduino.

I didn't see that covered in the link about hacking a reciever. What's wrong with this picture ?

Assuming I can get the protocol sorted (thanks for the link by the way) What's the best way of implementing this, i.e. how do I create a suitable pulse-train? At the simplest level I guess I could configure a pin to be a digital output pin and use a set of delays to turn it on and off at the right times, but I expect there's a much more effective way?

Yeah, or you could just use the Servo Library that comes with the IDE...

raschemmel: You're being quite confrontational for, from what I can tell, no good reason. We're all just trying to help.

A TX and a TX module are two different things. A lot of transmitters have removable modules that actually contain the RF link hardware. Typically you do feed these PPM, and a lot of RX's can output the same PPM signal to allow connecting to a flight controller with a single cable rather than one per channel. So the link was a display of what the PPM signal actually looks like it.

Fulliautomatix: I've only ever read from a PPM signal and I did that with interrupts and counting the time between them to build up an array of all the channels. If your arduino doesn't need to do anything else you could possibly use delays, but as you said, it's far from optimal. I imagine looping and comparing against a timer until the right amount of time has elapsed would be a better way but the delay method may get you a proof of concept system working faster

I came across this today in relation to the RC controlled 'Battleswitch', it may be of use to you.

and the video

Yeah, or you could just use the Servo Library that comes with the IDE...

The servo library is used for controlling servos that are connected directly to an arduino. This is not what is required.

Simply connect the receiver channel directly to the arduino. No hack necessary.

I think you misunderstand, I want to control a RC transmitter, not a RC receiver.

Ok guys, thanks for everyones input. I think I've got enough to go on for the moment, for those who may want to follow in my footsteps and control a RC transmitter module with an arduino, here's a brief summary.....

For a useful summary of some of the RC techie stuff...
http://adamone.rchomepage.com/guide1.htm

For an introduction to the PPM signal that's needed to control an RC transmitter, read this.....

There's a website here for a project to build a fully functioned RC transmitter based on an arduino try this.. (actually he's done a lot more than I need, but there's some good stuff here)
http://www.reseau.org/arduinorc/index.php?n=Main.HomePage

Finally, the work I'm interested in basically boils down to how to create a pulse stream of highs and lows to control a RC transmitter, theres a library and tutorial here that shows how to generate a simple on/off signal using timers....
http://playground.arduino.cc/Main/PulsePattern

For reference, I''ve also found another guy whos' already done this.

Whenever I start a new project I always discover someones already done it - the problem is finding it.

Were you able to achieve this project? I've been also working on the same thing, with the notable difference of RC transmitter, I'm using the FSi6.

I've been able to match up my generated PPMarduino with the PPMfsi6, but when I try to input the PPMarduino signal into the PPMin of the FSi6, I'm not getting anything.

Cheers,

VC