Details

The L298 Motor Driver is the chip at the heart of this all. This is the one that handles all the current, allowing us to make small signal inputs with our Arduino to control motors of large voltages. This part is also available from Sparkfun for ~$1.50 less, so if BOM cost is important, you can get it there.

Diodes are needed to protect against reverse pulses coming from the motors back onto the rest of the circuit and ruining things.

The board has a pair of switches separate from the motor circuit for me to give inputs into the Arduino that the sketch can use for whatever it wants. These resistors are there to pull down the switches to ground. It turns out that using these is a bad idea. Instead, I should have used the Arduino’s internal pull-up resistors and then connected the switches. In a future revision, I will change that and remove these resistors.

The trick to making a shield is getting these great stackable headers which stick through the board into the Arduino, and let you attach something into them above.

Other Parts

Qty

Source

Part#

Description

Price

Comments

1

Sparkfun

ROB-09238

Stepper Motor with Cable

$14.95

1

Sparkfun

BOB-09540

Breakout Board for L298N Full-Bridge Motor Driver

$2.95

The Sparkfun motor is a great motor to start out with. Sturdy, powerful, priced right. That said, this setup will work with any bipolar step motor.

When working with this on a breadboard, having the little breakout board for the L298 is critical. We won’t need it when the shield is done, though.

Background Reading

First, it’s good to be familiar with this stuff:

Stepper motor info. Basic explanation of what a step motor is, why it’s different, and how it operates.

Circuit Board

Following the advice in the Beginners Guide to Arduino Shield PCB, I then laid this circuit out using EAGLE, and send it off to pcb.laen.org for fabrication. $25 and 14 days later, I have three of these handy purple boards in my hands for all my step motor driving projects.

Note that this will also drive a pair of regular bi-directional DC motors.

The Future

This whole setup could be made even smaller and cheaper by using an Arduino Pro Mini from Sparkfun. The next revision of this board will use a 24-pin socket to stick the Pro Mini onto the board.