|
HB3x2 Dual 3 Amp H-Bridge for Robotics
| |
How To Use the HB3x2 with an Arduino
We are going to connect the Arduino to the HB3x2 with 2 standard I/O pins and 2 PWM outputs. We have chosen Pin0 and Pin1 as the standard I/O pins and Pin9 and Pin10 as the PWM outputs.
We will use Pin0 and Pin9 for Motor1, and Pin1 and Pin10 for Motor2.
We will consider Pin0 high as forward for motor1, and Pin0 low as reverse for motor1. Likewise we'll consider Pin1 high as forward for motor1, and Pin1 low as reverse for motor1. This may not be the same as your hardware so you may have to change this in your code.
Arduino Hookup Diagram
For this code we are going to wire up the circuit as follows:
Arduino |
HB3x2 |
Pin0 |
1A |
Pin9 |
1B |
Pin1 |
2A |
Pin10 |
2B |
Arduino Source Code
You can get a copy of the source code here.
If you have any questions email me here: jason (at) efundies.com
* Free shipping offer valid only in the United States.
|