Searching \ for 'Q: PIC 16F84 drives MOSFET hot?' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16F
Search entire site for: 'Q: PIC 16F84 drives MOSFET hot?'.

Truncated match.
'Q: PIC 16F84 drives MOSFET hot?'
1998\06\24@214557 by

G'day,

Amateur wants to learn.

My MOSFETs are getting hot and I'm wondering why.  Is my PWM frequency
too high?  Am I simply pushing them too hard?

I'm driving a pair of 21W 12V (1.75A) lamps using a MTP3055E MOSFET each
from port A bits zero and one using a pulse width modulation (PWM)
routine.  At an ambient temperature of 120C they reach 44.40C, with no
heatsink or fan.

Circuit is port to gate, source to ground, drain to lamp, then lamp to
the 13.6V 2A unregulated supply.  I have a GIF of the schematic I can
mail to anyone who asks.  It's a project for Technical Aid to the
Disabled ... a light box communication device for very young children.

The supply voltage stabilises under load to be about 14.4V, and a DVM
across the lamp shows about 10.5V at my chosen duty cycle of 200/256, or
71%.

The PWM routine "light" is called as frequently as possible; usually
with only two instruction cycles between each call.  The PWM is simple
and is derived from the Scott Edwards source book; repetitive addition
in an accumulator and taking the carry output as the PWM signal.

The code follows.  I calculate 15 cycles at 4MHz between each setting of
the output bits.  With a 71% bit pattern of 011101111011101111 that's
roughly 67 cycles between pulses, so a frequency of 15kHz.  I hope.

a_left  equ     0x12            ; duty cycle accumulators
a_right equ     0x13

d_left  equ     0x14            ; duty cycle settings (set to 200)
d_right equ     0x15

port    equ     PORTA

b_left  equ     0x00            ; gate of mosfet for left lamp
b_right equ     0x01            ; gate of mosfet for right lamp

[...]

light                           ; update lights using duty cycles
movf    d_left,w
btfsc   STATUS,C
goto    light_1
bcf     port,b_left
goto    light_2
light_1
bsf     port,b_left
light_2
movf    d_right,w
btfsc   STATUS,C
goto    light_3
bcf     port,b_right
goto    light_4
light_3
bsf     port,b_right
light_4
return

[...]

--
James Cameron                              (james.camerondigital.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

First find the ON resistance of the mosfet, and calculate the power in watts wit
h 1.7 Amp through that resistance.  If that matches the amount of heat you feel
on the mosfet, then you need a heatsink for the mosfet.
else:

1.   When the mosfet is in the act of turning on or turning off,  it goes throug
h a linear conduction region and dissipates heat.  The more often you do this, t
he more heat.  15KHz is a lot of switches (heat) per second.  You only have to u
se a frequency fast enough for the eye not to see flicker, which is about 40 Hz
to about 89 Hz, depending on how much coffee you had today (Yes, makes the retin
a detect flicker at higher frequencies).    Try using 100 HZ PWM, and you mosfet
will thank you (150 times less switching heat).   Switching power supplies swit
ch mosfets at 40 KHz and faster, but they drive the gate real hard, and use heat
sinks for the mosfet.

2.  Your mosfet may not be turning on or off fast enough.  You want to transitio
n thru the linear region as fast as possible.  The big mosfets (i.e 500MA and up
) have lots of gate capacitance, and often special drivers are used to charge an
d discharge the gates, we are talking one Amp here, instantaneous.  It may be th
at by the time the PIC output driver (Which an source 40 ma, but maybe only at 3
volts instead of the 5 volts you expect) charges the gate to +5 volts, it alrea
dy time to turn it off again.

3.  Your mosfet may not be a low threshold device.  Be sure that this mosfet is
completely on at 5 volts (which I suppose is comming from your PIC.  A standard
mosfet needs about 12 volts to turn it on fully, but low threshold types can be
fully on at only 4 or 5 volts, if the current is not excessive.

4. You are using an N type mosfet--that is good-- the P types have higher ON res
istance for the same current rating.

Put +5 on the gate of the mosfet, and wait a while with the lamp on.  If the mos
fet gets hot, then 5 volts is not enough to turn it fully on.
If the mosfet remains cool, then the problem is probably the inability of the PI
C to charge the mosfet gate to +5 quickly enough, and the solutions are: lower t
he frequency (remember, 150 times cooler at 100 Hz), or amplify the drive from t
he PIC with another stage of gain(either get more current, or swing the gate to
+12), or use a mosfet with a lower threshold (fully on at 2 or 3 volts)..

Regards,
Ron Fial
-------------------------------------
At 11:35 AM 6/25/98 +1000, you wrote:
{Quote hidden}

Regards,
Ron Fial

Inductance can cause enough voltage to cause your MOSFETS to zener each
turn-off. Put a scope on the drain lead and see. You might need a freewheel
diode drain-to-supply.

Read all the other answers you get, too. Mine is just one you might not
have heard yet.

Cheers,

Bob

http://www.bobblick.com/

On Thu, 25 Jun 1998 11:35:06 +1000 James Cameron
<james.cameronDIGITAL.COM> writes:
>G'day,
>
>Amateur wants to learn.
>
>My MOSFETs are getting hot and I'm wondering why.  Is my PWM frequency
>too high?  Am I simply pushing them too hard?

Ron Fial's answer was excellent, but  I'll go over the same points in a
different way.  They could be becoming hot either from DC resistance (too
much current or incomplete turn-on) or AC effects (slow turn on or turn
off, or oscillation).

The DC is easy to check.  First look at the ratings, specifically the
current squared times on-resistance times duty cycle.  A TO-220 device
with no heat sink will become noticeably warm at about 0.5W of power
dissipation and generally too hot around 1 Watt.  If the load current is
too much for the on resistance of the device, either you need a larger
device (lower on resistance) or a heat sink.  To meet the 0.5W
requirement with a 100% duty cyle of 1.75A, the on-resistance needs to be
less than 0.16 ohms.

If the theory looks good, try it in practice.  Set the PWM for 100% and
measure the drain-source voltage.  If it is more than expected (load
current times on resistance), you likely have incomplete turn-on due to
not enough gate-source voltage.  Make sure the FET is a "logic level"
type specified for 5V drive.  Another possibility is that the FET and
driver are oscillating rather than staying on.  A small resistor in
series with the gate helps prevent that.  Finally, consider that an
incandescent bulb draws more than its rated current when it is at less
than full brightness.  Of course the duty cycle is lower then too so the
worst case is probably still with full brightness.

The remaining possibilty is slow turn-on or turn-off, or maybe incomplete
turn-off (which is unlikely in this case).  An oscilloscope is really
essential to examine this phenomena.  Of course using a slower PWM
frequency will make the transistion times less important.

_____________________________________________________________________
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

James, I looked at your schematic.

The threshold for the mosfet you are using is quite low, but with any real curre
nt (such as the 3-4 Amp inrush current of your lamp when it is cold), the mosfet
doesn't really turn on all the way till you have about 7 volts or so from gate
to source.  If you turn it on all the way and turn it on quickly (it can turn on
in 60 nanoseconds, it should not get hot, since its on resistance is only .15 o
hms!  This is true even if you do it at 15 thousand times per second, as long as
you turn it on quickly, and turn it off quickly.

The voltage translation circuit to take the 5 volt swing from the PIC and make i
t into a fast 10 volt swing with high current drive capability uses a number of
parts, so there are now mosfet driver circuits to do that for you.  However you
would do better by getting some "logic level" mosfets that turn completely on at
5 volts, such as the International Rectifier IRL series.  The IRLIZ24N is a 55
volt device, on resistance is 0.06 Ohms!, and rated for 14 Amps continuous.  The
re are lots of others in that series that should work fine in your circuit.
The IRL540N is my favorite, 100 Volts, .044 Ohms On, 30 Amps continuous, and Dig
ikey sells them at \$1.41 each when you buy 10.

The PDF file for the  3055E mosfet you are using can be found at:
www.st.com/stonline/books/pdf/docs/3036.pdf
Regards,
Ron Fial

--------------------------------------------
At 01:15 PM 6/25/98 +1000, you wrote:
{Quote hidden}

At 11:35 AM 6/25/98 +1000, you wrote:
{Quote hidden}

Regards,
Ron Fial

Hi,

the connection between caffeine and the frequency limit of flicker
detection of the retina fascinates me (I believe it and I think I had
experienced it). Can you give me some reference?

Imre

On Thu, 25 Jun 1998, James Cameron wrote:

{Quote hidden}

Thanks all,

Further diagnosis revealed the MOSFET is not turning fully on; given a
stable 5V gate voltage, it still reached 440C at 120C ambient.  Given
the drain voltage of 14V, it was happy and ran cool; 270C.

I'll go buy ten logic-level MOSFETs.  Any Australians know a good, cheap
source of these things?  Not rich enough to try Farnell yet, though
they do list the IRLZ24 and IRL540 mentioned by Ron Fial.

http://www.ozemail.com.au/~oatley lists a 2SK2175 which they claim is
logic-level, http://www.st.com/ equates it with one of their logic-level
devices.  Where would I look for data on 2SK2175?  Recommendations
welcome for a good searching site.

I think I'll try a lower PWM frequency though; be kinder to any other

--
James Cameron                              (james.camerondigital.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

>
>Further diagnosis revealed the MOSFET is not turning fully on; given a
>stable 5V gate voltage, it still reached 440C at 120C ambient.  Given
>the drain voltage of 14V, it was happy and ran cool; 270C.

^^^^^^^^^^^^^^

THIS IS COOL???????

Calvin

{Quote hidden}

>>Further diagnosis revealed the MOSFET is not turning fully on; given a
>>stable 5V gate voltage, it still reached 440C at 120C ambient.  Given
>>the drain voltage of 14V, it was happy and ran cool; 270C.
>
>                                            ^^^^^^^^^^^^^^
>
>THIS IS COOL???????
>
>Calvin

That was my reaction, I was thinking it had to be a misprint.
If it's real, something's still very wrong.
Is the source at zero volts?

270C is also AFAIK, WAY beyond the thermal limits!

{Still looking for data on 2SK2175 MOSFETs}

> Further diagnosis revealed the MOSFET is not turning fully on; given a
> stable 5V gate voltage, it still reached 440C at 120C ambient.  Given
> the drain voltage of 14V, it was happy and ran cool; 270C.

Calvin wrote:
>                                             ^^^^^^^^^^^^^^
> THIS IS COOL???????

And his mail software is

X-Mailer: Microsoft Outlook Express 4.72.2106.4

There appears to have been a fallback character translation, from the
degrees symbol "0" [a superscripted circle] to a zero "0".  I have a
choice of sending this international standard character as either
eight-bit or quoted-printable.  I'd love to know whether the source of
this translation is my mail client (Netscape Communicator), the
distribution list server, or Microsoft Outlook Express.

I know where I'd place my bets.

"If you haven't got the source code, you haven't got the software."

--
James Cameron                              (james.camerondigital.com)
Digital Equipment Corporation (Australia) Pty. Ltd. A.C.N. 000 446 800

Anyone know any good data sheet indexes on the web?

James Cameron wrote:
> I know where I'd place my bets.

I lost the bet.  ;-(  A messsage to myself shows the degrees symbol is
converted.  I've turned on "quoted-printable MIME encoding" feature of
Netscape Communicator's preferences, and so this message should be in
that format.

Here is a set of six degrees symbols "¡¡¡¡¡¡" in ISO8859 character set.

If they appeared to you as a row of equals signs and "B0", then your
mail client does not understand this format.  Let me know by direct