How to wire up the larger stepper motor from SparkFun using an H-Bridge (SN754410):
(Images adapted from https://www.arduino.cc/en/Reference/StepperBipolarCircuit)
Note where pin 1 of chip is (marked with dot or U cut-out).
This motor requires 12V and up to 330mA of current. Red and Green wires are one coil, and Yellow and Blue the other coil. Motor datasheet showing wiring color codes: http://www.sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf
Code samples – use the Arduino stepper library for easiest control:
Visual animation showing how they work inside:
More information from Tom Igoe’s excellent explanation:
NOTE on above: we are using a bipolar stepper, you can ignore the two-wire setups, and Arduino library now has easier Stepper functions built in.
Connecting wires to breadboard: the motor has stranded wire which does not fit well into breadboards. Solder to header pins, either
- individually to connect directly to the h-bridge, or
- to a header pin block, with additional wires on the breadboard connected to the h-bridge
- This needs more wires but allows for easy plugging and unplugging of the motor