AC Power Monitor

I want to build a simple monitor to get notified if AC power in my house goes out. I was thinking I could just hook up an Arduino (on a battery) with a DC wall wart connected to a barrel jack connected to a voltage regulator, and just read the voltage on a digital pin on the Arduino? 1 means "yes, I have AC power", and 0 means "no, the power is out."

Does that make sense?

You would read the Vin signal thru an appropriate resistor divider to an input pin?
And provide battery power by way of the USB connector?
That would work.

Thanks. Do I need to use a capacitor with the voltage regulator?

Hi, it would be advisable to, if you look up the spec sheet of the regulator it will suggest values and type.

Tom..... :)

osmosis311: I want to build a simple monitor to get notified if AC power in my house goes out. I was thinking I could just hook up an Arduino (on a battery) with a DC wall wart connected to a barrel jack connected to a voltage regulator, and just read the voltage on a digital pin on the Arduino? 1 means "yes, I have AC power", and 0 means "no, the power is out."

Does that make sense?

Do you realise you could get the same indication from a $2.00 night light plugged in to the power outlet?

bluejets: Do you realise you could get the same indication from a $2.00 night light plugged in to the power outlet?

I rather suspect he wants the Arduino to do something when it happens. Such as send a carrier pigeon. :grin:

What's the distance between the power being monitored and the arduino ? (where you will be)

@paulB: you are correct 8)

@bluejets: I'm placing this device in an electrical cabinet by my volunteer organization's radio towers to send us an alert if the power goes out.

@raschemmel: probably within 25 feet.

If you have a UPS then you could use the power out signal from that to trigger whatever event you want. I have a Raspi connected to the APC UPS that it's plugged into at my distribution panel and running apcupsd. The daemon sends out a variety of messages to let the system know exactly what's going on. Perhaps you could use something similar with an Arduino? I considered just having an AC relay hooked up to the wall and having that toggle a pin on the Raspi or an Arduino that was connected behind the UPS. That would have worked fine, but using the UPS communication works better for me.