Dual Motor TinyShield Tutorial
The Dual Motor TinyShield allows you to drive two independently controlled DC brushed motors from your TinyDuino!
Now you can create your own tiny robots or drones!
Using two of the super miniature but very powerful 2mm x 2mm TI DRV8837 Motor Driver (H-Bridge) IC, this shield will allow for up to 1.8A of current per channel and operate motors between 1.8V to 11V.
This TinyShield includes a built in motor controller to make driving motors simple and uses the TinyDuino I2C interface - saving GPIO pins on the TinyDuino processor for other tasks, and an easy to use Arduino library is provided to control this.
Since this TinyShield uses I2C for communication, multiple Dual Motor TinyShields can be used on the same board (up to four Dual Motor TinyShields) There are resistors that can be changed to set the I2C address.
The board features include:
- Bypass capacitors
- Heatsinking the chips to a large plane on the bottom side of the board to help with heat dissipation
- An external power connection is supplied to connect up to your motor power source (like a battery), and all the connections to the motors are with standard 0.1″ spaced holes, that you can solder your motor leads into or use the supplied 0.1″ headers
- Available with JST connectors to allow easy connection to motors with this connection (future option)
- It kinda looks like a surprised face
The TI DRV8837 has one H-bridge driver consisting of N-channel power MOSFETs to drive a DC motor or one winding of a stepper motor, or other devices like solenoids. An internal charge pump generates needed gate-drive voltages. There are internal shutdown functions for overcurrent protection, short-circuit protection, undervoltage lockout and over temperature. The DRV8837 can supply up to 1.8 A of output current. It operates on a motor power-supply voltage from 1.8 to 11 V .
Note: While the DRV8837 supports 1.8A @ 11V, we highly recommend operating under 500mA @ 5V per channel unless you have some really good heat sinking in place.
The sample sketch below will demonstrate how to drive two brushed motors connected to M1 and M2.
- Up to 4 Dual Motor TinyShields (meaning 8 motors!) can be stacked together in one TinyDuino stack. However the I2C address needs to be different for each TinyShield and this can be changed with resistors R1 and R2 (soldering is required for this).
By default, the motor power supply input connection is connected to the VBATT connection on the TinyDuino to power it as well. Therefore you can run your TinyDuino and the motors off the same battery when it's plugged into this TinyShield. However when using this, be sure not to exceed 5.5V on this power input or it will damage the TinyDuino circuitry. If a higher motor voltage is required, you can remove resistor R3 which will allow you to run the motor voltage independently from the TinyDuino logic voltage.
- Even though the motor driver can support 11V at 1.8Amps, we do not recommend using more than a 5V motor at 500mA due to the small size.
- Be sure that your power supply is sufficient to operate these motors as well as your logic – batteries are the best. If you are running both the motors and the logic off of one power supply, we recommend avoid using a switching power supply as the transients caused can potentially damage items connected to the logic side.