APTINEX L6203 Dual Full Bridge Motor Drive Module saves all the trouble of connecting L6203 with a motor. You can easily connect two DC motors or one stepper motor very easilly and continue.
L6203 Features
• SUPPLY VOLTAGE UP TO 48V
• 5A MAX PEAK CURRENT (2A max. for L6201)
• TOTAL RMS CURRENT UP TO :4A
• RDS (ON) 0.3 Ω (typical value at 25 °C)
• CROSS CONDUCTION PROTECTION
• TTL COMPATIBLE DRIVE
• OPERATING FREQUENCY UP TO 100 KHz
• THERMAL SHUTDOWN
• INTERNAL LOGIC SUPPLY
• HIGH EFFICIENCY
APTINEX L6203 Dual Full Bridge Motor Drive Module Features
• LEDs for checking status of the input pins
• Heatsink for overheating protection
• Male pin headers for easily connecting with the development board
• Screw Terminals for outputs
Sample Code
//define motor 1 related pins | |
#define IN1 1 | |
#define IN2 2 | |
#define ENA 9 | |
//define motor 2 related pins | |
#define IN3 3 | |
#define IN4 4 | |
#define ENB 10 | |
void setup() | |
{ | |
 //set output for motor 1 related pins | |
 pinMode(IN1, OUTPUT); | |
 pinMode(IN2, OUTPUT); | |
 pinMode(ENA, OUTPUT); | |
 //set output for motor 2 related pins | |
 pinMode(IN3, OUTPUT); | |
 pinMode(IN4, OUTPUT); | |
 pinMode(ENB, OUTPUT); | |
 //set motor 1 run in clockwise | |
 digitalWrite(IN1, HIGH); | |
 digitalWrite(IN2, LOW); | |
 //set motor 2 run in anticlockwise | |
 digitalWrite(IN3, HIGH); | |
 digitalWrite(IN4, LOW); | |
} | |
void loop() | |
{ | |
 int PWM_Value = 0; //PWM value for motor 1 and 2 | |
 //Motor 1 and Motor 2 run with gradually increasing speed until Max | |
 for(PWM_Value = 0; PWM_Value<=255; PWM_Value+=5) | |
 { | |
  analogWrite(ENA, PWM_Value); //set PWM to Motor 1 | |
  analogWrite(ENB, PWM_Value); //set PWM to Motor 2 | |
  delay(100); | |
 } | |
 //Motor 1 and Motor 2 run with gradually descreasing speed until Stop | |
 for(PWM_Value = 255; PWM_Value>=0; PWM_Value-=5) | |
 { | |
  analogWrite(ENA, PWM_Value); //set PWM to Motor 1 | |
  analogWrite(ENB, PWM_Value); //set PWM to Motor 2 | |
  delay(100); | |
 } | |
} | |