EECS 373 Presentation DC motor with H

Download Report

Transcript EECS 373 Presentation DC motor with H

EECS 373 Presentation
DC motor with H-bridge
Team:
Bowen Xu,
Chenyu Yi,
Yitian Chen
1
+
M-
How to drive a motor
• Two functions
– Rotate reversely by reverse the voltage (Appendix I)
– Speed increases with voltage applied
• LEGO 2838, without load:
2
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)
3
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
4
A safer way to manage the “switches”
OUT1
Vpwr
M
OUT2
PWM1
PWM2
R
R
GND
5
Vavg
Forward
OUT1
3.3V Vpwr
M
0V
OUT2
1
0
GND
PWM1
PWM2
Vavg
GND
R
0
1
3.3V
0V
R
GND
6
Reverse
GND
OUT1
3.3V Vpwr
M
0V
OUT2
0
1
Vavg
PWM1
PWM2
GND
Vavg
R
1
0
3.3V
0V
R
GND
7
Brake 1
GND
OUT1
3.3V Vpwr
M
0V
0
0
OUT2
GND
PWM1
PWM2
GND
GND
R
1
1
3.3V
0V
R
GND
8
Brake 2
3.3V
Vpwr
OUT1
Vpwr
M
0V
OUT2
1
1
Vpwr
PWM1
PWM2
Vpwr
Vpwr
R
0
0
3.3V
0V
R
GND
9
Add one more function: ENABLE
OUT1
Vpwr
M
OUT2
PWM1
PWM2
EN
R
GND
10
Our Basic H-bridge Chip
Vpwr
PWM1
PWM2
ENABLE
GND
1
2
3
4
5
6
7
OUT1
OUT2
11
An example of using data sheet
LEARN TO USE MC33886
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 MC33886
• Output voltage and current:
– Vpwr: 5 to 12V
– Max current: 5.2A
• Other information
– PWM input frequency no higher than 10kHz
14
For problem 2: Pin descriptions
Vpwr
PWM1
PWM2
ENABLE
GND
1
2
3
4
5
6
7
General Chip we have
OUT1
OUT2
MC33886
(get from data sheet)
15
Connect MC33886 with MCU and motor
7.2V
Vpwr
PWM1
PWM2
0
MCU
1
IN1
IN2
D1
D2
30nF
FS
Ccp
GND
OUT1
RS540
OUT2
16
7.2V
PWM1
PWM2
0
MCU
1
Vpwr
IN1
IN2
D1
D2
FS
Ccp
GND
5.2A
OUT1
5.2A
OUT2
Vpwr
Dual H-bridge
to get greater power!
6.03 dollar each
(www.findchips.com)
IN1
IN2
D1
D2
FS
Ccp
GND
10.4A
OUT1
OUT2
RS540
Questions?
18
Appendix I
Forward and reverse
+ +
+
M
-
-
-
- +
-
- +
M
+
19
Appendix II
Forward and reverse with simple H-bridge
sw1
sw3
+
-+
+
sw2
M
+sw4
20
Appendix III
Brake with simple H-bridge
sw1
sw3
+
GND
+
+
sw2
M
GND
+
sw4
21
Appendix III
Brake with simple H-bridge
sw1
sw3
+
+
+
sw2
M
sw4
22
Appendix III
Brake with simple H-bridge
sw1
sw3
+
+
+
sw2
M
+
sw4
23
Appendix IV
Free wheeling
24
Appendix V PWM and Vavg
Vavg = Vpeak * Duty_cycle
3.3V
0V
25
Appendix VI
Output voltage with
PWM
control
Vpwr = 12V
Duty cycle: 30%
12V
3.3V
Vout
3.6V
26
Appendix VII
MC33886 Data sheet:
http://www.freescale.com/files/analog/doc/data_sheet/MC33886.pdf
27
Appendix VIII
MC33886 Data sheet, pin descriptions
http://www.freescale.com/files/analog/doc/data_sheet/MC33886.pdf
28