Stepper and DC Motors Control

39
Motor Control: Stepper Motors, DC Motors, PWM Control Tom Rethard CSE 3442

Transcript of Stepper and DC Motors Control

Motor Control: Stepper Motors, DC Motors, PWM ControlTom Rethard CSE 3442

Stepper Motorsy

y

y

y

Motor Moves Each Time a Pulse is Received Can Control Movement (Direction and Amount) Easily Can Force Motor to Hold Position Against an Opposing Force Used in Dot Matrix Printers and Robotics

Constructiony

Permanent Magnet Rotor Also Called the Shaft

y

Stator Surrounds the Shaft Usually Four Stator Windings Paired with Center-Tapped Common x Known as Four-Phase or Unipolar Stepper Motor

Construction (cont)y

Center Tapped Common

Moving the RotorUnstable Stable

Rotor will ALWAYS seek a stable position.

Moving the Rotor

CW

# 1 2 3 4

Standard 4-Step Sequence A B C 1 0 0 1 1 0 0 1 1 0 0 1

D 1 0 0 1

CCW

How It WorksStep 1: 1-0-0-1

1 0 0 1

How It WorksStep 2: 1-1-0-0

1 1 0 0

How It WorksStep 3: 0-1-1-0

0 1 1 0

How It WorksStep 4: 0-0-1-1

0 0 1 1

A Little Code, Pleasewhile (1) { PORTB = 0x66; // 1001 1001 MSDelay (100); PORTB = 0xCC; // 1100 1100 MSDelay (100); PORTB = 0x99; // 1001 1001 MSDelay (100); PORTB = 0x33; // 0011 0011 MSDelay (100); } y NOTE: Theres no need to double the sequence, but you have to send 4 bits at one time, so you lose the whole 8 bit port. Might as well send something!

Half-Step 8-Step SequenceStep # 1 2 3 4 5 6 7 8 A 1 1 1 0 0 0 0 0 B 0 0 1 1 1 0 0 0 C 0 0 0 0 1 1 1 0 D 1 0 0 0 0 0 1 1

CW

CCW

y

Moves step each time

Wave Drive 4-Step SequenceCW # 1 2 3 4y

A 1 0 0 0

B 0 1 0 0

C 0 0 1 0

D 0 0 0 1 CCW

Weaker Than Normal 4-Step Sequence

Holding Torquey

With the motor shaft at standstill or zero rpm condition, the amount of torque, from and external source, required to break away the shaft from its holding position. This is measured with rated voltage and current applied to the motor.

Next Question: How Far Does It Move?y

Step Angle Arc Through Which Motor Turns With ONE Step Change of the Windings Varies With Model of Stepper Motor Normally in Degrees

y

Steps per Revolution Steps per Revolution = 360/Step Angle

And Again: How Fast?y

Steps per Second Maximum Speed With Which You Can Move the Motor

y

Revolutions per Minute (RPM)

60 Steps per Second rpm = Steps per Re volution

How Many Teeth?

How Many Teeth?y

One Tooth = One Full Cycle of Movements Four-Steps = 1 Tooth

y

Teeth per Revolution Whats a Revolution Without Teeth?

Steps per Re volution Number of Teeth = Steps per Tooth

More Specsy

Drive System Unipolar Bipolar Universal

y y y

Voltage Phase Resistance Current Draw

Common Stepper Motor Types

Driversy

May Need a Driver Circuit Same Problem as Relays May Draw Too Much Current

y

Types Transistor Drivers x Usually a Darlington Pair Darlington Arrays Can Build It Yourself

Using Transistors for Stepper Motor Driver

Wiring It Up

Controlling Stepper Motor via Optoisolator

DC Motorsy y y y y

Only One Winding Two Connections: + and Reversing Polarity Reverses Motor Move Continuously Cannot Determine Position

Characteristics:y

RPM No Load: Maximum RPM With No Load on Shaft x Given in Data Sheets Loaded: Actual Maximum When Loaded x Not in Most Data Sheets

y y

Voltage Range Speed Increases With Voltage on a Given Motor

Current Draw Data Sheet Rating Is With Nominal Voltage and No Load Increases With Load

y

Speed Decreases With Load

DC Motor Rotation (Permanent Magnet Field)

Bi-Directional Controly y

Can Change Polarity With a Little Work H-Bridge Is Simplest Method Uses Switches (Relays Will do)

Basic H-Bridge Motor Configuration

Basic H-Bridge Motor Clockwise Configuration

Basic H-Bridge Motor Counterclockwise Configuration

Basic H-Bridge OOPS

Another Wayy

Use the L293 Chip Quadruple Half-H Driver Chip Gets HOT Need a Heat Sink for Continuous Operation! Two TI Versions x L293: 4.5-36V,