Hw 130 Motor Control Shield For Arduino Datasheet Better -
The shield breaks out two headers specifically for servos. These bypass the motor driver chips entirely.
void setup() pinMode(enA, OUTPUT); pinMode(enB, OUTPUT); pinMode(in1, OUTPUT); pinMode(in2, OUTPUT); pinMode(in3, OUTPUT); pinMode(in4, OUTPUT);
Second, a better datasheet would include a , explicitly stating that IN1/IN2 (or IN A/B) control direction, and that PWM pins must be connected to enable pins for speed control. Many failed HW-130 projects stem from users assuming the shield works like an L293D or a servo driver. A “better” document would include a side-by-side comparison with common misconceptions, plus an oscilloscope screenshot of proper PWM waveforms.
// Map IN1,IN2,IN3,IN4 accordingly
| Parameter | Value | |--------------------------|---------------------------| | Chip | L298N | | Logic voltage | 5V (from Arduino or ext) | | Motor voltage | 6V – 12V recommended | | Max continuous current | 1.5A per channel | | Peak current (1 sec) | 3A | | PWM frequency range | 0 – 25 kHz (use 15-20 kHz)| | Servo output | 5V, shared with Arduino | | Arduino pin usage | D4, D6, D7, D8, D9, D12 | | Standby current | ~12mA | | Onboard LED | Power indicator (VM side) |
The shield uses a shift register (74HCT595) to save Arduino pins, requiring only 3 digital pins to control 4 DC motors. Arduino Pin(s) Used Digital Pin 9 Uses Timer 1 (Uno) or Timer 2 (Mega) Servo 2 Digital Pin 10 Uses Timer 1 DC Motor 1 / Stepper 1 Digital Pin 11 PWM for speed control DC Motor 2 / Stepper 1 Digital Pin 3 PWM for speed control DC Motor 3 / Stepper 2 Digital Pin 5 PWM for speed control DC Motor 4 / Stepper 2 Digital Pin 6 PWM for speed control Shift Register Control Digital Pins 4, 7, 8, 12 Used for direction control of all motors Powering Your Motors The HW-130 features a PWR Jumper . L293D Based Arduino Motor Shield
motor1.run(RELEASE); delay(500);
The HW-130 has no official datasheet – it’s a clone of a clone. But now you know its soul: an L298N chip, a handful of diodes, screw terminals, and a heroic ability to get your robot moving. Treat it with respect for heat and power, and it will serve faithfully.
#include // Create motor objects AF_DCMotor motor1(1); // Motor on M1 AF_DCMotor motor2(2); // Motor on M2 void setup() // Set initial speed (0-255) motor1.setSpeed(200); motor2.setSpeed(200); void loop() // Forward motor1.run(FORWARD); motor2.run(FORWARD); delay(1000); // Backward motor1.run(BACKWARD); motor2.run(BACKWARD); delay(1000); // Stop motor1.run(RELEASE); motor2.run(RELEASE); delay(1000); Use code with caution. 5. Troubleshooting & Limitations
The HW-130 Motor Control Shield typically comes with a warranty and support from the manufacturer. For more information on warranty and support, please contact the retailer or manufacturer directly. hw 130 motor control shield for arduino datasheet better
Pinout and electrical connections
To prevent overloading the Arduino, remove the jumper next to the terminal block.