You are on page 1of 31

INTERFACING OF 8051 WITH MOTORS

CONTENT
Introduction. Components. 8051 pin diag. description. Types of motors & their description. Interfacing description. L293D pin description. ULN2003/2004 pin description. 8051 interfacing using both L293D & ULN2003/2004

COMPONENTS
8051 microcontroller Types of stepper motors (unipolar and bipolar stepper motors ) Different controlling types (Half step and Full step) Interfacing techniques: Interface using L293D - H-Bridge Motor Driver Interface using ULN2003/2004 - Darlington Arrays

8051 MICROCONTROLLER
. Features of 8051 The main features of 8051 microcontroller are: RAM 128 Bytes (Data memory) ROM 4Kbytes (ROM signify the on chip program space) Serial Port Using UART makes it simpler to interface for serial communication. Two 16 bit timer/ Counter Input/output Pins 4 Ports of 8 bits each on a single chip. 6 interrupt Sources 8 bit ALU (Arithmetic Logic Unit)

STEPPER MOTORS
Stepper motor divide a full rotation into a large number of steps. Types of stepper motor(Two-phase stepper
motors)

I. Unipolar (two windings per phase) II. Bipolar(single winding per phase)

Types of stepper motors


Unipolar Two windings per phase. Pole can be reversed without switching direction of current. Circuit can be made very simple. Large space required. Ease of operation makes unipolar motors Bipolar Single winding per phase To reverse pole current in a winding needs to be reversed. Circuit complicated, typically an H-bridge

arrangement.
Space occupied less Powerful than a unipolar motor of the same weight.

Types of stepper motors


Unipolar Bipolar

Different controlling types


Full Step Sequence
Two coils are energized at the same time and motor shaft rotates

Half Step Sequence


Motor step angle reduces to half the angle in full mode Double the angular resolution in full mode. Half mode is usually preffered over full mode.

Different controlling types


Full Step Sequence
Half Step Sequence

DC MOTORS
DC motor translates electrical pulses into mechanical movement. DC motor only have + and leads. DC motor move in both clock & anticlockwise direction on change of polarity.

EFFECT OF CHANGE OF POLARITY

How To Control dc motor using Micro Controllers ???


Microcontroller provide : 1. Digital logic (1 or a 0). 2. We cant provide polarity from microcontroller. 3. We cant connect motors to Controller as mostly motors runs on voltage higher that +5V, and motors demands high current (depends).

The solution is a H Bridge .


It allows motor rotation in both directions. From four terminals of H bridge we can control a DC motor. The pair of transistors (Transistor One and Transistor Three) are enabled, allow current to flow through the motor. The other pair is disabled, and can be thought of as out of the circuit. .

CONTD.
By determining pair of transistors current can be made to flow in either of the two directions in motor. Since permanent-magnet motors reverse their direction of turn when the current flow is reversed, this circuit allows bidirectional control of the motor.

The H-Bridge Circuit

The H-Bridge with Left-to-Right Current Flow

Interfacing techniques
To interface a stepper motor to controller any of two can be used : Interface using L293D - H-Bridge Motor driver Interface using ULN2003/2004 - Darlington Arrays

INTERFACING TECHNIQUES
L293D
ULN2003/2004

L293D Dual H-Bridge Motor Driver


L293D is a dual H-Bridge motor driver. One IC can interface two DC motors which can be controlled in both clockwise and counter clockwise direction Motor with fix direction of motion can make use of all four I/Os to connect up to four DC motors. L293D o/p current is 600mA & peak o/p current of 1.2A per channel. Output supply (VCC2) : 4.5V to 36V L293D a best choice for DC motor driver.

STEPPER MOTOR CONNECTION WITH L293D

8051 connection with dc motor using L293D

ULN2003/2004
The ULN2001A, ULN2002A, ULN2003A, ULN2004A, ULQ2003A, and ULQ2004A are high-voltage, high-current Darlington transistor arrays. Each consists of seven npn Darlington pairs that feature high-voltage outputs with common-cathode clamp diodes for switching inductive loads

CONTD.
. The collector-current rating of a single Darlington pair is 500 mA. The Darlington pairs can be paralleled for higher current capability. Applications include relay drivers, hammer drivers, lamp drivers, display drivers (LED and gas discharge), line drivers, and logic buffers. For 100-V (otherwise interchangeable) versions of the ULN2003A and ULN2004A

STEPPER MOTOR CONNECTION WITH ULN2003/2004 4-wire connection method

In this circuit the four pins "Controller pin 1,2,3 and 4 will control the motion and direction of the stepper motor according to the step sequence sent by the controller

2-wire connection for Unipolar Stepper Motor

simplified design to make controller use less pins

Connecting Bipolar Stepper Motor


Bi-polar stepper motors has 2 different coils. Step sequence is same as of unipolar stepper motors. The driving circuit an H-Bridge as it allows the polarity of the power applied to be controlled independently.

8051 connection with stepper motor using ULN2003

THANK YOU
THE END

You might also like