14
Rowan Hall 238A [email protected] http://rowan.jkbeard.com April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H-Bridge James K. Beard, Ph.D.

Rowan Hall 238A [email protected] April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Embed Size (px)

Citation preview

Page 1: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Rowan Hall 238A

[email protected]

http://rowan.jkbeard.com

April 09, 2006

Sophomore Clinic ENGR 01-202 5, CRN 20686Integrating the PIC and the H-Bridge

James K. Beard, Ph.D.

Page 2: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 2

Topics

Driving the MOSFETs from 5 Volts

The pin out of the H-bridge

Connecting the H-bridge and the PIC board

Page 3: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 3

MOSFETs in Switching

Switching properties Off

When they’re off, they’re off Gate-source voltage must be below threshold voltage

On When they’re on, the drain-source resistance is very, very

low The achieved on resistance is a function of the drive voltage Drive must be much higher than the threshold voltage

5 Volts drive provides sufficient drive

Page 4: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 4

On V-I Characteristics

N-Channel P-Channel

Page 5: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 5

Conclusion

Typical characteristics from the IRC data sheets N-channel is IRFZ24N P-channel is IRF9Z24NPbF

Data sheet shows N-channel on resistance of 1/8 Ohm P-channel on resistance of 2/5 Ohm Both limit current to about 2.5 A

Good to go for Sophomore Clinic Project motor drives

A good choice for magnet drive – switch directly from the PIC

Page 6: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 6

Pin-Out of the H-Bridge Board

Power connector+5 Volts, ground from the railsPower to the motors comes from here

Connectors for the motors Three redundant ground connections Eight lines to the PIC board

Page 7: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 7

1 3 5 7 8 6 4 2

A B C DG 5

G2 G4 G1 G3 G6 G8 G5 G7

G2

G1G3

G4

VDD

H12 H34

H78 H56 H34 H12

Page 8: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 8

The H-Bridge Drive

The MOSFETs are complementary – The P-channel is driven by the reverse polarity signal to the gate +5 Volts is OFF Ground is ON

We want to drive them form the PIC hardware, not the software

Solution We use the PWM output of the PIC We use the motor direction toggle from the PIC We drive the H-bridge with hardware using these

signals

Page 9: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 9

Interface Circuitry

G2 G4 G1 G3 G6 G8 G5 G7

Toggle PWM

G4

G1

G2

G3

From PIC

To H-Bridge

Page 10: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 10

The Chips

CMOS to provide full 5 Volt swing on logic one

4000 series to allow use in other circuits up to 15 Volts

Two-chip solution for both motorsCD4011 or MC14011 quad NANDCD4069 or MC14069 hex inverter

Page 11: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 11

Chip Pin-Outs

Page 12: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 12

Wiring the Interface Logic:

G2

G4

G1

G3

G6

G8

G5

G7

C0 C1 C2 C3 C4 ... ... ...

PIN 14: HOOK TO +5VDC

PIN 7: HOOK TO GND

TAKE YOUR TIME – TRIPLE CHECK EVERY CONNECTION!

Errors here can cause permanent damage to the uC board and/or H-Bridge!

CD40111 7

14

2 3 4 5 6

13 12 11 10 9 8

On both ICs:

CD40691 2 3 4 5 6 7

14 13 12 11 10 9 8

Page 13: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 13

The Interface Logic Wired

Page 14: Rowan Hall 238A beard@rowan.edu  April 09, 2006 Sophomore Clinic ENGR 01-202 5, CRN 20686 Integrating the PIC and the H- Bridge

Sophomore Clinic IIApril 09, 2006 Slide 14

Electromagnet Drive Circuit

D SG

Electromagnet

220 OutputFrom PIC

+5 VoltsFrom RailOr H-Bridge

IRFZ24NN-ChannelMOSFET (same one thatthe H-bridge uses)

GS

D