0% found this document useful (0 votes)
54 views9 pages

I. Summary The Main Principle of The Project and Its Circuits Is To Rotate The Stepper Motor Step Wise at A

This document discusses controlling a stepper motor using an 8051 microcontroller. It describes connecting a stepper motor to an 8051 and driving it using an L293D motor driver or ULN2003 driver IC. The stepper motor can be rotated clockwise or counterclockwise in half or full steps by energizing its coils in sequences controlled by the microcontroller. Applications include robots, printers, and medical devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views9 pages

I. Summary The Main Principle of The Project and Its Circuits Is To Rotate The Stepper Motor Step Wise at A

This document discusses controlling a stepper motor using an 8051 microcontroller. It describes connecting a stepper motor to an 8051 and driving it using an L293D motor driver or ULN2003 driver IC. The stepper motor can be rotated clockwise or counterclockwise in half or full steps by energizing its coils in sequences controlled by the microcontroller. Applications include robots, printers, and medical devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Stepper Motor Control using 8051 Microcontroller

I. Summary

The main principle of the project and its circuits is to rotate the stepper motor step wise at a

particular step angle. The project will be using a ULN2003 IC and the L293D Motor Driver to

drive the stepper motor as the controller cannot provide current required by the motor.

II. Objectives

We will see how to connect a stepper motor with an 8051 Microcontroller.

We will see what the stepper motors are and how they work.

III. Industry-Based Applications

A stepper motor can be applied to many projects. Stepper motors are used in automotive

gauges and machine tooling automated production equipment. A stepper motor is used inside

medical scanners, samplers, and also found inside digital dental photography, fluid pumps,

respirators, and blood analysis machinery. The stepper motors can also be used in disk drives,

matrix printers, etc. The circuit can be used in robotic applications and also used in mechatronics

applications.

Project Methodology

A stepper motor is brushless DC motor, which can be rotated in small angles, the angles

are called steps. Generally, stepper motors use 200 steps to complete 360-degree rotation, meaning

it rotates 1.8 degree per step. Stepper motor used in many devices which needs precise rotational

movement like robots, antennas, hard drives etc. We can rotate the stepper motor to any particular

angle by giving it proper instructions.


A Stepper motor comes in two types: Unipolar and Bipolar. Unipolar stepper motor

generally has five or six wires, in which four wires are one end of four stator coils, and the other

end of the four coils is tied together that makes the fifth wire, this is called common wire. Bipolar

stepper motor there is just four wires coming out from two sets of coils, meaning there are no

common wires.

The working of this circuit is very simple. A method called Half-Stepping is implemented

in the program to rotate the Stepper Motor. When the forward button is pushed, the stepper motor

rotates in clockwise direction

Similarly, when the backward button is pushed, it starts rotating in an anti-clockwise direction.

To stop the rotation completely, you can press the stop button.
Project procedure:

Circuit Diagram 1: Interfacing a Bipolar Stepper Motor Control using 8051

Microcontroller & L293D


components

AT89C51 (8051 Microcontroller)

L293D Motor Driver

5V Bipolar Stepper Motor

16X2 LCD Display

11.0592 MHz Quartz Crystal

10KΩ Resistors X 2

10KΩ POT

8x 1KΩ Resistor Pack

33pF Ceramic Capacitors X 2

10μF/16V Capacitor

Push Buttons X 4
330Ω Resistor

5V Power Supply

Circuit Design

First, the data pins of the LCD are connected to the PORT0 Pins of 8051. Since PORT0

doesn’t have any internal pull-up, a resistor pack is used to pull the PORT0 up. The RS and E

Pins of LCD are connected to P2.0 and P2.1 of 8051.

The RST Pin is pulled down using a 10KΩ resistor. The combination of a Push Button and a

10μF Capacitor will be used to reset the microcontroller. Also, the EA Pin is pulled-up using

a 10KΩ resistor.

Next, the oscillator. It consists of two 33pF Capacitors and an 11.0592 MHz Crystal

connected between XTAL1 and XTAL2 Pins of 8051.

Coming to the Motor Driver, the two enable pins and two supply pins are connected to +5V

supply. The four inputs are connected to PORT1 pins of 8051: P1.0, P1.1, P1.2 and P1.3. The

four pins of the Bipolar Stepper Motor are connected to the four out pins of L293D.

Three buttons are connected to PORT3 pins i.e. P3.0, P3.1 and P3.2. To control the direction

of the Stepper Motor.

Circuit 2: Stepper Motor Control using 8051 Microcontroller & ULN2003


Circuit Components

AT89C51 Microcontroller

ULN2003A

Stepper Motor

Crystal

Resistor

Capacitor

Circuit Design

The circuit consists of AT89C51 microcontroller, ULN2003A, Motor. AT89c51 is a low

power, high-performance, CMOS 8bit, 8051 family microcontroller that has 32

programmable I/O lines. It has 4K bytes of Flash programmable and erasable memory. An

external crystal oscillator is connected to the 18 and 19 pins of the microcontroller. The

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 a 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 a stator and rotor. Rotor has a permanent

magnet and the stator has a 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.

Half Step Drive: In this method the coils are energized alternatively. Thus, it rotates with a half

step angle. For this method, two coils can be energized at a time or a single coil can be

energized. Thus, increase the number of rotations per cycle.

How to Operate this Stepper Motor Driver Circuit?

● Initially, switch on the circuit.

● Microcontroller starts driving the stepper motor.


● One can observe the rotation of the stepper motor

● The stepper motor has four wires. They are yellow, blue, red and white. These are

energized alternatively as given below.

● In full step driving, use the following sequence

● To drive the motor in half step angle, use the following sequence

Stepper Motor Controller Circuit Advantages

● It consumes less power.

● It requires low operating voltage


Circuit Simulation Video

https://www.youtube.com/watch?v=LlpQuaQEQ8A&feature=youtu.be

IV. References

https://www.electronicshub.org/stepper-motor-control-using-8051-microcontroller/

https://circuitdigest.com/microcontroller-projects/stepper-motor-interfacing-with-

8051

V. Appendix

Code

stepper motor.txt

You might also like