loading

*As of 7/6/15, I'm still missing some of the assembly text. I will be finishing the Instructable shortly, in the meantime if you have any questions feel free to email me or leave a comment.

With this Instructable, you will be able to construct and code a versatile dual motor universal RC platform that utilizes an Arduino UNO board, L298 Dual H-Bridge, and Bluetooth control via an Android device. The result is a surprisingly quick and responsive platform with full directional capability. For simplicity, the supplied code only offers one speed capability. However, you will build the project with speed control in mind via Pulse Width Modulation (PWM) meaning the code can be modified later without additional hardware changes.

Recommended Free Android App: Arduino Bluetooth RC Car, Google Play

The chassis kit and all of the major components used can be found on Amazon using the links provided.

Good Luck!

Step 1: Chassis Kit

I used a simple dual motor chassis kit straight from China and modified it to my liking. The motors and gearboxes seem to be durable for the price point and have no complaints running the 9.6 Volts being fed to them. Any dual motor chassis or DIY chassis will do, however you will not be able to follow along step by step.

Modifications I chose included mounting the gear boxes above the chassis to lower ground clearance and eliminating the supplied caster in favor of sliders I machined from Nylon round stock. Skipping these modifications will not alter the methods outlined in this Instructable.

*NOTE: I chose to trace the supplied chassis onto a piece of acrylic sheeting to create a top to mount and protect the components. If you do not wish to do this, you will either need to come up with alternative mounting methods or simply order two kits. Spare parts may not be a bad idea; it is China after all.

Shanhai Chassis Kit

Step 2: Controller

It wouldn't be an Arduino project without an Arduino! Actually, any microcontroller that is compatible with the Arduino IDE and supports PWM and UART will do the trick, but to keep things simple I recommend the Arduino UNO R3.

Arduino UNO R3

Step 3: L298N Motor Drive Controller

You will need a dual H-bridge motor controller for this project. The L298N is a fantastic little board and the on-board 5v logic supply is perfect for powering your controller and Bluetooth receiver.

Pins:

  • Out 1: Motor A lead out
  • Out 2: Motor A lead out
  • Out 3: Motor B lead out
  • Out 4: Motor B lead out
  • 12v: +5-35v input
  • GND: Ground
  • 5v: +5v logic input/output (5v logic input with factory jumper removed, 5v supply output with factory jumper in place. Jumper will remain in place for our project)
  • EnA: Enables PWM signal for Motor A
  • In1: Enable Motor A
  • IN2: Enable Motor A
  • IN3: Enable Motor B
  • IN4: Enable Motor B
  • ENB: Enables PWM signal for Motor B

Specifications:

  • Double H bridge Drive Chip: L298N
  • Logical voltage: 5V*
  • Drive voltage: 5V-35V
  • Logical current: 0-36mA
  • Drive current: 2A (MAX single bridge)
  • Max power: 25W
  • Dimensions: 43 x 43 x 26mm
  • Weight: 26g

*Built-in 5v power supply, when the driving voltage is 7v-35v

L298N Motor Controller

Step 4: Bluetooth Module

A simple Bluetooth transceiver module is needed to establish a connection between the Arduino and Android device. I chose a HC-06 that defaults to 9600 baud; this module is capable of higher speeds however the default mode is plenty for what we're doing.

Concepts like Bluetooth can be confusing when you're new to Arduino, but it's actually very simple so try not to over think itwhen it comes time to code it.

Bluetooth Module

Step 5: Power Supply

You will need a means of powering your project. This 9.6v battery/charger combo fits within the chassis nicely and has great run time for the price. I chose to add a charging pigtail so the battery can charged without removal. In hindsight, I should have installed an on/off switch as well. This may be something to consider for your project to avoid unplugging the battery connection when not in use.

9.6v Battery

Charger Connectors

Step 6: Android Device

You will need an Android device with Bluetooth and the ability to download the controller app linked in the introduction. I used my Samsung Galaxy S6 and had no issues connecting and staying connected to the car.

Step 7: Miscellaneous Materials

Step 8: Assemble the Chassis

As mentioned earlier, you will need to trace the acrylic chassis supplied with the kit and cut it out with a band band saw, or simply order two kits. A power drill and appropriate sized drill bits for the hardware you use are needed to mount the components and drill holes for the spacers that connect the two chassis halves.

Begin by assembling the chassis kit according to the supplied instructions (mine were in Chinese), or you can get creative and make some modifications (Increase/decrease ground clearance with motor placement, change the caster out for wheels or sliders, etc). I decreased ground clearance and machined nylon sliders. This works great for flat surfaces, but wouldn't be ideal for obstacles.

To mount the Arduino and motor controller, I used machine screws/nuts and cut small diameter polyurethane tubing for spacers to raise them up slightly.

To mount the battery and the Bluetooth module, I used the crude (but highly effective) method of drilled holes and cable ties.

The spacers I used between the top and bottom chassis halves are threaded pieces of metal to be used with machine screws and can be purchased at any hardware store. I used 6 total mounted around the perimeter of the chassis.

Lastly, solder the motor leads.

Step 9: Build Bluetooth and Motor Controller Harness

Start by building the harness that will supply power to and from the motor controller. Keep in mind that if the board supplied with +7-35v at the 12v terminal and the 5v jumper is left in place, the board will output +5v to the 5v terminal, so there is no need to power the motor controller off the +5v pin of the Arduino. Another thing to remember is that all of the grounds must be tied together for the logic to operate predictably.

Using the battery connectors, build a lead with the female connector going to the battery and the male end going to the back of the car for charging. You should have a set of leads jumped off the battery side connector that will supply your motor controller.

You will need a positive and negative cable to supply the Arduino with 5v and a strip of (4) cables to supply the Bluetooth module023

Cut the female ends from the

Step 10: Connect the Motor Controller

Step 11: Install the Top

Step 12: Pair Your Android Device

With the battery connected, the Bluetooth module should be blinking a red LED. Follow these steps to pair and connect your device:

  1. Turn Bluetooth "ON" in the device settings
  2. Scan for Bluetooth devices. Be sure your device is set to "Visible".
  3. Select "HC-06"

Once you successfully pair your device:

  1. Open the "Arduino Bluetooth RC Controller" app
  2. Bluetooth permission request: "Yes" if prompted.
  3. Touch the "Settings" button
  4. Touch "Connect"

When successfully connected, the blinking red LED on the module will become solid and the red display in the Android app will change to green.

Step 13: Upload the Code

If your Bluetooth module uses a different default baud rate, you will need to change it in the code before uploading it to your Arduino.

*NOTE: When uploading the code, be sure to disconnect the Rx and Tx pins from the Arduino or the upload will fail. The Arduino serial communicates on pins 0 and 1 and having the Bluetooth module connected simultaneously will prevent the code from uploading. Reconnect the pins after the upload is complete.

Step 14: Check Proper Operation

It's easy to mix up a wire or two when building a project like this, so don't be surprised if it only partially works (or not at all) on your first attempt.

If your project responds to commands sent from your Android device, great! Just verify the commands sent correspond with the operation of the motors (for example, the "Forward" button should make both motors spin full speed in the same direction). If a command doesn't match the operation (for example, the "Forward" button makes one motor turn clockwise and the other turn counterclockwise) you have a few options:

<p>pls be more detail in the pinout</p>
<p>pleas help me !</p><p>Error</p><p>avr-g++: error: missing filename after '-o'</p><p>exit status 1</p><p>Error compiling.</p><p>Invalid library found in C:\Users\Ing Rado\Documents\Arduino\libraries\sketch_dec13a: C:\Users\Ing Rado\Documents\Arduino\libraries\sketch_dec13a</p><p>Invalid library found in C:\Users\Ing Rado\Documents\Arduino\libraries\sketch_dec13a: C:\Users\Ing Rado\Documents\Arduino\libraries\sketch_dec13a</p>
<p>u used the wrong port or programmer,or forgot to remove tx and rx</p>
<p>amigo no anda</p>
<p>can any one help i can not get the car to move and when i check the serial monitor it is receiving numbers and not letters from the app.</p>
<p>do tell me what i can do for this</p>
<p>everthing moves except front wheels dont turn at right direction</p>
<p>The Controls Forward<i> and Backward</i> makes only one wheel go</p>
<p>can i have circuit </p>
When are you uploading the codes
<p>Very nicely done!</p>

About This Instructable

15,746views

34favorites

License:

More by GarretK:Bluetooth Controlled Arduino Dual Motor RC Platform 
Add instructable to: