31
INTERFACING OF 8051 WITH MOTORS

Motor Interfacing

Embed Size (px)

Citation preview

Page 1: Motor Interfacing

INTERFACING OF 8051 WITH MOTORS

Page 2: Motor Interfacing

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

Page 3: Motor Interfacing

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

Page 4: Motor Interfacing

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) .

Page 5: Motor Interfacing

.

Page 6: Motor Interfacing

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)

Page 7: Motor Interfacing

Types of stepper motors

• 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.

Unipolar

Page 8: Motor Interfacing

Types of stepper motors

Unipolar Bipolar

Page 9: Motor Interfacing

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.

Page 10: Motor Interfacing

Different controlling types

Full Step Sequence Half Step Sequence

Page 11: Motor Interfacing

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.

Page 12: Motor Interfacing

EFFECT OF CHANGE OF POLARITY

Page 13: Motor Interfacing

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).

Page 14: Motor Interfacing

The solution is a “H Bridge”.

•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..

• It allows motor rotation in both directions. • From four terminals of H bridge we can control a DC motor.

Page 15: Motor Interfacing

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.

Page 16: Motor Interfacing

The H-Bridge Circuit

Page 17: Motor Interfacing

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

Page 18: Motor Interfacing

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

Page 19: Motor Interfacing

INTERFACING TECHNIQUES

L293D ULN2003/2004

Page 20: Motor Interfacing

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.

Page 21: Motor Interfacing

STEPPER MOTOR CONNECTION WITH L293D

Page 22: Motor Interfacing

8051 connection with dc motor using L293D

Page 23: Motor Interfacing

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

Page 24: Motor Interfacing

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

Page 25: Motor Interfacing
Page 26: Motor Interfacing
Page 27: Motor Interfacing

STEPPER MOTOR CONNECTION WITH ULN2003/20044-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

Page 28: Motor Interfacing

2-wire connection for Unipolar Stepper Motor

simplified design to make controller use less pins

Page 29: Motor Interfacing

[ 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.

Page 30: Motor Interfacing

8051 connection with stepper motor using ULN2003

Page 31: Motor Interfacing

THANK YOU

THE END