Dual-Channel DC Motor Driver-12A Wiki - DFRobo

Introduction

This is a dual channel DC motor driver with an extremely small size of of 1.97”×1.97”×0.49”. The module comes with two motor channels that can drive two motors simultaneously, and each channel employs an indicator to show the rotation direction of the motor: blue is forward rotation, red is reverse rotation. Support motor voltage ranges from 6.5V to 37V. Each motor channel can output 12A current continuously and the max power of the DC motor the module supports is up to 290W. The momentary peak current can reach up to 70A and last about 100ms. At the same time, the highly timing optimization of the units inside the driver makes the minimum pulse width of PWM input as narrow as 2us, which fully ensured its dynamic adjustment range and greatly improved the quality of controlling motors.
The module integrated over-voltage, under-voltage, and overheat protection circuit that will be triggered when facing with the these situations. There is an on-board STATE indicator to indicate protection state: ON->Work properly; Flashing quickly->Over-voltage; Flashing slowly->Under-voltage; Double flashing->Overheat. The latter three situations will turn off the output, which can efficiently reduce the possibility of device damage in abnormal operating conditions.
Usethis dual channel DC motor driver together with Arduino controller to easily realize motor controlling. The module can be applied to automatic robot, mechatronic, equipment manufacture, scientific production, electronics competition and so on.

Specification

Board Overview

Board Overview

No. Name Description
1 VCC Power input, 3.3V, 5V
2 PWM1 M1 Channel duty cycle modulation input, bandwidth 50MHz
3 INA1 M1 Channel control logic input A
4 INB1 M1 Channel control logic input B
5 GND Ground
6 VCC Power input, 3.3V, 5V
7 PWM2 M2 Channel duty cycle modulation input, bandwidth 50MHz
8 INA2 M2 Channel control logic input A
9 INB2 M2 Channel control logic input B
10 X Ground
11 M1_A Ouput PIN A of motor channel 1
12 M1_B Output PIN B of motor channel 1
13 M2_A Output PIN A of motor channel 2
14 M2_B Output PIN B of motor channel 2
15 P- Negative pole of external power input
16 P+ Positive pole of external power input
17 LM1 Motor channel 1 rotation indication, bule for forward, red for backward
18 LM2 Motor channel 2 rotation indication, blue for forward, red for backward
19 STATE On: work properly; Quick blink: over-voltage, output close; Slow blink: under-voltage, output close; Double blink:driver overheat, output close

Schematics Diagram

Schematics

Operating Logic

Signal Input Power Output
INAx INBx PWMx Mx_A Mx_B Motor Status
L L X L L Stop
L H PWM PWM L Forward rotation
H L PWM L PWM Backward rotation
H H X Z Z Floating
Over/under voltage, overheat protection happened on Driver Z Z Floating

Note:

  1. x in INAx, INBx, PWMx, Mx_A, Mx_B is the channel number, 1 or 2.
  2. H for high level, L for low level, X is irrelevant to level, Z is high-impedance state.
  3. Don't switch the motor direction if it is still in high speed, adjust the speed to 0% gradually by PWM before switching, otherwise, the driver may be damaged.
  4. Note: it is in High level when the signal input pin is floating.

Tutorial

The tutorial presents how to control motor driver board by Arduino UNO and drive two motors simultaneously.

Requirements

Connection Diagram

Connection Diagram

Connection
Motor Driver Board 2 3 4 7 8 9
UNO Board 2 3 4 5 6 7

Sample Code

/*
    This sample code is for testing the 2 stepper motors
    The rotation velocity can be adjusted by the code switch
    Microcontroller: Arduino UNO
*/
int PWM1 = 2;
int INA1 = 3;
int INB1 = 4;
int PWM2 = 5;
int INA2 = 6;
int INB2 = 7;
void setup()
{
  pinMode(PWM1, OUTPUT);
  pinMode(INA1, OUTPUT);
  pinMode(INB1, OUTPUT);
  pinMode(PWM2, OUTPUT);
  pinMode(INA2, OUTPUT);
  pinMode(INB2, OUTPUT);
}
void loop()
{
  digitalWrite(INA1, LOW);
  digitalWrite(INA2, LOW);
  digitalWrite(INB1, HIGH);
  digitalWrite(INB2, HIGH);
  analogWrite(PWM1, 255);  //PWM adjust speed
  analogWrite(PWM2, 255);  //PWM adjust speed
  delay(1000);
  digitalWrite(INA1, LOW);
  digitalWrite(INB1, HIGH); //Motor 1 rotate forward 
  digitalWrite(INA2, HIGH);
  digitalWrite(INB2, LOW);  //Motor 2 rotate backward 
  analogWrite(PWM1, 255);  //PWM adjust speed
  analogWrite(PWM2, 255); //PWM adjust speed
  delay(1000);
  digitalWrite(INA1, LOW);
  digitalWrite(INB1, LOW); //Motor 1 stop 
  digitalWrite(INA2, LOW);
  digitalWrite(INB2, LOW); //Motor 2 stop 
  analogWrite(PWM1, 255);
  analogWrite(PWM2, 255);
  delay(1000);
}

Expected Results

Result: two motors rotate forward simultaneously; one rotate forward, the other rotate backward; stop rotating.

FAQ

For any questions, advice or cool ideas to share, please visit the DFRobot Forum.

More Documents