I need to detect a AC mains outage, isolated way. Output marked as [?] goes to AVR MCU. I don't need to detect undervoltage or zero-crossings. I actually need a simple feedback to MCU interrupt which will trigger interrupt only in mains outage. MCU are powered from UPS. I've picked following circuit found on the net based on PC817, but adjusted C1/R1 to 230VAC.
Any errors, i.e. will this work? Suggestions/comments on parts/values are welcomed.