Monday, 23 December 2013

STEPPER MOTOR

HERE IS THE GUIDE FOR WORKING PRINCIPLE OF STEPPER MOTOR WITH THE CODE IN 8051.... USE THIS...


              A Stepper Motor is a brushless, synchronous DC electric motor, which divides the full rotation into a number of equal steps. It finds great application in field of microcontrollers such as robotics. Please refer the article Stepper Motor or Step Motor for detailed information about working of stepper motor, types and modes of operation. Unipolar Motor is the most popular stepper motor among electronics hobbyist because of its ease of operation and availability. Here I explain the working of Unipolar and Bipolar Stepper Motor with PIC 16F877A Microcontroller.



              Stepper Motor can be easily interfaced with PIC Microcontroller by using readymade ICs such as L293D or ULN2003. As I said in the article Stepper Motor or Step Motor, we have three different types of stepping modes for unipolar stepper motor.

Note: 1 – Represents Supply Voltage and 0 – Represents Ground

Wave Drive

In this mode only one stator electromagnet is energised at a time. It has the same number of steps as the full step drive but the torque is significantly less. It is rarely used. It can be used where power consumption is more important than torque.

Wave Drive Stepping Sequence

Step
A
B
C
D
        1
1
0
0
0
        2
0
1
0
0
        3
0
0
1
0
        4
0
0
0
1

 

Full Drive

In this mode two stator electromagnets are energised at a time. It is the usual method used for driving and the motor will run at its full torque in this mode of driving.
Full Drive Stepping Sequence

Step
A
B
C
D
       1
1
1
0
0
       2
0
1
1
0
       3
0
0
1
1
       4
1
0
0
1
Half Drive

In this stepping mode, alternatively one and two phases are energised. This mode is commonly used to increase the angular resolution of the motor but the torque is less approximately 70% at its half step position (when only a single phase is on). We can see that the angular resolution doubles in Half Drive Mode.

Half Drive Stepping Sequence

Step
A
B
C
D
      1
1
0
0
0
      2
1
1
0
0
      3
0
1
0
0
      4
0
1
1
0
      5
0
0
1
0
      6
0
0
1
1
      7
0
0
0
1
      8
1
0
0
1


Driving Bipolar Motor

Bipolar motors are simpler in construction as it contains two coils and no centre tap. Being simple, driving is little complex compared to unipolar motors. To reverse the magnetic polarity of stator windings, current through it must be reversed. For this we should useH-Bridge. Here I use L293d, H-Bridge Motor Driver for that. We can distinguish bipolar motors from unipolar motors by measuring the coil resistance. In bipolar motors we can find two wires with equal resistance.

PROGRAM FOR 8051

// Program to control Stepper Motor with AT89C51 using ULN2003
/**** Wave Drive Stepping ****/
#include<reg51.h>
sfr stepper=0xA0;

void delay(unsigned int count)
{
    int i;
    for(i=0;i<count;i++);
}

void main()
{
    while(1)
    {
        stepper=0x01;
        delay(350);
        stepper=0x02;
        delay(350);
        stepper=0x04;
        delay(350);
        stepper=0x08;
        delay(350);
    }
}
/*****************************/

/**** Half Drive Stepping ****/
#include<reg51.h>
sfr stepper=0xA0;

void delay(unsigned int count)
{
    int i;
    for(i=0;i<count;i++);
}

void main()
{
    while(1)
    {
        stepper=0x01;
        delay(300);
        stepper=0x03;
        delay(300);
        stepper=0x02;
        delay(300);
        stepper=0x06;
        delay(300);
        stepper=0x04;
        delay(300);
        stepper=0x0C;
        delay(300);
        stepper=0x08;
        delay(300);
        stepper=0x09;
        delay(300);
    }
}
/*****************************/


No comments:

Post a Comment

share your thoughts