The Arduino and the motors share the same power source. If you plug a 9V battery into the Arduino's DC jack, it will also power the motors. Warning: High-draw motors will pull too much current, cause voltage drops, and constantly reset your Arduino.
: Assigned to clock, latch, data, and enable lines for the 74HC595 shift register to control H-bridge direction states. Available I/O Pins
| Function | Arduino Pin | Description | | :--- | :---: | :--- | | | D10 | PWM control for Motor 1 (0-255 speed) | | M1 (Dir M1) | D12 | Direction control for Motor 1 (HIGH/LOW) | | E2 (Speed M2) | D11 | PWM control for Motor 2 (0-255 speed) | | M2 (Dir M2) | D13 | Direction control for Motor 2 (HIGH/LOW) | hw 130 motor control shield for arduino datasheet
Below is a simple sketch to spin a DC motor connected to the terminal forward, backward, and adjust its speed.
Used to connect a second stepper motor.
The shield is designed for 5V logic, but it can often be used with 3.3V boards like the ESP32. The L293D has a logic‑high threshold below 3.3V, so direct control is possible. However:
Up to 2 stepper motors (unipolar or bipolar, single/double coil, interleaved, or micro-stepping) The Arduino and the motors share the same power source
The HW-130 shield uses Arduino pins for motor control while leaving other pins free for sensors. Motor Terminals (M1, M2, M3, M4)
| Aspect | Review | |--------|--------| | | Good – clearly labels which Arduino pins are used for motor direction (IN1–IN4), enable pins (ENA, ENB), and servo connections. | | Basic wiring diagram | Shows how to connect motors, external power supply, and the shield stacking. | | Power supply notes | Mentions jumper for logic power (from Arduino 5V) vs motor power (external). Warns against powering large motors from Arduino’s 5V. | | Truth table | Simple truth table for H-bridge states (forward/reverse/brake/stop). | : Assigned to clock, latch, data, and enable
This code listens for Bluetooth commands (F, B, L, R, S) and drives the robot accordingly. It uses the AFMotor.h library.
If you have the specific HW-130 document (or a link to it), I can check for version-specific errors.