# How to program the constant current of a LED driver for various current levels?

I need to design a backlight unit that will change its duty cycle and constant LED current via a microcontroller. My supply is a SMPS with 12 V, 20 A output.

I need to drive 16 * 16 = 256 LEDs (16 separate LED strings each consisting of 16 LEDs). The LEDs have 2.1 V forward voltage and typical current is 60 mA.

Most of the LED driver chips work in the same way: they output a reference voltage and let us adjust the constant current via an external resistor, like this:

However, once you put the resistor there you are not able to change the current. So, I drew this circuit:

Thd driver chip is an LM3410 and the analog switch is an NX3L1G3157G.

I thought that I can switch between two external resistors via a deMUX. This way I will be able to have at least two current levels, and then I can use a few of the same configurations to get what I need. (Red circles are external resistors and the switch.)

The thing is, I couldn't find any other switch that supports more than 350 mA and 100 mΩ resistance except the NX3L1G3157G, and that one has only 2 switches.

Also, I will probably have to change the LEDs to other ones with a higher luminance and higher current flow so I will need a switch which can support up to 500 mA.

Also, I need 5 current levels like 100% DT (Duty Cycle) - X mA, 50% DT - 2X mA, 33% DT - 3X mA, 25% DT - 4X mA and 20% DT - 5X mA. I could still have managed to do that if we don't need to care for the PCB area, but we do!

Also, I am aware of some LED driver chips that provide a limited current adjustment register like the MC34844 but they do not allow more than 30 mA to flow per channel, so I can't use those.

So, since I had all my hidden answers from this forum, again, I ask help from other experienced engineers. Do you have any suggestion for my trouble? I need to adjust the current flow through LEDs to 500 mA (20% DT), 400 mA (25% DT), 300 mA (33% DT), 200 mA (50%DT) and 100 mA continuous.

• The top circuit that you believe you cannot change the current has the ability to have the LEDs dimmed by the input called "PWM dimming". This will adjust the average current flow and do what you want so, because this seems so obvious you must mean something else. Please clarify why PWM dimming doesn't work for you and, as an aside explain the relevance of the circuit you have drawn - it appears to contribute nothing to the question and is difficult to understand. Commented Jan 9, 2016 at 18:21
• PWM dimming works like this: You always have a stable current flow(say 10 mA) but when you do dimming it decreases the duty cycle. This is how to do brightness adjustment. So actually, avarage current decrease this way, but I want avarage current to be same. I want to decrease the duty cycle but increase the current with reverse proportional to decrease of the duty cycle. That I can not do. Commented Jan 9, 2016 at 18:27
• If you want average current to remain the same then I don't understand what this question is about. Commented Jan 9, 2016 at 18:30
• It would help anyone answering to understand why you would want to change the duty cycle if you want the current to be the same? I don't understand the application - I can see how to fix it but it makes no sense to do this (yet). Commented Jan 9, 2016 at 18:51
• @Andyaka - It appears that he's trying to make a constant-brightness strobe with variable flash duration. So he wants to decrease the light duration (PWM duty cycle) at the same time he increases the instantaneous brightness so as to maintain constant average light output. Commented Jan 9, 2016 at 19:03