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

0 Members and 1 Guest are viewing this topic.

Offline OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Slow MOSFET turn off
« on: August 12, 2018, 05:20:20 pm »
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: 1369
  • Country: us
Re: Slow MOSFET turn off
« Reply #1 on: August 12, 2018, 05:27:44 pm »
1M pulldown is pretty weak. You can try 10K or 4.7K instead.
 

Offline Neukyhm

  • Regular Contributor
  • *
  • Posts: 146
  • Country: es
Re: Slow MOSFET turn off
« Reply #2 on: August 12, 2018, 05:38:41 pm »
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: 1987
  • Country: dk
Re: Slow MOSFET turn off
« Reply #3 on: August 12, 2018, 05:58:07 pm »
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 OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Re: Slow MOSFET turn off
« Reply #4 on: August 12, 2018, 06:00:13 pm »
But the problem is only with three of the MOSFETs. All the others switch off instantly.
 

Online wraper

  • Supporter
  • ****
  • Posts: 16845
  • Country: lv
Re: Slow MOSFET turn off
« Reply #5 on: August 12, 2018, 06:02:43 pm »
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?
 

Online Benta

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

 

Offline mzzj

  • Super Contributor
  • ***
  • Posts: 1245
  • Country: fi
Re: Slow MOSFET turn off
« Reply #7 on: August 12, 2018, 06:33:25 pm »
Stinks like MCU output setting registers..
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Slow MOSFET turn off
« Reply #8 on: August 12, 2018, 07:25:40 pm »
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.
 

Online Benta

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

 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Slow MOSFET turn off
« Reply #10 on: August 12, 2018, 10:20:22 pm »
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.
 

Offline bson

  • Supporter
  • ****
  • Posts: 2269
  • Country: us
Re: Slow MOSFET turn off
« Reply #11 on: August 12, 2018, 10:24:07 pm »
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".
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 16607
  • Country: us
  • DavidH
Re: Slow MOSFET turn off
« Reply #12 on: August 13, 2018, 01: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 OaklanderTopic starter

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

Offline OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Re: Slow MOSFET turn off
« Reply #14 on: August 13, 2018, 05:45:22 am »
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: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: Slow MOSFET turn off
« Reply #15 on: August 13, 2018, 07:57:16 am »
Maybe some of the GPIO have their low side drivers damaged?
I love the smell of FR4 in the morning!
 

Offline gasmeter

  • Contributor
  • Posts: 25
  • Country: gb
Re: Slow MOSFET turn off
« Reply #16 on: August 13, 2018, 08:30:44 am »
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 OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Re: Slow MOSFET turn off
« Reply #17 on: August 13, 2018, 01: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: 951
  • Country: pt
    • My AVR tutorials
Re: Slow MOSFET turn off
« Reply #18 on: August 13, 2018, 02:02:51 pm »
Bad ground somewhere.
 

Offline sanman

  • Contributor
  • Posts: 45
  • Country: us
Re: Slow MOSFET turn off
« Reply #19 on: August 13, 2018, 02:42:27 pm »
Connect the troublesome MOSFET to one of the lines that is working with the other MOSFETS?
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Slow MOSFET turn off
« Reply #20 on: August 14, 2018, 10:15:17 am »
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, 10:18:30 am by StillTrying »
.  That took much longer than I thought it would.
 

Offline OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Re: Slow MOSFET turn off
« Reply #21 on: August 14, 2018, 05:45:37 pm »
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: 2850
  • Country: se
  • Country: Broken Britain
Re: Slow MOSFET turn off
« Reply #22 on: August 14, 2018, 09:10:00 pm »
It seems odd relying on 1M to pull the hexfet gate and GPIO below 1V when the GPIO could just drive it there!
.  That took much longer than I thought it would.
 

Online JustMeHere

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: us
Re: Slow MOSFET turn off
« Reply #23 on: August 15, 2018, 01: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 OaklanderTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: 00
Re: Slow MOSFET turn off
« Reply #24 on: August 15, 2018, 05:30:47 am »
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