Stepper Motor Control using 8951 Microcontroller

Stepper motor is operated by energizing the stator coils in an ordered sequence. When the input sequence of signal is applied to the motor leads, it starts rotating in steps.

AT89C51 microcontroller has a current rating of 50mA. It can neither source nor sink huge current. ULN2003 is high voltage and high current Darlington array IC. Each input-output pair in ULN2003 acts as an interface between the end points of the stepper motor and port pins of the microcontroller.

Port P2 of AT89C51 is configured as the output port to provide input sequence to four input pins of ULN2003. The output of ULN2003 accordingly helps in driving the motor.

Stepper motor
Circuit Diagram


To work with the unipolar stepper motor, the common points are connected to either Ground or Vcc and the end points of both the phases are usually connected through the port pins of a microcontroller. In present case the common (Green) wires are connected to Vcc. The end points receive the control signals as per the controller's output in a particular sequence to drive the motor.

Since the coils related to each phase are arranged in alternate manner, the end points of two phases are energized in alternate fashion to rotate the motor. This means that the voltage signal should be applied to first end point of Phase1 and then to the first end point of the Phase2 and so on.

1. Wave Drive Stepping Mode
The above mentioned sequence is repeated to rotate the motor in Wave Drive Stepping Mode. The direction of rotation can be clockwise or anti clockwise depending upon the selection of end points.

Wave drive stepping mode



2. Full Drive Stepping Mode

The Full Drive Stepping can be achieved by energizing two endpoints of different phases simultaneously.

Full drive stepping mode


3. Half Drive Stepping Mode

The Half Drive Stepping is achieved by combining the steps of Wave and Full Drive Stepping Modes. This divides the stepping angle by half.

Half drive stepping mode

To download the code for this project click on below button

Previous
Next Post »