Here is comprehensive content structured as a datasheet-style overview for the HW-130 Motor Control Shield for Arduino.
1.1 Key Features
- Dual Channel H-Bridge: Drives two DC motors (Channel A and Channel B).
- Output Current: Up to 2A per channel (peak 3A).
- Logic Voltage: 5V (supplied by Arduino or onboard regulator).
- Motor Voltage (Vs): 6V to 12V DC (max 12V recommended; 15V absolute max).
- Enable Logic: Active high enables with onboard jumpers (can be PWM controlled).
- Voltage Regulator: Onboard 78M05 5V regulator (active when motor supply >7V).
- Current Sensing: Non-inserted jumper pins for A & B channels (allows external current monitoring).
2.1 Power Connectors & Jumpers
| Connector | Label | Description | | :--- | :--- | :--- | | J1 (Screw Term) | +12V (Vs) | Motor supply voltage (6V–12V). Do not exceed 12V for extended periods. | | J1 (Screw Term) | GND | Common ground for motors and logic. Must connect to Arduino GND. | | J2 (Screw Term) | OUT1 / OUT2 | Motor A terminals (connect one DC motor here). | | J3 (Screw Term) | OUT3 / OUT4 | Motor B terminals. | | JP2 | +5V | 5V Output from onboard regulator (or input if VS <7V). | | JP3 | ENA | Enable Channel A jumper. Short = motor enabled. Remove for PWM control. | | JP4 | ENB | Enable Channel B jumper. Remove for PWM control. | | JP1 | Power Select | Short to enable onboard 5V regulator. Open to power logic externally via +5V. |
Example Arduino code (DC motor, motor 1 forward/backward + speed)
const int IN1 = 2; // direction pin 1
const int IN2 = 3; // direction pin 2
const int ENA = 5; // PWM pin (must be PWM-capable)
6. Arduino Code Example (2 DC Motors)
// HW-130 Motor Shield - Basic DC motor control
#define ENA 10 // PWM speed for M1/M2
#define IN1 8
#define IN2 9
#define ENB 5 // PWM speed for M3/M4
#define IN3 6
#define IN4 7
Servo Headers
The shield typically includes two 3-pin headers for Servos.
2. Pin Mapping: The Most Critical Section
The datasheet for the HW-130 can be confusing regarding which Arduino pins are used. Unlike generic L298N modules where you pick the pins, this shield has fixed mappings because the pins are hard-wired on the PCB.
void setup()
pinMode(ENA, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);