0% found this document useful (0 votes)
1K views4 pages

Stepper Motor Interfacing

The document describes a stepper motor control circuit using an 8051 microcontroller. It consists of an AT89C51 microcontroller connected to a ULN2003A driver IC and stepper motor. The ULN2003A drives the stepper motor, which has 4 coils activated in a cyclic order to rotate the shaft in full or half steps. The microcontroller program provides the pulse sequences to drive the motor in full or half step modes for clockwise rotation.

Uploaded by

Piyush chaudhari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views4 pages

Stepper Motor Interfacing

The document describes a stepper motor control circuit using an 8051 microcontroller. It consists of an AT89C51 microcontroller connected to a ULN2003A driver IC and stepper motor. The ULN2003A drives the stepper motor, which has 4 coils activated in a cyclic order to rotate the shaft in full or half steps. The microcontroller program provides the pulse sequences to drive the motor in full or half step modes for clockwise rotation.

Uploaded by

Piyush chaudhari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

STEPPER MOTOR INTERFACING:

Stepper Motor Control using 8051 Microcontroller Circuit Design:


 The circuit consists of AT89C51 microcontroller, ULN2003A, Motor. AT89c51 is low power, high-
performance, CMOS 8bit, 8051 family microcontroller. It has 32 programmable I/O lines. It has 4K bytes
of Flash programmable and erasable memory. An external crystal oscillator is connected at the 18 and 19
pins of the microcontroller. Motor is connected to the port2 of the microcontroller through a driver IC.

 The ULN2003A is a current driver IC. It is used to drive the current of the stepper motor as it requires
more than 60mA of current. It is an array of Darlington pairs. It consists of seven pairs of Darlington arrays
with common emitter. The IC consists of 16 pins in which 7 are input pins, 7 are output pins and remaining
are VCC and Ground. The first four input pins are connected to the microcontroller. In the same way, four
output pins are connected to the stepper motor.

 Stepper motor has 6 pins. In these six pins, 2 pins are connected to the supply of 12V and the remaining are
connected to the output of the stepper motor. Stepper rotates at a given step angle. Each step in rotation is a
fraction of full cycle. This depends on the mechanical parts and the driving method.

 Similar to all the motors, stepper motors will have stator and rotor. Rotor has permanent magnet and stator
has coil. The basic stepper motor has 4 coils with 90 degrees rotation step. These four coils are activated in
the cyclic order. The below figure shows you the direction of rotation of the shaft. There are different
methods to drive a stepper motor. Some of these are explained below.
Full Step Drive: In this method two coils are energized at a time. Thus, here two opposite coils are excited
at a time.
Half Step Drive: In this method coils are energized alternatively. Thus it rotates with half step angle. In
this method, two coils can be energized at a time or single coil can be energized. Thus it increases the
number of rotations per cycle. It is shown in the below figure.
How to Operate this Stepper Motor Driver Circuit?
1. Initially , switch on the circuit.

2. Microcontroller starts driving the stepper motor.

3. One can observe the rotation of the stepper motor

4. The stepper motor has four wires. They are yellow, blue, red and white. These are energized alternatively
as given below.
5. In full step driving, use the following sequence (1.8 degree)

6. To drive the motor in half step angle, use the following sequence (0.9 degree)
INTERFACING DIAGRAM:

PROGRAM:
AIM: For full stepping 1.8ᵒ for clockwise direction

MAIN: MOV P2, #09H ; Step 1


ACALL DELAY
MOV P2, #0CH ; Step 2
ACALL DELAY
MOV P2, #06H ; Step 3
ACALL DELAY
MOV P2, #03H ; Step 4
ACALL DELAY
SJMP MAIN

DELAY: MOV R4, #04


HERE_1: MOV R3, #0FFH
HERE_2: MOV R2, #0FFH
HERE_3: DJNZ R2, HERE _3
DJNZ R3, HERE_2
DJNZ R4, HERE_1
RET
END

AIM: For half stepping 0.9ᵒ for clockwise direction

MAIN: MOV P2, #0AH ; Step 1


ACALL DELAY
MOV P2, #08H ; Step 2
ACALL DELAY
MOV P2, #0CH ; Step 3
ACALL DELAY
MOV P2, #04H ; Step 4
ACALL DELAY
MOV P2, #06H ; Step 5
ACALL DELAY
MOV P2, #02H ; Step 6
ACALL DELAY
MOV P2, #03H ; Step 7
ACALL DELAY
MOV P2, #01H ; Step 8
ACALL DELAY
SJMAP MAIN

DELAY: MOV R4, #04


HERE_1: MOV R3, #0FFH
HERE_2: MOV R2, #0FFH
HERE_3: DJNZ R2, HERE _3
DJNZ R3, HERE_2
DJNZ R4, HERE_1
RET
END

You might also like