Aim
Write an ALP using 8051 for Stepper motor interface using 8051 microcontroller
Algorithm
Source Code
stepper motor
∙A motor, in general, is a device that converts electrical energy into mechanical
energy.
∙ As the name suggests, a stepper motor is a device that does the same task as
above but, in steps.
∙ It is a brushless, synchronous electric motor that can divide a complete rotation
into a number of steps. Stepper motors generally have a permanent magnet shaft
(rotor), and it is surrounded by a stator.
∙ The best feature of this type of motor is that the motor’s angular position can be
accurately controlled without any feedback mechanism, as long as the motor is not
oversized. (From a designer’s point of view the sizing of the motor is essential, if
the stepper motor is undersized then it will not be able to withstand load and if it is
oversized then it becomes too expensive for its purpose.).
∙ Therefore, it works in a simple accurate open-loop system, where the output is
directly dependent on the input.
∙ A stepper motor rotates at small angles to complete 360 degrees rotation, these
small angles are called steps, hence the name Stepper Motor. Typically, a stepper
motor consists of 200 steps.
200 Steps = 360 degrees
1 Step = ‘x’ degrees
x = 360 / 200 = 1.8 degree
∙ Therefore, every step is 1.8 degrees.
∙ The high and low pulses are provided to the stator coil of the stepper motor. ∙ Here
we’re using a 4-coil stator. The angle of each step is decided by the steps in the
rotor and its alignment with the stator.
∙ In the case of a 200-steps motor, the step angle is 360 / 200 = 1.8 degrees, and in
the case of an 8-steps rotor, the step angle is 360 / 8 = 45 degrees. Here’s a
simulation.
Result: