EECS 373 Presentation DC motor with H-bridge Team: Bowen Xu, Chenyu Yi, Yitian Chen 1
2 How to drive a motor Two functions – Rotate reversely by reverse the voltage (Appendix I) Rotate reversely by reverse the voltage – Speed increases with voltage applied LEGO 2838, without load: M + -
3 All in one – H bridge Integrating the following functions: – Capable of driving the motor in both directions (Appendix II) Capable of driving the motor in both directions – Control the speed (explain later) What’s more? – Brake(Appendix III) Brake – Free wheeling(Appendix IV) Free wheeling
Control the speed using PWM Can we use analog? – …Yes… But too complex – We prefer digital (Appendix V) We prefer digital Can we connect PWM output pins on MCU with motor? – No! – The motor won’t move – Or magic smoke comes out! PWM signal acts as “switch manager”(Appendix VI)switch manager – Manage big voltage source with small voltage source – Get different AVERAGE voltage with different duty cycle 4
R A safer way to manage the “switches” 5 M Vpwr GND R PWM1 PWM2 OUT1 OUT2
R 6 M Vpwr GND R PWM1 PWM2 OUT1 OUT2 Vavg GND Forward 1 3.3V 0V 3.3V 0V Vavg GND
77 R 7 M Vpwr GND R PWM1 PWM2 OUT1 OUT2 Vavg GND Reverse 0 3.3V 0V 3.3V 0V GND Vavg
8 R 8 M Vpwr GND R PWM1 PWM2 OUT1 OUT2 GND Brake 1 0 GND 3.3V 0V 3.3V 0V GND
99 R 9 M Vpwr GND R PWM1 PWM2 OUT1 OUT2 Vpwr Brake 2 1 Vpwr 3.3V 0V 3.3V 0V Vpwr
10 M Vpwr GND R PWM1 PWM2 OUT1 OUT2 EN Add one more function: ENABLE
11 PWM1 PWM2 Vpwr GND OUT1 OUT2 ENABLE Our Basic H-bridge Chip
LEARN TO USE MC33886 An example of using data sheet 12
Before we start Scenario – Use RS-540 to drive a model car – The rated voltage: 7.2V – Current for normal speed: 3A 2 Problems – Is MC33886 capable? Bear 7.2V? Supply sufficient current? – How to connect the pins 13
For problem 1: Properties of MC33886Properties of MC33886 Output voltage and current: – Vpwr: 5 to 12V – Max current: 5.2A Other information – PWM input frequency no higher than 10kHz 14
15 PWM1 PWM2 Vpwr GND OUT1 OUT2 ENABLE For problem 2: Pin descriptionsPin descriptions General Chip we haveMC33886 (get from data sheet)
16 RS V MCU PWM1 PWM2 0 1 GND Ccp D2 D1 IN2 IN1 FS OUT1 OUT2 Vpwr 30nF Connect MC33886 with MCU and motor
RS- 540 MCU PWM1 PWM2 0 1 GND Ccp D2 D1 IN2 IN1 FS OUT1 OUT2 Vpwr 7.2V GND Ccp D2 D1 IN2 IN1 FS OUT1 OUT2 Vpwr Dual H-bridge to get greater power! 6.03 dollar each ( 5.2A 10.4A
Questions? 18
19 Appendix I Forward and reverse M +- M
Appendix II Forward and reverse with simple H-bridge sw1 sw2 sw3 sw4 M
Appendix III B rake with simple H-bridge 21 GND + sw1 sw2 sw3 sw4 M GND +
sw1 sw2 sw3 sw4 M Appendix III B rake with simple H-bridge
23 + sw1 sw2 sw3 sw4 M Appendix III B rake with simple H-bridge
Appendix IV Free wheeling 24
Appendix V PWM and V avg V 0V V avg = V peak * Duty_cycle
Appendix VI Output voltage with PWM control 26 Vpwr = 12V Vout 3.3V 3.6V Duty cycle: 30% 12V
Appendix VII MC33886 Data sheet: 27
Appendix VIII MC33886 Data sheet, pin descriptions 28