Hw 130 Motor Control Shield For Arduino Datasheet
The HW-130 Motor Shield: Decoding the Datasheet for Real-World Use If you’ve bought a cheap "HW-130" motor driver shield from Amazon, eBay, or AliExpress, you probably noticed one thing immediately: the documentation is terrible. Most sellers just repost a messy schematic or a photo of the board. But don’t worry—I’ve dug through the reference designs and reverse-engineered the logic. Here is what the unofficial datasheet actually means for your project. What is the HW-130? The HW-130 is a clone/derivative of the classic L298N dual H-bridge driver. However, unlike the big blue heatsink modules, the HW-130 is designed as a shield that stacks directly onto an Arduino Uno or Leonardo. Key Specs (From the Board):
Driver Chip: L298N (or a clone like the TB6612 on some variants—check your chip) Logic Voltage: 5V (from Arduino) Motor Voltage: 5V – 12V (External supply) Max Current: 2A per channel (peak), 1A continuous (without active cooling)
Pinout: The "Missing" Datasheet The HW-130 doesn't use the standard L298N pin mapping. Here is the actual breakout: | Arduino Pin | HW-130 Function | | :--- | :--- | | D5 | Motor A Speed (PWM) | | D6 | Motor B Speed (PWM) | | D7 | Motor A Direction 1 | | D8 | Motor A Direction 2 | | D9 | Motor B Direction 1 | | D10 | Motor B Direction 2 |
Warning: Do not trust the silkscreen on cheap boards. Always verify with a multimeter, but the table above matches the standard "L298N Shield" reference design. hw 130 motor control shield for arduino datasheet
The Critical Jumper (Most people miss this) Looking at the HW-130 PCB, you'll see a small jumper labeled "5V En" (Enable).
Jumper ON (Default): The board powers the L298N logic using the Arduino's 5V pin. Use this only for small, 5V motors. Jumper OFF: You must supply external power (7-12V) to the "VMS" terminal block. Use this for 6V-12V motors.
If you run a 9V motor with the jumper on, you will fry your Arduino's voltage regulator. Cut that trace or remove the jumper immediately for high-voltage projects. How to Wire It (Step-by-Step) The HW-130 Motor Shield: Decoding the Datasheet for
Stack it: Push the shield onto your Arduino. It should cover pins 0-13 and the 5V/GND rails. External Power (if >5V): Connect your battery pack (6x AA or a 2S LiPo) to the green terminal block labeled "VMS" (Motor Supply) and "GND". Motors: Connect Motor A to the "A+" and "A-" terminals. Motor B to "B+" and "B-".
Arduino Code Template (The "Datasheet" Logic) 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); delay(2000); // Stop both motors digitalWrite(IN1, LOW); digitalWrite(IN2, LOW); digitalWrite(IN3, LOW); digitalWrite(IN4, LOW); delay(1000); }
3 Common Problems (And Fixes) 1. Motors twitch but don't spin. Here is what the unofficial datasheet actually means
Fix: You need external power. The Arduino's 5V pin cannot drive motors. Connect 6V-12V to the "VMS" terminal.
2. Arduino resets when motors start.