TB6612FNG Dual Motor Driver Features
Today, controlling the speed and direction of DC motors is very important due to their many applications. The most common method of controlling DC motors is the H-Bridge. This method allows you to control both the speed and the direction of the engine. The TB6612FNG dual module uses the same method to control two motors.
One of the control pins of this module is PWM. This pin is connected to the gate of the transistor. The longer the duty cycle, the higher the voltage and, as a result, the faster the motor rotates.
The motor working voltage is in the range of 2.7 to 13.5V and the maximum output current is up to 1.2 A per channel.
You can download the datasheet of this module here.
TB6612FNG Dual Motor Driver Module Pinout
This sensor has 16 pins:
- VM: Motor voltage
- VCC: Module power supply
- GND: Ground – In this module we have three ground pins that are connected to each other.
- A1: Motor A connection ‘+’
- A2: Motor A connection ‘-‘
- B1: Motor A connection ‘+’
- B2: Motor A connection ‘-’
- PWMA: PWM pin for Motor A for speed control
- PWMB: PWM pin for Motor B for speed control
- AIN1: Control signal for motor A
- AIN2: Control signal for motor A
- BIN1: Control signal for motor B
- BIN2: Control signal for motor B
- STBY: This PIN must be HIGH to activate Standby
You can see the pinout of this module in the image below.
Note that with different modes of control signals, motor performance varies. The table below shows the different modes of operation.
Interfacing TB6612FNG Dual Motor Driver Module with Arduino
Step 1: Circuit
The following circuit shows how you should connect Arduino to TB6612FNG module. Connect wires accordingly.
Step 2: Code
Upload the following code to your Arduino.
/* TB6612FNG-Dual-Driver made on 28 oct 2020 by Amir Mohammad Shojaee @ Electropeak
This code enables you to control 2 DC motors simultaneously. By turning the potentiometer, the speed of the motors increases in a clockwise direction.
Be careful not to fully turn the pententiometer because your motor is a 6 volts motor DC and the input voltage is 9 volts and the motor may be damaged. Of course, you can use a lower voltage battery or a higher voltage motor.