DOC PREVIEW
U of U ECE 3720 - Lecture Notes
Pages 10

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1'&$%ECE/CS 3720: Embedded System Design(ECE 6960/2 and CS 6968)Chris J. MyersLecture 17: Relays and MotorsSlide 2'&$%Introduction to Relays• A relay is a device that responds to a small current orvoltage change by activating a switches or other devices.• Used to remotely switch signals or power.• Input control usually electrically isolated from output.• Input signal determines whether switch is open or closed.1Slide 3'&$%Various Relay ConfigurationsSlide 4'&$%Types of Relays• Classic general-purpose relay has an EM coil and canswitch power.• The solid-state relay (SSR) has an input-triggeredsemiconductor power switch.• The read relay has an EM coil and can switch low levelDC electronic signals.• The bilateral switch uses CMOS, FET, or biFETtransistors (technically not a relay but behaves similarly).2Slide 5'&$%Drawing of an EM RelaySlide 6'&$%Electromagnetic Relay Basics• Input circuit is an EM coil with an Iron Core.• Output switch includes two sets of silver or silver-alloycontacts (called poles).• One set is fixed to the relay frame, and other is locatedat end of leaf spring poles connected to the armature.• Contacts held in “normally closed” position by thearmature return spring.• When input circuit energizes EM coil, a “pull-in” force isapplied to the armature and “normally closed” contactsbreak while “normally open” contacts are made.3Slide 7'&$%Solid State Relays• Developed to solve limited life expectancy and contactbounce problems since they have no moving parts.• Also, faster, insensitive to vibrations, reduced EMI,quieter, and no contact arcing.• Optocoupler provides isolation between the input circuit(pseudocoil) and the triac (pseudocontact).• Signal from phototransistor triggers the output triac sothat it switches the load current.• Zero-voltage detector triggers triac only when AC voltageis zero, reducing surge currents when triac is switched.• Once triggered, triac conducts until next zero crossing.Slide 8'&$%Solid State Relays4Slide 9'&$%Reed RelaysSlide 10'&$%Solenoids5Slide 11'&$%Pulse-Width Modulated DC Motors• DC motor also has frame that remains motionless and anarmature that moves in this case in a circular manner.• When current flows through EM coil, magnetic forcecreated that causes rotation of the shaft.• Brushes positioned between frame and armature used toalternate the current direction through the coil so that aDC current generates a continuous rotation of the shaft.• When current removed, shaft is free to rotate.• Pulse-width modulated DC motor activated with fixedmagnitude current but duty cycle varied to control speed.Slide 12'&$%Interfacing EM Relays, Solenoids, and DC Motors• Interface circuit must provide sufficient current andvoltage to activate the device.• In off state, input current should be zero.• Due to inductive nature of the coil, huge backelectromotive force (EMF) when coil current is turned off.• Due to high speed transistor switch, there is a large di/dtwhen the coil is deactivated (activation also but smaller).• Voltages can range from 50 to 200V.• To protect the driver electronics, a snubber diode isadded to suppress the back EMF.6Slide 13'&$%Relay and Motor InterfacesSlide 14'&$%Isolated Interfaces7Slide 15'&$%H-BridgeSlide 16'&$%Isolated H-Bridge with Direction Control8Slide 17'&$%Stepper Motors• Very popular due to inherent digital interface.• Easy to control both position and velocity in anopen-loop fashion.• Though more expensive then ordinary DC motors, systemcost is reduced as they require no feedback sensors.• Used in disk drives and printers.• Can also be used as shaft encoders to measure bothposition and speed.Slide 18'&$%Simple Stepper Motor Interface9Slide 19'&$%Stepper Motor SequencePortB A A’ B B’10 Activate deactivate activate deactivate9 Activate deactivate deactivate activate5 Deactivate activate deactivate activate6 Deactivate activate activate deactivateSlide 20'&$%Stepper Motor Basic Operation10Slide 21'&$%Stepper Motor Basic Operation (cont)Slide 22'&$%Stepper Motor Basic Operation (cont)11Slide 23'&$%Stepper Motor Basic Operation (cont)Slide 24'&$%Stepper Motor Basic Operation (cont)12Slide 25'&$%Stepper Motor Basic Operation (cont)Slide 26'&$%Unipolar Stepper Motor Interface13Slide 27'&$%Slip• A slip is when computer issues a sequence change, butthe motor does not move.• Occurs if load on shaft exceeds available torque of motor.• Can also occur if computer changes output too fast.• If initial shaft angle known and motor never slips,computer can control shaft angle and speed withoutposition sensor.Slide 28'&$%14Slide 29'&$%Linked List to Control Stepper Motor;Linked list stored in EEPROMS10 fcb 10 ;Output patternfdb S9 ;Next if CWfdb S6 ;Next if CCWS9 fcb 9fdb S5fdb S10S5 fcb 5fdb S6fdb S9S6 fcb 6fdb S10fdb S5;Global variables stored in RAMPOS rmb 1 ;0<=POS<=199PT rmb 2 ;to current stateSlide 30'&$%Helper Functions to Control Stepper MotorInit:clr POSldx #S10stx PTrts15Slide 31'&$%Helper Functions to Control Stepper Motor;Move 1.8 degrees clockwiseCW: ldx PT ;current stateldx 1,X ;next clockwisestx PT ;update pointerldaa ,X ;output patternstaa PORTB ;set phase controlldaa POS ;update positioninca ;clockwisecmpa #200blo OK1 ;0<=POS<=199clraOK1: staa POSrtsSlide 32'&$%Helper Functions to Control Stepper Motor;Move 1.8 degrees counterclockwiseCCW: ldx PT ;current stateldx 3,X ;next CCWstx PT ;update pointerldaa ,X ;output patternstaa PORTB ;set phase controlldaa POS ;update positiondeca ;CCW directioncmpa #255bne OK2 ;0<=POS<=199ldaa #199OK2: staa POSrts16Slide 33'&$%Helper Functions to Control Stepper Motorconst struct State{ unsigned char Out; /* Output for this state */const struct State *Next[2];}; /* Next state */#typedef struct State StateType;#typedef StateType * StatePtr;unsigned char POS; /* b/w 0 and 199, shaft angle */#define clockwise 0 /* Next index*/#define counterclockwise 1 /* Next index*/StateType fsm[4]={ {10,{&fsm[1],&fsm[3]}},{ 9,{&fsm[2],&fsm[0]}},{ 5,{&fsm[3],&fsm[1]}},{ 6,{&fsm[0],&fsm[2]}} };StatePtr Pt; /* Current State */Slide 34'&$%Helper Functions to Control Stepper Motorvoid CW(void){Pt=Pt->Next[clockwise];PORTB=Pt->Out;if(POS++==200) POS=0;}void CCW(void){Pt=Pt->Next[counterclockwise];PORTB=Pt->Out;if(POS==0)POS=199;else POS--; }void Init(void){POS=0;Pt=&fsm[0];}17Slide 35'&$%High-Level Control of Stepper Motor;Reg B=desired 0<=RegB<=199SEEK: pshb ;Save desiredtsysubb POS ;Go CW


View Full Document

U of U ECE 3720 - Lecture Notes

Course: Ece 3720-
Pages: 10
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?