Build Mini Rc Car, controlled by Android mobile using HC-05 Bluetooth Module & Arduino.

This is my first blog please do bear with me :)

Well i have this bad habit of  playing with all kind of  small cars like hot wheels, RC car ...etc, for me it looks like a good habit as it keep refreshing my child wood memories, when I saw my nephew 3-4 cars broken down and made there way to the trash, I thought of using them and rebuilding them.

In this blog, I will explain to you how to build Mini Rc car step by step which can be controlled by Android mobile.




Step 1: Getting Started

Software required.

Hardware required

    Circuit diagram
    Connections:

    Step 1: Connect Ground and 5V from Arduino to Bluetooth VCC and GND.

    Step 2: Connect the pin 9 & 10 from Arduino to the Dc motor 1, which is used for moving front and back. (Note: use motor driver to increase your motor speed)

    Step 3: Connect the pin 11 & 12 from Arduino to motor 2, which is used for turning right or left. (Note: use motor driver to increase your motor speed)

    Step 4: Connect the HC-05 Bluetooth module to your Arduino as shown in the above figure. As it takes 5v to run, you can supply 5v from Arduino or from Motor Drive, better supply from motor drive. (Note: if you face any problem Supply the power to HC-05 from Motor Driver )

    Bluetooth<-->Arduino
    VCC <--> 5V
    GND <--> GND
    TXD <--> Pin 0 (Rx)
    RXD <--> Pin 1 (Tx)

    (TX)Transmit and (RX)Receive refer to each device, therefore a transmission coming out of TXD pin of the Bluetooth module must be received by Arduino on the Rx Pin 0; similarly, a transmission going out of Arduino Tx Pin 1 must reach the HC-05 Bluetooth module on its RXD pin.

    Step 5: Now the tricky part is connecting the Batteries, I used 12V Batteries, from which I have made two separate connection, one for Arduino and the other for Motor Driver. As Arduino runs between 6v - 12v and even the motor driver runs on 6v to 12v.

    Step 2: Loading the Code into Arduino Board

    Arduino code: Download the code from GitHub

    Step 1: Download the above code from GitHub and paste it into your Arduino IDE.

    Step 2: Select the Board, go to Tools  ->  Board -> Select the Board which you bought ( Uno / Leanardo...etc)

    Step 3: Select the Port, go to Tools  ->  Port -> Select the Port which your Arduino is connected to  ( Uno / Leanardo...etc)

    Step 4: Compile the code by clicking the tick mark, which is below the file in Arduino IDE. once it compiled successfully, you can upload the code to your Arduino Board.

    Step 5: Upload the code to the board by clicking upload button which is next to compile button (->)


    Step 3: Installing the Android app




    Android Apk: Download the code from GitHub

    Step 1: Download the Android code from the above link and import the project in the android studio.

    Step 2: Click on run and install the app on your mobile.

    Step 3: Once it's been installed , open the app and enter the Bluetooth ID, if you don't know the ID of your Bluetooth, go to Bluetooth setting from mobile and search for the Bluetooth devices there you find the ID of your Bluetooth which will be like "98:D3:31:30:06:09".

    Step 4: After entering the Bluetooth ID, click on connect button.

    Step 5: Now you are ready to drive. click on Accelerate or Reverse, tilt your mobile to turn right or left Motor 2 is used for turning right or left.

    Finally, we are done with our stuff. Hope you guys like it.
    Enjoy..!



    Comments

    1. you need to use any of the motor controller.give the 12v power supply to that. and from there connect your motor to that.

      ReplyDelete
    2. How could we modify the code to apply different PWM values (from 0-255)i know that should be using analogWrite(), but how should we define the receiving data ?

      ReplyDelete
      Replies
      1. I have updated the blog , please go through it . Even you can download the android code and modify yourself from git hub.

        Delete
    3. This comment has been removed by the author.

      ReplyDelete
    4. I have updated the Blog now , please check it , it will solve your problem .

      Dual Motor driver , it has two input and two output and Vin of 12v. give the motor1 pins from arduino and motor2 pins from arduino as Input to Motor driver and the out put from the motor driver will go to respective motor.

      ReplyDelete

    Post a Comment