AC Power State monitoring

Hello community!

Just a brief question for you.

I'm looking to set up a way to monitor the state of AC power in my house in a power outage situation.

I have mulled over several things in this and the old forum with related or like issues.

What sensor would you suggest using to identify the power state of on and off?

I know that I could simply go to the store and pick up something to do this for me, but where is the fun and learning in that :)

Thank you for your time!

I’m looking to set up a way to monitor the state of AC power in my house in a power outage situation.

Get a 5V DC regulated wall-wart. Connect +V to a digital pin, and ground to ground. When the digital pin reads HIGH, there is power.

How are you planning to power the Arduino, and what do you expect to do when there is a power failure/recovery? Those are the more complicated parts of the project.

PaulS:

How are you planning to power the Arduino, and what do you expect to do when there is a power failure/recovery? Those are the more complicated parts of the project.

The intention was to either hook up the arduino to a USPs or dedicated charging power supply.

My concern however is the potential of a split second drop out when the UPS picks up when the power goes out. :)

Any other creative suggestions?

Ill be adding notification to this as well :) But that's another story all together, for another topic :)

Thanks again!

It depends on how small a power failure you want to look for. The wall wart idea is a really good one, but you have to test the actual wall wart to see how long its filtering capacitor can sustain a charge before dropping out. The more current you suck out of the wall wart, the faster it will drop to a logic zero. There are other things you can do like actually measuring the wall voltage using an analog pin on the arduino and such, but they carry inherent risks.

So, if you want to do somthing like that, get one of the AC wall warts. Take a look around, you may already have one. These wall warts supply AC power to the device, not DC and are usually in the 12V range. With one of these in hand, you can make a voltage divider to drop the voltage down to a level the arduino analog pin can read and then sample it rapidly to see what the voltage is for a given instant. You'll have to allow for the zero crossing, but that's not too hard. You can also rectify and filter it just slightly and feed it through a voltage divider to a digital pin. Your choice.

Have fun.

Thank you for the info. Once I choose either analog or digital, Ill be working on the notification portion of the project email/SMS or both :) !

:D

Plug in small night light and monitor it via LDR sensor. 1$ solution.

That's actually a really good idea except it suffers from the same problems as a power supply. If it's an led device, you have to be sure the light goes out quickly enough. If it uses a filament, you have to be careful to set the threshold of the light sensor to catch fast transients. Some transients won't allow it to dim enough to even sense.

But, for most purposes, that will work real well. Just depends on how short an interval you need.

As other have suggested, a DC wall wart is probably the easiest/cheapest solution. If you put a resistor between the Vcc and GND of the wall wart (you need to put two resistors anyway if you wall wart outputs more than 5V and you need a voltage divider), it will discharge the filtering cap and makes sure that the voltage drops quickly to logical 0.

If you for some reason don't want to use the DC wall wart, an other simple solution is to use an AC relay (a relay which coil uses AC). Connect the relay's coil to AC and wire the relay's contacts between the Arduino's +5V and a digital pin. If you choose a SPST relay, you need also a pull down resistor between the digital pin and GND. Depending on the relay's specs, the response time is around a few milliseconds.