350 likes | 613 Views
EECS 373 Presentation DC motor with H-bridge. Team: Bowen Xu , Chenyu Yi, Yitian Chen. How to drive a motor. Two functions Rotate reversely by reverse the voltage (Appendix I) Speed increases with voltage applied LEGO 2838, without load:. M. -. +.
E N D
EECS 373 PresentationDC motor with H-bridge Team: Bowen Xu, Chenyu Yi, Yitian Chen
How to drive a motor • Two functions • Rotate reversely by reverse the voltage (Appendix I) • Speed increases with voltage applied • LEGO 2838, without load: M - + http://www.philohome.com/motors/motorcomp.htm
All in one – H bridge • Integrating the following functions: • Capable of driving the motor in both directions (Appendix II) • Control the speed (explain later) • What’s more? • Brake(Appendix III) • Free wheeling(Appendix IV)
Control the speed using PWM • Can we use analog? • …Yes… But too complex • We prefer digital (Appendix V) • 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) • Manage big voltage source with small voltage source • Get different AVERAGE voltage with different duty cycle
A safer way to manage the “switches” OUT1 R Vpwr M OUT2 PWM1 PWM2 R GND
Forward OUT1 R Vpwr M 3.3V OUT2 GND 1 0 0V PWM1 Vavg GND PWM2 0 1 3.3V Vavg 0V R GND
Reverse GND OUT1 R Vpwr M 3.3V OUT2 0 1 0V PWM1 Vavg GND PWM2 1 0 3.3V Vavg 0V R GND 7 7
Brake 1 GND OUT1 R Vpwr M OUT2 GND 0 0 PWM1 GND GND PWM2 1 1 3.3V 3.3V 0V 0V R GND 8
Brake 2 Vpwr OUT1 R Vpwr M 3.3V 3.3V OUT2 Vpwr 1 1 0V 0V PWM1 Vpwr Vpwr PWM2 0 0 R GND 9 9
Add one more function: ENABLE OUT1 Vpwr M OUT2 PWM1 PWM2 EN R GND
Our Basic H-bridge Chip 1 2 3 4 5 Vpwr 6 7 OUT1 PWM1 PWM2 OUT2 ENABLE GND
An example of using data sheet learn to use mc33886
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
For problem 1: Properties of MC33886 • Output voltage and current: • Vpwr: 5 to 12V • Max current: 5.2A • Other information • PWM input frequency no higher than 10kHz
For problem 2: Pin descriptions Vpwr 1 2 3 4 5 6 7 OUT1 PWM1 PWM2 OUT2 ENABLE GND General Chip we have MC33886 (get from data sheet)
Connect MC33886 with MCU and motor 7.2V MCU Vpwr OUT1 PWM1 IN1 PWM2 IN2 RS-540 D1 D2 0 1 FS OUT2 Ccp GND 30nF
7.2V 5.2A 10.4A 5.2A 0 1 MCU Vpwr Vpwr OUT1 OUT1 PWM1 IN1 IN1 PWM2 IN2 IN2 RS-540 D1 D1 D2 D2 Dual H-bridge to get greater power! FS FS OUT2 OUT2 Ccp Ccp 6.03 dollar each (www.findchips.com) GND GND
Back Appendix IForward and reverse M M - + + - - + - + + - - +
Back Appendix IIForward and reverse with simple H-bridge sw1 sw3 + M + - + - - + - sw2 sw4
Back Appendix IIIBrake with simple H-bridge sw1 sw3 + M + + GND GND - + - sw2 sw4
Back Appendix IIIBrake with simple H-bridge sw1 sw3 + M + - - + - sw2 sw4
Back Appendix IIIBrake with simple H-bridge sw1 sw3 + M + + - + - sw2 sw4
Back Appendix IVFree wheeling
Back Appendix V PWM and Vavg Vavg = Vpeak * Duty_cycle 3.3V 0V
Back Appendix VIOutput voltage with PWM control Vpwr = 12V Duty cycle: 30% 12V Vout 3.3V 3.6V
Back Appendix VIIMC33886 Data sheet: http://www.freescale.com/files/analog/doc/data_sheet/MC33886.pdf
Back Appendix VIIIMC33886 Data sheet, pin descriptions http://www.freescale.com/files/analog/doc/data_sheet/MC33886.pdf