Go Down

Topic: READ Radio control car inputs with arduino (Read 2 times) previous topic - next topic

ramen rider

halo people,

i am making a project where it involves an RC car(i am using traxxas 1/16 e-revo) and integrated with arduino.

the idea is this: the car would normally be run with the provided radio control transmitter. i want the arduino to be able to read the pulse input (perhaps i can use pulse in -advice me!!) from the RECEIVER of the radio-control. when the arduino acknowledge the pwm from the transmitter to receiver, then the arduino can send the corresponding PWM to the ESC(electronic speed control) then to the motor. i want the arduino to have the capability to read the input i press from the radio control transmitter which is sent to the receiver.

when the arduino can read the inputs, i believe i can do hell lots of manupulating of the RC behaviour with the arduino. (this is one of the main of obstacle of my project). anybody has suggestions?

oya one, just wanna this is the rough idea without any pulses manupulation(so take input from receiver and output to the ESC)
can i use the code like this:

"pulsein (read from the receiver) = pulsout(write to the ESC-motor)"

therefore, it will act exactly the same as the default radio control function but with the arduino as the middleman and able to read what is happening.
thank you in advance

RC - robotic freak


And what did your searches of the forum throw up?

when the arduino can read the inputs, i believe i can do hell lots of manupulating of the RC behaviour with the arduino. (this is one of the main of obstacle of my project).

Did you mean "objective", rather than "obstacle"?

Do you think you could share your objectives?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.


There are a number of ways to read in the output of a RC receiver.
I am not a fan of pulse in.  It locks up the Arduino while it is waiting for the signal.  I would use interrupts.  This leaves the Arduino free to work on other tasks while it waits for the signal to change.
If you have a receiver that you can hack to get the Puls stream, then you can read in all the channels on one pin.
If you only need 2 channels, you can use 2 pins and the 2 available interrupts.
If you have a Mega, you can read up to 6 channels on 6 pins using 6 interrupts.
There are some other configurations possible.  I just bough a package of diodes from Radio Shack so that I can try putting multiple channels on 1 pin without the need to open the receiver up and find the pulse stream.  I will let you know how that goes.

So, how many channels do you want to read in from your receiver?  Which Arduino board do you have?

If you need 2 channels, I have some sample code that should get you started.

Out of curiosity, what manipulation do you want to do to the RC control?

ramen rider

heloo, thank you guys for the replies

actually the big picture of my project is " radio control car with roll-over detection". microcontroller with IMU to be integrated with the radio control car system(receiver, ESC and steering servo).man,i cant paste pictures here can i? if not it would be easier since i have the rough schematic. anyway part of the objective is to be able to read the RC receiver inputs.

i came across an idea of either using pulsein(which i am not sure at all it will work) or use analogread(to read voltage value straight from the receiver)(i believe that pwm generated from the receiver is simply a varying voltage perhaps 0v-5v that could be read in the arduino then i can output exactly the same voltage to the motor ESC, what do you guys think? i am going to try this idea today).

i want to try the interrupts you suggested but i really do not know at all about it, any references or sample code?

thanks guys


Aug 30, 2010, 07:25 pm Last Edit: Aug 30, 2010, 07:34 pm by mpeuser Reason: 1
Before you proceed, please understand the PPM signal used in RC applications. This is very, very easy; and after it, there is no need to write funny things about analogRead of different channels anymore or ask irrelevant questions  ;)

N.B. And pulseIn () will be fine for a start. http://arduino.cc/en/Reference/PulseIn

Go Up