Arduino 4WD bluetooth controlled rover

This is a simple 4WD rover i made with Arduino.
the rover is controlled with an android phone or tablet over bluetooth. With that app you can control speed (using Arduino's pwm) , run it with the accelerometer and many other things.

The Arduino sketch is fully commented and open source, also the communication protocol (developed by me) from the app to Arduino is explained in the sketch .

Knowing the protocol you can use the app to control other robots...

Step 1: What You Need...

In order to build your own Arduino 4wd rover you should buy all the needed parts from your preferred store.

Most of them can be bought on ebay or amazon or other online electronics/hobby stores.

I try put some links but they could be outdated and not working, in this case try search the part manually by name. Sorry for that.

Anyway it’s a very simple robot kit usually made by a chassis, four Dc (up to 12V) motors with gearmotor and four wheel.

The parts used are:

  • 1 pcs of chassis complete with 4 DC motors, usually called Arduino rover 4wd, for example these:


http://www.robotik.center/index.php?route=product/... from http://www.robotik.center/




Also a search on Ebay with the '4WD chassis robot arduino' keywords will return a lot of results.

  • 1 pcs of Arduino uno R3 or Arduino Leonardo board
  • 1 pcs of Bluetooth module HC-06 with adapter board or equivalent (must be SLAVE model), for example this:


  • 1 pcs L298 bridge dual motor controller board, for example this:


There are many different of these but the pinout is 99% the same for all.
Just connect wires to the right pins based on the board diagram. with this tutorial you can find the datasheet of the one I used (see next step).

  • 3 pcs 3.7V 1200mA (or more) Li-Ion rechargeable battery AA size or 11,1V 1200mA LiPo battery pack.
    if you use the AA size battery you can put them in a battery holder.
  • 1 pcs Jack plug for Arduino power plug.
  • 1 pcs 1Kohm resistor.

Step 2: The Schematic Diagram...

This is the schematic diagram for wiring the rover, please follow it while assembling it in the next step...

The L298 pdf will help you in case you have a different board pinout.

Step 3: Assembling the Rover…

Follow the numbered images and the short video for the assembling order (some things may differ depending on your chassis…).

  1. Start with the motors on the chassis and wheels (image 1).
  2. Mount the L298 motor controller board and wire motors to it.
    Also add 2 wires to power the board (image 2 and 3).
  3. A piece of flat cable will connect the board to Arduino, you need only 6 wires but I left some other free for future use (maybe lights or ultrasonic sensor…).
    Also wire the jack plug , pay attention to polarity, the central pin is positive (+11.1V from battery) (image 4).
  4. Place the battery holder (or the battery pack) in the front of the rover, fix it with a piece of double-sided tape. If you choose the AA size battery it’s simple to remove them individually for recharging.
    If you choose a battery pack then could be a good idea to put a connector between the battery pack and the rover (image 5).
  5. Place the top of the rover…the flat cable and the jack plug passes through the hole (image 6)

  6. Assemble the bluetooth module with the resistor using a piece of flat cable (usually provided with the module). Cut the RXD wire (not the pin!) and solder the resistor in series to the wire.
    Seal with a heat-shrinkable tube (image 7).

  7. Place the Arduino board and the module. Connect the flat cable as in the schematic.
    Fix the Bluetooth module with a (very) little piece of double-sided tape.
    Connect the power jack to Arduino (image 8).

Step 4: The Arduino Sketch...

Open the Arduino sketch and upload it to an Arduino uno R3 or Leonardo Board.

Connect (almost) the Bluetooth module HC-06 as in the schematic (remember the 1Kohm resistor! on RXD pin of the module).

Power on the Arduino board and run the serial monitor, the string ‘Connected to: ArduinoRover’ should appear (maybe not for Leonardo board) if the communication speed already match.

In the serial monitor set the communication speed to 57600 baud to match the line with Serial.begin(57600) and the NL (New Line) terminator.

From the serial monitor write the string: ‘Echo on’ and click Send, you should see ‘Echo is on’, this will echoes the next commands to the screen.

From the serial monitor write the string: ‘Device’ and click Send, you should see:

‘Connected to: ArduinoRover’

Now send the string ‘AT’ , you should see ‘OK’ after about one second, this mean your Bluetooth module is correctly connected and the baud rate match the one set in the sketch at: BtSerial.bregin(9600).

To change the Bluetooth module name send the string ‘AT+NAMEArduino’ (for example), you should see:

'OKsetname' in about a second.

Now try find the Bluetooth module with your smartphone or tablet and pair with it, insert the pin, usually 1234 when asked for.

Complete the project (see assembling the rover) if not already done.

Step 5: The Android App...

Now your Rover is ready to run!

You need the FREE android app IRacer & Arduino BT controller from the playstore here:


The app allow you to drive the rover with the four way joystick in portrait mode or with 2 joystick (multitouch) in landscape mode.

Open the menu (the gear button), choose settings and select the device Arduino Rover.

From the menu, choose connect and select your already paired bluetooth module name from the list to connect to.

In the settings menu there are a lot of options (backgrounds, speed limits ...) to play with, enjoy :)

<p>If only the wheels on the right part are turning , what you think may be the problem?</p>
<p>Hi Davide, nice work...<br>What you used to do the app in android?</p>
<p>Hi Peppers,</p><p>i'm using B4A development tool:</p><p><a href="https://www.b4x.com/b4a.html" rel="nofollow">https://www.b4x.com/b4a.html</a></p><p>Bye </p>
<p>thank you very very much</p><p>very very much</p><p>without you i couldnt make it</p>
<p>Hi, </p><p>solved? </p><p>Does it work?</p>
hi<br>yes it worked very well <br>sorry for the late reply
<p>Perfect Nidulaw, enjoy :)</p>
<p>hi </p><p>can i use a L298 driver module except a dual motor driver</p><p>thanks</p>
<p>Hi Nidulaw,</p><p>i think yes but i'm not sure without seeing a schematic of your module.</p><p>Of course you must match connections from your L298 driver board and the board i used.</p><p>Let me know if you need help (in that case please provide a link to a schematic of your board).</p><p>Bye</p>
<p>It seem very similar to the suggested one but can't help with photo... i need a schematic. Where did you bought it? There is something written on the pcb? Name... model.. ?</p>
<p>Hi all other stuffs are ready but i have motor driver shield not this module so can you please tell what are the changes i have to made in the code</p><p>THANKS inadvance</p>
<p>Hi,</p><p>you can find the datasheet of the motor driver i used on step 2 of this instructables.<br>you should adapt pinout of this motor driver to your motor driver.</p><p>I can't be more specific without seeing your motor shield specifications/model, so please post a link of your product or a datasheet/schematic in pdf format.</p><p>Bye.</p><p>Davide</p>
<p>New V2.10 Arduino code:<br>-Improved Bluetooth buffer<br>-Arduino can send messages to the app (requires latest version of the android app)</p><p>Enjoy :)</p>
<p>Hi AppsByDavideV, i was following your instructions and i have problems setting the BT connection up. The code was uploaded correctly but when i type AT on the serial monitor i do not get any response, just &quot;You sent: AT&quot;. What can i do to fix this?</p>
<p>for hc-05 the default baude rate for communication is 9600 and to enter into AT mode the baude rate is 38400 try changing the baude rates. Btserial.begin(38400).</p><p>In hc-05 if we want to enter into AT mode we should enable pin 34. we can do that in two ways</p><p>If your Hc-05 has a small button then hold pressing the button, by pressing the button pin 34 is HIGH, now power on the module and leave the button, the module will enter into mini AT mode. In mini AT mode, only some commands work like AT+VERSION etc. However, you can press the button and send the command and leave the button. In this way, you can send all AT commands.</p><p>The other way to enter into AT mode is by enabling pin34 by connecting EN or Enable pin of your hc-05 to vcc that is 3.3v or if your module supports 5v. The new factory out modules support upto 5v.</p>
<p>Hi EstebanCV,</p><p>wich BT module did you use? Are the rxd and txd pins connected in the right place ? be sure they aren't exchanged togheter. </p><p>Also when sending AT commands the module must not be connected over bluetooth.</p><p>You can try to change the line:</p><p>BtSerial.bregin(9600). </p><p>with a different speed, maybe your module is set to another speed.</p><p>Last: can you post a detailed image of the bluetooth module you are using?</p><p>Bye</p>
<p>I have been trying change both lines of code:</p><p>Serial.begin(57600);</p><p>BtSerial.begin(9600); and nothing happens</p><p>The module just keeps on blinking rapidly.TThe module that i am using is the HC 05 GW 040 which works as slave as well as master but i have no answer.</p>
<p>Yeah, I too got the same problem. Change serial.begin also to 9600, then it works. i.e Serial.begin(9600)</p>
<p>Hi EstebanCV, as far as i know the HC-05 and HC-06 have different communication protocols. This could be the problem. The project was developed with an HC-06 and actually works. I'm sorry i haven't an HC-05 to test and adapt the sketch.</p><p>You can try change the BtSerial.begin(9600); up to 115200 bps one step at a time but i think it's not enought: perharps the module waits for some extra characters</p><p>Attached the serial monitor result for the project using the HC-06 and the android app connected to arduino. Also find the pdf that explain the differences from the HC bt modules...</p><p>Hope it helps :)</p><p>Bye</p>
<p>Hi MR32,</p><p>i can't get errors using the correct Arduino (Uno or Leonardo) with either the ide 1.6.9 from arduino.cc and the ide 1.7.10 from Arduino.org.</p><p>Check the Arduino you are using is correct (must be Uno or Leonardo)</p><p>Greetings</p>
What can i use this driver for motor and use accu 12v for battery??
<p>I think yes. Just compare the pinout of this driver with the datashett of the one i used . The datasheet is in the step2 of this instructable.. The 12V battery is good too. Make sure it can source almost 1,2A otherwise the voltage will drop causing Arduino random resets... bye</p>
<p>I have tried changing everything. I decided to buy another bluetooth module, hope it works. thanks for your help.</p>
<p>Hi <a href="https://www.instructables.com/member/habibulilalbaab" style="">habibulilalbaab</a>, sorry can't understand what you mean. This module can be found on some internet store. Maybe it isn't the same i used but if it is based on the same chip it will be surely compatible. Compare datasheets from the module you choose in internet to the datasheet given in this tutorial.</p>
What can I use L298N H Bridge module . ?
<p>Yo cuando lo abro me sale conectar el bluetooth y cuando esta echo me sale los mandos pero no hay reacci&oacute;n.</p>
<p>Hi, what's about Step 4? </p>
<p>pues yo e segido las instrucciones del esquema y nada de nada.</p>
<p>Hi IsraelD3, i need more info to help you. Is the problem hardware or software?</p><p>Software check: was the step4 successful? </p><p>Android app: did you select the ARDUINO ROVER from settings? (the app also support the I-Racer but it has a different communication protocol and will not work)</p><p>Hardware check: resistor on the correct pin of the bluetooth module, connections on the L298 board.</p><p>Let me know which step fails.</p><p>Bye</p>
<p>Really cool project! I love the bluetooth compatibility to go with it! </p>
<p>Thanks tomatoskins, i love bluetooth too... i made also an hexapod controlled with it and turned an old toy car into a bluetooth controlled car (in these cases i used a PIC18F microcontroller board instead of arduino)</p>

About This Instructable




Bio: I like to develop android apps and electronics devices that can be controlled by that apps. My first pc was a commodore VIC20 hacked to ... More »
More by AppsByDavideV:Rangefinder for Garage Parking With Arduino Android personal Home Server Arduino 4WD Rover Bluetooth Controlled by Android Phone/tablet 
Add instructable to: