# How can I dim 50 high-power LEDs in series with an Arduino?

What I'm trying to do is to use an Arduino to control the brightness of two series of 50 high-power LEDs independently.

Each series has an independent LED driver, and each LED has a foward voltage and current of 2V and 700mA respectively.

What I want to do is to be able to vary the brightness of each series from 0% (OFF) to 100% (full brightness) with 0.5% or 1% steps using my PC or my smartphone (with a BT module) and an Arduino.

I've searched on the internet about how to do this, and I found that maybe I could use an n-MOSFET to control the current provided by the LED Driver using an analog output of the Arduino (as far as I know controlling the current I can control the brightness which is the main point), but I saw that those MOSFET can get very hot (and I don't want this) and the current doesn't change linearly, so I'm afraid of not being able to precisely control the brightness. So now I'm completely lost on this problem, if someone could help me I would be extremely grateful.

OBS: I'm a complete noob in electronics and with Arduino, so if it's not asking too much, please explain exactly how I should build this circuit to get it to work.

• What is the led driver IC number? Apr 29, 2020 at 6:25
• So like I commented bellow the answer, I don't have an LED driver yet, because I thought that the LED driver wouldn't be so different between them. So I don't have any LED Driver yet, because I was thinking about buying these components together once I knew what I need to buy. Apr 29, 2020 at 13:45

An n-channel MOSFET is a great way to dim LEDs. Something like the IRFZ24N is likely what you'd want - it can handle way more amperage than you'll ever need, and pretty cheap.

The way you drive an LED with a MOSFET is to view the MOSFET as a switch - because it is! Current will flow between the Drain and Source, but only when the voltage between Gate and Source is high enough (Vgs). Because the switch is voltage-controlled, you'll want a pull-down resistor to make the switch OFF when the Arduino isn't driving it.

simulate this circuit – Schematic created using CircuitLab

The code you'll want to look up is the Arduino function analogWrite. This will let you pulse an output on and off for different amounts of time (pulse-width modulation is the key term here, or PWM). For your application, PWM will let you control brightness.

R2 is to limit the current to 500mA - just for example. If you post exactly what "LED Drivers" you're using, we could help you utilize them, but this is a valid solution for driving the LEDs without those drivers.

Your MOSFET isn't likely to get hot passing 300mA, or even the full 700mA. This is because a MOSFET has a really low "switch resistance" (RDS_ON), around 70mΩ in the IRFZ24N. 700mA through 70mΩ is only 0.03W, maybe 2 or 3 degrees hotter than ambient! If anything will get hot, it'll be the LEDs themselves and the resistor (300mA through 10Ω is 0.9W, hence the need for a beefy resistor!)

A switching LED driver prevents this resistor heat issue by converting the voltage to the right place instead of shedding it as additional heat. Yours might do that, so if you can let us know what those are we could avoid a lot of heat problems!

EDIT REVOKED: Didn't realize you wanted independent control.

• So, In my lay toughs, I didn't ever think that could be much differences between the LED Drivers except for the Voltage and Current supplied by it... So I don't have any LED Driver yet, because I was thinking about buying these components together once I knew what I need to buy... The only thing that I would pay attention was to sum the voltages of the LEDs in series and pick a LED driver with this voltage an use a resistor to control the current using the Ohn's Law... So I should look for a LED driver that's a switching LED Driver? Thanks a lot for your answer !! Apr 29, 2020 at 2:02
• Just one more question, which is the function of the 10kΩ (R1) resistor in this circuit? Apr 29, 2020 at 2:05
• @Lucas Sievers That is a pulldown resistor. It helps turn the mosfet off when it is not being driven high and ensures the mosfet turns off when not driven.
– K H
Apr 29, 2020 at 2:36
• @LucasSievers I think most off-the-shelf LED drivers are switching. I've only seen a few ICs that do linear constant-current LED driving, so I wouldn't worry too much there. If you can find it, you'll want an LED driver that supports 2V forward voltage and has an input for PWM dimming. I'm less familiar with off-the-shelf LED drivers, so I'm not sure how you could 'adapt' one to allow for dimming if it doesn't support it already. Apr 29, 2020 at 3:08