TL431 as a comparator?
Note that TL431 have three pins. U1 "measures" the voltage across R7 which is proportional to the output voltage because R6 &amp; R7 is configured as a voltage divider. If the voltage across R7 is above 2.495V (see TL431 datasheet) it will "open" and current will flow trough R4, the opto coupler and U1 to ground. The voltage drop over the opto coupler doesn't matter because unlike a zener diode, U1 have a separate voltage sense pin.