HOW TO MAKE A RC ROBOT CAR



Through this post you can, step by step, learn how to make a simple Remote Control Car that operates in RF (radio frequency). This is a very simple and beginner level robotic project which can be made by anyone with interest. All you need to know is the working of all integrated circuits (IC) and modules used in this robot. And there is absolutely no programming required for making this robot!
This is not exactly a robotics project. By definition, a robot is something that makes a decision based on some external parameters. But it is still something to start with.

Thing you will need:-
Chassis: It is the base frame of the car.
Most of the components that we will be using are really common and can be bought in local electronics stores. Here is a list of all the hardware items that you will need for this project.
L-Clamps (motor mount) 
Wheels
 
       Castor Wheel                                                           DC Motor


And in terms of electronics, you will need the following major components. You may also need some other basic components such as resistors and capacitors but we will discuss them as and when we get it.
RF Transmitter (Can be ordered online
along with RF receiver with cost around
Rs. 120-200) 
RF Receiver
An encoder(HT12E)-decoder(HT12D) pair ( Can be ordered online
with cost around Rs. 200)
Motor Driver (Can be ordered online with
price around Rs. 70-90)
Tactile Switch (Can be ordered online at very low price)
Batteries
How does it work:-
Here we will use a couple of ICs and a motor fixed to a chassis to make a remote control car. The brief idea is to transmit control signals through Radio Frequency and receive it through a receiver module in the car. We will have two switches in our remote control to power each motor of the car. The state of the switches (ON / OFF) is the control data. This data from the remote control is encoded before transmission, received back and decoded again to be sent to the motor drivers. This is achieved using an RF module and an encoder(HT12E)-decoder(HT12D) pair.
This RF module consists of an RF Transmitter and an RF Receiver. The transmitter/receiver (TX/RX) pair operates at a frequency of 434 MHz. An RF transmitter receives serial data and transmits it wirelessly at RF through its antenna connected at pin 4. The transmission occurs at the rate of 1Kbps – 10Kbps. The transmitted data is received by an RF receiver operating at the same frequency as that of the transmitter. The RF module is used along with a pair of encoder and decoder. The encoder is used for encoding parallel data for transmission feed while reception is decoded by a decoder.
Using the combination of different states f the two switches, you can control the direction of motion of your remote control car. If both switches are off, both motors will be off and the car will not move. If both are on, the car will move straight ahead. And to turn the car, switch ON only the motor on the side to which the car has to turn.

Understanding Datasheets

The next step is to learn how to access the data sheet for the components that you are using. Its actually not that big a deal, just Google the component name and you will find links to the datasheet.
The data sheet or spec sheet is a PDFA document that is provided by the manufacturer to give us a better understanding of how the component actually behaves. The real tricky part is to find what you are looking for in the PDF file that you just downloaded. 

Differential Drive Algorithm

There are a lot of different types of drive algorithms for driving robotic cars. One such method is the differential drive method.
It may sound fancy but that’s no big deal. We will be using only one pair of motors to drive the car. We will just have one castor wheel asides from the two motors and it will be used to give mechanical stability to the robot car.

Now the obvious question is how will the car change direction if it has only two wheels. That is when the differential drive algorithm comes in the picture. The direction control is achieved by rotating one of the wheels in one direction and the other in another direction. The following table might give you a better understanding.
Left Motor
Right Motor
Direction
Front
Front
Front
Front
Back
Right
Back
Front
Left
Back
Back
Back


RF Transmitter and Receiver Module

Now here is what the RF transmitter and receiver modules will look like. There are a variety of manufacturers so don’t panic if your modules are looking different. Even the frequency in which they communicate should not be a problem as long as both the receiver and the transmitter are of the same frequency. All modules are Pin and Pad compatible. But there are some modules that have inverted numbering, like first pin will be last pin and second pin will be second from last and so on.

Making Power Supplies for the Remote Control Car

remote control carFirst we will start with the power supply circuits. Both, the RF transmitter and receiver circuits need separate power supplies. The receiver circuit needs to be powered using 12V supply and transmitter circuit can be powered using 9V battery.
You can see the circuit for the receiver power supply on the right. Using this diagram, wire up the supply circuit. You can also add an LED via a 1k resistor to indicate the state of power supply.

remote control car

  • IC 7805 regulates the 12V supply to 5V. (you can also use a 9V supply here)
  • You can also use 0.1uF and 470uF capacitors inthe circuit.
  • And 1k resistor for status led.


NOTE: Use heat sink for 7805 because we are dropping 7v (12-5) so lots of heat will be produced to burn the regulator so use of heat sink is recommended.

Making the RF Transmitter (Remote Control)

Now for the transmitter circuit, you will have to bear in mind that this is your remote. The HT12E encoder are 12 bit encoders that is they have 8 address bits and 4 data bits. The address bits can be left open or pulled low. In the circuit below, you will see that each of the address pins (A0 to A7) are connected to a switch. So if the switch is ON then that line is connected to GND (VSS) otherwise the pin is left floating.
The TE (transmit enable) is an active low input to the IC. This enables the transmission. So when the switch connected to pin 14 is pressed, the 8 address bits along with the 4 data bits (AD8 to AD11) are serially encoded and sent out at the DOUT pin.
For our application (RC robot car) we will connect TE directly to GND as we have to keep sending the data as and when they arrive to the RC car. Unlike the receiver circuit, this does not need to have a beefy battery. You could power this circuit with a 9V battery.

Making the Transmitter (Remote Control)

remote control car
DPDT Switches for Remote Control
The transmitter circuit consists of
  1. HT12E encoder
  2. RF transmitter module
  3. Two DPDT switches
  4. Power supply circuit
  5. And a 1M resistor

You can see I have marked A, B, C, D in the transmitter circuit after the switch. The same has been marked on the DPDT Switch Diagram. Connect the A,B,C,D on the transmitter circuit to the A,B,C,D on the 2 DPDT switches.

Making the RF Receiver Circuit with Motor Driver

This is the circuit diagram for the receiver. It handles the RF reception as well as the the motor drive.
The address pin in the decoder (HT12D) behaves just like that of the the encoder. The data is received at the DIN pin from the RF receiver circuit and then this data is checked 3 times (according to the datasheet the data is transmitted 3 times and received 3 times and only if all 3 times the data is same it is decoded) and then decoded and the IC checks if the address pin connection of the encoder is same as that of the decoder. If the address configuration of the decoder matches that in in the received data (from encoder) the data is decoded and latched on to the data pins (D8 to D11).
This decoded data is then sent as control signals to the motor driver IC. L293d is a dual H-bridge motor driver to be short. It is used to drive the motor in both forward and back ward direction. 
The VT (valid transmit) pin is used to indicate if there is a valid transmission between the encoder and decoder. This pin can be left open or like in the circuit below, an LED with series resistance can be used to give a visual indication.

Making the Receiver Circuit remote control car

The receiver circuit consists of 3 ICs:
  1. HT12D decoder(Pin Out)
  2. L293D motor driver(Pin Out)
  3. RF receiver module(Pin Out)
Wire the circuit as per the above receiver schematic. There are 2 LEDs in the receiver board. One lights up when power supply is given to the receiver. The other one near the IC HT12D should light up when power supply is given to transmitter circuit. This provides you with a valid transmission (VT) when power is given at the transmitter. If not, there is something wrong with your connection or your RF TX RX module.
remote control carThe L293D is a Motor Driver IC. It allows the motor to be driven in both directions. L293D is a 16-pin IC with eight pins on each side, dedicated to controlling a motor. It can control a set of two DC motors at a same time in any direction. It has 2 INPUT pins, 2 OUTPUT pins and 1 ENABLE pin for each motor. L293D consists of two H-bridges. H-bridge is the simplest circuit for controlling a low current rated motor.
NOTE: Use red wires for positive and black for negative. If there are any problems, it will be easier to debug the circuit.

Setting up the car: You can follow the video from the link given below to get the setup.

Testing your Circuit

  • Power Circuit

The problems in the power circuit are fairly easy to detect so I don't need to get into the details. Most of the time it is short circuit due to an improper soldering or due to a bricked component. In either case the battery would heat up and the power LED would not glow.
Solution: All you have to do is power off the circuit and then test for short circuits with a multimeter in connectivity mode. If there is a short, then look for the source of the short and try to eliminate it.

  • Motor Driver Circuit

The L293d ICs are fairly easy to brick. Most of the time you will see a visible damage on top of the IC (there will be crack). If you are lucky you will be able to see the smoke too, but there are some cases when the IC is bricked without any external signs.
Solution: Give +5v and GND to the IC’s power terminals and then give the high voltage supply VCC2 to pin number 8. Also connect the enable pins of either motors to +5v so that they are always enabled. Now give Logic 1 and Logic 0 to the input of one motors and check the output pins with a multimeter. You should get VCC2 in the multimeter if you don’t get it then you have to replace the IC

  • Encoder and Decoder IC

loopback encoder decoder
This is a very uncommon fault but it has to be ruled out any way to be certain that your encoder and decoder pair are working properly. You will have to short the DOUT pin of the Encoder to the DIN pin of th Decoder. You have effectively removed the RF module alone from the circuit. This will remove any trouble caused by the RF module. Here is small video that I have made to demonstrate this concept.
Solution: Unfortunately there is not much you could do about it. So buy another one.

Description of some of the terms used:
  • VDD and VSS: This pin are used to provide power to the IC, Positive and Negative of the power supply respectively 
  • DIN: This pin is the serial data input and can be connected to a RF receiver output. 
  • A0 – A7: This is the address input. Status of these pins should match with status of address pin in HT12E(in transmitter) for receiving data. These pins can be connected to VSS or left open. 
  • D8 – D11: This is the data output pins. Status of these pins can be VSS or VDD depending upon the received serial data through pin DIN. 
  • VT: stand for Valid Transmission. This output pin will be HIGH when valid data is available at D8 – D11 data output pins. OSC1 and OSC2: These pins are used to connect external resistor for internal oscillator of HT12D. OSC1 is the oscillator input pin and OSC2 is the oscillator output pin.



Comments

  1. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

HOW TO MAKE A RC PLANE FOR BEGINNERS

THE BEGINNER'S GUIDE FOR ALL ABOUT STARTUPS