Saturday, 18 November 2017

Stepping it up a gear

Having previously played with a Servo, I bought a cheap stepper motor to see how easy it is to use with the Arduino.

Stepper motors have multiple electromagnets arranged around the central shaft. These electromagnets can be controlled in a specific way that allows the shaft to rotate, or step, a fixed amount. Typically steppers are controlled with a driver circuit. A microcontroller such as the Arduino can do this.

The motor is a 28BYJ-48 with a ULN2003 motor driver chip. This is a unipolar stepper with 5 wires.


A unipolar stepper has one winding with a "center tap" per phase. The center tap is a contact made half way along the winding. In the 5 wire stepper, the center tap is joined to a common wire.



Wiring the stepper as below and and using the stepper_oneRevolution sketch from the Arduino examples didn't work out of the box. Instead of revolving clockwise and anticlockwise it always rotated in the same sense.

So, to get it working I followed the steps on this Instructables tutorial



Here is the Arduino and Stepper put together:
Next step is to include this with the Raspberry Pi for some more interesting applications.

No comments:

Post a Comment