Hi guys. I want to be able to read analog values from an radio receiver using an analog pin. I'm currently trying to use analogRead() to do so. When I try and print the values using Serial.println(analogRead(A0)) and move the lever nothing happens. Would this be because the values from the receiver are larger/smaller than the 0-1023 range? Would I have to convert them to be within range? I'm also supplying the receiver with 5V from an H-Bridge motor controller. Thanks for the help, I'm new to this so any information is greatly appreciated!
Are you talking about a radio control receiver as used to control model aircraft? I believe that the output from them that controls the servos is a PWM signal, rather than an analog value.
What do you mean you are not seeing anything? Where are you not seeing anything?
Normally the minimum you should supply is your code (posted correctly) and a schematic of what you have. Pencil and paper is fine as a schematic, a Fritzing physical layout diagram is not.
What Arduino? What "RC receiver"? How is it connected? What code are you using?
I've never seen an RC receiver that has analog outputs. You normally read the output from an RC receiver using pulseIn()...search "Arduino read RC receiver" to see the many times this has already been done.
don't RC receivers output a pulse from 0.5 to 2 msec that controls an RC servo?
couldn't you either use an interrupt or monitor it using a digital input, not analog?
21st century r/c receivers are likely to provide PPM or a genuine modern serial protocol on a single output line.
Some fraction of them also provide r/c PWM 1 to 2 millisecond pulses at 50 Hz, for example on multiple output lines.
It’s not the same kinda PWM as for dimming an LED or for making an analog voltage from the Arduino.
So yeah @hamish_graham, what receiver and watchu up to?
what is ppm?
(pwm is one of many possible signals using pulse width)
Thanks, guys! I think I have it figured out. I was incorrectly assuming I could use an analog pin to use the values from the receiver. The values I'm receiving are in the range of 1000-2000.
I don’t think you have come to grips with what the two signals are. With an analogue pin you can measure voltages up to the supply of the processor, so that will be up to 5V or 3.3V. Those voltage readings will be digitised to numbers in the range 0 to 1023. These have no correlation with the values you are receiving. If they had, and you were receiving voltages greater than the power rail of your processor then a simple voltage divider would make your system work.
Now we are trying to find out what you mean by you are receiving values of 1000 to 2000.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.