RC Car Hack - Bluetooth Controlled Via Android App

19,930

327

21

Published

Introduction: RC Car Hack - Bluetooth Controlled Via Android App

About: I'm an enthusiast of robotics :)

I'm sure that each of you can find at home unused RC car. This instruction will help you change your old RC car to original gift :) Due to the fact that the RC car I had was small in size I have chosen Arduino Pro Mini as a main controller. Another important module that I've used in this project is TB6612FNG dual motor driver carrier. This motor controller has sufficient range of acceptable input voltages (4.5V to 13.5V) and continuous output current (1A per channel). As a bluetooth receiver I used a popular inexpensive module HC-06. Additionally, you can use LEDs as front and rear lights of the car.

Components of the project:

  1. RC car (may be an old and broken)
  2. Arduino Pro Mini 328 (3V/8Mhz) x1
  3. TB6612FNG Dual Motor Driver Carrier x1
  4. HC-06 bluetooth module or similar x1
  5. Leds: 2x red and 2x white
  6. Resistor 10k (required for leds) x4 or 10k SIL Resistor Network x1
  7. Breadboard (half size) x1
  8. Jumpers and cables
  9. AA batteries x4

Step 1: Connection of the Modules

The way of connecting Arduino Pro Mini with the other modules is given below. Don't forget to connect the supply voltage to each module (VCC, GND).

1. Bluetooth (e.g. HC-06) -> Arduino Pro Mini (3.3V)

  • RXD - TXD
  • TXD - RXD
  • VCC - 3.3V from Arduino Pro Mini (VCC)
  • GND - GND

2. TB6612FNG Dual Motor Driver -> Arduino Pro Mini

  • AIN1 - 4
  • AIN2 - 7
  • BIN1 - 8
  • BIN2 - 9
  • PWMA - 5
  • PWMB - 6
  • STBY - Vcc
  • VMOT - motor voltage (4.5 to 13.5 V) - 6V from RC Car battery
  • Vcc - logic voltage (2.7 to 5.5) - 3.3V from Arduino Pro Mini (VCC)
  • GND - GND

3. TB6612FNG Dual Motor Driver -> DC Motors

  • A01 - drive motor A
  • A02 - drive motor A
  • B01 - steering motor B
  • B02 - steering motor B

4. LEDs -> Arduino Pro Mini

  • front right led - 2
  • front left led - 3
  • rear right led - 14
  • rear left led - 15

Step 2: Arduino Code

The full code for this project is available at GitHub: link

The Arduino program checks in the main loop - "void loop()" whether the new command (character) has been sent from Android app via bluetooth. If there is any incoming character from bluetooth serial the program starts execution of "void processInput() " function. Then from this function depending on the character a specific control function is called (e.g. for "r" character function "void turn_Right()" is called).

If you are going to use Arduino motor shield (L298) this link can be useful for you

Step 3: Android App

My Android app allows you to control any robot equipped with an Arduino board via bluetooth. You can also independently control the two motors PWM channels (a pair of motors).

The unique character is assigned to each button of Android app as shown in above figure. You can edit Arduino code and use my Android app to control your own device (not only this RC car).

You can download my Android app for free from Google Play: link

How to use the Android app:

  • tap menu button or 3 vertical dots (depending on the version of your Android)
  • select the tab "Connect a device"
  • tap on the "HC-06" tab and after a while you should see the message "Connected to HC-06"
  • after connecting, you can control your car
  • if you don't see your bluetooth device HC-06 tap "Scan for devices" button
  • on the first use pair your bluetooth devices by entering the default code "1234"

If you would like to see my other projects related to robotics please visit:

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Microcontroller Contest

      Microcontroller Contest
    • Casting Contest

      Casting Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    21 Comments

    ya , you have to download the arduino desktop app to programme the arduino

    Hi, I use the Arduino IDE and USBasp programmer to program Arduino Pro Mini 328

    CAN U GIVE ME UR WHATSAPP NO. ?

    hey bro i dunno why but my circuit wont budge i am using a different motor driver tho it is an L298n motor driver (*** help this newbie plzz broz!***) secondly i am detecting no voltage changes in the arduino outputs 9,8,7,4 and for pmwa and b i havent connected them also my motor driver dosent have any stby port HELP!!!

    Hi,

    I've just added detailed instructions on how to use the Android app in the last step ;)

    can we make this connection of modules to arduino uno and channel relay module or any other module ?

    for motor shield l298

    it shows a compiling error that

    serial1 is not declared in this scope

    1 reply

    Coz this example for Arduino motor shield refer to Arduino Leonardo (not Pro Mini)

    Can we use a different motor driver
    Like H - bridge dual motor driver L293d or l298d ?

    1 reply

    Sure, I've added a useful link in step 2: Arduino Code. There is sample code for Arduino motor shield (L298)

    Hey sheraz14 ! My circuit worked ! However my motor got too fast (high current) that it rebooted the whole board :D

    2 replies

    Try adding a small voltage regulator to the circuit and you shouldn't have that problem.

    Hi, you can use a separate battery to power the DC motors (e.g. LiPol 7.4V if the nominal voltage for your motors or rc car is 6V, but please remember that the voltage increasing will shorten the life of the motors and you do this at your own risk).

    Hi ! Im doing a similar project as you but i have problems trying to increase the speed of my motor. Do you have any advice for me ?

    1 reply