Issue using MOSFETs

Hello,

I am controlling a LED strip with 3 channels of MOSFETs and am having some unexpected behavior. Everything works except on startup (when power is applied) on two of the channels it's evident that a very small voltage (duty cycle of just a few perfect) gets into the gate pin and subsequently turns the leds dimly on.

I have a AC->DC power supply connected to a toggle switch then going to the board and PWMing the MOSFETs.

My biggest trouble is figuring out what to search or how to ask this question so any help or suggestions are appreciated

Are you switching the mosfet gate with 5v pwm. If the mosfet drain_source voltage (led supply) is higher than 5 volt the 5v pwm signal from the mcu pin might not be enough to switch on the mosfet. Try to jumper the gate to your 5v supply to check if mosfet is switching. Remember to put a resistor from gate to source. Sometimes one needs a mosfet driver.

If I am comprehending what you are saying I think my issue is different. Once it powers up I can control it perfectly fine, including getting the two channels that are ininitially on to go down to 0. Everything works fine and it switches well (I think). The issue is on power up some ringing on the input of the mosfet must be occurring, I'm guessing from some sort of voltage spike. I was wondering if this is common and or how to fix it (capacitor, diode, etc?)

Thanks

Usually a high value (10K or more) pull down resistor from gate to ground is used to prevent a floating gate at start up from turning the MOSFET on. The Pull down is high enough that it will not effect operation. Upon reset all pins default to hi-z inputs so they are floating (undefined voltage) until, in setup(), the pin is changed to OUTPUT. The resistor holds the pin to ground until the pin is changed to output.

To illustrate the pull down.
12v led driver.jpg

Thanks! I had remembered hearing something about big resistors on there before and that makes total sense. I will try that and update if it works!

Appreciate the help

That worked thanks again!