Maker Pro
Maker Pro

Strange Mosfet Results

P

Peter

Jan 1, 1970
0
I'm trying to fade some lights off slowly using a mosfet (see separate
posting Fading Lights from 22 July) driven from a PIC and 74HC595
shift registers. I've encountered some strange results.

I actually have 7 identical mosfets with 7 strings of lights attached,
each string of lights drawing a different amount of current. Each
74HC595 output runs via a diode to one mosfet gate. The lights get
turned on at different times then I want them all to fade off
together.

To create the fade I added a small cap to each mosfet gate (0.001uF).
The first thing I noticed was that the higher the load current the
faster the lights turned off. I therefore had to vary the size of the
caps to get a uniform fade time across the 7 strings.

The smallest string of lights however was turning off too slowly even
using a 0.0001uF cap. I therefore removed the cap completely. To my
surprise that INCREASED the turn off delay - so much so that the
mosfet overheated badly. Why the increase in turn off time? Would it
be due to the leakage through the external cap actually draining off
the mosfet gate cap once the external cap discharges?

Next problem. Increasing the size of the gate caps does not increase
the period of the fade. It simply keeps the lights on at almost full
brightness for longer, then they die very rapidly. The actual fade
time remains constant at about 0.7 seconds no matter how big the caps.
(I need about 1.5 seconds). I am therefore thinking of reverting to
transistors instead to try to get a slower fade.

(I am driving it from an 8-pin PIC (Picaxe) but I can't do PWM for
various reasons.)
 
J

John Jardine

Jan 1, 1970
0
Peter said:
I'm trying to fade some lights off slowly using a mosfet (see separate
posting Fading Lights from 22 July) driven from a PIC and 74HC595
shift registers. I've encountered some strange results.

I actually have 7 identical mosfets with 7 strings of lights attached,
each string of lights drawing a different amount of current. Each
74HC595 output runs via a diode to one mosfet gate. The lights get
turned on at different times then I want them all to fade off
together.

To create the fade I added a small cap to each mosfet gate (0.001uF).
The first thing I noticed was that the higher the load current the
faster the lights turned off. I therefore had to vary the size of the
caps to get a uniform fade time across the 7 strings.

The smallest string of lights however was turning off too slowly even
using a 0.0001uF cap. I therefore removed the cap completely. To my
surprise that INCREASED the turn off delay - so much so that the
mosfet overheated badly. Why the increase in turn off time? Would it
be due to the leakage through the external cap actually draining off
the mosfet gate cap once the external cap discharges?

Next problem. Increasing the size of the gate caps does not increase
the period of the fade. It simply keeps the lights on at almost full
brightness for longer, then they die very rapidly. The actual fade
time remains constant at about 0.7 seconds no matter how big the caps.
(I need about 1.5 seconds). I am therefore thinking of reverting to
transistors instead to try to get a slower fade.

(I am driving it from an 8-pin PIC (Picaxe) but I can't do PWM for
various reasons.)

If I've read it right and you've a diode feeding each FET gate then I can't
even see how they can turn off at all :). Would not something like a 100ohm
resistor be better?.
regards
john
 
R

Robert C Monsen

Jan 1, 1970
0
Peter said:
I'm trying to fade some lights off slowly using a mosfet (see separate
posting Fading Lights from 22 July) driven from a PIC and 74HC595
shift registers. I've encountered some strange results.

I actually have 7 identical mosfets with 7 strings of lights attached,
each string of lights drawing a different amount of current. Each
74HC595 output runs via a diode to one mosfet gate. The lights get
turned on at different times then I want them all to fade off
together.

To create the fade I added a small cap to each mosfet gate (0.001uF).
The first thing I noticed was that the higher the load current the
faster the lights turned off. I therefore had to vary the size of the
caps to get a uniform fade time across the 7 strings.

The smallest string of lights however was turning off too slowly even
using a 0.0001uF cap. I therefore removed the cap completely. To my
surprise that INCREASED the turn off delay - so much so that the
mosfet overheated badly. Why the increase in turn off time? Would it
be due to the leakage through the external cap actually draining off
the mosfet gate cap once the external cap discharges?

Next problem. Increasing the size of the gate caps does not increase
the period of the fade. It simply keeps the lights on at almost full
brightness for longer, then they die very rapidly. The actual fade
time remains constant at about 0.7 seconds no matter how big the caps.
(I need about 1.5 seconds). I am therefore thinking of reverting to
transistors instead to try to get a slower fade.

(I am driving it from an 8-pin PIC (Picaxe) but I can't do PWM for
various reasons.)


You are missing the resistor to ground, in parallel to the capacitor.
The thing should work by keeping the mosfet completely on, but then
limiting the current as Vgs drops. This won't really happen unless
there is a path to ground, since the mosfet doesn't pass any current
through the gate.

The only thing draining the current circuit is reverse current leakage
through the diode. Thats why removing the capacitor caused it to take
longer; the diode was leaking away only the capacitance of the MOSFET,
not the sum of this and the tiny capacitor you are using.

Check the Vgs curve for your mosfet on the datasheet, and choose the
capacitor/resistor so that the gate goes from Vcc to Vgs(th) in 2
seconds. You can do that by using the following formula:

Vgs(th)/Vcc = exp(-2/(R*C))

so

R*C = -2/ln(Vgs(th)/Vcc)

For a Vgs(th) of 4V, and a Vcc of 4V, you have

R*C = -2/ln(4/5) = 9

Thus, you could pick C to be 10uF, and R to be 910k.

Unfortunately, the Vgs(th) in the datasheet is not a very reliable
parameter for most power MOSFETs. Thus, you may have to experiment and
adjust the values.

Regards,
Bob Monsen
 
A

Active8

Jan 1, 1970
0
^^^^^^^^^^^^^^
Yup. Use it. It'll work.

BTW, John mentioned that the diodes blocked the discharge.

|
||-+
___ ||<-
-|___|------+-------||-+
| |
|
---
---
|
|
===
GND


That'll work, too, and the same equation applies. Just don't let
Vcc/R exceed the maximum sink current of the SRs.
 
C

colin

Jan 1, 1970
0
Active8 said:
BTW, John mentioned that the diodes blocked the discharge.

|
||-+
___ ||<-
-|___|------+-------||-+
| |
|
---
---
|
|
===
GND


That'll work, too, and the same equation applies. Just don't let
Vcc/R exceed the maximum sink current of the SRs.


rather than conect the capacitor to ground u cld make use of the miller
efect and conect it from gate to drain. this wld make any delay much more
related to diming rather then delay before starting to turn off. basicaly
the miler efect multiplies the efective capacitance by the gain of the
circuit, wich is probably 30 or more at a very wild gues, its basicaly gm x
r load. wich both vary with curent.


Colin =^.^=
 
P

Peter

Jan 1, 1970
0
My first attempt was simply connecting a big resistor from gate to
ground with no cap. But that gave almost instant turn-off, even when
using a 10M resistor! That was why I removed it and used a cap
instead. But I think I can now see that if I use a resistor and a
bigger cap then it will ramp the voltage down more slowly.

Colin can you please explain the Miller effect a bit more. And are you
saying a cap from gate to drain (which is sitting at 40V) plus also
the resistor to ground?
 
P

Peter

Jan 1, 1970
0
PS. See also my separate posting "Peak current to charge a capacitor".
I was also concerned that adding too big a cap to the chip outputs
might overload them when the cap is charging. How big a cap is too
big?
 
A

Active8

Jan 1, 1970
0
PS. See also my separate posting "Peak current to charge a capacitor".
I was also concerned that adding too big a cap to the chip outputs
might overload them when the cap is charging. How big a cap is too
big?

Those specs that define max load capacitance apply to a faster
digital output where the cap is constantly being charged and
discarged. Also, if you try to drive a big cap it takes longer to
charge it up with a limited charging current.
 
A

Active8

Jan 1, 1970
0
My first attempt was simply connecting a big resistor from gate to
ground with no cap. But that gave almost instant turn-off, even when
using a 10M resistor!

Sure. The gate cap is so small that you won't notice an increase in
turn off time because it's down there in the uS range.
 
P

Peter

Jan 1, 1970
0
Well that had a less than interesting effect!
First I tried the idea of just connecting a capacitor and resistor in
parallel between the gate and ground. Tried a few combinations but the
result was exactly the same as I was experiencing with just a cap on
the gate, namely that increasing the RC did not increase the "fade"
period. It just stretched the fully-on time then it faded off rapidly.
That seems to be indicating that the mosfet is very efficient. ie. it
is fully on over a fairly wide range then rapidly goes to fully off.

I therefore tried the idea of using the so-called Miller effect. ie. I
connected a cap from gate to drain plus the resistor from gate to
ground. Very interesting. The mosfet promptly died (internal short so
always hard on). It had gotten fairly hot so I then installed a new
mosfet with heat sink attached. Same result. Died immediately. It did
not even wait for a signal to the gate and did not bother getting hot.
Just died the moment power was applied to the drain (indicated by
coming hard on even though no gate signal). The cap I used was a 0.1uF
(104) with a 10k resistor from gate to ground.

As I said before the source is at 40v (actually rectified 38vAC). The
max rating specs for the mosfet (2SK2175 - equivalent to STP16NE06)are
as follows:
"Vdgr Drain-Gate voltage (Rgs=20k) 60V
Vds Drain-Source voltage (Vgs=0) 60V
Vgs Gate-Source voltage +/- 15V."
 
P

Peter

Jan 1, 1970
0
This is getting even stranger! I remembered reading about gate ringing
in mosfets and found a ST datasheet that recommended inserting a 4k7
resistor on the gate to stop it. I therefore got another new mosfet
and hooked it up that way. At least then it did not die, but it acted
even stranger. As soon as any of the OTHER mosfets came on, the one I
was testing turned on spontaneously without any input from the chip. I
put a multimeter between the diode (coming from the 595 output) and
the 4.7k resistor and it read 2v. The 595 output was still at 0v.

Oops, I spoke too soon. I was using a 0.27 400V cap a minute ago as a
trial. I just changed it back to a little 0.01 "metalised ceramic
disc" and the mosfet just died as soon as I switched on. Could it be
that the 40v is too much for those little caps?

Anyway this whole idea of a cap between gate and source doesn't seem
to be helping.
 
P

Peter

Jan 1, 1970
0
Anyway this whole idea of a cap between gate and source doesn't seem
to be helping.

....I mean between gate and drain.
 
P

Peter

Jan 1, 1970
0
35VAC > Bridge rectifier > Lights > Mosfet > Gnd.
 
A

Active8

Jan 1, 1970
0
35VAC > Bridge rectifier > Lights > Mosfet > Gnd.

Damn sam. No simple error.

I was also thinking that the Vgs(th) was a loose spec and (I'm
talkin parallel RC on the gate to ground/source here - forget that
drain - gate cap) that even though the gate voltage is dropping
slowly, the mosfet is being a sensitive prick. They're nice that way
and it's a useful feature. They are used as on/off switches more
often than not.

So your thought to try a bipolar tranny might just be the ticket but
then you'd have to deal with the RC net discharging though the base.
Bummer, eh? A Darlington pair migh help a bit. I'd also use a
resistor in series with the gate so that the cap discharges into the
595 and skip the diode.

The prob I see with either case is the exponential charge/discharge
nature of the RC net. If RC is the time constsnt, that's the time it
takes for a cap to charge to 63%, IIRC of the charging voltage or
discharge to 37% of it's initial charge. Then for the next RC
interval, it only changes that same percentage of what's remaining.
It's not a linear thing so the control voltage of your switching
active is probably going to rapidly shoot right past that point
where the active is in its linear region.

I'd probably forget this RC approach. It's subject to mfg process
variations and everything else.
 
A

Active8

Jan 1, 1970
0
35VAC > Bridge rectifier > Lights > Mosfet > Gnd.

Best idea I can come up with without using separate *real* dimmer
circuits for aech string is that which you don't seem to want to
hear. I don't know what picaxes can do, but if you can get a single
pwm output, you can and that with the on signal. 7 outputs... like
so:

|
__ ||-+
+----| | ||<-
| |& |---------||-+
D0 -------------|__| |
|
| __
+----| | |
| |& |- |
D1 -------------|__|
| |
| |
| | |
| |
| |
| |
| |
| | |
| __ |
+----| |
| |& |-
D7 -------------|__|
|
|
|

pwm
created by Andy´s ASCII-Circuit v1.22.310103 Beta www.tech-chat.de

Then you just dim the lights and turn off the PIC outputs with a

and 0x00, port

and reset the pwm register or control voltage. and you can get your
pwm from a 555 timer if you don't want to do it in the pic, but
yuo'll need a control voltage.
 
R

Robert C Monsen

Jan 1, 1970
0
Peter said:
35VAC > Bridge rectifier > Lights > Mosfet > Gnd.

How are you arranging the 5V logic supply? Battery?

Regards,
Bob Monsen
 
A

Active8

Jan 1, 1970
0
How are you arranging the 5V logic supply? Battery?

Good question. He mentioned that turning on one string causes them
all to turn on under whatever incarnation of the circuit he was
talking about. IIRC it was the one with the gd cap.
Regards,
Bob Monsen
^^^^^^^^^^^^^^^^ add a hyphen or two and readers will clip your
title block for replies.
 
Top