MOSFET Switch behaves strange

Hello, after I probably burned 4 MOSFET’s already, it’s an IRL2203N http://www.soloelectronica.net/PDF/24%20a%2012/irl2203n.pdf
I don’t know what to do anymore.
I am currently building a switch to turn two 12V LED Strips on and off.
I am using a Node MCU (3.3V Logic) to control the MOSFET.
I am soldering anything like in the plan which I attached.

When I power everything for the first time, everything works as it should be for a while.

  • GPIO = LOW on the MOSFET Gate -> LED Strip is OFF
    ~100mV measured on the LED Strip + and –
  • GPIO = HIGH on the MOSFET Gate -> LED Strip is ON
    Same Voltage as the 12V PSU
  1. Why do I still measure ~100mV when the MOSFET is supposed to be OFF?

Then I let it run for a while in the GPIO = LOW State, LED Strip is turned OFF, that’s the moment it begins to behave strangely.

  • GPIO = LOW on the MOSFET Gate -> LED Strip is glowing very weakly and flickers slightly
    After some time I measure 5V than 8.1V on the LED Strip + and –
  • GPIO = HIGH on the MOSFET Gate -> LED Strip is ON
    Same Voltage as the 12V PSU
  1. Why does the MOSFET opens up after a while?

I have already searched the Internet to solve the problem, but I wasn’t successful, please help me.

  1. Probably because the LEDs are acting as solar cells and generating a little power. If that's the reason, you will measure 100mV even with the mosfet disconnected, under the same lighting conditions.

  2. My guess is that you have a bad connection between ground of the NodeMCU and the mosfet source. Or possibly a ground loop between the two power supplies - best plug them into the same mains distribution block.

OP's image:


A schematic diagram with pin markings and so would help A LOT. I don't feel like having to check the data sheet to try to figure out what the pinout of that mosfet may happen to be, to see whether you connected it properly.

The flickering and opening of the gate implies the gate is floating - which would happen if you have the pin set to INPUT and no pull-down resistor to keep the gate off. That wire diagram shows a 2k2 resistor between one of the pins and GND (is that gate and source?) which should keep it shut, assuming proper connections.

Hi,
Welcome to the forum.

Can you please post a picture of your project?

When the fault occurs, what voltage do you measure between the gate and source pins of the MOSFET, please measure AT the pins of the MOSFET.

What happen if you remove the MCU completely, so all you have is this.

Are you sure that 2.2K is connected from gate to supply gnd/source
Tom... :slight_smile:

wvmarle:
A schematic diagram with pin markings and so would help A LOT. I don't feel like having to check the data sheet to try to figure out what the pinout of that mosfet may happen to be, to see whether you connected it properly.

The flickering and opening of the gate implies the gate is floating - which would happen if you have the pin set to INPUT and no pull-down resistor to keep the gate off. That wire diagram shows a 2k2 resistor between one of the pins and GND (is that gate and source?) which should keep it shut, assuming proper connections.

I added a shematic diagram of the pin markings of the MOSFET.

The GPIO is set to OUTPUT in the sketch.
Yes, the 2k2 Resistor is between the GND and the Pin coming from the NodeMCU to keep it shut.
The GND from 12V and the GND NodeMCU are also connected.

TomGeorge:
Can you please post a picture of your project?

I added pictures from my soldered board.
The MOSFET is not soldered in at the moment, because I do some testing on it with a breadboard and jumper wires.
The soldering job looks a bit messy, it is my first time I did this.

TomGeorge:
When the fault occurs, what voltage do you measure between the gate and source pins of the MOSFET, please measure AT the pins of the MOSFET.

I am using the probably broken MOSFET:

  • MOSFET is supposed to be OFF, but LED Strip still glows a bit.
    I meassure 0.4mV
  • MOSFET is supposed to be ON, LED Strip is ON.
    I meassure 3.32V

NEW MOSFET:

  • MOSFET is supposed to be OFF, LED Strip is OFF.
    I meassure 0.4mV
  • MOSFET is supposed to be ON, LED Strip is ON.
    I meassure 3.32V

I meassure the same voltage on both MOSFET's.

TomGeorge:
What happen if you remove the MCU completely, so all you have is this.

Probably broken MOSFET: LED Strip is ON, but not full, and flickering
New MOSFET: LED Strip is OFF

TomGeorge:
Are you sure that 2.2K is connected from gate to supply gnd/source
Tom... :slight_smile:

Yes I am sure that the 2k2 Resistor is connected between the GPIO coming from the NodeMCU and the GND coming from the NodeMCU, the GND from the Arduino and PSU are connected as well.

Hi,

The MOSFET is not soldered in at the moment, because I do some testing on it with a breadboard and jumper wires.
The soldering job looks a bit messy, it is my first time I did this.

You must solder the MOSFET in circuit, you do not have a reliable connection to the MOSFET, particularly the MOSFET gate.
OPs picture

This picture shows that you have the MCU and gnd inputs the wrong way around, it shows MOSFET gate to gnd and MCU to 12V PSU gnd/negative

Tom... :o :o :o

TomGeorge:
You must solder the MOSFET in circuit, you do not have a reliable connection to the MOSFET, particularly the MOSFET gate.

I know, but I didn't want to solder the MOSFET in again just for the picture because it was so hard to get it out of the soldered PCB. I tested the circuit and MOSFET before when it was solder in the PCB. I also took it out to test it in a breadboard and avoid a potential bad circuit on the PCB.

TomGeorge:
This picture shows that you have the MCU and gnd inputs the wrong way around, it shows MOSFET gate to gnd and MCU to 12V PSU gnd/negative

Are you sure? The "GPIO" is coming from a NodeMCU Pin and the "-" is the GND coming from the NodeMCU as well.
But maybe I was thinking the wrong way the hole time.

Hi,
Look at your red writing on your "back" image, you have gnd connected to the red wire that goes to the gate.
You may have just made a mistake in the picture.

naitsimp:
I know, but I didn't want to solder the MOSFET in again just for the picture because it was so hard to get it out of the soldered PCB. I tested the circuit and MOSFET before when it was solder in the PCB. I also took it out to test it in a breadboard and avoid a potential bad circuit on the PCB.

If you have a breadboard, then use it.
Leave your soldered board alone and check the MOSFET performance on the breadboard.

Tom... :slight_smile:

LED strips may draw more power than a solderless breadboard can comfortably handle (about 0.5A).

TomGeorge:
Look at your red writing on your "back" image, you have gnd connected to the red wire that goes to the gate.
You may have just made a mistake in the picture.

I think I don't understand what you mean.
The red wire is connected to one GPIO of the NodeMCU and goes to the Gate.
The black wire is connected to the GND of the NodeMCU and goes to the GND of the 12V PSU.

TomGeorge:
If you have a breadboard, then use it.
Leave your soldered board alone and check the MOSFET performance on the breadboard.

I used the breadboard to develop the circuit, after everything worked on the breadboard I soldered everything on a PCB. Thats the moment the problem started to show up.
It worked as it should be for some time on the PCB but after some time running in the OFF state the LED Strip began to glow and flicker. Something is destroying the MOSFET or something, I don't know.

wvmarle:
LED strips may draw more power than a solderless breadboard can comfortably handle (about 0.5A).

Thank you, I am just using a segment of the LED Strip with 3 LED's to test the circuit.

I also read that it is recommended to have a 220 Ohm Resistor in series with the GPIO because the MOSFET can draw a lot of current when it switches on.

Hi,
What is your 12V LED supply?

Tom... :slight_smile:

TomGeorge:
What is your 12V LED supply?

I have two, but I am using the white one, picture 1.JPG.

Hi,OPs images.


Tom... :slight_smile:

I redesigned the PCB soldering layout a bit, an updated layout is in the attachments.

I tested everything with a new MOSFET on a breadboard, it worked perfectly.
So I continued and soldered the MOSFET on the PCB, without any connection to any terminals or Resistors.
I tested it and the MOSFET worked, the LED Strip stayed OFF when it should be OFF.
I measured a Voltage of around 100mV on the LED Strip.

Then I soldered the two Resistors in and tested again.
The same problem showed up again, the LED Strip glows slighty (no flashing this time).
I meassured around 7-8V on the LED Strip.

I then connected a longer Strip of LED Strip and the LED Strip stopped to glow, but the Voltage was still getting through the MOSFET.

I have absolutly no idea what I am doing wrong, I spent way to much time on this.
Does anybody know what I am doing wrong?

Update:
I wasn't able to solve my problem.
I am now using a SSR module controlled by the NodeMCU to controll the Input of my PSU.
I am not able to fade the LED Strip anymore with this setup, but that's ok.