Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: stoffLer on Nov 08, 2016, 04:58 pm

Title: LED Strip / MOSFET / Arduino - best way to do
Post by: stoffLer on Nov 08, 2016, 04:58 pm
Hi,

till now I tried a lot of different wirings to control a LED Strip (one color at the moment) with a MOSFET connected to an Arduino.

Used components:




I tested my code with a single LED on the port I used in the code <- works, even with PWM

After that, I wired it up as attached. The Strip is connected 12V+ to the common anode. Ground(blue) is connected with the MOSFET drain and source to ground of power supply.

My problem is, that there is no reaction to the arduino pin. I tried first with IRFZ44N but that MOSFET needs more than 10V+ to fully switch through. So I tried the IRLZ44N as logic MOSFET. This should work with the delivered 5V from the Arduino.

Maybe u guys can help me to fix this ;)

Greetings Marcel

Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: INTP on Nov 08, 2016, 05:17 pm
You need to connect a ground wire back to the Arduino. So run a wire from the ground rail of the breadboard to a GND pin of the Arduino.
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: Wawa on Nov 10, 2016, 07:58 am
^ That, and...

Remove that 220ohm resistor, and use it between Arduino output pin and mosfet gate.
And add a 10k resistor between Arduino pin and Arduino ground.
Leo..
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: stoffLer on Nov 10, 2016, 04:59 pm
Just finished my board and the code is working too.

Some update:

First:

I added 2 more Mosfets in the same way to control a RGB Strip. It is working as expected, but the voltage regulator on the Arduino is getting hot.
I put 12 V+ to the Arduino VIN. The Data sheet tells it is possible, but I think better not do this ;)

Maybe there is a easier way as a regulator?

Second

@Leo

I attached the new layout to this post - is this correct?



//thanks guys. now it is working as expected



Marcel
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: Wawa on Nov 11, 2016, 02:33 am
Yes, diagram is correct.

Is this a Nano, as on the Fritzing.
Nanos don't have a lot of heatsink area for the regulator.
Burning off 7volt (12 - 5) could make the regulator slightly warm from the current draw of the Arduino itself.
If you connect extra devices to the 5volt pin (sensors etc.), you have to calculate current/heat.
Hot to the touch (50-60C) is ok.
If you can see the printing of the regulator burned onto your finger, then the regulator is too hot.
Leo..
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: INTP on Nov 11, 2016, 04:37 am
I have a similar setup, 3 Mosfets on a Nano for a 12V strip.
While it worked with feeding 12V into the Nano, I decided to use a separate buck converter module to bring 12V down to 5V and stick that into the 5V of the Nano.
Everything is happier.
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: stoffLer on Nov 11, 2016, 08:20 pm
ok - I will buy a buck converter too. Think this is the more efficient way to step down the voltage instead of heating the air ;)

Thank you guys for the help
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: drc on Dec 29, 2017, 05:35 am
sorry for bringing this up again but why are mofsets used on led? do they make any improvements? or what do they exaclty do?mofsets really neccesary for the leds?
i saw a ton of tutorials... some of these guys not even using resistors or capaciators... almost nobody uses mofsets.. maybe im not getting the use of mofsets right...

also why are nobody using fuses on their projects?
sorry for the noob questions :D

greets
Title: Re: LED Strip / MOSFET / Arduino - best way to do
Post by: Grumpy_Mike on Dec 29, 2017, 05:47 am
You do not need FETs for a single LED as that can be driven by a single pin without exceeding the current rating of the pin.

People not using something to limit the current through an LED like a resistor are idiots and deserve to be shot when they display their ignorance as facts.

Once you have a strip of LEDs they draw a lot of current and so you need to switch this current with a FET.

In electronics fuses are very slow compared to the time it takes a semiconductor to blow, so they are generally useless.