How to detect power cutout for PC?

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
Loading thread data ...

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

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

wrote (in ) about 'How to detect power

NOT

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

wrote (in ) about 'How to detect power

CONNECTED

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

You don't want a line monitoring circuit- you want to break into the UPS and signal the PC when the battery hits 1.8V/cell or sometime before its internal cutout threshold if it exists. This would make much more sense, you will be working with low voltage grounded DC, and no separate circuit housing or power supply is required.

Reply to
Fred Bloggs

Well, DigiKey has a relay (several, actually) with a 12V, 960 ohm coil, that'd be a time constant of 4.512 S, which would hold up for a glitch, but that's about it.

Now, if you really insist on letting a cap discharge, just amplify it. :-) Use a MOSFET, although you'd probably want to use another transistor for a little positive feedback so you'd get a snap action - I don't know if you'd want your MOSFET to be in the linear region for 2-3 minutes. :-)

Cheers! Rich

Reply to
Rich Grise

Of course. John, you've got to read the thread. The cap discussed is a large electrolytic and the example given was 4,700 uf. The power supply specified was a 12 volt DC regulated wall wart.

Ed

Reply to
ehsjr

And the current is?

Suppose it's 60 mA. That means the load resistance is 200 ohms. The time-constant with 4700 uF is 940 ms. After less than a second, the voltage is down to 0.37 x 12 = 4.4 V. After less than 3 s, it's 0.6 V.

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

No, fred bloggs is on to the answer. Open it, measure the voltage across it's internal battery, use that as a trigger. Compare it with a reference built out of a TL431 or something, use that to turn on an optoisolator, used to drive the input signal, perhaps a parallel port pin. This gives him a signal only when it is required.

--
Regards,
 Bob Monsen
Reply to
Bob Monsen

you'll be wanting to open /dev/ttyS0 (or ttyS1 etc) and use ioctl() calls to get the status bits, or I think you can get the OS to send a SIGHUP signnal when the carrier detect line goes off if you first ctty() to the serial port.

Bye. Jasen

Reply to
Jasen Betts

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.