Brief introduction of tb6612fng and its design of DC motor control system with single chip microcomputer

TB6612FNG, produced by Toshiba Semiconductor, is a DC motor drive device. It has a high-current MOSFET-H bridge structure, dual-channel circuit output, and can drive 2 motors at the same time. In particular, the use of L298N and TB6612FNG is basically the same.

Pin function of TB6612FNG

Ref: Pin function
  • AIN1 / AIN2, BIN1 / BIN2, PWMA / PWMB are the input terminals of the control signal, that is, the control signal is input from here. .
  • AO1/A02, B01/B02 are 2 motor control output terminals, that is, output signals to control the motor.
  • The function of STBY is to control the chip in normal working or standby state.
  • VM (4.5~15 V) and VCC (2.7~5.5 V) are motor drive voltage input and logic level input terminals respectively.

Working mode of TB6612FNG

The figure shows the motor control unit composed of TB6612FNG and AVR microcontroller.

The single-chip timer generates 4 PWM outputs as AIN1/AIN2 and BIN1/BIN2 control signals. As shown in the figure, OCxA and 0CxB control the motors M1 and M2. Using the timer to output hardware PWM pulses allows the MCU CPU to participate in calculations only when changing the PWM duty cycle, which greatly reduces the burden of system calculations and the overhead of PWM software programming. Input pin PWMA, PWMB and STBY control the motor running or braking status and the device working status by I/0 level. The circuit uses a 10µF electrolytic capacitor with a withstand voltage of 25 V and a 0.1µF capacitor for power supply filtering, and uses a power MOSFET to provide reverse connection protection for VM and VCC.

Motor work module

TB6612FNG is a MOSFET-based H-bridge integrated circuit, which is more efficient than a transistor H-bridge driver and has a stronger load output capability.

The pulse width modulation method generates a PWM signal with a varying duty cycle, and realizes the speed control of the motor by quickly switching the output state of the driver. The size of the PWM duty cycle determines the average value of the output voltage, which in turn determines the speed of the motor. In this article, the unipolar, fixed frequency and wide PWM modulation method is adopted to ensure the stability of motor speed control. The logical truth table of TB6612FNG is shown in Table 1. When the device is working, the STBY pin is set to high level; IN1 and IN2 remain unchanged, the input signal of the PWM pin can be adjusted to control the unidirectional speed of the motor; the PWM pin is set to high level, and the input of IN1 and IN2 is adjusted The signal can be used for bidirectional speed control of the motor. The control logic of the A and B channels is the same.

Ref: The pulse width modulation

The 5 pins in the red part of the picture control one motor, and the pins in the blue part control the other motor. Here, only the A channel is analyzed. AO1 and AO2 are connected to the + and-of the motor respectively. Then control the motor through PWMAA, IN2, AIN1. Among them, PWM connects A to the PWM pin of the microcontroller, usually 10Khz PWM, and adjusts the speed of the motor by changing the duty cycle (the duty cycle is the ratio of the positive voltage time to the cycle in a cycle).

The type of work can be divided into three situations:

  • AIN1=0, AIN2=1: The motor rotates in the reverse direction.
  • AIN1=1, AIN2=0: The motor rotates in the forward direction.
  • AIN1=0, AIN2=0: the motor stops.

In addition:

Connect AIN1 to 3.3~5V, AIN2 to GND, and PWM to A 3.3~5V. This is equivalent to controlling the full duty cycle of the motor to rotate forward.

Connect AIN1 to GND, AIN2 to 3.3~5V, and PWM to A 3.3~5V. This is equivalent to controlling the reverse rotation of the motor at full duty cycle.

Advantages of TB6612FNG

Independent two-way control of 2 DC motors: At the same time, it can provide sufficient output capacity, and it has advantages in operating performance and energy consumption.

Very high integration: Therefore, it can be used as an ideal motor drive device in an integrated and miniaturized motor control system.

High starting current: Each channel outputs a continuous drive current of up to 1.2 A, and the starting peak current is 2A/3.2 A (continuous pulse/single pulse).

High support frequency: Its PWM support frequency is up to 100 kHz.

Wide operating temperature range: on-chip low-voltage detection circuit and thermal shutdown protection circuit; operating temperature: -20~85℃;

Some suggestions about TB6612FNG

1. When the output state of the device is switched between driving/braking, a good linear relationship can be maintained between the motor speed and the PWM duty cycle, and its operation control effect is better than that of the device switching between driving/stopping.

2. When fPWM is high, the motor runs continuously and smoothly with low noise, but the power consumption of the device will increase with increasing frequency; when fPWM is low, it will help reduce power consumption and improve the speed regulation linearity, but it is too low The frequency may cause a decrease in the continuity of the motor rotation. Usually when fPWM>1 kHz, the device can control the motor stably.

3. Excessive PWM duty cycle will affect the stability of the motor drive current and the output load capacity of the device. The duty cycle range should be set reasonably according to different speed requirements.

4. If the operating temperature of the device is too high, it will result in a decrease in its output power. In the circuit PCB design, sufficient copper area should be ensured, which helps to dissipate heat and facilitate the stable operation of the device for a long time.

By the way, Seeed Fusion has a rich component library including TB6612FNG.


September 2020