Pages: [1] 2   Go Down
Author Topic: How to detect power failure?  (Read 3333 times)
0 Members and 1 Guest are viewing this topic.
Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.




* sch.png (5.74 KB, 746x306 - viewed 111 times.)
Logged

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

Netherlands
Offline Offline
God Member
*****
Karma: 5
Posts: 614
A naughty mind is a joy forever.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 20
Posts: 1318
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Atlanta, GA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 86
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
 

Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ 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. 


* ACchecker.jpg (634.98 KB, 2389x1896 - viewed 111 times.)
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

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

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 71
Posts: 3511
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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.


* LED_120VAC.png (1.8 KB, 260x145 - viewed 51 times.)
Logged

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

Buena Vista, CO
Offline Offline
Full Member
***
Karma: 0
Posts: 180
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

8000ft above the average

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ 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.
Logged

Pages: [1] 2   Go Up
Jump to: