Re: how to read PWM signal from RC receiver

I realize this is an old thread and probably nobody is listening in here anymore but I have a question specific to the topic.

I'm totally new to Arduino and the like but had a thought on a fun project.

For it to work I need to learn how many seperate PWM (or PPM) channels one Arduino can monitor and (and modify) at one time. In most cases I only want to modify the signal and pass it along--either amplified slightly or dampened.

You would use any digital input pin with the pulseIn() function to read the output of the receiver. pulseIn() returns the width of the servo control pulse in microseconds (nominal 1000 to 2000 microseconds. Then, using the servo library, use servo.writeMicroseconds() to output the modified pulse to the servo. Be careful about the amplitude of the pulses from the receiver. If the receiver is powered by 6V the servo signal could damage a digital input. Make sure the pulse is no more than 5V amplitude (power the receiver with 5V if possible).

Thanks, GF.

So if I input 8 channels into an Arduino, I can process all 8 in real time?

A Uno has 11 available digital I/O pins (I don't count pins 0 and 1, RX and TX) and you can use the analog inputs as digital I/O so there should be enough pins. I don't know if the analog pins, set to be digital output, can be used with Servo library but they should work as inputs just fine. I am not sure what you mean by real time, but since the servo pulses (for each servo) are 20mS apart you should be able to. Also you only need to write a new value to a servo when it need to change position.

I guess by real-time I mean that I want to input the signals from up to eight inputs at once, process them to a percentage of their original ms value, and send them on to the intended servo in a semi-continuous loop.

Would you estimate that the delay in receiving, processing, and sending for eight inputs be in the very low millisecond range or significantly slower?

Yes, I think that is possible.

Thanks, GF, for tolerating my ignorance.

Another question: the friend that introduced me to Arduino suggested there might be a problem with the Arduino output which he says is 3.3v.

If my receiver is usually passing 5v to the servo, do you think a 3.3v signal from the Arduino will cause problems?

Yes, the 3v3 Arduino will complicate things. You will need to reduce the signal from the receiver to less than 3v3 into the digital input. Voltage dividers will do. I don't know if the 3v3 output signal will be enough for the servo so you may need level shifter to bring the 3v3 outputs to 5 or 6 volts to signal the servo. I don't see that it would hurt to try controlling a servo with a 3v3 signal. If it doesn't work you will need to translate the 3v3 signal to 5 or 6 v. A CD4050 may work as on up-converter, I will test it and report later.

Edit: After digging around a bit, it turns out that about any CMOS buffer, powered by 5 or 6V, can take a 3v3 input signal and output at the supply level. Tested with 4050 and seems to work fine. And using a 5V Arduino would be simpler.

Why not just get a 5v Arduino ?

Then start here - RCArduino: How To Read an RC Receiver With A Microcontroller - Part 1

There are lots of other projects that alter the RC Signals before passing them through like this one

or this one

Duane B