Programming of Arduino 2A Motor Shield with NEMA17 Stepper Motor
- Arduino Uno
- Arduino 2A Motor Shield : User Manual
- NEMA 17 Stepper Motor
The NEMA 17 stepper motor has two coils. The two ends of each coil are connected to one motor output on the shield. The centre tap wires (black and white) can be ignored.
Motor Shield | NEMA 17 Motor |
---|---|
Motor 1A | green |
Motor 2A | yellow |
Motor 1B | red |
Motor 2B | blue/purple |
The Arduino Stepper library is used. The programs are based off its inbuilt examples stepper_oneRevolution and stepper_oneStepAtATime.
- One Step at a Time: motor moves one step at a time, used to test motor wiring
- Constant revolution: motor constantly revolves at selected speed in selected direction, used to test motor wiring
- One Revolution: motor moves one revolution clockwise, then one revolution counter clockwise, and repeats
Reliability Test for Flexible Electronics
- For the NEMA 17 Stepper Motor tested, the datasheet states that for one coil black is the coil end and yellow is the centre tap wire, but it was found that the opposite is true.
- Select the number of revolutions per step based on the motor used
- These examples use Signed Magnitude mode on the shield.