Pages Menu
TwitterRssFacebook
Categories Menu

Posted by on Dec 20, 2012 in Electronics, Robotics | 183 comments

Making an RF Car

Making an RF Car

RF controlled bot

This is an article written by a one of my readers, Yash Tambi, Core Committee Member, roboVITics. Do read this post and pitch in your comments below regarding this. Thanks!

Now a days, we see many remote controlled cars and robots, but, ever thought of making one?

RF controlled bots are the most simple of their kind. All you need are a few ICs, which are easily available in the market, a 433Mhz Transmitter and Receiver module, and the usual wires, resistors etc. Theoretical information related to this can be found in this post, where Mayank discussed about RF module interfacing.

Items required for making an RF car

Items required for making an RF car

The ICs we will be using are

  • LM7805 as voltage regulator
  • HT12D, HT12E for wireless control
  • L293D for driving motors

Before making the circuit permanent, it is always better to make it on a solder less breadboard and check for any rectifications in the circuit if needed.

Using the 7805 – 5V Voltage Regulator

Using the LM7805 IC is quite simple. It is used to convert the input varying supply (usually 9-18 volts) to a stabilized 5 volts supply, which is used to drive the circuitry.

LM7805 Pins

LM7805 Pins

Using the L293D – Motor Driver IC

We start with the L293D. L293D is a popular motor driving IC. It is a 16 pin IC. The IC has 8 pins on both the sides. It has 2 enable pins, 1 VSS pin, 1 VS pin, 4 ground pins, 4 input pins and 4 output pins. Though not required here, but in case you wish to learn how to interface L293D with a microcontroller, you could refer to this post by Mayank.

Following is the pin diagram of L293D –

L293D Pin Configuration

L293D Pin Configuration

The descriptions of the pins are as follows:

  1. Enable – the enable pins, when are given true, (i.e. 1) then they enable the respective part of the IC. The enable 1 chip enables the Left part of the IC for inputs and outputs, and so does the Enable 2 does to the right part of the IC.
  2. VSS – this pin is to be given an input of 5 volts. This is used to power up the chip for its operations.
  3. VS – this pin is given the voltage that we have to supply to the motors. This voltage comes out through the output pins. Due to the gates used in the IC, the output is usually 1.8 to 2 volts less than the Vs.
  4. Input – the input pin decides whether output has to be given to he respective output pin or not. When the Input is true, then output is also 1 in the respective output pin. When input in the Input pin is 0, and then output in the respective output pin is also 0.
  5. Output – the output pin is connected to the terminals of the motor. The input pins, as stated above, control its output.
  6. GND – these pins are the ground pins, or, in other words, Zero.

Note – When no input is given to the inputs pins (i.e. they are left floating) or 1 is given, there is an output from the output pins. Its only when 0 (ground) is given to the inputs, when the output is zero for the corresponding output pin.

The L293D IC can be used to control a maximum of 4 motors simultaneously. When 4 motors are connected to the IC, then for operation, -ve of each of the motors is connected to the GND, and the +ve terminal to the outputs. For bidirectional control, you can connect only two motors simultaneously as per the circuit diagram below:

L293D Based Motor Driver

L293D Based Motor Driver

This is how the circuit looks when soldered on a PCB —

L293D Motor Driver Circuit Soldered on PCB

L293D Motor Driver Circuit Soldered on PCB

Using the HT12D and HT12E for Wireless Control

HT12E Encoder

The next IC is HT12E. The HT12E is an encoder. It converts digital signals into suitable form to be transmitted through EM signals. It is an 8-bit Encoder. The HT12E is usually used for 433 MHz wireless modules. It is an 18 leg IC.

The pin configurations are as follows:

  1. HT12E Pin

    HT12E Pin

    A0: 7 – these are the address pins.

  2. GND – this is the ground pin. This pin should also be connected to the –ve of the battery.
  3. Vcc – the VCC pin is where we need to supply the input voltage for the working of the encoder. It is used to power the IC.
  4. Osc1: 2 – these pins are the oscillator input and output pins. For the ordinary circuit, they are connected to each other with the help of an external resistor.
  5. TE – this is the transmission enable pin. When this is given true, then data transmission starts.
  6. Output – this is an output pin. The data in EM signals is given out from this pin.
  7. AD0: 3 – these are the data/address pins.

Note – How does a transmitter know to which receiver it has to send the signal to? It depends on the configuration of the address pins on Both the ICs. For the Tx-Rx pair to work, they should have the same configuration of the address pins.

The address pins can either be grounded, or can be given Vcc individually. So the corresponding pins on the Tx and Rx have to have the same configuration.

You can also use a gamepad for the inputs. Remember, gamepads are designed to be active low in configuration i.e. when you press a key in the gamepad, it sends out ‘0’ and when left floating, it gives ‘1’.

HT12D Decoder

The next IC is HT12D. The HT12D is a decoder. It decodes signals into suitable form to be transmitted through EM signals. It is an 8-bit Encoder. The HT12D is usually used for 433 MHz wireless modules. It is an 18 leg IC.

HT12D Pin

HT12D Pin

The pin configurations are as follows:

  1. A0: 7 – these are the address pins.
  2. Vss – this is the ground pin. This pin should be connected to the –ve of the battery.
  3. VDD – the VCC pin is where we need to supply the input voltage for the working of the encoder. It is used to power the IC.
  4. Osc1: 2 – these pins are the oscillator input and output pins. For the ordinary circuit, they are connected to each other with the help of an external resistor.
  5. DIN – this is the Data input pin. The data input from the receiver module is fed in this pin.
  6. VT – this is an output pin. This pin gives the output as soon as any signal s received by the receiver.
  7. D8: 11 – these are the data pins.

Now a natural question arises… Why can’t we directly use the output pins from the decoder to run the motors instead of  using another IC?

Following are the reasons —

  1. Through L293d, we can give the desired voltage output to the motors.
  2. The output from the decoder has a very low current output, which is insufficient to drive the motors.

The output pins of the decoder are good only to be used as switches.

Note For coupling of two ICs, they have to be commonly grounded to the same source, otherwise they will not work.

Designing the Transmitter Circuit

  • As stated above, the address pins can be configured as per choice.
  • The Ground pin needs to be grounded.
  • The Vcc pin needs to be given regulated 5 Volts.
  • The output pin is connected to the data pin of the Tx module.
  • To enable transmission, the TE pin is grounded.
  • Resistors of 1.1MΩ are connected across Osc1 and Osc2 pins.
  • Pull-up resistors of 100KΩ are connected across D8, D9, D10, D11 pins. The other end of the resistors may be either grounded, or given 1, or left floating depending upon what we want as the default value from the output pins of HT12D.
  • Suppose we ground the resistors’ other ends, then, by default, all the output pins in the HT12D will receive 0, and similarly vice-versa.
  • Switches may be used in between the data pins and the resistors.

You can also refer to this circuit diagram —

RF Transmitter Section

RF Transmitter Section (Click to Enlarge)

Designing the Receiver Circuit

  • The address pins must be given the same configuration as of those given in the transmitter circuit.
  • The VSS pin is to be grounded. Similarly, a 5v regulated output should be given to the VDD pin.
  • The D8, D9, D10, D11 are the outputs corresponding to those in the transmitter circuit.
  • A resistance of 51KΩ should be applied across Osc1 and Osc2 pins.
  • The data output from the receiver module is to be connected to the DIN pin.
  • The VD pin gets ‘on’ whenever the receiver receives a signal. It may be left unconnected.

You can also refer to this circuit diagram —

RF Receiver Section

RF Receiver Section (Click to Enlarge)

Upon soldering on a PCB, the circuits look like this —

RF Receiver Circuit Soldered on PCB

RF Receiver Circuit Soldered on PCB

Tire and Motor Selection

Now coming to tire and motor selection. This is a very basic bot, and thus one can use any tire or motor of their choice! :)

And it’s done!

Photo

My finished bot looked like this!

Final RF Bot

Final RF Bot

Video

And that’s it for now! Any kind of queries and discussion, please leave a reply below and I will be more than happy to get back to you! :) You can also subscribe to maxEmbedded for more interesting articles!

Thank you.

Yash Tambi
yash@delta.robovitics.in

183 Comments

  1. good morning sir
    i’m not perfect in this area but want to make this .
    please tell me diode value used in them .

    • Hello Anurag!
      You can use any of the commonly available diodes, like 1N4001 or 1N4007. Diodes are just to prevent back EMF, to save the IC from any possible damages. I had tested without the diodes, and it the circuit worked perfectly!

  2. Hello yash,
    its been great to see the comments here, iam making a same sort of thing in which i have completed the pcb using RFmodule, HT12D and HT12E but it is not working properly i mean when i press any switch all the led’s remains glowing and when again if iam pressing it is off when i release the switch its on. the difference between your circuit diagram and my circuit diagram is the values of the resistors i have used 750k and 33k respectively. electronic circuits are just the hobby for me i love it a lot. please help me, pls let me know where iam going wrong. thanks

  3. Dear Mr.Mayank Prasad,
    Myself Akheel, i have gone through your website and very happy to see the comments of the people. Iam not a engineering student but iam a freak of electronic circuits, as i love electronics like any thing i have done a electronics course just as it is my hobby.
    coming to the point, I have created a circuit for RC robot by searching the web. even after doing every thing as per the website still my circuit is missing some where.

    the Circuit which i have created is little different as i have seen at your website almost every thing is OK but the resistor values and some connections are different as i have used RF modulee, HT12D, HT12E, 750k & 33k Resistor at ossilator etc..

    the problem is whenever iam powering up the circuits the leds are glowing and when iam pressing the push botton led OFF when iam releasing the botton it is ON i mean it is working opposite way. it should be ON when i press the botton and OFF when release.

    Iam confused please help me rectify this problem and i request you to give me complete details from start to end including the components to be used and L293D (motor driver).

    Waiting for your response.
    Thanks and regards.

    • Hello Mr. Aqeel!
      When I had first made the circuit, i had also faced the same problem. This is sometimes due to the unreliability of the RF Module (interference issues).
      Are you using 433MHz RF Modules?
      You can try one thing, try connecting the output of the Encoder (pin 17) directly to the input pin (pin 14) of the Decoder. Also, commonly ground both the ICs.
      Revert Back once you try this! :)
      As far as L293D connections are concerned, they are given on this post. For any other specific queries, you can always comment! :)

      • Mr.Yash,
        Thanks for your reply, infact i have done the things which you have told but there is no progress it acts the same there is no change even after making common ground and connecting pin 17 and 14 directly. what could be the issue. pls reply

        • Mr.Yash,
          Can u please send me the pcb layout for the complete project if you have?

          • Sorry, but i had not made the pcb Schematics. But they are the same aa the ones posted above. Try changing the resistor values at the oscillator pins to those mentioned above, and try again! Hope this works! :)

      • Dear Mr.Yash,
        When ever iam powering the transmitter, receiver is getting 5v at all 4 outputs even though iam not pressing the button. please tell me what should be the voltage at output stage when it is idle and what will be the voltage if it is pressed?

        • This problem might be due to wrong resistor combinations at the oscillator pins. Try the combination mentioned above in the post. This might sole your problem!
          The output voltage at idle stage depend on what you have defined as the ‘idle’ stage at the encoder. What I mean is that If you have put external Pull-Up resistors at the input pins, then you will receive ‘Vcc’ at the output pins at the idle state, Else you will receive ‘0’ at the output pins.

    • data pins of encoder are active low.Try using an inverter IC (74LS04) problem solved!…

    • data pins of HT1E encoder are active low.Hence they are ON when grounded.Try connecting the data outputs of the decoder to an inverter IC(74LS04).You will get the desired output

      • Thanks Pavan for the information! :)

      • I never used this ic, can u pls let me know the connections for this or shall i replace the encoder or decoder ic??? iam not getting the exact problem weather the problem is with module or encoder/decoder or my connections. pls let me know…

        • Dear Aqeel, Did you try after changing resistor values at the Osc pins to those mentioned above?

        • Yes i did change 47k and 1m resistor as i was not getting 51k and 1.1m

          • You will have to use the exact values of the resistors. For 51k, Try using two 100k in parallel, in series with a 1k resistor.
            For 1.1M, try using 1M and 100k in series.

        • Inverter IC:
          http://student.olivetcollege.edu/moladele/Board4_files/image008.jpg
          PINS 1,3,5,9,11,13 are inputs and PINS 2,4,6,8,10,12 are outputs.Connect the data output pins of decoder (10,11,12,13) to any four input pins of inverter IC and take outputs from corresponding output pins of inverter.also connect Vcc and GND for inverter IC.

        • Mr.Yash,
          Thanks for your help, i have successfully completed the rc car with the help of your guidence.

  4. Pull-up resistors in the tx diagram shows 1k but in the theory it says 100k. Which one is correct ?
    Thanks.

    • Hello Ksheer!
      the input pins in the ICs are mostly digital: i.e. they either accept high(1) or low(0). A threshold level is there in most of the ICs, beyond which the input is read as 1, else it is read as 0. The external pullup resistors are used to create that potential difference. Both, 1k and 100k are able to create the potential difference which is more than the threshold. Hence, both can be used! :)

  5. sir
    i am worried about the battery connection in l293d. where do the negative connect of 12v vss connection . and where does the gnd connect

    • Negative and ground can be taken as the same in this case. You have to connect the -ve of the battery to the Gnd pins of the L293D, as well as that of the decoder.

  6. sir
    if me supply 18 v to l293d vcc2 how munch volts come out for the motor with connection of gnd ?and i am using 12v dc motor ?

    • Hello Ciril! The output from the output pins of the l293D is around 0.7 volts less than what you supply at the VCC2 pin. So the output should come around 17.0-17.3 volts.

    • Yes, definitely! The minimum input voltage at the VCC2 pin for L393D is around 4.7 volts. So you can surely use it for a 12v motor!

    • Their uses are given in the post above.

  7. Dear Mr.Yash,
    Can we increase the current through transistors for example i have a Power Supply Unit of 12v 1amp and i want to pull 12v 5amps from the same PSU if it is possible which transistor i need to use and there connections.

    • Sorry, but that is not possible. You will have to use another PSU. An SMPS would suit our purpose.

  8. Dear Mr.Yash,
    I have made the circuit successfully its working good but i want to know some more details on this.
    1. I have made the entire project but the thing is the RF signal is very poor how to increase the wireless signal strength? to use it from some distance.
    2. The motors which i have used is not that fast (speed) is it due to L293d or the rpm of the motor? i want the high speed motor, so what should be the motor rpm u recommend? . i have seen some circuits on google they are using relay instead of L293D what will the benefit of using relay instead of ic??
    3. If i want to increase the channels (8 channels) which ic to be used and there connections.

    Thanks you very much for ur support till now.

    Aqueel

    • Dear Mr. Aqeel
      I am glad you have completed the circuit! :)
      Regarding your doubts:
      1. To increase the signal strength, you can increase the number of turns, and the total length on the antennae you are using, at both the ends. Increasing the number of turns will result in a stronger field, and thus effectively more power would be transferred to the signal, hence increasing the range.
      2. L293D is a dual H-Bridge device. Since it has diodes inside it, the effective voltage transferred to the motors is around 0.7V lower than what we supply at the Vcc2 pin. Also, there is a loss of current through the semiconductor.
      One thing to note here is that he torque of the motor depends on the current through it, not on the voltage, while speed depends on Voltage. L293D has its current limitations. It can tolerate input currents of upto 1 Amps.
      It might be the case that you are supplying, say 12V to a motor rated at 12V, but still not getting the full RPM. That can be because the load on the motors might be too high, and it is unable to bear it.
      The advantage of relays over L293D is that whatever input Voltage and current you apply, the complete is transferred to the motor, and hence there is almost no loss. Losses due to heating are also very less, almost nil.
      What is the RPM of the motor you are using? Also, what is going to be the exact use the circuit you have made? This is so that I could recommend you appropriate motors.
      3. If you want to increase the number of channels to 8, you can use HT640 Encoder and HT648 Decoder.

      You are welcome! :)

      • Dear Mr.Yash,
        thanks for your reply, i dont know wt turns ur talking about as i have not done any turns, only i have connected a antenna through a normal wire, please let me know how to make turn and what guage of wire to be use.
        I dont know what is the RPM of the motor is but its a johnson company make. iam using this in a toy car.
        Please provide your email id so that i can send you the pictures also it will be easier you to understand my purpose.

        Thanks and regards.
        Aqueel

        • Make the antennae of the shape of a solenoid (wires of a telephone). Those are the turns I am talking about.
          My email id is yash@delta.robovitics.in

          • Dear Mr.Yash,
            Kindly let me know how to connect that solenoid turns to antenna.

          • Dear Mr.Yash,
            Kindly let me know how to connect the antenna and the wire turns.

  9. hi,
    please send source code for this..please send a receiver circuit for this..how to connect a microcontroller and a receiver

    • Hi Arun

      In general we have to connect the data out of the receiver to the Rx of the microcontroller.
      Just check the pin diagram of both the devices.
      But if you want the exact details then mention the details of the receiver and the microcontroller
      you are using.

  10. I wanna switch on or off the home appliances..wat i have to do

    • Hello Mohamed!
      One simple thing you can do to control your home appliances wirelessly is that you can interface the RF module, along with the decoders with the Switch boards in your room. Use DC Relays instead of normal Press-switches to switch the plugs On/Off.

  11. yash i am confused about one thing. how you hav connected L293D ic with decoder? please send me the pic or scematic of it on ma mail id that is : nabilkunda@gmail.com
    thank You

    • Hello Nabil. I have simply connected the output pins of the decoder (10,11,12,13) to the input pins (2,7,10,15) of the L293D. There isn’t much circuitry involved.

      • thnxx manh…

  12. my circuit works even without antennas. however, wen i place the breadboards( one for rx and one for tx) flat, the vt pin goes low. i have to adjust the relative position of the breadboards the get the vt pin high again. i guess this is because of electro magnetic interference with the rest of the devices of the board. am i right? is this normal?

    • Hello Rahul!
      Sorry for the late reply, I had missed your comment :(
      Yes you are right. We have antennas, and usually coiled ones so that we get a stronger signal, and hence the chances of interference are lesser.

  13. hi every body, I am asking every body if any person is expert Embedded C progamming so please start this tutorial in briefly ………..

  14. hey this is priyanka i m also trying this ckt using 434 rf module ht12e,ht12e and l293d.. when i first made a check with the ckt.. then the led glows but the motors didn’t worked and now 2nd time when i checked it again then the led too is not glowing. what would be the reason of this.. and with led i have used the resistor of 100 ohm in series with it.

    • Hello Priyanka!
      The reason can be one of these listed below:
      1. Insufficient power; replace your batteries with new ones and try again.
      2. Connection issues; make sure the circuit is correct, and re-connect the circuit if possible.
      3. RF Module issues; Though this is very rare, but this can be one of the reason. Directly connect the output of HT12E to input of HT12D, and commonly ground them.
      4. Common grounding; Make sure that you have commonly grounded the HT12D and L293D.

      Try these and revert back!
      Sorry for late reply!

  15. Hello yash
    i am working on the same project..but instead of controlling car through remote i m doinf with PC ..i am getting some problem..
    i am using Rf transmiter connecting to MAX232 module and RF receiver directly to microcontroller..i.e data pin of receiver to port 3.0 of microcontroller…but whever i am sending data from pc for moving(eg-A from move forward…) but microcontroller is not reciveing the code…
    i tried to connect data pin of reciever to serial port RXD pin..but its not reciveing the data…can u help me please….

    • Hello Laxman!
      I am extremely sorry for the delay in response as I had missed your comment.
      You have to connect TxD to RxD and likewise, RxD to TxD.
      First, make sure that the code you are using at the receiver end is correct. How? by simply removing the RF Modules and directly connecting the Microcontroller to MAX232.
      Do revert back with your findings.
      Yash

  16. HELLO SIR;
    I MADE RC CAR SUCCESSFULLY THANKS A LOT FOR YOUR HELP AND SUPPORT.

  17. sir
    Is there programming for tx. & rx.

    • Hello Nilesh!
      No, these Encoder/decoders are non programmable.

  18. Hello mr. yash I am new for this site and for u. My name is Gaurav Chouhan. I m an Engg. student of Mechanical but have more interest in Electronics. I had made this one also with HT12E, HT12D, 74LS04, L293D IC’s and 33k & 750k resistors, but it is not working and there r lots of problems , like;
    1. The motors r not run, sometimes run only one motor without switch ON.
    2.Sometimes transmitter can’t get signal and more n more other problems.

    • Make sure that your Connections are proper.
      Use the resistors exactly as mentioned in the tutorial, as they are for baud rate settings. If the baud rate is not same for both the ICs, communication wont happen (you could use other combinations as well.. just check out the data sheet, but its recommended to use the combination mentioned).
      For L293D IC, the inputs are active low, so make sure you are giving the correct inputs.

Leave a Reply

%d bloggers like this: