Robot Quickstart!
Introducing the Hardware
Introducing the H-Bridge
The Toshiba TB6612FNG is actually a dual H-bridge IC. This means it has two full H-bridge circuits built into a little package, allow- ing you to control the two motors on your robot with a single board. The H-bridge distinguishes the two motors as A and B, as you can see on the underside of the board in Figure 8-6. To control each H-bridge circuit, you use three signal wires: two for direction and one for speed. You can buy the board either with or without pins already sol- dered on, so if you want to save yourself the trouble of soldering, make sure you get the presoldered board (ROB-13845). If you have the board without header pins already soldered on (ROB-09457), it’s not a problem, but you’ll need to solder male headers onto the pins; for soldering instructions, see “How to Solder” on page 302. In either case, before you start building this project you should have a board that looks like first picture in this tutorial.
Hookup Table
1 | Motor voltage supply |
2 | Chip supply voltage |
3 | Ground 1 |
4 | AO1 motorA connection |
5 | AO2 motorA connection |
6 | BO2 motorB connection |
7 | BO1 motorB connection |
8 | Ground(GND) |
9 | Ground(GND) |
10 | PWMB (MotorB Speed) |
11 | BIN2(MotorB2 DIR2) |
12 | BIN2(MotorB2 DIR1) |
13 | STBY |
14 | AIN1(MotorA DIR1) |
15 | AIN2(MotorA DIR2) |
16 | PWMA (MotorA Speed) |
Geared Hobby Motor
The basic hobby motor is great for simple mechanisms like spinning fans, but it doesn’t offer a lot of torque (rotational force). In this project, we want to use a motor to move the entire project around, so we need to use a geared motor—a motor that’s attached to a gearbox.
A gearbox essentially converts mechanical rotations into torque. This gearbox has a 48:1 gear reduction, which means 48 rotations of the motor equal one rotation of the output shaft. This slows down the motor by a factor of roughly 1/48 and results in a multiplication of the torque by a factor of 48. Basically, the output speed is slower, but the torque is a lot higher.