Hw 130 Motor Control Shield For Arduino Datasheet Better Patched Official

The key to success with the HW-130 is . The motors must be powered separately from the Arduino's logic.

The HW-130 is a 4-channel motor shield based on the L293D, a quadruple high-current half-H driver. This driver IC allows you to control the speed and direction of up to four DC motors or two stepper motors independently. It also includes headers for two servo motors. Plug-and-play: Stacks directly onto the Arduino. Versatility: Supports DC motors, steppers, and servos.

⚠️ If your motors draw >1A, do NOT power the Arduino through the shield’s 5V regulator. Instead, power Arduino via USB or its own DC jack.

// --- Move Reverse (Full Speed) --- digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); analogWrite(ENA, 255); hw 130 motor control shield for arduino datasheet better

The shield works seamlessly with the AFMotor.h library. This library simplifies complex motor commands into simple, easy-to-understand functions like setSpeed() and run() , abstracting away the underlying complexity.

To write your own code without a library, you must understand this internal map.

The shield is built around two L293D motor driver ICs and a to save Arduino pins. The key to success with the HW-130 is

Since the shield uses a shift register to control motor direction, it frees up several Arduino pins for other uses. Arduino Pin(s) Used Connected to Timer1 for jitter-free control. Connected to Timer1. DC/Steppers Pins 4, 7, 8, 12 Used by the 74HC595 shift register. Pins 3, 5, 6, 11 Direct PWM control for motor speed. Unused Pins Digital 2, 13; Analog A0–A5 Available for sensors or other modules. Power Management & Jumpers

Based on your request for a "better" datasheet experience for the HW-130 L298N Motor Control Shield, I have compiled a . This document is designed to be clearer, more practical, and easier to read than standard technical datasheets, specifically tailored for Arduino users.

Here is a simple example to run a motor back and forth. This driver IC allows you to control the

Up to (5V) connected to the Arduino’s high-resolution timers.

| IN1 | IN2 | Motor A Action | | :--- | :--- | :--- | | HIGH | LOW | Forward | | LOW | HIGH | Reverse | | HIGH | HIGH | Brake (Stop) | | LOW | LOW | Stop (Coast) |

switch(command) case 'F': // Forward motor1.run(FORWARD); motor2.run(FORWARD); break; case 'B': // Backward motor1.run(BACKWARD); motor2.run(BACKWARD); break; case 'L': // Turn Left motor1.run(BACKWARD); motor2.run(FORWARD); break; case 'R': // Turn Right motor1.run(FORWARD); motor2.run(BACKWARD); break; case 'S': // Stop motor1.run(RELEASE); motor2.run(RELEASE); break; default: // Stop all motors if an unknown command is received motor1.run(RELEASE); motor2.run(RELEASE); break;

The easiest way to control the HW-130 is by using the Adafruit Motor Shield library .

Aller au contenu principal