Summary of Controlling 2 motors with the TB6612FNG + Arduino
This article introduces the TB6612FNG dual motor driver breakout board, explaining its H-bridge functionality for controlling two motors in both directions and varying speeds via PWM. It emphasizes the need for an external power source to prevent Arduino damage and details the required control pins: one standby pin and three pins per motor (two for direction, one for speed).
Parts used in the TB6612FNG Motor Control Project:
- TB6612FNG dual motor driver
- TB6612FNG breakout board from SparkFun
- Arduino
- External power source (2.5V to 13V)
- Two motors
First off: I know… we went overboard with the motor illustration.
In previous articles we have discussed how to control motors with simple transistors. And… with PWM you could control the speed. But that is just one motor, and you can only go one direction. Today we are going to talk about the TB6612FNG dual motor driver, specifically the TB6612FNG breakout board from sparkfun.
The TB6612FNG isn’t just a dual motor driver, it is a dual H-bridge. An h-bridge is basically a specific setup of transistors that allow you to switch direction of current. So hooked up to a motor, that means you can have it spin in both directions, and with PWM input, you can use your arduino to make them spin at any speed. Because the TB6612FNG has 2 H-bridges, you can not only make a robot go forwards and backwards, but also turn around by having each wheel spin in a different direction.
Quick stats on this guy: It is capable of supplying up to 13V and 1.2A (3.2 peak)
Hooking it up
As you can tell from the illustration this guy requires a few pins from your arduino to get it running. And it probably looks complicated at first. But it’s not that bad. The first thing to notice however, is that you do need an external power source for your motors (the TB6612FNG can work with 2.5 to 13v), the 5v pin on the arduino just can not source enough power to drive 2 motors, and you could damage your arduino if you do.
But why it uses so many pins is for several reasons. First, there is a standby pin, if this pin is held LOW, the motors are basically disconnected from power. And… Each motor also has 3 control pins, 2 for direction, and one for speed.
For more detail: Controlling 2 motors with the TB6612FNG + Arduino
- What is the TB6612FNG?
It is a dual H-bridge motor driver capable of supplying up to 13V and 1.2A. - Can I power the motors directly from the Arduino 5V pin?
No, you must use an external power source because the 5V pin cannot source enough power. - How many control pins does each motor require?
Each motor requires three control pins: two for direction and one for speed. - What is the function of the standby pin?
If held LOW, the standby pin disconnects the motors from power. - Does the TB6612FNG allow motors to spin in both directions?
Yes, it allows switching current direction so motors can spin forwards and backwards. - How can I control the speed of the motors?
You can use PWM input to make the motors spin at any speed. - What voltage range does the TB6612FNG support?
The module works with voltages ranging from 2.5V to 13V. - Why is this chip called a dual H-bridge?
It has two H-bridges, allowing independent control of two motors for turning or moving forward/backward.
