what is the prupose of the of putting a diode in reverse parallel across the input of the optocoupler. is it for protection. also i was going to use the regulated 5v to drive the LED in the opto with a current limiting resistor. What this Work
The optocoupler is deliberately fed with AC. The reverse parallel diode protects the LED when the AC goes negative.
The optocoupler is used to tell the mute circuit that the power has failed. It provides pulses to the mute circuit.
As soon as the AC supply fails the pulses from the optocoupler stop. Note that at the instant the AC fails your +5v line will probably stay above +4.5v for a significant period due to the reservoir capacitors after the bridge rectifier.
So the sequence of events is:
AC power fails
Pulses stop
Mute circuit is activated
The transient generated by the analog DC power failing is muted
Several milliseconds later, when the DC eventually fails, the relay will drop out
If you feed the optocoupler LED from the +5v line you get
AC power fails
The transient generated by the analog DC power failing is NOT muted
The +5v rail drops to a low level, and the mute relay activates for a few milliseconds (if that)
Several milliseconds later, when the DC eventually fails, the relay will drop out.
Remember what I said earlier "all you are doing is driving the LED of an optocoupler from an AC source without a smoothing/reservoir capacitor."