I sometimes have home automation projects that require detecting AC voltage (on/off only), previously have experimented with non-contact AC detection. Here is another approach that may be more suitable for low-power AC detection node: using a NE2 neon lamp and an LDR
The bulb will reduce LDR’s resistance and the circuit will read LOW when AC is present and HIGH when it is not (reversed logic). Since the weak pull-up resistor is 150K, this can run on battery operated node in sleep mode with pin change interrupt approach.
Here are some pictures how the sensor came along:
Relatively safe and isolated, cheap to build too. Be careful when playing with AC.
Page views: 4466