A simulation of a bi-directional optocoupler such as the PC814 running off of 24v AC. Smoothing is performed after the optocoupler to produce a stable current across the right-most LED. The push button can temporarily disconnect the AC. A microcontroller placed along the 1µF+ lead can digitally detect the application of the 24v AC signal. This circuit was designed to detect the status of HVAC equipment.