I am trying to get this well known circuit [TL431 constant current

work inserted in a series of 69 LEDs to protect them according to this specification. Transistor is 2N2222, hfe=18 according to multimeter. The free-running current is 19mA and I use Rcl=100R to limit Iout to 25mA. Calculating R1 is uneasy, so I made the following tests.

R1=470Ω   V1=0.1  I1=0.2mA  Vi=1.9  VB=1.8  VE=1.09 ICL=10,9 mA
VBE=1.8-1.09=0.71V  VCE=0.81
R1=2.2kΩ  V1=0.5  I1=0.2mA  Vi=3.0  VB=2.5  VE=1.8  ICL=18.0 mA
VBE=2.5-1.8=0.7V  VCE=1.2
R1=10kΩ   V1=1.85 I1=0.18mA Vi=4.38 VB=2.53 VE=1.85 ICL=18.5 mA
VBE=2.53-1.85=0.7V  VCE=2.53

My main concern is that 7.4 and 9.1 say:

more than 1mA (Imin(max)) must be supplied in to the cathode pin. Under this condition, feedback can be applied from the Cathode and Ref pins to create a replica of the internal reference voltage.

OK, OK, but how do I supply the 1 mA that seems to be required for correct operation? I see no minimum Vi spec and the TL431 seems to increase its resistance as I lower R1.

Another concern is that rather much less that 19mA flows in RCL.
What does a constant VBE=0.7V mean? Perfectly conducting?
And, BTW, how does the TL431 in the off (<2.5V) state know what VB=VK=to output?

Update: thanks for your answers and you want more detail. I have bought 5730 LEDs corn cob lamps. They are cleverly very simple: Basically: mains, dephasing cap, MB6S rectifier, smoothing cap, LED chain. Cap's cos φ aka power factor determines the voltage at the LED chain. Some lamp models use pairs of parallel LEDs like 2×36. My 95 and 36 LED models are OK. But the 69 (or 2×36) LED ones constantly failed in some homes of this country. I replaced burned LEDs with a 220kΩ resistor but more LEDs burned. I suspected over-voltage peaks and that current limiting is something to try. So, I wired data sheet's fig 38 in a delicious layout on a 2×5 holes veroboard. Component wires folded and 3 solder points, no need for soldering pads. I can tuck it inside a E25 lamp socket well immobile at the end of a hard wire. But the value of R1 is not clear and I found no simple howto on the Web.

Just random remarks here and there plus 7.1-7.4's "no Vi minimum".
So, the best was to try R1 values and that took me here, thanks for your answers. So, Fig 38 "limiter" should be called instead "Vi≥5 current limiter" which is not my case. Your advice: use fig 39 with a separate 5V Vi. Unfortunately, the lamp PCB provides no 5V (and forces LEDs on - ground side).

So, I want a low Ik at 1 mA. I finally figured that I can add some 100 Ω resistor between collector and + source. Then, relative to negative ground, Vi will be higher. What do you think of that? I will try when I'll have time and probably come back here.

  • 1
    \$\begingroup\$ 2n2222, hfe=18??? You must have reversed C and E leads. \$\endgroup\$ Mar 5, 2017 at 1:04
  • \$\begingroup\$ @Papou .what are you doing ? .Led currents do not need to be super accurate .Current limit is applied to stop them blowing up .The current that they can handle is a function of temp .When it is hotter you want to reduce current .So you now will realise that you can ditch the TL431 and use a simple cheap NPN small signal BJT .The TL431 is featured in www.badbeetles.com and it can sometimes be a badbeetle. \$\endgroup\$
    – Autistic
    Mar 5, 2017 at 5:01
  • \$\begingroup\$ @all: see Update: in Question \$\endgroup\$
    – Papou
    Mar 7, 2017 at 4:18
  • \$\begingroup\$ @Sredni Vashtar: Oops yes, I again confused solder and component side and plugged EBC in CBE. But the new measure is no less surprising: 250. \$\endgroup\$
    – Papou
    Mar 7, 2017 at 4:20
  • \$\begingroup\$ @ Autistic: See update. You are reassuring. Badbeetles refer to a"Free photo recovery software" and to a faulty TL341 SMD production (almost useless info without saying which) and I don't use SMD. \$\endgroup\$
    – Papou
    Mar 7, 2017 at 4:23

3 Answers 3


You state the you want to run 96 LEDs ...is that a string of LEDs in series?
If it is then you have other problems with a 20 mA constant current driver.

Working out the resistors for the TL431 is very simple, consider this simplification from Figure 39 of the datasheet.

enter image description here

The circuit of Figure 38 seems non-ideal for your application (if it's a string of LEDs you want to drive), and Figure 39 modified slightly may be better:

enter image description here

Here I've used LEDs with a Vf of 2.2 and a supply of 36 V, if it's different for your LEDS or supply, then you'd have to recalculate the values.

If you drive the LEDs from a low side constant current source than you get a couple of advantages...

  1. The voltage above R1 is constant and unrelated or impacted by Vce for the transistor.
  2. The TL431 Ik, which will vary to some extent (transistor Hfe and temperature dependent) is NOT added to the current for the LED string.
  3. You can drive multiple strings with just one TL431 as shown below (now you might understand why I set the Ik at 5 mA in my scenario).

If you want to run 96 LEDs as a string it might be done as below:

enter image description here

Here with each 2n2222 Ib at 400 uA, there is still 2.2 mA current in Ik, well above the minimum requirements of 1 mA.
Each string of LEDs is now only 12 devices instead of 14, but the voltage (Vf) difference for the string simply appears across the 2N2222. So Vce would increase by 4.4 V. This does increase the power dissipation in the transistor, but it's well within it's ratings.

Note that you could put more LEDs in a string and reduce the number of strings, but you'd have to increase the Vce of the transistor. The 2N2222 is only 40 V Vce.
You could also use a more capable power FET instead of a transistor, but this increases the complexity of the design in terms of minimum voltage etc.

Hope this helps.

  • \$\begingroup\$ Thanks for the only howto I saw, and a good one. Note: Whatever the number of LEDs in the string, the only thing the circuit sees of it is a current. So, there is no 36V maximum (212V in my case) and no Vce increase etc. (unless all LEDs get a short-circuit, of course ;-)) Thanks !!! \$\endgroup\$
    – Papou
    Mar 7, 2017 at 4:25
  • \$\begingroup\$ Not so, you absolutely need a higher Vce rating for your transistor. Consider that if you have 96 LEDs with a Vf of 2.2, you need 96 * 2.2 + 3.5 = 214.7 V before your current string will stabilize. If you are using rectified AC without any capacitance, then you conduction angle will be small. So you'd need to have capacitance to reduce the ripple. ...You also need to consider that if the low voltage power supply were to drop and the TL431 stop conducting then the transistor will see the full voltage on the collector due to forward leakage of the LEDs. It only takes a few uA. \$\endgroup\$ Mar 7, 2017 at 5:45
  • \$\begingroup\$ @JackCreasey is there any chance you can help me with my circuit. I am trying to power an single CW laser diode with an constant current source. It is an 20mW laser diode with an operating voltage of 2.2-2.4V and an operating current of 75-80mA. I used your circuit above with an battery voltage of 3.7V, R1 = 100 ohm and connected to Vbatt and Rs = 10 ohm. My laser is getting very hot and the laser is not at maximal brightness and goes out after some time. \$\endgroup\$ Feb 22, 2023 at 18:59
  • \$\begingroup\$ @leonbouman. You provide too little detail to help in any realistic way. However I will point out that at 20mW optical power your diode is dissipating about 200mW. Depending on the laser diode you are using it may well get quite hot. \$\endgroup\$ Feb 27, 2023 at 17:39

the circuit needs 2.5v+0.7v + something else to work. so you are looking at 3.5v or more as a starting point. testing it below that makes no sense.

as to the sizing of R1: check the datasheet for min or max values, or calculate the power dissipation on tl431 and see if it gets too hot.

I typically run 2 - 3ma and no more than 15ma into a tl431. so if you think your input is Vi, the voltage across R1 is at most Vi - (2.5 + 0.7 + Vout). Vout is your Icl * Rload.

  • \$\begingroup\$ I think the added context / background was very helpful - the ask now is quite different from what it was then. I would suggest that you put forth a full schematic, with the leds forward voltage and current specified. I think 1) a spike is unlikely the cause of failure here; and 2) a current limiter as suggested is unlikely the solution. \$\endgroup\$
    – dannyf
    Mar 8, 2017 at 12:20

I think the problem is that you didn't ever operate the TL431 correctly, looking over your three cases. If I had to guess, your approach was just random shots without design and in all three cases you missed the target entirely and are wondering how it is supposed to work.

[And before I go there, are you seriously considering 69 series-arranged LEDs?? Is this supposed to eventually be a mains-powered thing?]

Let's start with an overview schematic for the two simpler constant current topologies for the TL431 (I'm using an SCR symbol for the TL431 here) on the left side, below:


simulate this circuit – Schematic created using CircuitLab

The load can be inserted into either of the two locations shown, given that the other location is shorted when there is no load there. There are reasons for both approaches. But I think you are just testing this, for now, by shorting both of them. So you are, in effect, testing with a \$0\:\Omega\$ load. So your circuit looks like the middle one, shown above.

For the TL431 to work correctly, you need enough headroom. In your case, you need at least \$25\:\textrm{mA}\$ through \$R_{CL}=100\:\Omega\$ and you also need at least another \$1\:\textrm{mA}\$ for the TL431, itself.

For a moment, let's consider the case where the TL431 doesn't admit any significant current because it doesn't have enough headroom to work with. In this case, you can basically remove the TL431 and instead consider the circuit shown on the far right, above.

For this circuit:

$$I_{R_{CL}}= \frac{V - V_{BE}}{R_{CL}+\frac{R_1}{\beta+1}}$$

Let's assume for a moment that your NPN BJT has \$\beta=100\$. This would work out to \$I_{R_{CL}}\approx 11.5\:\textrm{mA}\$ when \$V_I=1.9\:\textrm{V}\$and \$R_1=470\:\Omega\$, \$I_{R_{CL}}\approx 18.8\:\textrm{mA}\$ when \$V_I=3\:\textrm{V}\$ and \$R_1=2.2\:\textrm{k}\Omega\$, and to \$I_{R_{CL}}\approx 18.4\:\textrm{mA}\$ when \$V_I=4.38\:\textrm{V}\$ and \$R_1=10\:\textrm{k}\Omega\$. These results show a behavior that is similar to what you actually observed, including the relative behavior of the latter two cases where the current didn't change much. So I think this tells you one important fact -- the TL431 is effectively "out of the circuit." You weren't allowing it to operate correctly in any of the three cases.

In all cases you will need to be sure that \$V_I\ge 3.5\:\textrm{V}\$. This allows enough headroom for the TL431, plus another volt for the NPN BJT. Beyond that, you will need whatever additional headroom is required for your eventual load, too. So in your early testing, do not ever use \$V_I\lt 3.5\:\textrm{V}\$.

Let's take your last case, since you had sufficient voltage then. You know that \$I_{R_{CL}}=25\:\textrm{mA}\$. You also know that \$I_{KA}\ge 1\:\textrm{mA}\$, though the datasheet appears to emphasize \$I_{KA}= 10\:\textrm{mA}\$. Assuming the middle circuit above for testing, you'd then want \$R_1\$ to provide \$I_{KA}= 10\:\textrm{mA}\$ plus a little extra for the NPN base. We can ignore the base current, given this setting for \$I_{KA}\$, so \$R_1=\frac{4.38\:\textrm{V}-700\:\textrm{mV}-2.5\:\textrm{V}}{10\:\textrm{mA}}\approx 120\:\Omega\$. As you can see, quite a lot less than you used.

When \$R_1=10\:\textrm{k}\Omega\$, the worst case minimum \$I_{KA}=1\:\textrm{mA}\$ would cause a \$10\:\textrm{V}\$ drop! Even the typical minimum of \$I_{KA}=400\:\mu\textrm{A}\$ leads to a \$4\:\textrm{V}\$ drop! There was no way it could operate under the circumstances.

If you use a low-side load, the \$I_{KA}=10\:\textrm{mA}\$ is added to the low-side load current. So you may need to adjust \$R_{CL}\$, accordingly. If you use a high-side load, then \$I_{KA}\$ is side-stepped and only the current set by \$R_{CL}\$ goes through the load.

Now, this gets back to the question of how you intend to operate it eventually. Are you serious about 69 LEDs in series?

  • \$\begingroup\$ Thanks. The guy who doesn't understand anything has added an Update: in the question. \$\endgroup\$
    – Papou
    Mar 7, 2017 at 4:27
  • \$\begingroup\$ @Papou I get it that you don't have a fixed DC reference. This is mains powered. Time to show a complete schematic for all three versions you are making. \$\endgroup\$
    – jonk
    Mar 7, 2017 at 5:27

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.