Controlling an Arduino with a standard RC transmitter/receiver
There are many ways to remote control an Arduino, Xbee, RF link, IR…
I decided to try and use something I had laying around and that is common among large group of hobbyist : RC transmitter and receiver pair
I will be using this 2 channel transmitter and receiver pair:
From what I have found there are 3 ways of getting the signals to the Arduino and making them useful. (If I am missing one tell me)
-Method 1 involves poking around inside the receiver looking for a pin that is outputting all the channels together and then separating the pulses to get the values of each channel.
-Method 2, use interrupt to read the pulses coming from each individual channel, very efficent but needs more coding, will be used for version 2.
-Method 3, use Pulsein, inneficent but I have chosen this methos since I am not great at coding and it is fairly simple to use.
For now I will be controlling this guy:
He is driven by 2 continuous rotating servos.
So far reading the pulses and getting the bot to turn on the spot have been fairly easy, but now comes the hard bit(s).
To do list:
-Get robot to go straight ahead.Somehow I need to “revers” the signal coming from the RC receiver since both servos are going in opposite direction for the bot to go forwards.
-Make values smooth for low speed control .The value coming from the receiver tends to jump around a bit, so maybe take the average of 5 values and send that to the servo?
-How to make the servos stop totally and not slowly turn when stopped.Usually to make these servos stop, you send the centre position. Well with these particular ones, they don’t seem to have a centre position, no matter how close to the centre position, it still slowly turns to one side.
-Use two pots to adjust centre/trip the servos. So when the stick is at rest on the remote the servo will be stopped.This is still a work in progress so it might be some time before I declare it complete.
I might even post a forum topic as I am struggling with coding.