PowerElecHub

TL431 Optocoupler Feedback Calculator: LED Resistor, Bias Resistor and Opto Gain

Bias a TL431 and optocoupler feedback loop for a flyback or other isolated converter: the largest LED series resistor that still pulls the controller's FB pin low at minimum CTR, the bias resistor that keeps the TL431 above its minimum cathode current, and the mid-band gain of the opto stage across the CTR range.

Secondary side

Optocoupler and primary side

V_dd and R_pu are the controller's FB pull-up, often internal; check the datasheet. The FB voltage to reach is the level at which the controller goes to minimum duty or skip mode. Use the CTR at the LED current you expect, and the minimum over temperature and lifetime.

Largest LED resistor

5.86 kΩ

at minimum CTR and full pull-down

Suggested LED resistor

4.7 kΩ

15 % below the maximum, E24

Bias resistor across the LED

1 kΩ

for 1 mA through the TL431

Opto stage gain

6.6 … 18.6 dB

CTR·R_pu/R_LED, min … max CTR

Operating point at full pull-down

Opto transistor current needed
225 µA
LED current at minimum CTR
450 µA
TL431 cathode voltage with the suggested resistor
4.19 V
TL431 dissipation
6.07 mW

Opto stage gain against LED resistor

The gain falls as R_LED rises, but R_LED cannot exceed the maximum or the loop loses control authority at light load. The gap between the two lines is the gain spread from CTR alone.

Static bias and mid-band gain only. The optocoupler's own pole from its collector capacitance and R_pu, the TL431 compensation network, and the dependence of CTR on LED current and temperature are not modeled. Use the result as the starting point for the loop design.

How it works

Most isolated converters, from phone chargers to industrial flybacks, regulate through a TL431 shunt reference and an optocoupler. On the secondary side the TL431 compares a divided output voltage with its 2.5 V reference and sinks current through the optocoupler LED. On the primary side the opto transistor pulls the controller's feedback pin down against an internal or external pull-up. The more current the TL431 sinks, the lower the FB voltage and the less power the controller delivers.

The static design is a chain of current limits. To command minimum power, the opto transistor must pull FB down to a low level, which takes a collector current of (V_dd − V_FB)/R_pu. With the lowest CTR the part will ever have, that needs an LED current of I_C/CTR_min. The LED current flows from V_out through the series resistor R_LED, the LED and the TL431, and the TL431 needs at least about its reference voltage across it to work. That gives the largest usable R_LED: (V_out − V_F − V_KA,min)/(I_F + I_bias). Choose a larger one and at light load the TL431 runs out of voltage before it can pull FB low enough, so the output rises.

The TL431 also needs a minimum cathode current, typically up to 1 mA, to regulate properly. At light load the LED current may be lower than that, so a resistor across the LED, R_bias = V_F/I_bias, supplies the difference. Without it the TL431's gain and reference accuracy degrade exactly when the converter is lightly loaded.

R_LED also sets the gain of the opto stage. In the mid-band, where the TL431 is compensated with a capacitor, the transfer from TL431 to FB has a gain of CTR·R_pu/R_LED. Because CTR can vary by a factor of two to four between parts, temperature and age, that gain varies by the same factor, and the loop's crossover moves with it. Choosing R_LED close to its maximum keeps the gain as low as the bias allows; the calculator suggests a value with margin and shows the resulting gain range.

Design procedure

  1. 1Read the controller's FB pull-up voltage and resistance and the FB level for minimum power from its datasheet.
  2. 2Take the optocoupler's minimum CTR at your LED current over temperature and lifetime, and its maximum CTR.
  3. 3Enter the output voltage, LED forward voltage and the TL431's minimum cathode voltage and bias current.
  4. 4Use the suggested R_LED or another value below the maximum, and the bias resistor across the LED.
  5. 5Carry the gain range into the compensation design and confirm light-load regulation on hardware.

Formulas

Collector current for full pull-down
I_C = (V_dd − V_FB,min)/R_pu
LED current at minimum CTR
I_F = I_C/CTR_min
Bias resistor
R_bias = V_F/I_bias
Largest LED resistor
R_LED ≤ (V_out − V_F − V_KA,min)/(I_F + I_bias)
Opto stage mid-band gain
G = CTR·R_pu/R_LED

Worked example

The defaults describe a 12 V flyback whose controller has a 20 kΩ FB pull-up to 5 V and must see 0.5 V at light load, with an optocoupler whose CTR lies between 50 and 200 %. Pulling FB down takes 0.225 mA of collector current, so at 50 % CTR the LED needs 0.45 mA. With 1 V across the LED and 2.5 V across the TL431, 8.5 V is left for R_LED, which must carry the LED current plus 1 mA of bias current through a 1 kΩ resistor across the LED. The largest R_LED is 5.86 kΩ; 15 % below that, rounded down to E24, is 4.7 kΩ. With it the opto stage has a gain of 2.1 at minimum CTR and 8.5 at maximum, 6.6 to 18.6 dB, and the TL431 still has 4.2 V across it at full pull-down. A 5 V output with a 1.2 V LED leaves only 1.3 V, so with an 80 % CTR part and a 4.7 kΩ pull-up the largest resistor is 614 Ω and the gain rises to 17 to 23 dB, which is why low-voltage outputs often use a lower-voltage reference. These values were checked against a separate Python calculation that finds the largest resistor by bisection.

Common mistakes

  • Choosing R_LED for a convenient gain without checking that it stays below the maximum at minimum CTR.
  • Leaving out the bias resistor, so the TL431 runs below its minimum cathode current at light load.
  • Using the CTR at 5 mA when the LED runs at 0.5 mA.
  • Ignoring the gain spread from CTR tolerance, which moves the crossover by a factor of two or more.
  • Using a 2.5 V TL431 on a 3.3 V or 5 V output without checking the headroom.

Frequently asked questions

Why is there a maximum value for R_LED?

Because at light load the TL431 must sink enough LED current to pull FB down, and all of that current flows through R_LED. If R_LED is too large, the voltage across it eats into the TL431's minimum operating voltage before the required current is reached, and the loop can no longer reduce power. The output then rises at light load or the converter enters an uncontrolled burst.

What is the bias resistor across the LED for?

The TL431 needs a minimum cathode current, up to about 1 mA depending on the grade, to regulate with its specified accuracy and gain. At light load the LED current may be far below that. A resistor across the LED adds a fixed current of about V_F/R_bias so the TL431 always has enough.

Which CTR values should I use?

The minimum over temperature, lifetime and the LED current you operate at, for the bias calculation, and the maximum for the gain. CTR is usually specified at a few milliamperes, while feedback loops often run the LED at a fraction of a milliampere, where CTR can be lower. Optocoupler datasheets give CTR versus LED current curves.

Does this design the compensation too?

No. It sets the static bias and the mid-band gain of the opto stage, which the compensation then has to work with. The opto transistor's collector capacitance with R_pu adds a pole that often sits in the low kilohertz range and must be included in the loop design.

How were the numbers checked?

A separate Python program finds the largest LED resistor by bisection on the TL431 cathode voltage reaching its minimum, rather than with the closed form, and the values match. The 5 V example is also checked to show how quickly the headroom shrinks.

References

  1. C. Basso, "Designing Control Loops for Linear and Switching Power Supplies: A Tutorial Guide", Artech House, chapters on the TL431 and optocoupler feedback (static bias, maximum LED resistor, opto stage gain).
  2. Texas Instruments, TL431/TL432 datasheet (SLVS543), minimum cathode current and cathode voltage requirements.
  3. The values on this page were recomputed independently in Python.

Results are engineering estimates. Verify your design with datasheets, simulation and measurement.

Related guides

Related calculators