How to detect power cutout for PC?

Thank you very much, now I'm getting a clearer picture and going to start to build and test the circuit.

Once I have it working correctly on the hardware level, it is going to be a "simple matter of programming" for my Debian GNU/Linux running PC.

--
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr
Reply to
Emre Sevinc
Loading thread data ...

Yes, I thought about that too, similar situation here in Turkey, some outages are just a few or 10-20 seconds that my UPS can handle. So, modifying the circuit in order not to send a signal as soon as it detects outage but maybe cound 2-3 minutes and then send the signal would be much better. But I think this complicates the matter just a little bit. So, if I can manage to build the circuit described in previous messages and write a program to do what I want, then I can try to introduce some kind of useful delay as you described, but first things first, I'm just an electronics newbie trying to find my way :)

--
Emre Sevinc

eMBA Software Developer         Actively engaged in:
http:www.bilgi.edu.tr           http://ileriseviye.org
http://www.bilgi.edu.tr         http://fazlamesai.net
Cognitive Science Student       http://cazci.com
http://www.cogsci.boun.edu.tr
Reply to
Emre Sevinc

Do the delay in software. When the relay drops out, instead of immmediately shutting down, go into a time delay loop (in the background, of course) for whatever delay time you want. At the end of that delay time, check your "power is out" signal, and if it has disappeard (i.e., the power's come back on), then do nothing and exit. (or, go back to whatever it was you were doing before).

Good Luck! Rich

Reply to
Rich Grise

Here's a circuit that adds delay. You add

1 part - C1 a large electrolytic capacitor. 12 volt DC relay ------ ----- | (||) |---+---| / |---+

--| (||) | |+ ----- |

--| (||) | [C1] | | (||) | | | | (||) |---+-------------+ ------

If you use a relay with a high coil resistance, such as Radio Shack #275-248 and a 4,700 uF 16 volt (or higher) capacitor, you will get a few seconds delay. The higher the coil resistance and/or the higher the capacitance, the longer the delay. For example, and Omron G5V-1-2-DC12 relay has more than twice the coil resistance as the Radio Shack relay. If you used that relay, you would get a delay approaching 10 seconds.

Ed

Reply to
ehsjr

Actually, I had the impression that his question was about acquiring the "power is good" signal in the first place, and that he already knows how to handle it when it gets into the port, ergo he wouldn't _have_ to put together a hardware timer. Like, is the goal "a ups alarm" or is the goal "learn how to build a timer circuit"?

But, yes, if you want to start learning electronics in general, then a 555 is probably a pretty good place to start. :-)

Cheers! Rich

Reply to
Rich Grise

The original answer with a wall-wart called out 12VDC:

--------------------- : 12 volt relay : DC relay contacts : ------ ----- |->|

Reply to
Rich Grise

That John might have missed the post where they specified "DC". If you hadn't seen that, then it _does_ look exactly like a plain transformer, which _will_ blow up a capacitor! :-)

Thanks, Rich

Reply to
Rich Grise

I read in sci.electronics.design that ehsjr wrote (in ) about 'How to detect power cutout for PC?', on Mon, 19 Sep 2005:

This is DANGEROUS RUBBISH. YOU HAVE AN ELECTROLYTIC CAPACITOR CONNECTED TO A LOW-IMPEDANCE AC SUPPLY. IT WILL EXPLODE, LATER IF NOT SOONER.

--
Regards, John Woodgate, OOO - Own Opinions Only.
If everything has been designed, a god designed evolution by natural selection.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
Reply to
John Woodgate

I read in sci.electronics.design that Rich Grise wrote (in ) about 'How to detect power cutout for PC?', on Mon, 19 Sep 2005:

But he knows software already. he wants to get into hardware, and a 555 timer project is the ideal introduction.

--
Regards, John Woodgate, OOO - Own Opinions Only.
If everything has been designed, a god designed evolution by natural selection.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
Reply to
John Woodgate

I've noticed a lot of highly questionable advice from s.e.b . Seems to be the blind leading the blind.

Graham

Reply to
Pooh Bear

What's your point ?

Shoving a cap across even a DC output won't result in a noticeable time delay !

Holy Shit !

Graham

Reply to
Pooh Bear

You must have missed the earlier post. This post showed only the addition of the cap.

Ed

Reply to
ehsjr

Which won't do any good anyway !

Do you like being led by the blind ( and stupid ) ?

Graham

Reply to
Pooh Bear

Why not? (remember, this is a transformer WITH rectifier.) The OP was asking for a time delay, after all.

Thanks, Rich

Reply to
Rich Grise

Thanks for the assessment. Now, as to the cap, why won't it do any good?

Ed

Reply to
ehsjr

He wants a delay of 2 to 3 minutes, during which time you'll have to source more than 12mA. That is more than 200mF. A supercap might work, but then you'd be connecting a supercap to a low impedance voltage source. I wonder about inrush and the like. Perhaps a 5W 100 ohm resistor between the cap/relay junction and the wart might be a good addition.

--
Regards,
 Bob Monsen
Reply to
Bob Monsen

Oh my.

Reply to
ehsjr

the serial port of your pc has 5 input pins RI RXD CTS DSR CD

all you need to do is arrange for your mains supply to be converted into a negative voltage (5-12V) on one of those pins and set software to watch or receive an interrupt when the mais goes off, the power supply stops, and the pin changes state,

Bye. Jasen

Reply to
Jasen Betts

Actually, all he wants to do is avoid complications and build the circuit described. Later on he may try to add to it. He said: "So, if I can manage to build the circuit described in previous messages and write a program to do what I want then I can try to introduce some kind of useful delay as you described, but first things first, I'm just an electronics newbie trying to find my way"

The addition of the cap adds a delay that is useful to ignore power "blips", and the circuit is within the restriction of "newbie trying to find my way". So saying "it won't do any good anyway" makes one wonder what that other poster had in mind. As it turns out, that poster seems not to understand what adding the cap does. He said: "Shoving a cap across even a DC output won't result in a noticeable time delay!"

Ed

Reply to
ehsjr

Will it?

--
Regards, John Woodgate, OOO - Own Opinions Only.
If everything has been designed, a god designed evolution by natural selection.
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
Reply to
John Woodgate

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.