Introduction
This DFRobot micro dual way DC motor driver with Gravity connector. It is design based on TB6612FNG motor driver chip. It inherits DFRobot L298N motor control logic, which only need four pins to drive 2 motors. The Gravity connector version expands four GPIO with standard Gravity connector. Once you use the Gravity IO Expansion board, it will be quite convenient. TB6612FNG is a dual-channel full-bridge drive chip. The maximum continuous drive current of single channel can reach 1.2A, peak value 2A/3.2A (continuous pulse / single pulse) , which can drive some micro DC motors. The control logic is similar to L298n, and the code can be directly compatible with the DFROBOT L298N motor driver. Standard XH2.54 pin can be inserted directly into the breadboard. It is a good choice for DIY project or product developments. If you need some tiny module, you can also use the module separately.
Specification
- VCC Operating Voltage: 2.7V~5.5V
- VM Input Power: 2.5V~12V
- Output Current: 1.2A (single-channel continuous drive current)
- Start / Peak Current: 2A (continuous pulse) / 3.2A (single pulse)
- Dimension:1.57x1.57(in) / 40 × 40(mm)
Board Overview
Label | Number | Description |
---|---|---|
1 | DIR1 | M1 Direction Control |
2 | PWM1 | M1 Speed control(PWM) |
3 | PWM2 | M2 Speed control(PWM) |
4 | DIR2 | M2 Direction Control |
5 | GND | Negative power supply |
6 | VCC | Power 3.3V-5V or IO port output high |
7 | M1 | A Output 1 |
8 | M1- | A Output 2 |
9 | M2 | B Output 1 |
10 | M2- | B Output 2 |
11 | VM- | Negative power supply |
12 | VM | Motor drive power 3.3V-12V |
- LED : The motor Turn direction indicator.
Tutorial
Connection Diagram
- Hardware
- 1 x DFRduino UNO R3
- 1 x Dual Motor Driver (TB6612)
- 8 x Breadboard Jumper Cables
- 2 x DC Motor
- 5 x AA Battery
Sample Code
- Software
- Arduino IDE Download Arduino IDE
int PWM1 = 5;
int DIR1 = 4;
int PWM2 = 6;
int DIR2 = 7;
void setup()
{
pinMode(DIR1, OUTPUT);
pinMode(DIR2, OUTPUT);
}
void loop()
{
int value;
for(value = 0 ; value <= 255; value =5)
{
digitalWrite(DIR1,HIGH);
digitalWrite(DIR2, HIGH);
analogWrite(PWM1, value); //PWM Speed Control
analogWrite(PWM2, value); //PWM Speed Control
delay(30);
}
}
Result
Two motor speeds change from 0 to maximum, cycle.
FAQ
Some general Arduino Problems/FAQ/Tips:
Click the topic link on DFRobot Forum.
For any questions, advice or cool ideas to share, please visit the DFRobot Forum