| Connector | Label | Function | |-----------|-------|----------| | M1 / M2 | A+ A- / B+ B- | DC Motor A & B (Channels 1 & 2) | | M3 / M4 | C+ C- / D+ D- | DC Motor C & D (Channels 3 & 4) | | Servo 1 | SIG - VCC - GND | Servo control (5V or external) | | Servo 2 | SIG - VCC - GND | Servo control (5V or external) | | Ext PWR | GND – VIN (or VS) | External motor power input (6–12V DC) | | Arduino pins | Stacked headers | Digital I/O 4,5,6,7,8,9,10,11,12,13; A0-A5; 5V; GND; RESET |
According to the standard L298P datasheet applied to the HW-130 board:
Based on the pinout above, here is the truth table. To spin a motor, you set one direction pin HIGH and the other LOW. To brake, set both HIGH.
// HW-130 Motor Shield Pin Definitions #define ENA 5 // Speed for Motor A #define IN1 7 // Direction 1 #define IN2 8 // Direction 2#define ENB 6 // Speed for Motor B #define IN3 9 // Direction 1 #define IN4 10 // Direction 2
void setup() pinMode(ENA, OUTPUT); pinMode(ENB, OUTPUT); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT);
void loop() // Motor A Forward at 75% speed digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); analogWrite(ENA, 191); // 255 * 0.75
// Motor B Backward at 50% speed digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); analogWrite(ENB, 127); hw 130 motor control shield for arduino datasheet
delay(2000);
// Stop both motors digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); delay(1000);
The Go to product viewer dialog for this item. (often labeled as an L293D Motor Driver Shield) is a versatile, low-cost expansion board for the Arduino Uno and Mega. It is essentially a clone of the original Adafruit Motor Shield V1, designed to drive inductive loads such as relays, solenoids, DC motors, and stepper motors. Key Technical Specifications
The board is powered by two L293D motor driver chips and one 74HC595 shift register.
DC Motors: Up to 4 bi-directional DC motors with 8-bit speed selection. void loop() // Motor A Forward at 75%
Stepper Motors: Up to 2 stepper motors (unipolar or bipolar).
Servos: 2 dedicated ports for 5V hobby servos connected to high-resolution timers.
Voltage Range: Supports motor voltages from 4.5V to 12V (the L293D IC itself can handle up to 36V, but the shield components often limit it).
Output Current: 0.6A per channel (1.2A peak) with thermal shutdown protection. Pinout and Hardware Setup
The shield simplifies wiring by plugging directly into the Arduino headers.
HW-130 Motor Control Shield is a multi-functional motor driver board designed for the Arduino Uno . It is a cost-effective alternative to the original Adafruit Motor Shield V1 and shares a nearly identical schematic and pinout. Core Specifications Driver Chips: quadruple half-H bridge drivers. Logic Chip: The Go to product viewer dialog for this item
8-bit serial-to-parallel shift register used to expand Arduino pins. Voltage Range: Supports motor voltages from 4.5V to 24V (though often recommended up to 12V for generic versions). Output Current: continuous current per channel ( ) with thermal shutdown protection. 5.imimg.com Driving Capabilities
The shield can simultaneously control several combinations of motors: DC Motors: 4 bi-directional DC motors with individual 8-bit speed selection. Stepper Motors: 2 stepper motors
(unipolar or bipolar) with single/double coil, interleaved, or micro-stepping support. Servo Motors: 2 interfaces for 5V hobby servos
connected to the Arduino's high-resolution dedicated timers for jitter-free operation. 5.imimg.com Pin Mapping & Usage
Because it uses a shift register, the motors are not connected to the Arduino directly. You use a library like the Adafruit Motor Shield Library (v1) to communicate with them. Arduino Pin Usage Digital Pin 9 Digital Pin 10 DC Motor 1 / Stepper 1 Digital Pin 11 (PWM) DC Motor 2 / Stepper 1 Digital Pin 3 (PWM) DC Motor 3 / Stepper 2 Digital Pin 5 (PWM) DC Motor 4 / Stepper 2 Digital Pin 6 (PWM) Latch (74HC595) Digital Pins 4, 7, 8, and 12 Power Management External Power (EXT_PWR):
Located on a 2-pin terminal block. It is highly recommended to use an external supply for motors rather than the Arduino's 5V pin to avoid overheating or logic resets. Power Jumper: Jumper ON: Powers the Arduino from the motor's external power supply. Jumper OFF: Separates the logic and motor power. Remove this
if you are powering the Arduino via USB and using an external battery for the motors to prevent damage.
All six analog input pins (A0–A5) remain available for use with other sensors. library to test your DC motors? Adafruit Motor Shield