Close

Adding a real RC receiver

A project log for Yet another quadcopter (YAQC)

A fairly beefy quadcopter based on the arduino mega 2560, xbeam.

kjohKJoh 04/26/2015 at 14:460 Comments

so, using the XBee for control comms was a bit problematic, so I splurged on a real RC radio from Hobbyking (the Turnigy 9x). It arrived on Friday, so my weekend was set!

After messing with it and a servo, it was time to connect it to the arduino. My first tests with the "pulseIn" function worked fine as a way to read the PWM signals, but this is not the right way to do it. A more efficient way is to use interrupts. Thanks to the guide at

http://rcarduino.blogspot.co.uk/2012/04/how-to-read-multiple-rc-channels-draft.html

I got it working with some effort. I stumbled a bit, as it seems that the higher order digital inputs on the mega don't seem to work with pin change inetrrupts, although pulseIn worked. I'll have to look into that. The other thing was a damned compile time error people have been talking about on the arduino.cc site ("collect2.exe. Ld returned 5exit status"). The workaround at forum.arduino.cc/index.php?topic=316146.0 seemed to work.

Some pictures:

Plugged into an Uno.

Output showing roll, pitch and throttle outputs from the receiver

Discussions