Lab 8. Speed Control of a Dc motor The Motor Drive
Motor Speed Control Project 1. Generate PWM waveform 2. Amplify the waveform to drive the motor 3. Measure tachometer signal (motor speed) 4. Find parameters of a motor model 5. Control motor speed with a computer algorithm 12 Vdc ac Motor Tachometer Signal 9 Vdc Conditioning Power Amplifier (Frequency Supply or Amplitude) microcontroller
Buehler 12 volt permanent-magnet dc motor with tachometer output Electrical Connections yellow/green -- tachometer output blue/red -- motor winding Note: Tachometer wires may not have two colors on some units .
Exploded view
Some questions P = V motor × I motor n Required power? n Ac tachometer signal behavior? I motor Ac + V motor Dc motor V tach tachometer –
Set up an experiment dc ac t = 0 motor tachometer I motor V+ V motor V tach 9 V 1 Ω V R n Measure V motor , V R , and V tach n I motor = V R (because R = 1 Ω )
Experimental results Motor current 1 Amperes 0.5 0 Current reaches 1 amp during startup! -0.5 -20 0 20 40 60 80 100 120 140 160 180 Tachometer voltage steady-state speed 20 zero 10 speed Volts 0 -10 increasing speed -20 -20 0 20 40 60 80 100 120 140 160 180 Motor voltage 10 5 Volts 0 -5 -20 0 20 40 60 80 100 120 140 160 180 Time (ms)
Some observations n V tach amplitude grows with motor speed n V tach frequency also grows with speed n Initial current I motor peaks around 1 A n Steady state I motor is approx. 250 mA Why does the process behave this way? Some analytical modeling …
Motor electro-mechanical models R a – armature winding resistance L a – armature winding inductance i a – armature current V t – motor terminal voltage e a – back emf T m – developed torque T L – torque needed for load ω – rotational speed B – friction coefficient J – moment of inertia
Motor electrical dynamics di v R i L a e = ⋅ + + t a a a dt ω e K = a m e a = “back emf” (electromotive force) generated within armature windings Note: Emf e a = 0 at standstill, and increases linearly with motor speed. Current i a is high at low speed.
Mechanical dynamics analogous to electrical circuits! Equations for these systems have similar form.
Motor mechanical dynamics ω d ω T J B T = ⋅ + ⋅ + m L dt T K i = ⋅ m a T m = developed torque increases with current J = motor moment of inertia B = motor friction coefficient ω = angular velocity of the motor T L = torque required to drive the load
Laplace transformed equations n Electrical V ( s ) R I ( s ) L sI ( s ) K ( s ) = ⋅ + ⋅ + ⋅ Ω t a a a a n Mechanical K I ( s ) J s ( s ) B ( s ) T ( s ) ⋅ = ⋅ Ω + ⋅ Ω + a L
Steady state analysis ( s =0) n Electrical steady state Ω V R I K = ⋅ + ⋅ t a a n Mechanical steady state Ω K I B T ⋅ = ⋅ + a L n Solve for speed R K Ω a T V = − ⋅ + ⋅ L t 2 2 R B K R B K + + a m a m
Motor speed vs. load torque n Speed is related to load torque and terminal voltage R a K ⋅ T L + ⋅ V t Ω = − R a B m + K 2 R a B m + K 2 ! " # # $ ! " # # $ − c 1 c 2 Ω operating points speed 2 increasing V speed 1 t T L load 1 load 2
What we now know: n For a given load, motor speed is proportional to voltage applied to its terminals n Use of a PWM signal allows the average voltage of the signal to be varied by varying duty cycle T 1 ⎛ ⎞ T1 = “ON” time V V = ⎜ ⎟ T2 = “OFF” time avg digital T 1 T 2 + ⎝ ⎠ n We have a 12 Vdc motor (max. terminal voltage is 12 Vdc) q A 3 volt signal will be insufficient to produce full speed, PLUS … q Motor may draw 1 A of current, whereas microcontroller output pins can typically supply only milliamperes Idea: Use a single transistor switch to amplify the digital PWM signal to drive the motor
Basic transistor switch (ideal models)
Switching an inductive load (motor winding) n Inductor voltage-current law: ( ) = Ldi C V L t dt n As current i C is switching off , q di C /dt is large and negative q Inductor voltage V L is large and negative q Collector voltage > V cc n Q may be destroyed!
Switching an inductive load (need to protect switch Q ) n Use anti-parallel diode D!!! q reverse biased when Q is ON q gives alternate current path when Q switches OFF (when inductor voltage becomes negative) q protects Q Collector voltage is clamped to V cc + V diode n q a.k.a. freewheeling diode
Drive design practical model
Drive design considerations n Maximum load current, I LOAD n Transistor characteristics q current gain, h FE q voltage V BE(sat) in saturation mode n Microcontroller limitations q digital pin output voltage (high), V OH q digital pin output current, I IO ≈ 20 mA (max)
Design equations n Constraints for base current in the ON state I IO > I B >> I LOAD h FE n Calculate base series resistance, R R = V OH − V BE ( sat ) I B
EE Board variable power supply Positive Supply VP+ output voltage & current limit VP+ ON Actual VP+ Current Waveforms Power Supply Window
Connect grounds of multiple power supplies
Lab procedure n Verify proper PWM signal generation n Study amplifier behavior q Measure V in , V BE , V CE q Compare to theoretical assumptions n Study motor behavior q Measure tachometer output (yellow/green leads) q Plot motor speed vs. PWM signal duty cycle q Repeat for several PWM signal frequencies q Analyze data and discuss results
Choice of devices n Transistor ( Q ) q 2N3904 is cheap but under-rated for current q 2N2222 has higher current rating q Both may be destroyed if motor is stalled n Diode ( D ) q 1N4001 is a rectifier diode: a bit slow, has large diameter leads q 1N4148 (or 1N914) is a switching diode: faster, but has low current rating (but is not expensive)
2N2222 NPN transistor data Source: Fairchild Semiconductor Absolute Maximum Ratings Symbol Parameter Value Unit V CEO Collector-emitter voltage (base open) 40 V V CBO Collector-base voltage (emitter open) 75 V V EBO Emitter-base voltage (collector open) 6 V I C Collector current 1 A Electrical Characteristics Symbol Parameter Conditions min max Unit h FE Dc current gain I C = 150 mA, V CE = 1 V 50 V CE(sat) Collector-emitter I C = 150 mA, I B = 15 mA 0.3 V saturation voltage V BE(sat) Base-emitter I C = 150 mA, I B = 15 mA 0.6 1.2 V saturation voltage
2N3904 NPN transistor data Source: Fairchild Semiconductor Absolute Maximum Ratings Symbol Parameter Value Unit V CEO Collector-emitter voltage (base open) 40 V V CBO Collector-base voltage (emitter open) 60 V V EBO Emitter-base voltage (collector open) 6 V I C Collector current 200 mA Electrical Characteristics Symbol Parameter Conditions min max Unit h FE Dc current gain I C = 100 mA, V CE = 1 V 30 V CE(sat) Collector-emitter I C = 50 mA, I B = 5 mA 0.3 V saturation voltage V BE(sat) Base-emitter I C = 150 mA, I B = 5 mA 0.95 V saturation voltage
1N4148 switching diode data Source: Fairchild Semiconductor Absolute Maximum Ratings Symbol Parameter Value Unit V RRM Maximum repetitive reverse voltage 100 V I O Average rectified forward current 200 mA I F Dc forward current 300 mA I C Collector current 200 mA Electrical Characteristics Symbol Parameter Conditions min max Unit V F Forward voltage I F = 100 mA 1 V I R Reverse leakage V R = 20 V 0.025 µ A t rr Reverse recovery time I F = 10 mA, V R = 6 V, I rr 4 ns = 1 mA, R L = 100 ohm
Recommend
More recommend