Providing power to arduino to control 12V LEDs via a MOSFET

Hello everyone!

To preface, I am extremely new to programming and working with microcontrollers.

My objective is quite simple - I'm looking to control 12v LEDs (about 24 watts worth, just shy of 2 amps full power) using a MOSFET. I have chosen the IRFZ44N to do this.

I was using a digispark ATTINY85 board, which I elected to use as there is a built in voltage regulator. I simply wired the power supply to the MOSFET, LED strip, and VIN of the ATTINY85 and is worked very well... quite a few times. The bootloaders would corrupt and become undetectable, which I'm told is a common problem for these devices and I am not confident in my ability to flash and reinstall a bootloader to repair them.

Looking for a more reliable device, I see that the arduino nano has a built-in voltage regulator as well, in the 7-12v range. Seeing as this device would only be used to control the gate of the MOSFET, would this run any risk of damaging the Arduino?

Essentially, I would be wiring the positive of the 12V power supply to the LED strip and VIN of the arduino, the Negative to the Ground of the Arduino and source of the MOSFET, the drain of the MOSFET to the ground of the LED strip, and of course the gate of the MOSFET to a PWM pin.

What are your thoughts? Alternatively, should I wire a volatage regulator like an LM7805? I see they only have a 1.5A tolerance - would the full 2A be going through the voltage regulator if the Arduino is only being used to controll the gate of the MOSFET?

Thanks so much in advance! These distinctions have eluded me in my reading.

If the LEDs have their own separate power connection, the current doesn't go through the Arduino's regulator so the Arduino is not stressed.

What LEDs? You are using an LED strip, right?

Note that addressable LED strips don't need a MOSFET driver because there is a built-in driver chip for each LED.

Non-addressable LED strips have built-in current limiting resistors so 12V (or 12V PWM) is fine.

Individual "high power" LEDs need a constant-current source (or "controlled current" for dimming). They don't work properly from a regular constant-voltage power supply.

Here is a MOSFET driver circuit. (With an LED strip instead of a motor you don't need the diode.)

IRFZ44N is not a good choice, although with this small power you probably won't have a problem. However, I recommend IRLZ44N, which is a logic level transistor unlike the other one.

Your idea is correct but use an IRLZ44N as @flashko suggested

The ATTiny85 is as robust as the ATmega382p used on the traditional Arduino boards, so there should be no reason for them to fail so often on you.

Do post your schematic, without it there's not much that can be said about why this could possibly happen.

As mentioned before, your mosfet is not a good choice for switching with 5V at the gate. You can either replace it by a logic level one, or build a simple driver with a small signal BJT transistor to get a 12V signal to switch the IRFZ44.

Sorry the Source and drain are reversed in your explanation, the Source needs to be connected to ground and the Drain to your LEDs. Your MOSFET will work with a 5V unit, it is rated with a Gate threshold voltage VDS = VGS; I D = 1 mA Min, 2.0, Typ 3.0, Max 4.0 V

Thank you for the replies, everyone!

Here's an extremely poorly rendered depiction of how things are currently wired. After a brief search, i can see why a logic MOSFET is a much better fit and I'll be replacing it it as soon as possible.

I'm intending to flicker these LEDs to give the appearance of a failing fluorescent lamp. I believe I have the code figured out, and will just use the analogWrite function to open and close the gate. Right now, it's just a matter of finding the right hardware.

The digispark ATTiny85 is conceptually great, programming via USB is extremely efficient. Having the built-in 5v voltage regulator is a major bonus as well. The sketches would upload and run well, however, after plugging them in and uploading new sketches several times, they would abruptly stop being recognized once inserted. I've read this is somewhat of a common problem for this particular board. As a result, I've been entertaing alternatives.

You're going to draw 2 Amps through breadboard connections? Good luck!

Nope, but it was my best attempt to illustrate the mess of wiring. I apologize if that as misleading, I'm not quite competent with drawing schematics like the very neat one provided above. :sweat_smile:

OK, just checking, proceed. :smiley:
You might try this for a simple drawing tool.
http://www.digikey.com/schemeit/project/

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.