Arduino – PWM MOSFET LED Strip Driver

arduinoledmosfetpwmrgb

First off, my electronics knowledge is really basic. I learned some at school and very simple projects with Arduino. I'm a scale modeler making a specific diorama with LED lighting.

I'm trying to design an Arduino Mega shield that will allow me to turn on and off six 12v RGB LED strips fading in and fading out. After some research, I found that the best way to do so was to use N-channel MOSFETs as switches, instead of Darlington transistors, due to heat issues.
The current taken by each strip is between 100mA and 400mA.

Also, I might be interested in varying the color in each LED strip, depending on the need.

I came out with this circuit (x6), where D2 is an Arduino pin sending the PWM signal, SV1 is the connector to the LED strip and the potentiometers are intended for color adjusting. I used 2SK3918 MOSFETs (I know they are not logic level and I can change them for logic level ones). R1 is the pull-down resistor to ensure 0V at the MOSFET when initializing. I've read somewhere that there's a need for a Gate resistor, but somewhere else I read it's not needed.

enter image description here

I made a prototype board, connected it outside the arduino but couldn't make it work.

enter image description here
enter image description here

I connect 12v and GND to X1. 0-5v (testing up to 20v) power supply to D2 and GND and a test LED strip to the corresponding terminals at SV1.

No matter what voltage is applied to D2, the LED strip is continuously on. There's 12v all the time at each pin in SV1.

I know I'm missing something, but I don't know what it is.

Best Answer

You've connected the top side of the potentiometers to GND, and the bottom side of the potentiometers to the MOSFETs, which then also connect through to ground.

When you plug the lighting strips in, there's a path from the 12V supply (pin 1 of SV1) through the lighting strips, back through SV1, through the potentiometers, and back to ground regardless of whether your MOSFETs are on or off.

It isn't clear what those potentiometers were supposed to do. You should remove them and just have the lines from the LED strips going straight back into the drain pins of the MOSFETs.

I used 2SK3918 MOSFETs (I know they are not logic level and I can change them for logic level ones).

If you're using 5V logic levels, the 2SK3918 is fine. You're way above its Vgs(th) at 5V and you can see from the forward transfer characteristics graph in the datasheet that the forward current (Id) is more than 10A at a Vgs of 5V.

That said, these MOSFETs are massive overkill for your design and I would recommend using smaller ones in future.