Go Down

Topic: How to detect power failure? (Read 4950 times) previous topic - next topic

Jack Christensen

I'm designing a monitor to detect utility power failures (among other things).  I want it to be able to run for at least several hours once the power fails.  Therefore it will be powered from a wall wart plugged into a UPS unit like would be used for a computer.

My question is how to detect the utility power failure.  My current thinking is a second wall wart plugged directly into utility power, i.e. not into the UPS unit.  I'm sure a circuit similar to the attached would do the job, but I'm wondering if anyone can suggest a better, simpler, or more elegant way.


MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Simpson_Jr

Don't know whether it's better, a single relay with high voltage coil would be enough.

mmcp42

when I were a lad the UPS used to have a serial port to tell the pooter that it had lost its food supply
does your UPS have the same?
there are only 10 types of people
them that understands binary
and them that doesn't

Jack Christensen


Don't know whether it's better, a single relay with high voltage coil would be enough.



Indeed it would!  I'll think on that, thanks!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Jack Christensen


when I were a lad the UPS used to have a serial port to tell the pooter that it had lost its food supply
does your UPS have the same?


Haven't purchased the UPS yet, but I did wonder about that.  These days they're probably a USB interface?  Guess I was discounting that option because (a) I'll just use a small, low-end UPS, not sure they all have that feature, (b) Wasn't sure about figuring the interface out, might be proprietary, etc., and (c) Wasn't sure it'd be any cheaper.

Thanks!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Coding Badly

Quote
My question is how to detect the utility power failure


In the olden days, a good quality UPS had a contact closure to indicate power failure.

pantonvich

my ups had a very annoying beep . beep . beep - as if having no lights wasn't enough of an indication of no power - so other options are tapping into the beeper or the no power led



Techone

@ Jack Christensen

I make a circuit to test which breaker is for. It when power is off at a AC plug, a buzzing sound is made. Power in, no buzzing sound.  You can simply modify to use with the Arduino.  My design use a opto-coupler. And the AC transformer, I got from the garbage, extract the AC transformer. Here a schematic. 

Jack Christensen


I make a circuit to test which breaker is for. It when power is off at a AC plug, a buzzing sound is made. Power in, no buzzing sound.  You can simply modify to use with the Arduino.  My design use a opto-coupler. And the AC transformer, I got from the garbage, extract the AC transformer. Here a schematic. 


Interesting, that idea could work.  The optocoupler's LED could even be run direct from the mains with appropriate Rs and Cs.  Thanx!
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Techone

Quote
The optocoupler's LED could even be run direct from the mains with appropriate Rs and Cs.


PLEASE not DIRECTELY from the main ( You know Murphy's Law - I anythings can go bad ) . Just use a CHEAP AC transformer... it more safer. That what I have in my design.

Jack Christensen


Quote
The optocoupler's LED could even be run direct from the mains with appropriate Rs and Cs.


PLEASE not DIRECTELY from the main ( You know Murphy's Law - I anythings can go bad ) . Just use a CHEAP AC transformer... it more safer. That what I have in my design.


LOL, yeah I know, there have been other threads about that.  Don't worry, I'm appropriately trained/educated.  Seriously, that's what the opto isolator is for (I may be crazy but I'm not stupid).  I'm thinking a simple circuit like these LED night lights that you can get now.  Except it'd be the LED on the input side of the opto isolator.

But I'm all for keeping the Legal Dept. happy, so like they say on the commercials:
CLOSED COURSE, TRAINED PROFESSIONAL, DO NOT ATTEMPT.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Kris

the nightlight idea is proberbly the best way to monitor utility power, get a cheap LED one, rip it open as much as you need to get access to the LED, replace that with an Opto Coupler and a few other bits to get it working and your prettymuch done, just rig the nightlight to think its dark all the time (proberbly by replacing the LDR with a variable resistor, so you can adjust it until it thinks its night).

hope this helps, also as normal its mains electric so i dont suggest messing with it unless you know what your doing.

Jack Christensen

@Kris, the circuit is so simple, I wouldn't bother tearing anything apart.  I've seen several circuits that are variations on the attached.  In my case the LED would be the input side of an opto-coupler. I might want some filtering as this example will flash the LED at the line frequency.

Actually I think I'm favoring the second wall wart approach for the prototype, but the mains-driven LED could be just as safe if done properly, in a proper enclosure with an opto-coupler, etc.
MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

alfiesty

Jameco sells an opto isolated coupler p/n PS2505-2 that is AC tolerant. Connect the transformer through a properly sized resistor directly to the chip.

Jim
8000ft above the average

Techone

@ Jack

I was a bit worried...I look at your schematic, it a bit similar of a telephone circuit ...ringer detector. The parts... let see...

C is 0k has long it is well above 200 V
D1 - 1N914... Wrong...<--- Too weak !!  Use a 1N4004 or above rated of 200 V.  <--- Check datasheets. Use this site. http://www.datasheetcatalog.com/  It one of my favorite site to check datasheets.

R1 - 1 K ----> check calculations :  120 V AC rms --> 170 V peak so let use 200 V for V.  LED operating current of 10 mA. Vled = 2.2 V      ---->   ( V - Vled ) / I led = R limiting   ( 200 - 2.2 ) / 10 mA = 19 780 ohm  ---> 20 K  NOT 1 K. Let check the power rating of R1. Power = R1 * ( I led * I led )   20 K * ( 10 mA * 10 mA ) = 2 Watt resistor

Re-list of part:   C1 - 0.1 uF @ 250 V   D1 - 1N4004   R1 - 2 Watt  20 K

Now that it will work. Except the LED will flash @ 60 Hz in that circuit.

Go Up