A switching supply has a high voltage primary and low voltage secondary, so feedback must cross isolation; the opto coupler plus TL431 is the classic scheme. This page covers stable isolated feedback, compensation and the traps.
On the secondary a TL431 acts as the error amplifier, comparing the sampled output with its 2.5 V reference and driving the opto LED with the error current; the opto transistor feeds the primary to force PWM duty down. Thus the signal crosses the transformer barrier without sharing ground. The loop is negative feedback: output high makes light strong makes primary cut duty makes output fall. Phase margin decides stability.
An RC around the TL431 sets loop bandwidth and phase margin, typically across cathode to ref. Too little compensation gives low frequency oscillation, too much slows response. The opto current transfer ratio drifts with temperature and age, so design with margin and stay linear. Keep bandwidth below one tenth of switching frequency to avoid noise retriggering.
| Stage | Role | Note |
|---|---|---|
| TL431 | error amp | ref 2.5 V |
| Opto | cross isol | CTR margin |
| Comp RC | stable loop | phase margin |
| Sample | divider fb | precise R |
| Bandwidth | under f/10 | avoid noise |
| Isolate | pri sec | no shared GND |
Isolated feedback rides TL431 and opto across the transformer, with compensation RC holding phase margin. Opto CTR drifts so keep margin, use precise sense resistors, keep primary and secondary strictly isolated, and do not tune output by only the opto side resistor.
The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Supply feedback and isolation per GB/T 5226.1; creepage to IEC 60204-1 and GB/T 16935. Always check the device datasheet and the product design file for ratings and derating.
Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.