Author Topic: Slow MOSFET turn off  (Read 969 times)

0 Members and 1 Guest are viewing this topic.

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Slow MOSFET turn off
« on: August 13, 2018, 03:20:20 am »
I have MOSFETs as switches. The circuit is shown in the attached picture. The input to the gate is coming from GPIO pin of AVR microcontroller and the source is connected to a LED-light module.
My device has 16 identical copies of the circuit. Most of them turn the LED off instantly but some are slow. The slowest one stays on for four seconds after the GPIO is set LOW.

I only have one prototype of the device so I can't compare different units. I wonder if this could be caused by bad solder joint or something.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1340
  • Country: us
Re: Slow MOSFET turn off
« Reply #1 on: August 13, 2018, 03:27:44 am »
1M pulldown is pretty weak. You can try 10K or 4.7K instead.
 

Offline Neukyhm

  • Regular Contributor
  • *
  • Posts: 130
  • Country: es
Re: Slow MOSFET turn off
« Reply #2 on: August 13, 2018, 03:38:41 am »
1M pulldown is pretty weak. You can try 10K or 4.7K instead.
Agree. Try using a lower value resistor. I usually put 1K to my IRFP250 mosfets.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1333
  • Country: dk
Re: Slow MOSFET turn off
« Reply #3 on: August 13, 2018, 03:58:07 am »
But he mentions setting the gpio pin low.
Shouldn't that pull down the gate through 100ohm , faster than 4s ?

Or does the 1M prevent current to flow to gnd, when discharging

/Bingo
 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #4 on: August 13, 2018, 04:00:13 am »
But the problem is only with three of the MOSFETs. All the others switch off instantly.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 8435
  • Country: lv
Re: Slow MOSFET turn off
« Reply #5 on: August 13, 2018, 04:02:43 am »
Or does the 1M prevent current to flow to gnd, when discharging
LOL what?

Is MCU output really set low or just high impedance? What if you don't use mcu but manually switch R37 between +5V / GND?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 1547
  • Country: de
Re: Slow MOSFET turn off
« Reply #6 on: August 13, 2018, 04:19:22 am »
What's the 1 M (or whatever value) even doing there?  Seems useless to me.

 

Offline mzzj

  • Frequent Contributor
  • **
  • Posts: 707
  • Country: fi
Re: Slow MOSFET turn off
« Reply #7 on: August 13, 2018, 04:33:25 am »
Stinks like MCU output setting registers..
 

Online ogden

  • Super Contributor
  • ***
  • Posts: 1189
  • Country: lv
Re: Slow MOSFET turn off
« Reply #8 on: August 13, 2018, 05:25:40 am »
What's the 1 M (or whatever value) even doing there?  Seems useless to me.

It's not. Most I/O pins of firmware-less MCU are floating inputs. If you screw-up your firmware or GPIO initialization, such (preferably 10..50k) pull-down resistor can save your circuit, especially in BDLC motor control application.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 1547
  • Country: de
Re: Slow MOSFET turn off
« Reply #9 on: August 13, 2018, 08:02:49 am »
ogden, you're right. It came to me as well after posting. Uninitialized I/Os are a problem. But 1 M? No way.

 

Online bson

  • Supporter
  • ****
  • Posts: 1297
  • Country: us
Re: Slow MOSFET turn off
« Reply #10 on: August 13, 2018, 08:20:22 am »
4s sounds like the leakage through the 1M resistor when the GPIO pin is set to input or some other high-impedance function.  Smells like a pin configuration firmware bug.
 

Online bson

  • Supporter
  • ****
  • Posts: 1297
  • Country: us
Re: Slow MOSFET turn off
« Reply #11 on: August 13, 2018, 08:24:07 am »
Reduce the 1M slightly, to say 47k to make it a weak pulldown.  This keeps the gate from drifting and makes the FET shut off in case of - ahem - firmware bugs that accidentally misconfigure it.  It will also keep it low during power-on reset until the pin is - ahem - correctly configured.  And, finally, on power-off as rails ramp down and the ┬ÁC is suspended by the brownout detection circuitry, it shuts off the FET should the firmware - ahem - "forget to".
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 7723
  • Country: us
  • DavidH
Re: Slow MOSFET turn off
« Reply #12 on: August 13, 2018, 11:15:31 am »
Some microcontroller input and tri-state output pins have 100 kilohm pullups or similar which may or may not be selectable to prevent ambiguous logic states.  This may be part of a "bus hold" function.  Combined with the 1 megohm pull-down this may be causing a problem.
 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #13 on: August 13, 2018, 01:04:57 pm »
The other two slow MOSFETs take about half a second and a second to turn off. Can the firmware bug explain that?
 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #14 on: August 13, 2018, 03:45:22 pm »
I now checked the software and there is no difference in the configuration of the pins. I also checked the datasheet for alternate pin functions but they are all disabled and should not interfere.
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1531
  • Country: pl
  • Troll Cave Electronics!
Re: Slow MOSFET turn off
« Reply #15 on: August 13, 2018, 05:57:16 pm »
Maybe some of the GPIO have their low side drivers damaged?
I love the smell of FR4 in the morning!
 

Offline gasmeter

  • Newbie
  • Posts: 4
  • Country: gb
Re: Slow MOSFET turn off
« Reply #16 on: August 13, 2018, 06:30:44 pm »
Hi

A few things with Fets I have learnt over the years.
1/ Never underestimate the gate capacitance, especially if your switching any current .
(I have seen power fets blow up just because they are driven by an IO pin from a micro and not a proper drive circuit).
A slow moving Gate makes the Fet operate in its linear region for a time which causes it to heat up and can cause thermal run away.

2/ If switching use a gate drive IC they can sink/source massive current to discharge that capacitance, you will be amazed how much current it takes.

3/ Make sure the supply driving the gate is very well decoupled.
If you are dumping current into a gate, it has to come from somewhere local.

4/ If possible turn the FET on Hard.

For your application I assume you have a scope ?
Simply look at the gate waveform and if your not sure post here.

I come across a lot of circuits where the FET gets very hot just because its not being turned on/off fast enough.
Then I don't know what load you are switching but look at the drain.


I hope that helps.

Peter


 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #17 on: August 13, 2018, 11:06:47 pm »
I have now made the measurements with the scope.
The voltage on the gate of the MOSFET instantly drops to ground level. The voltage on the drain fades just like the light intensity of the LED.
That's what happens when I measure them separately. But if they are both measured at the same time there is no delay. Then the slow LEDs turn off just as fast as the others.

To me it seems like a hardware problem. Somehow some of the gates of the MOSFETs are slow to discharge, but the presence of the oscilloscope probe makes them discharge faster.
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: pt
    • My AVR tutorials
Re: Slow MOSFET turn off
« Reply #18 on: August 14, 2018, 12:02:51 am »
Bad ground somewhere.
 

Offline sanman

  • Contributor
  • Posts: 38
  • Country: 00
Re: Slow MOSFET turn off
« Reply #19 on: August 14, 2018, 12:42:27 am »
Connect the troublesome MOSFET to one of the lines that is working with the other MOSFETS?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 1443
  • Country: gb
  • 100% Brand New and High Quality, in theory.
Re: Slow MOSFET turn off
« Reply #20 on: August 14, 2018, 08:15:17 pm »
The voltage on the gate of the MOSFET instantly drops to ground level.

Actual values for instantly and ground level would help to solve the mystery. If it takes more than about 1 or 2us for the gate to get below 0.2V the GPIO is not driving it low properly.
« Last Edit: August 14, 2018, 08:18:30 pm by StillTrying »
 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #21 on: August 15, 2018, 03:45:37 am »
It was a bad solder joint.

I noticed that the LEDs turn on if I press on the components with my finger. The slow ones illuminated very bright but others very only glowing a little. That made me think that maybe my finger was good enough conductor to turn the FETs on. Then I did the same test with a plastic bag as insulator between my finger and the PCB. Then nothing happened. That made the problem look like problem with pull-down so I checked the soldering of the 1M resistors and it worked. All the LEDs now turn off very quickly.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 1443
  • Country: gb
  • 100% Brand New and High Quality, in theory.
Re: Slow MOSFET turn off
« Reply #22 on: August 15, 2018, 07:10:00 am »
It seems odd relying on 1M to pull the hexfet gate and GPIO below 1V when the GPIO could just drive it there!

Offline JustMeHere

  • Regular Contributor
  • *
  • Posts: 95
  • Country: us
Re: Slow MOSFET turn off
« Reply #23 on: August 15, 2018, 11:44:07 am »
It seems odd relying on 1M to pull the hexfet gate and GPIO below 1V when the GPIO could just drive it there!

Shouldn't you pull the one way or the other so that the FET is in a known state during micro start up and programming?
 

Offline Oaklander

  • Contributor
  • Posts: 35
  • Country: fi
Re: Slow MOSFET turn off
« Reply #24 on: August 15, 2018, 03:30:47 pm »
It seems odd relying on 1M to pull the hexfet gate and GPIO below 1V when the GPIO could just drive it there!
Yeah. I don't really understand what happened. The GPIO pins are pulled down to ground to turn the FETs off. The 1M resistor should not have any effect on that.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf