Maker Pro
Maker Pro

How to detect power cutout for PC?

E

Emre Sevinc

mike said:
YOu might want to consider a delay either in hardware or software.

Turkey may be different, but here in the good ole us of a,
there are two kinds of power outages, very brief and very long.
The distribution has a big hole in the middle. You'd likely want to
skip the shutdown on the short ones.

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
 
J

John Woodgate

I read in sci.electronics.design that Emre Sevinc <[email protected]>
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 :)

You can do a 1 to 3 minute delay quite easily with a CMOS 555 timer
(7555 or TLC555, which Google will find for you), and that is a very
good (and very popular) newbie project.
 
E

ehsjr

Emre said:
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 :)

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
 
R

Rich Grise

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 :)

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
 
J

John Woodgate

I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in said:
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

John Woodgate

I read in sci.electronics.design that Rich Grise <[email protected]>
wrote (in said:
Do the delay in software.

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

Pooh Bear

John said:
I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in said:
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

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

Graham
 
R

Rich Grise

I read in sci.electronics.design that Rich Grise <[email protected]>


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

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
 
R

Rich Grise

I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in said:
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

The original answer with a wall-wart called out 12VDC:
---------------------
: 12 volt relay
: DC relay contacts
: ------ ----- |->| <|
: | (||) |---| / |---+ | | |
: --| (||) | ----- | N/C o o o N/O
: --| (||) | | COM
: | (||) |-------------+
: ------
: 12 volt DC N/C = Normally Closed
: regulated COM = Common
: wall wart N/O = Normally Open
 
P

Pooh Bear

Rich said:
I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in said:
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

The original answer with a wall-wart called out 12VDC:
---------------------
: 12 volt relay
: DC relay contacts
: ------ ----- |->| <|
: | (||) |---| / |---+ | | |
: --| (||) | ----- | N/C o o o N/O
: --| (||) | | COM
: | (||) |-------------+
: ------
: 12 volt DC N/C = Normally Closed
: regulated COM = Common
: wall wart N/O = Normally Open

What's your point ?

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

Holy Shit !

Graham
 
R

Rich Grise

Rich said:
I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in <ggEXe.6619$i86.6486@trndny01>) about 'How to detect power
cutout for PC?', on Mon, 19 Sep 2005:
Here's a circuit that adds delay. You add 1 part - C1 a large
electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+
------

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

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

What's your point ?

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
 
E

ehsjr

John said:
I read in sci.electronics.design that ehsjr <[email protected]>
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

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

Ed
 
P

Pooh Bear

ehsjr said:
John said:
I read in sci.electronics.design that ehsjr <[email protected]>
Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+

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

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

Ed

Which won't do any good anyway !

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

Graham
 
J

Jasen Betts

["Followup-To:" header set to sci.electronics.basics.]
I need a circuit that can detect when electricity goes out
and sends a signal to the serial port of my PC,

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
 
R

Rich Grise

ehsjr said:
John said:
I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in <ggEXe.6619$i86.6486@trndny01>) about 'How to detect power
cutout for PC?', on Mon, 19 Sep 2005:

Here's a circuit that adds delay. You add 1 part - C1 a large
electrolytic capacitor.

12 volt
sensitive DC relay
----------- -----
| (||)-|>|--|---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||)------|---+-------------+
-----------
[diagram repaired by Rich Grise]

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

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

Which won't do any good anyway !

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

Thanks,
Rich
 
E

ehsjr

Pooh said:
ehsjr wrote:

John said:
I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in <ggEXe.6619$i86.6486@trndny01>) about 'How to detect power
cutout for PC?', on Mon, 19 Sep 2005:


Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+
------


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

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

Ed


Which won't do any good anyway !

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

Graham

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

Ed
 
B

Bob Monsen

Pooh said:
ehsjr wrote:

John Woodgate wrote:

I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in <ggEXe.6619$i86.6486@trndny01>) about 'How to detect power
cutout for PC?', on Mon, 19 Sep 2005:


Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+
------


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

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

Ed


Which won't do any good anyway !

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

Graham

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

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

ehsjr

Bob said:
Pooh said:
ehsjr wrote:



John Woodgate wrote:


I read in sci.electronics.design that ehsjr <[email protected]>
wrote (in <ggEXe.6619$i86.6486@trndny01>) about 'How to detect power
cutout for PC?', on Mon, 19 Sep 2005:



Here's a circuit that adds delay. You add
1 part - C1 a large electrolytic capacitor.

12 volt
DC relay
------ -----
| (||) |---+---| / |---+
--| (||) | |+ ----- |
--| (||) | [C1] |
| (||) | | |
| (||) |---+-------------+
------


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

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

Ed


Which won't do any good anyway !

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

Graham

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


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.


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
 
Top