# How to Control Any R/C Car With an Airplane Transmitter!

98,499

79

54

Have you ever wondered if you could use your R/C airplane transmitter to control any R/C car as well?
How awesome would it be to have 6 or more channels to control your R/C car, and also customize each channel as per your choice?
I’ve been longing to make something so that I could make this possible so I started off with a little bit of research soon after my 8th grade exams. During my holidays last month, at the age of 14, I finally completed the project and now have a wonderful piece of circuitry which I can integrate on just any R/C car and use the airplane transmitter to control it after customizing every channel just the way I like.
I’ve been very excited about this ever since I completed it and wish to share with everyone how exactly I made it so you guys could enjoy too!! Well this tutorial explains exactly how I made this piece of circuit in detail. If you still happen to have any doubts, please feel free to post your queries and comments, and it’ll be my pleasure to answer!

Enjoy the instructable!

## Step 1: Gathering Your Parts!

Parts Required

2. L298n Motor Driver Shield (Parts list and tutorial for the shield is below)
3. Arduino Mega 2560
4. An R/C Car
5. 9v battery
6. 7v NiCd Battery

## Step 2: The Transmitter

For this tutorial, I will be using the flysky ct6b transmitter. The Operator controls the plane through a radio link which is connected to the receiver via electromagnetic radiation i.e. PPM signals (Pulse Position Modulation). Basically, the R/C equipment consists of a transmitter which is operated by the operator and a receiver that receives the signals that are transmitted by the R/C transmitter.
PPM
Pulse-position modulation (PPM) is a form of signal modulation in which M message bits are encoded by transmitting a single pulse in one of   possible time-shifts. This is repeated every T seconds, such that the transmitted bit rate is M/T bits per second. It is primarily useful for optical communications systems, where there tends to be little or no multipath interference.
To use an airplane R/C transmitter with any microcontroller (in my case the arduino) we have to first decode the PPM signals. To decode these signals I will be using the arduino programming environment.

## Step 3: The Motor Driver Shield

To use any motor controlled appliance with a microcontroller, we need a motor driver that basically allows you to add an external battery to control the appliance. Here I will be using the L298n motor driver which allows you to use up to 24v and 4 amps.
Now I will show you how to make your own L298 motor driver shield for the arduino.
Parts List
1. L298N DUAL H-Bridge  IC
2. IN4004 diodes
3. Burg Strips
4. A standard PCB (Printed Circuit Board)
5. Heat Sink
6. Basic Tools and some wire

The L298n H-Bridge
The basic principle of an H-Bridge was being able to control the direction of the motor i.e. forward or backward. This was achieved by managing the current flow through circuit elements called as transistors. The formation looks like an H and that’s where it gets its name – H-Bridge. The L298 uses this principle to control the motors.

Schematic
I made my shield on a universal PCB with burg strips spaced to go into the arduino’s headers instead of separate wires, which made it easy to use.

## Step 4: The Flysky Receiver

Now we have to wire up the flysky receiver.
Connecting the receiver to the arduino
Connect any two channels of the receiver that you want to use to the arduino pins 9 and 10.

Connecting the battery to the Receiver
Connect the positive and negative terminals of the receiver to the 9v battery. Make sure all the grounds are connected (i.e. the arduino’s ground, the receivers ground and the ground of both the batteries). Usually, many problems occur when all the grounds are not connected.

## Step 5: The R/C Car

I used a cool R/C car with suspensions to make it easy to use on many terrains!
So first of all, we have to remove the circuit from the R/C car.
Make sure you do not damage any component unless it’s an old car that’s spoilt :) .
Now Solder two wires to each motor and connect these wires to the
L298n shield as shown on the schematic in the previous step.

## Step 6: Programming the Arduino

At last, we get to the code that decodes the PPM signals and converts them so that the L298 can understand them. I used the pulseIn () function to read the transmitter stick values!
Below is the code which is self explanatory!!

/*   This is the code for controlling any R/C car with an airplane transmitter written by Vishnu Chaitanya Karpuram. Enjoy!!   */
int motor1Left = 5;// defines pin 5 as connected to the motor
int motor1Right= 6;// defines pin 6 as connected to the motor
int motor2Left = 7;// defines pin 7 as connected to the motor
int motor2Right = 8;// defines pin 8 as connected to the motor

int channel1 = 9; // defines the channels that are connected
int channel2 = 10;// to pins 9 and 10 of arduino respectively

int Channel1 ; // Used later to
int Channel2 ; // store values

void  setup ()
{
pinMode (motor1Left, OUTPUT);// initialises the motor pins
pinMode (motor1Right, OUTPUT);
pinMode (motor2Left, OUTPUT);
pinMode (motor2Right, OUTPUT);// as outputs
pinMode (channel1, INPUT);// initialises the channels
pinMode (channel2, INPUT);// as inputs
Serial.begin (9600); // Sets the baud rate to 9600 bps
}

void  loop ()
{
Channel1 = (pulseIn (channel1, HIGH)); // Checks the value of channel1
Serial.println (Channel1); //Prints the channels value on the serial monitor

if (Channel1 > 1300 && Channel1 < 1500 ) /*If these conditions are true, do the following. These are the values that I got from my transmitter, which you may customize according to your transmitter values */
{
digitalWrite (motor1Left, LOW); // Sets both the
digitalWrite (motor1Right, LOW);// motors to low
}

if (Channel1 < 1300) // Checks if Channel1 is lesser than 1300
{
digitalWrite (motor1Left, HIGH);// Turns the left
digitalWrite (motor1Right, LOW); // motor forward
}
if (Channel1 > 1500) // Checks if Channel1 is greater than 1500
{
digitalWrite (motor1Left, LOW);// Turns the right
digitalWrite (motor1Right, HIGH);// motor forward
}
Channel2 = (pulseIn (channel2, HIGH)); // Checks the value of channel1
Serial.println (Channel2); //Prints the channels value value on the serial monitor

if (Channel2 > 1300 && Channel1 < 1500 ) // If these conditions are true, do the following
{
digitalWrite (motor2Left, LOW);// Sets both the
digitalWrite (motor2Right, LOW);// motors to low
}

if (Channel2 < 1300) // Checks if Channel2 is lesser than 1300
{
digitalWrite (motor2Left, LOW);// Turns the left
digitalWrite (motor2Right, HIGH);// motor backward
}
if (Channel2 > 1500) // Checks if Channel2 is greater than 1500
{
digitalWrite (motor2Left, HIGH);// Turns the right
digitalWrite (motor2Right, LOW);// motor backward
}

/* NOTE - Check the values of the channels that you get in the serial monitor
and adjust the values in the if statements accordingly. In my case when the stick
was centered, my readings were 1400 to 1470. When the stick was raised, the readings were
above 1470 and when it was lowered, the readings were below 1300.
*/

## Step 7: Testing Time!!!

Finally, let’s test our cool creation and check how it works. See the video below to see it in action!!

Participated in the
Hurricane Lasers Contest

Participated in the
Remote Control Challenge

## Recommendations

• ### Internet of Things Class

20,928 Enrolled

## 54 Discussions

HELP HELP HELP can you make same thing for tank 2 motors fly sky rc with L298n dual H brige 2 joysticks left rite independent for each motors ! I can't find anything for my project need your help! i have code for one side only can you modify it for 2 motors ? my email- maksimum22ru@gmail.com
/*

Example code to control a DC motor forward and reverse with variable speed
using a L298N driver board, an Arduino, and a typical RC Controller

driver board: \$7
https://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=L298N

flysky rc controller transmitter and receiver: \$50
https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=fs-t6&rh=i%3Aaps%2Ck%3Afs-t6

video overview:
*/
int in1 = 12;
int in2 = 13;
//the following are all ~PWM capable ports
int enable1 = 11;
int rc_channel4 = 3;
int switchD = 5;
void setup() {
pinMode(rc_channel4, INPUT);
pinMode(switchD, INPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(enable1, OUTPUT);
Serial.begin(9600);
}
void loop() {
int pwm = 0;
int swd = pulseIn(switchD, HIGH, 25000);
int rc4 = pulseIn(rc_channel4, HIGH, 25000);
Serial.print("switch: ");
Serial.print(swd);
Serial.print(" raw channel4: ");
Serial.print(rc4);
if(rc4==0){
Serial.println(" no signal");
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(enable1, 0);
}
else if(rc4 > 1530){ //right stick
pwm = map(rc4, 1530, 2000, 0, 255); //map our speed to 0-255 range
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
analogWrite(enable1, pwm);
Serial.print(" right stick speed: ");
Serial.println(pwm);
}
else if(rc4 < 1460){
pwm = map(rc4, 1460, 1000, 0, 255); //map our speed to 0-255 range
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
analogWrite(enable1, pwm);
Serial.print(" left stick speed: ");
Serial.println(pwm);
}else{
Serial.println(" stick centered");
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
analogWrite(enable1, 0);
}
delay(10);
}

Can I directly swap the L298 driver with a L293D chip without making any changes to the scematic

1.Funcionara con mi FlySky FS-i6X 2.4 GHz 10CH ?

2.Alguien me puede enviar el codigo a mi correo por favor, no compila
angel.elyos@gmail.com

3. Se puede hacer para controlar PWM a través del arduino UNO ?

i'm kind of new to all this stuff but i wanna ask if i have an rc transmitter that i got with an rc car and a rc receiver circuit from a different rc car is thier a way to connect them so that the receiver takes information from the transmitter

r u dumb? the encoder and decoder circuit has to be the same. and that pic is quite useless

Only the right stick can be used for moving forward, backward, left and right! How to use the left throttle stick for moving forward and backward?

Hi, where do I have to use which Batterys? Btw nice project ;D

Hi
my rc heli 40mhz remote just stopped working so is there a way i can use any rc remote to my rc heli

hai...i am also working on this..could you just help me out..l298n is only compatible with 4 amp of current ...but i need to make a circuit for allowing 7.5 amp of current for controlling a battle bot