Rugged Motor Driver
The Rugged Motor Driver Shield for Arduino is a motor driver for two brush DC motors or one bipolar stepper motor. Rated for 30V and 2.8A peak current operation, the Rugged Motor Driver is the solution for powerful motion. The shield is directly compatible with the Ruggeduino, Arduino Uno, Duemilanove, and Mega, or can be used as a standalone motor driver with any microcontroller board.
- 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:
|Peak DC current per phase||0.6A||2A||2.8A|
|Shorted motor protection||No||No||Yes|
|Electrostatic discharge protection||No||No||2000V|
- 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.
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: INO File: rmcbasic.ino
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: INO File: stepperdemo.ino
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: INO File: AccelStepperDemo.ino
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.
The following Arduino pins are used by default to control the two motor outputs.
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.
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
- 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.
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.
|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|
|A0/D14||J11||Motor B current sense|
|A1/D15||J9||Motor A current sense|
The remaining jumpers on the board are described in the table below. Except for J21, which must be cut when voltages greater than 15V are applied to terminal block J4 (24V for the Ruggeduino), the presence of these jumpers can be ignored for normal operation.
Jumpers can be connected using a small solder bridge or by installing 2-position 0.1” pin headers and a shorting jumper. Jumpers that need to be cut can be easily cut using a small hobby knife or other sharp tool.
|Jumper||Connected by Default||Function|
|J23||No||Provide internal 5V node from motor power supply using R36 and D3 (not included, see schematic).|
|J19||No||Provides +3.3V analog voltage reference to AREF pin.|
|J18||No||Can be used as solderable points for an external reset switch.|
|J17||No||Use 5V for internal DRV8801 logic pullup resistors|
|J20||Yes||Use 3.3V for internal DRV8801 logic pullup resistors|
|J21||Yes||Connect Arduino VIN power to external power supplied through terminal block J4. You must cut this jumper when using external power sources greater than 15V (24V for Ruggeduino).|
|J22||Yes||Leave connected -- provides “star ground” connectivity between digital ground and motor power ground.|
Standalone Motor Driver
The Rugged Motor Driver can be used as a standalone motor driver (without an Arduino) by providing an 8V-30V DC voltage at terminal block J4 and wiring control signals to connector J3. Note that connector J3 is not populated -- you can solder wires directly to the pads on the board or you can purchase our Rugged Motor Driver upgrade kit which includes a 6-pin quick-connect terminal block that can be soldered in for J3.
The connections for J3 are shown in the table below.
|EN1||Enable (PWM) pin for Motor 1|
|DIR1||Direction control for Motor 1|
|3V-5V||Provide a 3V-5V DC supply for DRV8801 logic pullup resistors. Alternatively, install jumper J23 and populate components R36 and D3 (see schematic). Negligible current is drawn from this 3V-5V supply (<1mA).|
|EN2||Enable (PWM) pin for Motor 2|
|DIR2||Direction control for Motor 2|
|EN1||Enable (PWM) pin for Motor 1|
|GND||0V reference -- must be the same as 0V reference for power provided at terminal block J4.|
The Rugged Motor Driver is compatible with the Microchip chipKIT, however pin D11 is not a PWM-capable pin on this board. This means that D11 cannot be used to vary the motor current (hence speed) when connected to the ENABLE2 line. This problem is fixed by jumper J15 (see above). This is a 3-position jumper that normally connects D11 to ENABLE2. By cutting this connection (underneath the board) and instead jumpering D9 to ENABLE2, the Microchip chipKIT can now be used since D9 is PWM-capable on this board.
In summary, to use the Rugged Motor Driver with the Microchip chipKIT:
- Cut the jumper that connects D11 to ENABLE2 (the J15 jumper, on the underside of the board)
- Install a jumper that connects D9 to ENABLE2 (on the right side of the J15 jumper)
- Use D9 in your sketches instead of D11
Uncooled Power Handling
With no forced air flow or other active cooling mechanism, no motor driver integrated circuit is going to achieve its maximum rated current. See our application note The Motor Driver Myth for an explanation of why heat is the limiting factor in how much current you will actually be able to deliver to your motors.
Although the DRV8801 H-bridge devices are rated for 2.8A of peak current, this current cannot be sustained unless there is forced air flow or other active cooling. The same problem exists, and is worse, for motor drivers based on the L293D or L298. Using actual measurements from a controlled experiment with a popular Arduino-compatible motor driver that uses the L298, the Rugged Motor Driver was able to deliver twice as much current to both motor outputs than the L298-based driver. Here is the summary from The Motor Driver Myth application note.
|Motor Driver||Channel 1 Current||Channel 2 Current||Total Current|
Rugged Motor Driver
To summarize, you will not be able to deliver a continuous 2.8A of current to your motors with our Rugged Motor Driver unless you implement forced air flow or other active cooling mechanisms. But you will have the same problem with motor drivers that use the L298 -- a “2A motor driver” will not deliver a continuous 2A of current without forced air flow or active cooling.
- Here is the schematic of the Rugged Motor Driver. For the older version (Revision D), here is its schematic.
- Here is the datasheet of the DRV8801 2.8A H-bridge driver
The Rugged Motor Driver was designed in the USA and is assembled in the USA using lead-free components and lead-free manufacturing and assembly processes.