Dual MAX14870 Motor Driver Shield for Arduino – Pololu 2519
This motor driver shield and its corresponding Arduino library make it easy to control a pair of bidirectional, brushed DC motors with an Arduino or compatible boards. The board features a pair of Maxim’s MAX14870 H-bridge motor driver ICs, which allows it to operate from 4.5 V to 36 V and makes it well suited for driving higher-voltage motors like our 12V 20D gearmotors. The shield can deliver 1.7 A continuous per channel and tolerate peak currents up to 2.5 A per channel for a few seconds. The shield ships fully populated with its SMD components, including the MAX14870 drivers and a FET for reverse battery protection; header pins for interfacing with an Arduino and terminal blocks for connecting motors and power are included but are not soldered in.
This shield is intended to provide a low-cost, basic motor driver option for Arduinos, so it is much smaller than typical Arduino shields and does not include pass-through, stackable headers.
Motor Driver Shield Specifications:
|Motor driver:||MAX14870 (x2)|
|Minimum operating voltage:||4.5 V|
|Maximum operating voltage:||36 V|
|Continuous output current per channel:||1.7 A1|
|Peak output current per channel:||2.5 A|
|Maximum PWM frequency:||50 kHz|
|Reverse voltage protection?:||Y|
- Typical results at room temperature with VIN=18 V and both channels running at 90% duty cycle.
Motor Driver Shield Dimensions:
- Size: 50.8 x 24.4 mm (2″ x 0.96″)
- Weight: 4.8 g
Assembly of the Motor Driver Shield:
Before the shield can be plugged into your Arduino, header pins must be mounted to the bottom of the board (the side without any components or text) by soldering them into the appropriate holes. The shield ships with a 0.1″ straight breakaway male header strip that can be broken into smaller pieces and used for this purpose. Ground is the only necessary connection on the left side of the board (though VIN must also be soldered if you intend to power the Arduino from the shield). Along the right side of the board, digital pins 4, 7, 8, 9, 10, and 12 are used by default. Male header pins should be soldered to at least these locations so that the shield will make the appropriate connections to the Arduino. Once the header pins are soldered in, one easy way to ensure that you are plugging the shield properly into the Arduino is to align the gap between pins 7 and 8 on the shield with the gap between pins 7 and 8 on the Arduino’s female headers.
When the input voltage for the motors is appropriate for the Arduino or Arduino compatible board, reverse-protected power can be provided to the Arduino’s VIN pin through the shield. For this configuration, solder two male header pins to the “VM = AVIN” jumper location and install the included blue shorting block across them (as shown in the above assembled picture). These pins should point up, away from the Arduino.
If the motor supply voltage is higher than the Arduino or Arduino compatible board can handle, a voltage regulator, such as our D24V5F9 500mA Step-Down Voltage Regulator (not included), can optionally be used to provide a suitable voltage to VIN pin of the Arduino. For this configuration, solder the regulator into the VM, GND, and AVIN pins outlined in the shield’s silkscreen. Be careful to orient the regulator so its input pin lines up with VM and its output pin lines up with AVIN. For a more modular setup, a three pin female header can be soldered to the shield and used as a socket for a regulator.
The Arduino’s power jack must remain disconnected at all times if power is supplied to the AVIN pin through the shield.
Three 2-pin, 5 mm terminal blocks are included for making easy motor and power connections to the shield once they have been slid together and soldered to the six large through-holes. Alternatively, you can solder 0.1″ male header pins to the smaller through-holes above the terminal block holes, or you can just solder wires directly to the shield for more compact (and permanent) installations.
Additional header pins and shorting blocks beyond what is included can be used to make some of the more advanced optional modifications to the shield, such as remapping the control pins.
An Arduino is not included.
Default Pin Mappings:
The shield plugs into Arduino digital pins 4 – 12 on one side and A1 through RST on the other. The upper-left corner of the shield partially blocks the Arduino’s IOREF pin, but this region of the board (marked with a white silkscreen box) can be removed if necessary to allow access. The shield also blocks Arduino digital pins 5, 6, and 11, but these pins are not used by default and alternate access points to them are provided via the neighboring through-holes.
This table shows how the Arduino’s GPIO pins are used to interface with the motor drivers:
|Motor driver pin||Description|
|4||EN||Inverted enable input: The shield pulls this pin low by default, enabling the drivers. Driving this pin high puts both motor driver ICs into a low-current sleep mode and disables the motor outputs (setting them to high impedance).|
|7||Motor 1 DIR||Motor direction input: When DIR is low, motor current flows from output A to output B; when DIR is high, current flows from B to A.|
|8||Motor 2 DIR|
|9||Motor 1 PWM||Motor speed input: A PWM (pulse-width modulation) signal on this pin corresponds to a PWM output on the corresponding driver’s motor outputs. When this pin is low, the motor brakes low. When it is high, the motor is on. The maximum allowed PWM frequency is 50 kHz. A 100 kΩ pull-down resistor on the shield makes this pin default low.|
|10||Motor 2 PWM|
|12||FAULT||Fault output: The internal pull-up on the Arduino pin connected to the FAULT input should be enabled so when the drivers are functioning normally it is pulled high. In the event of an over-current or over-temperature condition, the driver IC experiencing the fault drives FAULT low.|
Using The Shield:
In the shield’s default state, the motor driver shield and Arduino are powered separately, though they share a common ground. When used this way, the Arduino must be powered via USB, its power jack, or its VIN pin, and the shield must be supplied with 4.5 V to 36 V through its large VIN and GND pads. Attempting to power the shield from the Arduino is not recommended as this could result in large currents flowing through small traces. However, it is possible to power the Arduino from the shield either directly with the motor power supply or through an added regulator. See the Assembly with included hardware section above for more information on powering the Arduino from the shield, including some important warnings.
The MAX14870 offers a simple two-pin DIR/PWM control interface, where the DIR pin determines the motor direction and the PWM pin can be supplied with a PWM signal to control the motor speed. The PWM control input is pulled low on the shield through a 100 kΩ pull-down resistor. When the PWM pin is low, the motor outputs are both shorted to ground, which results in dynamic braking of a connected motor.
The shield’s EN pin can be driven high to turn off motor outputs for both motor channels, which is useful if you want to let the motors coast. The EN pin is pulled low through a 100 kΩ pull-down resistor on the shield so that both motor channels are enabled by default. To get individual control of the enable lines for both drivers, the trace between the M1EN and M2EN through holes can be cut. This will leave M2EN connected to Arduino digital pin 4. A jumper can be used across the M1EN pin and the neighboring through hole to connect it to digital pin 5.
|0||0||PWM||PWM (H/L)||L||forward/brake at speed PWM %|
|0||1||PWM||L||PWM (H/L)||reverse/brake at speed PWM %|
|0||X||0||L||L||brake low (outputs shorted to ground)|
|1||X||X||Z||Z||coast (outputs off)|
The following simplified truth table shows how the driver operates:
The MAX14780 shield has a fault pin that combines the fault outputs of the two on-board drivers, M1FAULT and M2FAULT. It is an open-drain, active-low fault output that goes low during an over-current or over-temperature condition on either motor channel. To get individual fault outputs, the trace between the M1FAULT and M2FAULT through holes can be cut. This will leave M2FAULTconnected to Arduino digital pin 12. A jumper can be used across the M1FAULT pin and the neighboring through hole to connect it to digital pin 11.The MAX14870 IC features a SNS input that can be used for optional automatic current limiting. By default, this input is connected to ground for both drivers on this board, which bypasses the current regulation feature. To enable current limiting, you must first cut the traces between each pair of unpopulated 1206 resistor pads near the driver chips.
Real-world power dissipation considerations
Each driver tries to keep the voltage on the SNS pin from exceeding 100 mV, so for example, a 100 mΩ resistor limits the current to 1 A and a 200 mΩ resistor limits it to 0.5 A.
The MAX14870 datasheet recommends a maximum continuous current of 2.5 A. However, the chip by itself will typically overheat at lower currents. In our tests, a continuous current of 1.7 A per channel was sustainable for many minutes without triggering a thermal shutdown.
The actual current you can deliver will depend on how well you can keep the motor driver cool. The shield’s printed circuit board is designed to help with this by drawing heat out of the motor driver chip. PWMing the motor will introduce additional heating proportional to the frequency.
- Maxim Integrated MAX 14870 DC Motor Driver Datasheet (492k pdf)
- Dimension Diagram for the Dual MAX14870 Motor Driver Shield (190k pdf)
- Schematic Diagram for the Dual MAX14870 Motor Driver Shield (139k pdf)
- Maxim Integrated MAX14870 Product Webpage
- Pololu’s Arduino Library for the Dual MAX14870 Motor Driver Shield