Connecting the 2WD robot chassis to the Arduino Uno and Motor Shield

If a picture tells a thousand words, let start with a video demo:

We are going to show how to assemble the chassis and connect it to the Arduino and motor shield below.

(note: most of the components are part of the HackaBot Uno Robot Kit. You may refer to this post to identify various components that come with the kit)


1. Connecting the motors

These motors are 6V DC motors. The drive current (without load) is rated 150mA. It is too much current for Arduino Uno to drive them directly. Instead, we will use the motor shield that comes with the kit to drive them. First we need to solder the motors to some wires. In my case, I use DuPoint Wires. I cut off one end of the wires and soldered them to the motor. Alternatively, you could use gauge-22 wires as well.



2. Follow the instructions provided by the vendor of the 2WD robot chassis to assemble the chassis. The following picture shows how it looks after assembly.


3. Connect M3 metal (brass) hex standoffs in the slot/holes in the chassis. (See the 4 golden metal pieces in the picture above).

4.  For the ease of drilling holes that match the locations of the standoffs, I used a 8cm x 12cm prototype PCB. I drilled additional holes to connect the standoffs for Arduino Uno R3 controller on the other side.




5. In my opinion, Arduino Uno R3 controller is not ‘screw’ friendly. I find it difficult to connect it to 4 standoffs. Instead, I left one of them floating. In the picture below, you will find that one of the holes (next to the DC power connector) in the Uno board is not supported by standoff.


6. Now I stack the motor shield on top of the Arduino Uno R3 controller board. In the picture below, I also showed that a small prototype breadboard (the white one on the left) is used. I used the double sided tape to stick it to the PCB (in brown). This way, I can insert sensors and connect them to the motor shield using jumper wires.

In the picture below, I have an ultrasonic distance sensor, a gyro-accelerometer and a BlueTooth module connected.


7. Connect a battery holder (four AA batteries) to the Motor shield. WIth 4 AA batteries, we provide 6V DC to the motor shield as well as the Arduino Uno R3 controller. In some articles, people use separate power supplies (to the motor shield and Arduino) because some motors draw too much current and the IR-drop may cause instability to the controller. In my case, I found that shared supply works fine.


8. This is how the robot look from the top of the motor shield. Notice that power connections are on the left (to the red and black wires). Motor connections are on the bottom (motor M3/M4 ports). Ultrasonic distance sensor is on the right.


Detailed information on how to connect the sensors to the motor shield will be posted in the future along with source code. Stay tuned.