Electronics Design Laboratory Lecture #6 Electronics Design Laboratory 1
Soldering tips ECEN 227 Electronics Design Laboratory 2
Introduction to Lab 3 Part B: Closed-Loop Speed Control -1V Experiment 3A -1V Forward Controller Forward NOT Forward Reverse Controller Speed error - -5V Speed Output proportional to desired motor speed Experiment 3B V speed -5V Speed Output proportional to actual motor speed Experiment 1 & 2 5VDC Speed Sensor and Filter GND ECEN 227 Electronics Design Laboratory 3
DC motor driver and speed sensor R3 and C3 from speed sensor v s = t t on ( 5 V) = ( 5V) ton f B1 C R I B = 1 V v DC _ sense_pwm speed sensor (Lab 2) t t on t f = 12 64 2π 122 Electronics Design Laboratory 4
Open-loop speed control using = 1 V = 1V = 4V Faster = Slower B1 v DC _ = sense_pwm speed sensor (Lab 2) t on Electronics Design Laboratory 5
INPUT System Gains = 1 V OUTPUT μc B1 v DC _ sense_pwm speed sensor (Lab 2) t t on t f = 12 64 2π 122 Electronics Design Laboratory 6
Speed sensor gain Encoder Output Frequy proportional to physical speed f Speed Sensor PWM Duty cycle proportional to frequy t on Voltage Output Voltage proportional to Duty Cycle 5V V Physical Frequy Duty Cycle Voltage Encoder Speed Sensor Low Pass f d vs Frequy of pulses [Hz] f = 12 64 122 2π ton = 5 V = 5V ton f t p vs = = 122 5 ton = 61 t Speed sensor output voltage [V] vs ( ) ( ) Speed sensor gain [Vs/rad] K sense on Electronics Design Laboratory 7
Open-loop system = 1 V INPUT OUTPUT μc B1 v DC _ K sense Speed sensor Electronics Design Laboratory 8
Closing the feedback loop: compensator = 1 V INPUT OUTPUT μc Need to equal in steady state Need to change depending on our speed error ( - ) Need -1V output and -5V inputs. K sense B1 v DC _ Speed sensor Electronics Design Laboratory 9
Integral compensator _ 1 V v o = 1 sc R I I ( ) ( ) I v v = v v ref s K s ref s Electronics Design Laboratory 1
Closed-Loop System with Integral Compensator = 1 V OUTPUT _ 1 V B1 v DC _ K sense Speed sensor Electronics Design Laboratory 11
Qualitative Analysis of Feedback Loop = 1 V goes down OUTPUT sensed speed too high _ 1 V B1 goes down v _ DC goes down goes down K sense f goes down Speed sensor Electronics Design Laboratory 12
Speed control circuit as a closed-loop system = 1 V μc INPUT - Integral compensator v error G m (s) K I s B1 v DC _ OUTPUT K sense Speed sensor Electronics Design Laboratory 13
Speed control circuit as a closed-loop system v e - Integral compensator G m (s) K I s Speed sensor Driver & motor G c (s) 1 G o s 1 m K sense Closed-loop response: Loop gain: 1 T ( s) G( s) = = T ( s) = K sensegc ( s) Gm( s) v K 1 T ( s) ref sense Electronics Design Laboratory 14
Steady-state: Closed-loop speed control End result: speed precisely set by, independent of load torque, motor imperfections, = 1 V = K sense = = /K sense Faster _ 1 V B1 v DC _ Slower sense_pwm speed sensor (Lab 2) t on Electronics Design Laboratory 15
How to change direction? = 1 V _ 1 V B1 v DC _ sense_pwm speed sensor (Lab 2) t on Electronics Design Laboratory 16
Stop & Go Control = 1 V ON = GO OFF = STOP _ 1 V B1 v DC _ sense_pwm speed sensor (Lab 2) t on Electronics Design Laboratory 17
Stop & Go Control Implementation c = GO V = STOP G R G S PMOS D _ 1 V B1 = 1 V v DC _ sense_pwm speed sensor (Lab 2) t on Electronics Design Laboratory 18
Speed Control Complete Schematic Electronics Design Laboratory 19
Feedback Control circuit block Op-amp integral compensator PMOS transistor used to force output at b low Two copies of the circuit used: one for each side of the motor (to control motor in each direction) Electronics Design Laboratory 2
GND GND Floor planning Speed sensors Left wheel Right wheel GND Space for project add-ons 1V Feedback circuits Left wheel Right wheel Project: Remote control receiver GND GND 1V Arduino Space for project add-ons GND 1V Electronics Design Laboratory 21
Speed Control Demo Setup Use waveform generator, -5V, 5 Hz square wave, Hi-Z Adjust duty cycle to set the speed refere so that f = 2 Hz Show speed-sensor output pulses on the scope. Frequy of the pulses should be f = 2 Hz Electronics Design Laboratory 22