Wiring

The first step in building the robot is taking the RC car apart. This starts with removing the PCB and the built in battery. When you have the PCB out, remove the wires from the PCB by cutting the wires. Keep track of the four motor wires (two to each motor). From here it is possible to completely wire the rest of the robot.

Robot_Sketch_1_schem-v8l4to

To start I recommend hookuping up the HC-05 to the Arduino. This can be done by connecting 5V from the Arduino to VCC(5V+) on the HC-05. Next connect ground from the Arduino to ground on the HC-05. Finally TX and RX must be connected between the devices. It may seem unintuitive but it is important to get this part right. TX goes to RX and RX goes to TX. If you connect RX to RX and TX to TX your project will not work and it will be very frustrating to debug.

Next you should hook up the battery pack. To do this, connect ground(black) to the ground on the motor driver and connect power(red) to Vcc (+12V) on the motor driver. Also connect the ground and power to ground and Vin on the Arduino.

Next the motor driver needs to be connected to the Arduino. To do this pay careful attention to the schematic. Different ports can be connected from the Arduino to the motor driver, but if you plan to use the code I provided, it is important to wire exactly the same way I did. Arduino (9) to motor driver (in 1). Arduino (10) to motor driver (in 2). Arduino (5) to motor driver (in 3). Arduino (6) to motor driver (in 4). Different motor drivers can vary. This particular one has in 1-4 but some have in a1, in a2, in b1, and in b2.

Finally the motors can be hooked up to the motor driver. This can be tricky. The important part is to keep the two motors separate. If you mix up the two wires on one of the motors, you will have only switched the polarity (direction) of the motor. If you mix the two different motor cables together, the project  will not work properly. Out1 and Out2 on the motor driver are both on the same side. These should be connected to the right wheel. Out3 and Out4 on the motor driver are both on the other side. These should be connected to the left wheel. 

It can also be helpful for debugging to hook an LED up. to do this simply put the short end on ground and the long end on pin 13 in the Arduino.