How to Interface Stepper Motor with 8051 Controller

This article based on how to Interface Stepper Motor with 8051 Micro controller using ULN2003 IC. This simple project is really helps you to understand the working of Stepper Motor.

What is Stepper Motor?

A stepper motor, also known as step motor or stepping motor, is a brushless DC electric motor that divides a full rotation into a number of equal steps.

stepper motor
Components used:
  • 8051 Controller (AT89C51)
  • Stepper Motor
  • ULN 2003
  • Power Supply
  • Crystal Oscillator (12mhz)
  • Ceramic Capacitor (33pf)
Software used:
What is ULN2003

Typical usage of the ULN2003A is in driver circuits for relays, lamp and LED displays, stepper motors, logic buffers and line drivers

Source Code:
#include
void delay(int time) // Delay Function
{
int i,j;
for(i=0;i<time;i++)
for(j=0;j<1275;j++);
}

void main() //Project main function
{

while(1)
{
P2=0x01; // 0001 P2_0=1,P2_1=0,P2_2=0,P2_3=0
delay(100);
P2=0x00; //0010
delay(100);
P2=0x02; //0010
delay(100);
P2=0x00;
delay(100);
P2=0x04; //0100
delay(100);
P2=0x00;
delay(100);
P2=0x08; //1000
delay(100);
P2=0x00;
delay(100);

}

}

Copy above code and create .Hex file. Learn how to create .Hex file watch below video

Circuit Design, watch below video:

You may also like...

Leave a Reply