I don’t really feel like re-inventing the wheel in this case. Does anyone have a reference design to detect an open or closed 120VAC circuit using 3.3VDC GPIOs?
It seems to me like you could use a pullup resistor along with an opto-coupler to detect whether or not the circuit is open or not. I’d love to get a reference design that works and where all of the edge cases have been thought out.
I’ve used a simple plug in DC power supply plugged into the 120VAC I wanted to monitor. Then it is relatively easy to monitor the DC voltage of the supply. Any old cell phone charger etc should do, may just need a simple voltage divider to lower the voltage to your 3.3V level.