Stepper motor is a variable reluctance DC motor. When correct input sequence of signal is given to the motor, it starts rotation in steps. (For more detail refer Unipolar Stepper motor interfacing with microcontroller AT89C51).
ULN2003 is high voltage, high current Darlington arrays each containing seven open collector Darlington pairs with common emitters. Here it is used as a current driving IC. This IC is required because stepper motor require more than 60mA current and since controller doesn’t work at this current rating so this IC provides high current to the stepper motor.
In the circuit port P2 as output port which provide input sequence to four input pins of ULN3003 and output of ULN2003 drives the motor.
Input sequences are same as in previous project which are
Simplest sequence
0001
0010
0100
1000
And for half step size
0001
0011
0010
0110
0100
1100
1000
1001
Project Source Code
###
// 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); } } /*****************************/
###
Circuit Diagrams
Project Components
Project Video
Filed Under: 8051 Microcontroller
Filed Under: 8051 Microcontroller
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.