detect power loss

I have looked at the OpenEnergyProject site's info about measuring voltage and current (and it's all good stuff). But I want a very simple, boolean/digital input indicating whether there is line voltage present or not.

I'll have 240v, split-phase wiring (2 * 120v AC and a Ground) to measure. I am only interested in using one of the two 120v lines (I can safely assume if one line is dead, so is the other). My Arduino Uno's power-supply is coming from a different source.

Basically want I want is some kind of "reverse relay", where the 120v available on the line holds my I/O to one state and flips when the voltage is gone.

The OpenEnergyProject uses an AC/AC transformer and then uses voltage-dropping-resistors to drop the range into the 0-5v that an analog I/O port can measure. But really I only want to know if it's present or not. I'm not interested in whether it's 120v or 110v on the line.

Is there a cheaper/simpler alternative working with the line-voltage to a (probably) digital input on the Arduino?

Thanks, AJ

Probably the cheapest way to detect line-voltage is to use a mobile phone charger (USB charger) purchased from EBay.

I'm not sure what a "reverse relay" is, but a real mains relay with its coil wired to the supply, and the contacts to an input pin would do the job, it seems to me. It may even react slightly faster than the phone charger, because it won't have any smoothing caps to discharge.

It ought to be possible to sense mains voltage via stray capacitance - you wrap a sense wire around the mains cable a few times, connect it to a digital input and via something like a 33M resistors to ground Some experimentation required, the wire must be properly insulated as must the mains cable. The induced signal will be clamped to 0..5V range by the digital pin's input diodes and the resistor will hold it low when no mains signal present. Code then has to look for transitions on that pin.

Alternatively power the Arduino from the mains, and if the power fails you'll know about it (!)

for security reasons i would prefer that stray capacitance idea of MarkT or a hall sensor glued on the wire...

with a 555 chip u can generate the desired HIGH LOW signal using a "missing pulse detector" circuit: http://www.falstad.com/circuit/e-555missing.html

you wrap a sense wire around the mains cable a few times, connect it to a digital input and via something like a 33M resistors to ground Some experimentation required, the wire must be properly insulated as must the mains cable. The induced signal will be clamped to 0..5V

Your idea could be very dangerous for the arduino itself. AWOL idea is more safe

Want safe? Get a small night light (dollar store item), tape off the light sensor so it's always on and glue a simple light sensor near the bulb and use it as a analog input.

Lefty