Controlling DC Motors

Knowing how to control a simple DC motors will help you complete your lifting device for the design competition. This web page will point you toward resources that will help you power the motors in your printer kits.

Other resources

If you want to know the details, and build your own motor controller, you should take the controls and/or mechatronics classes, ME 452, 453, 454, 460. However, with some basic knowledge of electrical circuits a willingness to write a little microcontroller code, and an investment of $10 or so, you can easily build a system that controls up to two DC motors.

PWM Basics

Motor controllers very often use Pulse-width Modulation (PWM) to simulate a variable DC power level. Here are some notes on using PWM to control a "slow" electrical load like a brushed DC motor.

Do not attempt to control the DC motors in the printer directly from an Arduino, or similar, microcontroller. Microcontroller boards cannot supply sufficient current, and if you short to output you may damage the microcontroller.

Motor Control Boards

The TB6612 motor driver should be sufficient for your printer projects. At least it's a good starting point. If you need more current, I recommend looking at the Pololu web site (see below).

Instead of working with the bare chip, I recommend a break-out board costing $5 to $10 from Adafruit, Pololu, Sparkfun or a similar vendor. A break-out board has supporting circuitry and convenient solder pads that match the pitch of a breadboard.

If you already have a TB6612 Breakout Board, check out the wiring and usage guide for ME 491 students.

The TB6612 has built-in flyback diodes, so you can drive a DC motor with a PWM signal without worrying about current spikes back into the source of the control signal, such as a microcontroller.

Adafruit has a low-cost ($5) motor driver board

This board uses the same TB6612 driver as the Sparkfun boards listed below. Note that Adafruit tutorial gives instruction on using this board to drive a single stepper motor. The same board will also drive two DC motors.

Pololu sells low-cost ($5) motor drivers as well as drivers capable of higher power levels than the TB6612 breakout boards sold by Adafruit and Sparkfun boards.

Sparkfun sells a breakout board with the same TB6612 H-bridge chip at a higher price ($10) than Adafruit or Pololu. The only difference between the two versions of the TB6612 breakout sold by Sparkfun is whether the breakout boards comes with pre-soldered, breadboard-compatible, headers or not.

Locally, URS electronics carries a small selection of Sparkfun parts. I don't know if URS has the TB6612 breakout board in stock, but it may be worth checking.


Document updated 2016-11-26.