18
EECS192 Lecture 4 Feb. 6, 2018 Topics Quiz 1 Polarized capacitor Project proposal feedback Driving MOSFETs and motor (conclusion) MC33883 MOSFET driver H bridge PWM and motor drive (conclusion) RC servo notes Power supplies and Wiring Linear Regulator Buck Converter Notes: Check off- 2/9: Motor drive/stall, steering servo Quiz 2: power MOSFET/motor drive Tues 2/13 47uF, 16V electrolytic, polarized Not all same- ESR…

Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

EECS192 Lecture 4

Feb. 6, 2018

Topics• Quiz 1

• Polarized capacitor

• Project proposal feedback

• Driving MOSFETs and motor (conclusion)– MC33883 MOSFET driver

– H bridge

• PWM and motor drive (conclusion)

• RC servo notes

• Power supplies and Wiring

• Linear Regulator

• Buck Converter

Notes:

Check off-

• 2/9: Motor drive/stall, steering servo

• Quiz 2: power MOSFET/motor drive Tues 2/13

47uF, 16V electrolytic, polarized

Not all same- ESR…

Page 2: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Project proposal feedbackMotor Driver

Schematic• Estop: what to switch?

• G_EN = 5V not 3.3V.

• Snubbing capacitors and diode

• Drive/brake/enable/dir- shoot through protection

• Need accel/coast/brake to avoid burning out motor/transistors

• Conventions: L->R, top to bottom

• Connectors- battery, motor, IO connections+ground

Circuit Layout• Mounting holes

• Big wires, short distances

• QFN vs SOIC package, SMD vs through hole

• Heat sinks- horizontal transistor is more robust

• Estop switch

• Signal connectors- include ground

• Power connectorsSoftware

• Tasks vs interrupts vs main() vs RtosTimer

Page 3: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Driving MOSFETs and motor

Page 4: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

MC33883 + H bridge

!!!!CAUTION!!!!

Software fries hardware….

Need protection logic- 74HCxxx

Estop?

Driving MOSFETs and motor

G_EN = 5V

Page 5: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

PWM Skeleton/Examplehttps://github.com/ucb-ee192/SkeletonMCUX/tree

/master/frdmk64f_pwm

FTM_UpdatePwmDutycycle

(BOARD_FTM_BASEADDR, BOARD_FTM_CHANNEL,

kFTM_CenterAlignedPwm, updated_duty_cycle);

PWM and Motor Drive

Page 6: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

PWM for Main Motor control

im

<im > = (T/To) imax

Is imax constant?

To

T

PWM and Motor Drive

Page 7: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Motor Electrical Model

Also- see motor worksheet……

Motor Electrical Model

Back EMF

Motor electromechanical behavior

+

VDS

-VGS

+

Vm

-

+

Ve

-

Rm

im

im = VBAT – ke qm

Rm

. +

Vm

-

+VBAT

Conclusion:

<im >=?

PWM and Motor Drive

Motor Resistance?

Peak current?

Page 8: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

PWM for Steering Servo

Gotchas:

• 4.8 or 6V, (Not 7.2V!)

• max current 2A

• May be sensitive to noise on supply line

• Performance depends on voltage

RC Servo notes

Page 9: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Power supply wiring- BAD!

Voltage regulatorVoltage regulator

+11.1V

On board: what does this look like electrically (as a schematic)?

Power supplies

and Wiring

Page 10: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Voltage regulator

Power supply wiring- Star is better!

Voltage regulator

+11.1V

On board: what does this look like electrically (as a schematic)?

Low power ground

Power supplies

and Wiring

Page 11: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Ohms/square

http://www.edn.com/design/components-and-packaging/4411971/Counting-

squares--A-method-to-quickly-estimate-PWB-trace-resistance

Power supplies

and Wiring

Page 12: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

MC33883 protectionDriving MOSFETs and motor

Caution: don’t run motor

current through here

Page 13: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

+-

11v

S D

G

+-11v

SD

G

+-

11v

S D

G

B

C D

+-

11v

S D

G

A

Power supplies

and Wiring

Page 14: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Linear Voltage Regulator

VREG =5.0V

VREG =5.0V

0.5 ohm

(equiv. for 1 amp load)

regulatorVIN

VIN

Linear Regulator

Page 15: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Linear Regulator for RC servo power

• Power limit? Heat….

VIN

VREG

VIN

IIN

VREG =5.0V

0.5 ohm

(equiv. for 1 amp load)

regulatorVIN

Caution: caps required for

stability for some voltage

regulators

VIN

Pdiss

Pdiss =?

Linear Regulator

Page 16: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Buck Converter- DC-DC

Waveforms on board (also see buck converter notes.)

Buck: high to low. Boost: low-to-high)

+ VL -

+

Vin

-

+

R Vout

-

Buck Voltage Convertor

Why? Efficiency ~90%

Page 17: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Buck Converter LM2678

Buck Voltage Convertor

+

Vout

-

Page 18: Topicsee192/sp18/files/lec4.pdf · EECS192 Lecture 4 Feb. 6, 2018 Topics • Quiz 1 • Polarized capacitor • Project proposal feedback • Driving MOSFETs and motor (conclusion)

Buck Converter

https://en.wikipedia.org/wiki/Buck_converter

Buck Voltage Convertor

+ VL -