EEE3410 Microcontroller Applications Department of Electrical Engineering Lecture 11 Motor Control

Similar documents
Assembly Language. Topic 14 Motion Control. Stepper and Servo Motors

Automatic Railway Gate Control & Track Switching

combine regular DC-motors with a gear-box and an encoder/potentiometer to form a position control loop can only assume a limited range of angular

EEE3410 Microcontroller Applications Department of Electrical Engineering. Lecture 10. Analogue Interfacing. Vocational Training Council, Hong Kong.

ANGULAR POSITION CONTROL OF DC MOTOR USING SHORTEST PATH ALGORITHM

MICROCONTROLLERS Stepper motor control with Sequential Logic Circuits

Lab Exercise 9: Stepper and Servo Motors

International Journal of Advance Engineering and Research Development. Wireless Control of Dc Motor Using RF Communication

Laboratory Exercise 1 Microcontroller Board with Driver Board

Page 1. Relays. Poles and Throws. Relay Types. Common embedded system problem CS/ECE 6780/5780. Al Davis. Terminology used for switches

Experiment#6: Speaker Control

o What happens if S1 and S2 or S3 and S4 are closed simultaneously? o Perform Motor Control, H-Bridges LAB 2 H-Bridges with SPST Switches

L E C T U R E R, E L E C T R I C A L A N D M I C R O E L E C T R O N I C E N G I N E E R I N G

Small DC Motor Control

Introduction to Relays. ECE/CS 5780/6780: Embedded System Design. Various Relay Configurations. Types of Relays. Drawing of an EM Relay

Mechatronics Engineering and Automation Faculty of Engineering, Ain Shams University MCT-151, Spring 2015 Lab-4: Electric Actuators

PART 2 - ACTUATORS. 6.0 Stepper Motors. 6.1 Principle of Operation

Basic of PCD Series Pulse Control LSIs

DC motor control using arduino

2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMS Fall 2009 Lab 4: Motor Control. October 5, 2009 Dr. Harrison H. Chin

EXPERIMENT 6: Advanced I/O Programming

Micromouse Meeting #3 Lecture #2. Power Motors Encoders

AN Industrial Stepper Motor Driver. Application Note Abstract. Introduction. Stepper Motor Control Method

Appendix 1. Basic Electronics. The PIC Hardware. Using Transistors (Basic Electronics)

MicroToys Guide: Motors N. Pinckney April 2005

Stepper Motor Board. User Manual. 1.0, Oct 2013

DC-Motor Driver circuits

SMART Funded by The National Science Foundation

Experiment (2) DC Motor Control (Direction and Speed)

Job Sheet 2 Servo Control

THE UNIVERSITY OF BRITISH COLUMBIA. Department of Electrical and Computer Engineering. EECE 365: Applied Electronics and Electromechanics

Half stepping techniques

ESO 210 Introduction to Electrical Engineering

Lock Cracker S. Lust, E. Skjel, R. LeBlanc, C. Kim

Electronic Speed Controls and RC Motors

ME 2110 Controller Box Manual. Version 2.3

Ametek, Inc. Rotron Technical Products Division. 100 East Erie St., Suite 200 Kent, Ohio User's Guide. Number Revision F

ES86 Series Closed-loop Stepper Drive + Motor System (ES-D808 Drive+ Motor/Encoder)

Stepping Motor. Applications. Structure and operation. Code names. Mobile equipment Digital cameras, Mobile equipments, PDA, etc.

Sensors and Sensing Motors, Encoders and Motor Control

M.Kaliamoorthy and I.Gerald PSNACET/EEE CHAPTER 2 STEPPER MOTORS

EDE1204 Bi-Polar Stepper Motor IC

Solid State Devices (2)

International Journal of Advance Engineering and Research Development

ES86 Series Closed-loop Stepper Drive + Motor System (Drive+ Motor/Encoder)

WIRELESS DC MOTOR SPEED AND DIRECTION CONTROL USING IR (PWM and H-Bridge)

Input/Output Control Using Interrupt Service Routines to Establish a Time base

ES86 Series Closed-loop Stepper Drive + Motor System (Drive+ Motor/Encoder)

WIRELESS DC MOTOR SPEED AND DIRECTION CONTROL USING RF COMMUNICATION

Introduction to the ME2110 Kit. Controller Box Electro Mechanical Actuators & Sensors Pneumatics

Dimensions: Specifications:

30-80V, 8.2A Peak, No Tuning, Nulls loss of Synchronization

Datasheet of the MEZ Stepper Servo Drive MEZ 2D VDC, 8.2A Peak, Closed-loop, No Tuning. Version

Lab 8. Stepper Motor Controller

Microcontroller Based Electric Expansion Valve Controller for Air Conditioning System

Open Loop Speed Control of Brushless DC Motor

USING THE L6204, A BIPOLAR STEPPER AND DC MOTOR DRIVER IN BCD TECHNOLOGY

Application Note. 3-Phase Brushless DC Motor Control with Hall Sensors AN-CM-244

Activity 4: Due before the lab during the week of Feb

Stepper Motors and Control Part I - Unipolar Stepper Motor and Control (c) 1999 by Rustle Laidman, All Rights Reserved

Application Information

AppKit: Using the LTC bit Analog-to-Digital Converter

Basic NC and CNC. Dr. J. Ramkumar Professor, Department of Mechanical Engineering Micro machining Lab, I.I.T. Kanpur

Motor control using FPGA

User's Manual. Step Motor Driver L E V E L

Design of double loop-locked system for brush-less DC motor based on DSP

Stepper motors. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Embedded Systems Lab Lab 7 Stepper Motor Application

CL86T. 24~80VDC, 8.2A Peak, Closed-loop, No Tuning. Descriptions. Closed-loop. Stepper. Applications. Datasheet of the Closed-loop Stepper CL86T

ECE 4510/5530 Microcontroller Applications Week 13

Semiconductor 9/21/2015

Administrative Notes. DC Motors; Torque and Gearing; Encoders; Motor Control. Today. Early DC Motors. Friday 1pm: Communications lecture

Citrus Circuits Fall Workshop Series. Roborio and Sensors. Paul Ngo and Ellie Hass

OPENCOCKPITS IOCard USBSTEPPER INSTALLATION AND USER S MANUAL

3DM phase Digital Stepper Drive

PMSM Control Using a Three-Phase, Six-Step 120 Modulation Inverter

Zig-Bee Robotic Panzer

MEGORAS Technology - TB6600 STEP MOTOR Driver.

User's Manual. Step Motor Driver

The Mechatronics Sorter Team Members John Valdez Hugo Ramirez Peter Verbiest Quyen Chu

School of Engineering Mechatronics Engineering Department. Experim. ment no. 1

Stepper Motors in C. Unipolar (5 lead) stepper motorr. $1.95 from 100 steps per rotation. 24V / 160mA / 600 gm cm holding 160mA

CIS009-2, Mechatronics Signals & Motors

Feedback Devices. By John Mazurkiewicz. Baldor Electric

Motors and Servos Part 2: DC Motors

The Allen-Bradley Servo Interface Module (Cat. No SF1) when used with the Micro Controller (Cat. No UC1) can control single axis

3. What is the difference between Switched Reluctance motor and variable reluctance stepper motor?(may12)

Initial Power-Up Tests

ARDUINO BASED DC MOTOR SPEED CONTROL

Exercise 3-3. Manual Reversing Starters EXERCISE OBJECTIVE DISCUSSION. Build manual reversing starters and understand how they work.

Lecture #19 Digital To Analog, PWM, Stepper Motors Embedded System Engineering Philip Koopman Monday, 28-March-2016

Voltage-Versus-Speed Characteristic of a Wind Turbine Generator

Four Quadrant Speed Control of DC Motor with the Help of AT89S52 Microcontroller

LS7362 BRUSHLESS DC MOTOR COMMUTATOR / CONTROLLER

AB-44 APPLICATION BRIEF. Using the 87C51GB SHARON LOPEZ APPLICATIONS ENGINEER. March Order Number

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

Datasheet of the Easy Servo Drive ES-D VAC or VDC, 8.2A Peak, Close-loop, No Tuning. Version

of PWM is explained here. Consider a simple circuit as shown in figure below. DC Motor Speed Control using 555 Timer IC. The DC MOTOR SPEED.

Computer Numeric Control

Speed Control Of Transformer Cooler Control By Using PWM

Transcription:

EEE34 Microcontroller Applications Department of Electrical Engineering Lecture Motor Control Week 3

EEE34 Microcontroller Applications In this Lecture. Interface 85 with the following output Devices Optoisolator Stepper motor DC motor 2

Optoisolator EEE34 Microcontroller Applications An optoisolator, also called optocoupler, is to isolate two parts of a system. An optoisolator has an LED transmitter and a photo-transistor receiver, separated from each other by a gap. When current flows through the LED, it will light up and the light transmits across the gap. When the photo-transistor receives the light, it will turn on linking up the two output leads similar to a mechanical switch. The action of the photo-transistor will produce the same signal with the same phase as from the LED but with a different current and amplitude. The gap between the transmitter and receiver of optoisolators prevents the electrical current surge produced at the receiving reaching the transmitting end. 3

EEE34 Microcontroller Applications Interfacing an Optoisolator The optoisolator comes in a small IC package with four or more pins. There are also packages that contain more than one optoisolator. When placing an optoisolator between two circuits, two separate voltage source are used, one for each side. Unlike relays, no drivers need to be placed between the microcontroller output and the optoisolators. Figure. IC package of Optoisolator Figure.2 Controlling a Lamp via Optoisolator 4

EEE34 Microcontroller Applications Stepper Motor (/2) Stepper motor: a device that translates electrical pulses into mechanical movement Usually used in robotics Permanent magnet (PM) rotor surrounded by a stator Stepper shaft (rotor) moves in a fixed repeatable increment rather than running freely as in conventional motors Figure.3 Stepper shaft alignment 5

EEE34 Microcontroller Applications Stepper Motor (2/2) We shall consider a 4-phase stepper motor 6 leads: 4 stator winding leads and 2 center-tapped commons A N common A A common B S common N o S S N B B B common A Figure.4 A 4-phase stepper motor 6

EEE34 Microcontroller Applications Stepper Motor Position Control (/5) Current through the coils determine the polarity of the stator poles Applying a specific sequence of voltage to each winding will enable the rotor to rotate in a specific manner P.7 P.6 P.5 P.4 P.3 P.2 P. P. A B A A B +V 85 A B common Stepper Motor B Figure.5 7

Stepper Motor Position Control (2/5) EEE34 Microcontroller Applications There are several widely used sequences where each has a different degree of precision. Normal 4-step sequence 8-step sequence (half-stepping) Step angle the step angle is the minimum degree of rotation associated with a single step. The smaller of step angle, higher degree of precision in position control. Motor Step Angle ( ).72.8 2. 2.5 5. 7.5 Steps per Revolution 5 2 8 44 72 48 8

EEE34 Microcontroller Applications Stepper Motor Position Control (3/5) Normal 4-Step 4 Sequence Clockwise Step # 2 3 4 Winding A Winding B Winding A Winding B Counter-clockwise ORG H MOV A, #B ; load step sequence BACK: MOV P, A ; issue sequence to motor RR A ; rotate right clock ACALL DELAY ; wait SJMP BACK ; repeat the rotation sequence ; DELAY:.. ; time delay subroutine RET END 9

EEE34 Microcontroller Applications Stepper Motor Position Control (4/5) 8-Step Sequence (Half Step) Step # Winding A Winding B Winding A Winding B 2 Clockwise 3 4 5 6 7 Counter-clockwise 8

EEE34 Microcontroller Applications Stepper Motor Position Control (5/5) Program of 8-Step 8 Sequence (Half Step) ORG H MOV R, #B ; load normal step sequence MOV R, #B ; load half step sequence BACK: MOV A, R ; load normal sequence value MOV P, A ; issue sequence to motor RR A ; rotate right - clockwise MOV R, A ; store normal sequence value ACALL DELAY ; wait MOV A, R ; load half step sequence value MOV P, A ; issue sequence to motor RR A ; rotate right - clockwise MOV R, A ; store half step sequence value ACALL DELAY ; wait SJMP BACK ; repeat the rotation sequence ; DELAY:.. ; time delay subroutine RET END

EEE34 Microcontroller Applications Further example on Stepper Motor Position Control Controlling stepper motor via optoisolator Figure.6 85 connection to Stepper motor Example. If a switch is connected to port P2.7. Write a program to monitor the status of SW and perform the following: (a) If SW=, the stepper motor moves clockwise. (b) If SW=, the stepper motor moves counter-clockwise. 2

EEE34 Microcontroller Applications Further example on Stepper Motor Position Control Example. Program listing ORG H MAIN: SETB P2.7 ; make P2.7 as an input MOV A, #99H ; starting phase value MOV P, A ; send value to port TURN: JNB P2.7, CW ; check switch RR A ; rotate right - clockwise ACALL DELAY ; wait MOV P, A ; send value to port SJMP TURN ; repeat CW: RL A ; rotate left counter-clockwise ACALL DELAY ; wait MOV P, A ; send value to port SJMP TURN ; repeat ; DELAY: MOV R2, # ; time delay subroutine H: MOV R3, #255 H2: DJNZ R3, H2 DJNZ R2, H RET END 3

EEE34 Microcontroller Applications DC Motors DC motor: has only a pair of + and leads. Connecting to a DC voltage source, DC motors move in one direction. By reversing the voltage polarity, they will move in the opposite direction. Figure.7 DC motor rotation 4

DC Motors - Bidirectional control (/2) EEE34 Microcontroller Applications With the help of relays or some specially designed chips, the rotational directions (forward and backward) of DC motors can be control. The basic concept is the H-Bridge control of DC motors Figure.8 H-Bridge Motor Configuration Figure.9 H-Bridge Motor Clockwise Configuration 5

EEE34 Microcontroller Applications DC Motors - Bidirectional control (2/2) Figure. H-Bridge Motor Counter-Clockwise Configuration Figure. H-Bridge in an Invalid Configuration H-Bridge control can be created using relays, transistors, or a single IC solution. When using relays and transistors, make sure that invalid configuration do not occur. 6

Solution: ORG H MAIN: CLR P. ; H-Bridge switch CLR P. ; H-Bridge switch 2 CLR P.2 ; H-Bridge switch 3 CLR P.3 ; H-bridge switch 4 SETB P2.7 MONITOR: JNB P2.7, CW ; check switch SETB P. ; H-Bridge switch CLR P. ; H-Bridge switch 2 CLR P.2 ; H-Bridge switch 3 SETB P.3 ; H-Bridge switch 4 SJMP MONITOR CW: CLR P. ; H-Bridge switch SETB P. ; H-Bridge switch 2 SETB P.2 ; H-Bridge switch 3 CLR P.3 ; H-Bridge switch 4 SJMP MONITOR END EEE34 Microcontroller Applications Example.2 : If a switch is connected to port P2.7. Write a program to monitor the status of SW and perform the H-Bridge direction control of DC motor as follow: (a) If SW=, the DC motor moves clockwise. (b) If SW=, the DC motor moves counter-clockwise. 7

EEE34 Microcontroller Applications DC Motors - Speed control by PWM (/2) The speed of DC motor depends on three factors; (a) load, (b) voltage and (c) current For a fixed load, speed of DC motor can be changed by pulse width modulation (PWM) PWM is to change the width of the pulse applied to DC motor which lead to an increase or decrease the amount of power supplied to the motor. As a result, the motor speed increases or decreases respective to the power supplied. Although the amplitude of the pulse is fixed at a voltage level, but its duty is varied. The wider the pulse, the higher speed of motor. Motor Speed Figure.2 Pulse Width Modulation Comparison 8

EEE34 Microcontroller Applications Example.3 : Refer to figure.9, write a program to monitor the status of SW and perform the following: (a) If P2.7 =, the DC motor moves with 25% duty cycle pulse. (b) If P2.7 =, the DC motor moves with 5% duty cycle pulse. Figure.3 Connection of DC Motor speed Control by PWM 9

EEE34 Microcontroller Applications Read reference The 85 Microcontroller and Embedded Systems - Using Assembly and C, Mazidi Chapter 7 P.49 P.55 2

EEE34 Microcontroller Applications Review Questions. Give two applications for an optoisolator. 2. Give the advantages of an optoisolator over an electromechanical relay. 3. If a stepper motor takes 9 steps to make one complete revolution, what is the step angle for this motor? 4. Calculate the number of steps per revolution for a step angle of 7.5 degrees. 5. Finish the normal four-step sequence counterclockwise if the first step is (binary). 6. What is the effect of a time delay between issuing each step? 7. What is the factors which affect the speed of a DC motor? 8. What is the advantage of stepper motors over DC motors? 9. A DC motor is moving a load. How do we keep the motor speed constant?. What is PWM, and how is it used in DC motor control? 2

EEE34 Microcontroller Applications Department of Electrical Engineering END of Lecture Motor Control Week 3 22