Features
- Operation from 8V-30V and 2.8A peak per phase
This is the most powerful and rugged motor driver in its price class. Using two Texas Instruments DRV8801 2.8A H-bridge IC’s, the Rugged Motor Driver outperforms drivers based on the L298 (like the Arduino Motor Shield) and L293 (like the Adafruit Motor Shield). Take a look at the datasheet parameters:
|
Parameter
|
L293D
|
L298
|
DRV8801
|
|
Peak DC current per phase
|
0.6A
|
2A
|
2.8A
|
|
Overtemperature protection
|
Yes
|
Yes
|
Yes
|
|
Overcurrent protection
|
No
|
No
|
Yes
|
|
Shorted motor protection
|
No
|
No
|
Yes
|
|
DMOS construction
|
No
|
No
|
Yes
|
|
Synchronous rectification
|
No
|
No
|
Yes
|
|
Electrostatic Discharge Protection
|
No
|
No
|
2000 V
|
|
- Reverse voltage protection
Hook up the power supply backwards with most motor drivers and you can throw them in the trash. Not so with the Rugged Motor Driver. It is fully reverse voltage protected up to 40V. With this feature and the built-in protection systems of the DRV8801 devices, the Rugged Motor Driver is a rugged product that forgives mistakes.
- Simple enable/direction interface
Each motor (or stepper motor phase) is controlled by only 2 inputs: ENABLE and DIRECTION. The ENABLE input can be driven by a PWM output to control the average motor current. The DIRECTION input controls the direction of current flow. These four digital pins completely control 2 brush DC motors or 1 bipolar stepper motor. This interface is compatible with other popular Arduino motor driver shields. See the Connections section below for how to hook up these signals.
- Use external power or Arduino power
You can either use an external voltage source (8V-30V) or use the Vin power from the Arduino. NOTE: For external voltages greater than 15V you must cut jumper J21 when the shield is plugged in to an Arduino (the Ruggeduino is OK up to 24V). See the diagram below in the Connections section for the location of this jumper.
- Assembled, with terminal blocks and pin headers included
Nothing to solder, no extra terminals or pin headers to buy (unlike some other motor driver shields), the Rugged Motor Driver is fully assembled and comes ready to work as an Arduino shield, right out of the box. For use as a standalone motor driver, solder wires directly to 6-pin connector J3 or get our Rugged Motor Driver upgrade kit and solder in a 6-pin quick-connect terminal block.
- Stacking headers
You can stack another shield on top of the Rugged Motor Driver shield, or use the stacking headers for connecting bare wires to I/O pins.
- Four status LED’s
Four general-purpose LED’s can be used to display motor status. Requires shorting jumpers J15, J16, J6, and J7 (see diagram below).
- Configurable control pins for driving multiple motors
Within a few minutes you can modify the Rugged Motor Driver to use different control pins (simple soldering required). Together with the stacking headers this means you can stack multiple Rugged Motor Driver shields together and independently control multiple motors. Since the Arduino has 6 PWM outputs you can stack up to 3 shields together and independently have PWM control over 6 DC motors or 3 stepper motors. More info below.
- Parallel phases for double the current
For driving one DC motor you can connect the two output phases in parallel and get twice the current output. See our application note for more details.
Sample Sketches
Here are some sample programs for demonstrating the applications of the Rugged Motor Driver. They are provided as PDE files (i.e., sketches) for use with the Arduino development environment.
- Basic DC Motor Control
This sketch demonstrates how simple it is to use the Rugged Motor Driver to control the direction and rotation of two brush DC motors.
- Stepper Motor Control
This sketch demonstrates keyboard control of a stepper motor. Open up the serial monitor (or any other terminal program) and use single-keystroke commands to control stepper motor speed, direction, and power. See the documentation in the sketch for usage notes. This sketch makes use of the built-in Stepper library that comes with the Arduino software.
- Stepper Motor Control with Acceleration
The AccelStepper library has more features than the Stepper library. This sketch demonstrates a stepper motor rotating back and forth, slowly accelerating and decelerating to its final position.
The AccelStepper library also supports multiple stepper motors, which is handy if you want to stack multiple Rugged Motor Drivers (see below for how this can be done).
NOTE: The AF_Motor library is only designed to work with the Adafruit motor shield and will not work with the Rugged Motor Driver or other motor drivers that directly control motor driver pins.
Connections
Basic Control
The following Arduino pins are used by default to control the two motor outputs.
|
Pin
|
Function
|
|
D3
|
ENABLE1
|
|
D12
|
DIRECTION1
|
|
D11
|
ENABLE2
|
|
D13
|
DIRECTION2
|
|
The pin assignments can also be changed with some simple board modifications.
ENABLE1 and ENABLE2 can be driven with steady logic level signals (high to enable motor power, low to disable it) or driven by PWM outputs to vary the average motor current smoothly from no power to full power.
The DIRECTION1 and DIRECTION2 signals control the direction of the flow of current in each motor output, hence the direction of rotation for brush DC motors.
For stepper motors, these two direction outputs must be pulsed in the proper sequence to effect forward or reverse rotation. The Stepper library handles this logic for you.
An LED is also connected to pin D9. Three other LED’s are available (on pins D10, D16, and D17) but require jumpers to be shorted before they can be used (see below).
Power In / Motor Out
Terminal block J4 provides an optional 8V-30V external power input connection. The VIN external voltage input to the Arduino can also be used to power the motors instead of applying power at J4.
The motor outputs are available at terminal blocks J1 and J2.
- A bipolar stepper motor is driven by connecting each one of its coils to these two terminal blocks.
- Two brush DC motors can be driven by connecting each motor to one to these two terminal blocks.
- A single brush DC motor can be driven at twice the current by paralleling the outputs of the two terminal blocks. See this application note for more details.
Note that by default, the power input at J4 and the VIN external voltage input are connected (separated by a diode so that the VIN external voltage input cannot be observed at J4 -- see the schematic). This means that when external power inputs greater than 15V are to be used, jumper J21 must be cut else damage to the Arduino can result since it was only designed for VIN voltages of 15V or less. When using the Ruggeduino, input voltages may be as high as 24V before J21 must be cut. See the diagram below for the position of jumper J21.
|
Be careful when cutting jumpers! Do not cut outside the jumper boundary else you may cut traces that run nearby.
|
|
If jumper J21 is left connected then the voltage applied at terminal block J4 can power both the motors and the Arduino.
Power provided through terminal block J4 is reverse voltage protected at up to 40V. If you reverse the polarity of the wires at this connector (i.e., you apply up to -40V), the motor driver will not be damaged.
The DRV8801 motor drivers do tolerate positive input voltages of up to 40V, but we suggest limiting the applied voltage to 30V. When switching large inductive loads, like motors, back-emf voltages greater than the applied voltages can result, especially when quickly reversing the direction of current in a coil (for example, stepping a stepper motor). Rather than quoting the absolute maximum voltage of 40V from the DRV8801 datasheet, we believe it is more prudent to apply only 75% of this absolute maximum voltage (30V) in normal operation.
Rewiring Control Inputs
If you want to use pins other than D3/D11/D12/D13 to control your motors you can do so with some simple board modifications. You will need:
- hobby knife / craft knife : these are available for $2-$3 at just about any craft store or hardware store
- soldering iron
- solder
- hookup wire
Here is the procedure for rewiring the control inputs:
- Use the hobby knife to cut the connection for the control pin you want to disconnect (one of D3/D11/D12/D13). See the layout diagram above for the jumper locations, or the diagram below for an example.
- Solder in one end of a wire to the jumper pad that you want connected to an Arduino pin.
- Solder in the other end of the wire to the desired control input jumper pad.
For example, here is a diagram of a Rugged Motor Driver rewired to the control scheme shown in the table below. Notice that D5 is a PWM-capable output, thus is an appropriate choice for the ENABLE1 control input.
|
Pin
|
Function
|
|
D5
|
ENABLE1
|
|
A1/D15
|
DIRECTION1
|
|
D11
|
ENABLE2
|
|
A0/D14
|
DIRECTION2
|
|
|
|
Optional Connections
Additional pins can optionally be used to make use of features on the Rugged Motor Driver. These pins are not connected by default to allow for maximum flexibility in using the motor driver with other circuits. Only the 4 control pins D3, D11, D12, and D13 are connected in the board as shipped (along with an LED connected to D9).
The optional pin connections shown below can be made by making a small solder bridge between two contacts, or installing a 2-position 0.1” pin header and using a shorting jumper. Our Rugged Motor Driver upgrade kit includes all the necessary pin headers and shorting jumpers to make any connection shown below. Please see the schematic and DRV8801 datasheet for more details on these optional jumpers and pin functions.
J15 is a special jumper: it is a 3-position jumper that selects which pin controls the ENABLE2 line. By default, D11 controls the ENABLE2 line. By cutting this jumper underneath the board, D9 can be used to control the ENABLE2 line. This jumper is intended to allow compatibility with boards like the chipKIT which do not have PWM capability on D11. Regardless of how this jumper is configured, D9 is used to turn on LED #1.
Remember: all of the pins in the table below are not connected by default, meaning you can use them for other purposes and circuits without at all interfering with the normal operation of the motor driver. For example, you can leave jumper J6 unshorted and use analog channel A3 to sense an external analog voltage in your sketch. Or you can short jumper J6 and configure digital pin D17 as a digital output to turn LED #4 on and off.
 |
|
|
|
Pin
|
Jumper
|
Function
|
|
D2
|
J5
|
DRV8801 A mode pin
|
|
D4
|
J8
|
DRV8801 A sleep pin
|
|
D5
|
J10
|
DRV8801 A fault pin
|
|
D6
|
J12
|
DRV8801 B mode pin
|
|
D7
|
J13
|
DRV8801 B sleep pin
|
|
D8
|
J14
|
DRV8801 B fault pin
|
|
D9
|
J15
|
Connection to ENABLE2
|
|
D10
|
J16
|
LED #2
|
|
A0/D14
|
J11
|
Motor B current sense
|
|
A1/D15
|
J9
|
Motor A current sense
|
|
A2/D16
|
J7
|
LED #3
|
|
A3/D17
|
J6
|
LED #4
|
|
|
|