Open Arduino IDE > Sketch > Include Library > Manage Libraries > Search for "Adafruit Motor Shield" (V1) and install.
motor.run(F
If you hold the HW-130, you are likely holding a blue PCB stacked with chips. To understand it, we must ignore the "HW-130" label and look at the actual components:
This is a classic beginner project that showcases the shield's capabilities. hw 130 motor control shield for arduino datasheet better
While it's possible to power a small motor from the Arduino's 5V pin during initial testing, this is not recommended. Motors draw significant current, which can cause your Arduino to brown out or reset. Always connect a separate battery pack (4.8V to 24V) to the EXT_PWR terminal.
// Turn right (Motor A forward, Motor B backward) digitalWrite(in1, HIGH); digitalWrite(in2, LOW); digitalWrite(in3, LOW); digitalWrite(in4, HIGH); analogWrite(enA, 150); analogWrite(enB, 150); delay(1000);
The HW-130 shield is a fantastic tool for learning and prototyping motor control projects. Its L293D driver makes it ideal for small to medium-sized DC motors and stepper motors. For 90% of hobbyist robots and automation projects, the HW-130 is powerful enough. Understanding its power needs (always use external power for motors), its library (AFMotor.h), and its physical connections will let you build almost any robotic project. Open Arduino IDE > Sketch > Include Library
AF_DCMotor motor(1); // Create motor object on channel 1
void loop() { uint8_t i;
Each IC has two H-bridges, providing 4 H-bridges total. While it's possible to power a small motor
So, is the HW-130's than modern options? The answer is nuanced and depends entirely on your project's mission.
Controlled via Pins 4, 7, 8, and 12 (Shift Register). PWM (Speed Control): Motor 1: Pin 11 Motor 2: Pin 3 Motor 3: Pin 5 Motor 4: Pin 6 Servos: Pins 9 and 10 (linked directly to Arduino timers). Better Software Implementation
In online discussions, multiple users have noted that the L293D chip (600mA/channel) is outdated and not suitable for demanding applications. As one expert on a forum put it, " The L293D is old technology. That chip can only power tiny motors. Common yellow car/wheel motors and a 15V supply is a big NO ". For demanding applications or large motors, it struggles, often overheating under load.
The following are the technical specifications of the HW-130 Motor Control Shield: