Solar supported arduino Uno + Dimmable LED with Mosfet doesnt "work"

Hello everyone and thanks for clicking on this thread :slight_smile:

I currently try to control LEDs with a solar-supported arduino uno. I havent ordered the Solarpanel/Lipo/LipoRider, so my first question is:
Should that power-setup work like that?

What i have is an USB-powered arduino uno, a old LEDstrip-desklamp, a 12v/2.0A AC/DC Adapter and a "Transistor HEXFET IRLZ24NPBF TO-220 IR". I fail to control and "dimm" the LED tho. It simply runs at full light

I tryed both the Basics->Fade and Analog->Fading with my current Setup and none work. So my second question would be:
Whats the difference between those 2 programs? I dont really see the difference!

The third and final question would be if the LED-setup seems correct to you guys?! I still have a hard time understanding Resistors and if im missing any

Thank you for your time! Also thats the first time i used Fritzing..!


Hi Viktor.

From your sketch it appears that you have the MOSFET connected wrongly. It is an N-Channel MOSFET. Current is flowing continuously from the supply through the substrate diode in the MOSFET and through your LEDs.

It should be wired so that the MOSFET is in the ground half of the circuit. The source pin would be on ground, the drain pin on the ground side of your LEDs, and the supply connected to the other side of your LEDs.

If you want to switch the supply rather than the ground, then you will need to use a P-channel MOSFET.