I have CAT4101 constant current LED driver and I need to control LED current. My idea is to use microcontroller and digital potentiometer (MCP41010) to control the current. While the potentiometer I have is linear (resistance is proportional to the digital code), LED current is not linear due to CAT4101 characteristics:

LED Current    RSET
[mA]           [Ohm]
100            4990
200            2490
300            1690
400            1270
500            1050
600            866
700            768
800            680
900            604
1000           549

Its datasheet says that it maintains constant voltage on the Rset pin and LED current is approximately 400 times the Rset pin current.

Is is possible to "invent" some circuit based on linear digital potentiometer that will change its resistance in non-linear way and allow linear LED current control?

  • \$\begingroup\$ The easier and cheaper way to go about this is to set the LED current to max and to use PWM to change the brightness. In fact, your driver is designed for this. \$\endgroup\$ Oct 9, 2015 at 12:45
  • \$\begingroup\$ Yes, I know about PWM. But I'd like to use the same power supply with different LEDs. Some of them are rated for 150 mA, some for 750 mA, some for 1A. This is why I need both PWM and DC current control in one unit. \$\endgroup\$
    – anandr
    Oct 9, 2015 at 13:53
  • \$\begingroup\$ To be more specific, I want to use LEDs with different peak emission wavelength to irradiate my samples. This is why I need wide range of output LED current. Also, some samples can not be irradiated with blinking (PWM) LED because this will cause undesired structural changes so time and DC current control is the only option in such case. \$\endgroup\$
    – anandr
    Oct 9, 2015 at 14:00

2 Answers 2


If you examine the table you can see a reasonably linear relationship between resistor current and LED current. This is implied in the data sheet where it says that LED current is 400 times Rset current. So, given that Vset is constant at 1.2 volts, for an Rset of 4990 ohms, Iset will be 0.24mA and Iled will be 400 x higher at 96mA (not far off 100mA). At mid scale (say) 1050 ohms, Iset will be 1.143mA and Iled should be 457mA - it says 500mA in the table so it's not far off. At max LED current (1A) Iset is 2.185 mA and the LED current would probably be 400x higher at 874mA.

What I'm saying is that you could use an op-amp and a transistor to extract a controlled current from the Rset pin and you would find this to be significantly more linear than trying to delinearize a resistor: -

enter image description here

Iload in the diagram would connect to the Rset pin of the chip. Rset in the diagram above would ideally be slightly lower than 549 ohms - maybe a 470R would be fine. Vset in the diagram would force a current to flow into the collector that is Vset/470R and, for 400mA LED current would be approximately 0.47 volts.

Remember that the CAT4101 uses current mirrors to produce the overall target LED current and therefore feeding in a variable constant current is going to be more accurate that choosing a value for Rset no matter how delinearized.


Yes, it is possible to get some non-linearity by connecting a fixed resistor across the variable resistor, unfortunately it's not in the right direction for your application.

The law you ideally want is reciprocal, the LED current is controlled by the conductance of your Rset resistor. I don't know of any digital variable conductance devices, but it might be worth a quick google.

As you are already using a microcontroller, you could simply do a reciprocal of the set current you want, and send that to the digital pot. Unfortunately, this would limit the resolution you would get at the low end.

Putting a 500ohm resistor in series would claw back some of the resolution at the bottom end of the range.

What you need to do is pull a specific current out of your Rset pin, and it doesn't need to be a resistor that does it. It would however take extra components. As the Rset pin is at nominally 1.2v, there is the headroom to implement a current mirror underneath it to act as a controllable current sink, see Andy's fine answer for the detail of this.Then your micro can program a current into the mirror. If computing the values for a simple non-linear but non-reciprocal law is not good enough, then extra components are your only choice.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.