Dual Channel Motor Driver Module, H-Bridge up-to 2.5 Amp, 2~10VDC
-
RM8.00
- Product Code: motor driver 2.5A
- Availability: In Stock
This driver module is based on unknown H-bridge, a high current, low voltage dual full bridge driver. It can drive up to 2 DC motors up to 2Amp each, or drive one stepper motor or 2 solenoids up to 1.5 Amp each continuesly and 2.5 Amp at peak.
The driver can control both motor RPM and direction of rotation. The RPM is controlled using PWM input to ENA or ENB pins, while of rotation direction is controlled by supplying high and low signal to IN1-IN2 for the first motor or IN3-IN4 for the second motor. This Dual H-Bridge driver is capable of driving voltages from 2V up to 10V.
Features
Specifications
Package Include
Coding below is base on a L298N, you may modify it.
Test your module by codes below, which can be used for two circuits we've seen before.
The program turns motor A clockwise, then turn off that motor and turns the engine B in the same direction.
Then repeat this procedure in an anti-clockwise.
// Program: Control 2 DC motors using L298N H Bridge // Definitions Arduino pins connected to input H Bridge int IN1 = 4; int IN2 = 5; int speedPinA = 9; // Needs to be a PWM pin to be able to control motor speed int IN3 = 6; int IN4 = 7; int speedPinB = 10; // Needs to be a PWM pin to be able to control motor speed void setup() { // Set the output pins pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); pinMode(speedPinA,OUTPUT); pinMode(speedPinB,OUTPUT); } void loop() { analogWrite(speedPinA, 255); // Sets speed variable via PWM analogWrite(speedPinB, 255); // Sets speed variable via PWM // Rotate the Motor A clockwise digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); delay(2000); // Motor A digitalWrite(IN1, HIGH); digitalWrite(IN2, HIGH); delay(500); // Rotate the Motor B clockwise digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); delay(2000); // Motor B digitalWrite(IN3, HIGH); digitalWrite(IN4, HIGH); delay(500); // Rotates the Motor A counter-clockwise digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); delay(2000); // Motor A digitalWrite(IN1, HIGH); digitalWrite(IN2, HIGH); delay(500); // Rotates the Motor B counter-clockwise digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); delay(2000); // Motor B digitalWrite(IN3, HIGH); digitalWrite(IN4, HIGH); delay(500); }
Tags: Motor Driver