N Channel MOSFET stays on

N Channel MOSFET staying on after triggered

I built a circuit for an RGB LED light strip using two IRFD-123 MOSFETs and one IRLZ24N MOSFET (because I ran out of the former). When gate voltage is applied from my Arduino, the first two function as expected; LEDs turn on/off with digital HIGH or LOW. (Current sketch using digital vs PWM for reasons too detailed for this question)

The IRLZ24N starts of as off, as expected. However, once it gets the gate signal and turns on, it stays on. I tried a 1k, 10k and 20k pull down resistor from gate to ground, as suggested in forums, but those cause the MOSFET to never trigger.

I also tried replacing it with a IRF520, but still the same thing.

Connections are as follows:

Gate (1) to pin 5 of Arduino.
Drain (2) to LED strip Blue connection.
Source (3) to ground.

Can somebody please point me to what I am doing wrong? Am I using the wrong kind of MOSFET? These are supposedly logic level.

Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components. Posting images:

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

larryd:
Show us a good schematic of your circuit.
Show us a good image of your wiring.
Give links to components. Posting images:
https://forum.arduino.cc/index.php?topic=519037.0

Use CTRL T to format your code.
Attach your ‘complete’ sketch between code tags, use the </> icon in the posting menu.
[code]Paste your sketch here[/code]

Unfortunately, I don’t have access to the circuit or sketch again until Tuesday.

But for the code, it is a simple digitalWrite(5, HIGH/LOW) the code works if I wire the other FETs to that pin.

For the circuit:

Pin 5 → Gate
Source → ground
Drain → blue on rgb strip
12+ from per supply → 12+ on LED strip

You should verify the LED ground and Modfet ground and 12+ ground and Arduino ground are all connected together.

JohnRob:
You should verify the LED ground and Modfet ground and 12+ ground and Arduino ground are all connected together.

They are. I checked a few times, and even rebuilt the circuit to be sure I had it all wired correctly.

Which Arduino? A 5v or 3.3v type?
The pull down resistor, say 10k, must go between the Arduino pin (pin 5 in your case) and ground, not the mosfet gate and ground. The difference can be important if you also use a gate series resistor.

Since you can't get the schematic right now..... if it were me I would:

Write a simple program:

In setup set the pin 5 high, delay 5 seconds
Set the pin 5 low

exit setup

leave the loop empty.

I know you said the code was kind of simple but I know in the past I've looked at something many times and missed something. Kind of like the fact that we don't read the word "of" in a sentence the meaning just goes to our brain.

You have set the output pin to be an output using the pin mode call in the setup function have you? Because your fault description sounds like you haven’t.

Grumpy_Mike:
You have set the output pin to be an output using the pin mode call in the setup function have you? Because your fault description sounds like you haven’t.

Yeah, I have done this. Something I forgot to mention also in my original post is if I move the gate pin from one of the working circuits to this circuit, I still have this issue. Also, if I move the gate signal from this circuit to one of the working circuits, it functions fine.

Someone on another forum I posted to said 10k and even 20k pull down wasn't high enough for this FET according to the data sheet? Something I still have to try

We need to see the actual wiring.

The pull down on the gate is only really needed during ‘power up time’ when all pins are in the ‘input’ high Z state; after the program starts, the output pin is either at 5v or 0v therefore no pull down is needed.

If you want help, let’s see the wiring.

The pull down need to be on the output pin not the gate which is the other side of the series resistor.

If you put it on the gate, that and the series resistor act as a voltage divider and reduces the gate voltage.

I suspect that is what they were trying to say in a clumsy way.

Tyewonk:
. . .
Someone on another forum I posted to said 10k and even 20k pull down wasn't high enough for this FET according to the data sheet? Something I still have to try

But you have already said this in your OP :

I tried a 1k, 10k and 20k pull down resistor from gate to ground, as suggested in forums, but those cause the MOSFET to never trigger.

Until you produce a schematic and the test code used, you will get only speculation.

Hi,
Are building this on protoboard?
Have you physically swapped the MOSFETs over to see if the fault moves with the offending MOSFET?

If you are using a protoboard, check that the power supply busses down the sides of the board are not open circuit in the middle.
protobreak.jpg
Tom... :slight_smile:

protobreak.jpg