Skip to main content

Motor Driver

I2C out
Available Units
  • Percent [%]
released in 1.1.1

Description

A control board that can drive one or two DC motors forward or backward with variable speed.

Warning: When you drive motors close to the maximum power rating, the motor driver will get very hot. Be careful not to touch it or you can burn yourself.

Functions

Links

Choosing Motors

The motor driver can drive 2 brushed DC motors typically found in small electronic devices. Choose motors with only 2 wires rated between 5V–15V and drawing a maximum of 2 amperes (better to stay below that). Make sure to check out the datasheet for the motor before buying.

Most small electric motors spin pretty fast, but without too much torque. If you want to move things that are heavy or push against resistance you'll need a gear, either separately or integrated into the motor. With a gear you trade speed for force.

A small 5V motor with very low power requirements can be powered through the Arduino and the USB port of your computer, but drawing too much power directly through the Arduino can damage the board. We recommend using an external power source connected to the motor driver.

Many motors don't come with any wires attached, so if you're not comfortable with soldering, make sure to get motors with preattached wires.

Connecting the Motors

You can connect the wires from the motor either to the screw terminals J1 and J5 or to the pin headers OUT1..4 on the motor driver. For the screw terminals you'll need a tiny screw driver with a slotted (flat) head not typically found in your tool market kit.

For a typical DC motor it doesn't really matter which way you connect the wires. Interchanging them will simply reverse the direction the motor is turning. In the blokdots UI we use "forward" and "backward" for the direction – if that doesn't match your expectations, you can switch the wires.

External Power Source

We highly recommend using an external power source when working with motors. This can either be an AC/DC power adapter (you might find an old one from devices you don't use anymore) or a battery pack. If your motors don't need more than 5V, a power bank for mobile phones can work great as a power source.

If your power source and motors operate at the higher end of the specs, consider using a separate power source for the Arduino and remove jumper J4. Read more about that in the Grove Wiki.

If you need to max out the driver specs, consider adding a heat sink on the H-bridge (the chip with L298N written on it).