How to detect power cutout for PC?

John, *READ* the thread!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! "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."

Reply to
ehsjr
Loading thread data ...

The brief delay is all he needs. He can sense the relay with software once every desired_delay_time and won't need a routine that says if power bad, sense again in 4 seconds, if power still bad, signal.

However, since people seem to think the full delay needs to be in hardware, the cap amplifier is a good idea. I did that a long time ago, with bjt. Here are two circuits, aimed at the OP's self-described level of familiarity (and perhaps a bit beyond it). I think the first is the simplest of the two for the OP to get longer hardware delay - it yields about 1 1/2 minutes delay as drawn.

1N400x +----|
Reply to
ehsjr

No it doesn't.

Funny that !

I've designed more power supplies than you could shake a stick at.

Indeed it won't.

It simply makes the reservoir cap bigger and reduces ripple.

To make a delay you need an *RC* network !

You don't seem equipped even to understand the very basics of electricity.

Graham

Reply to
Pooh Bear

So ?

I can't find a note of the power rating but lets say it's 6W - so can supply 500mA.

dV/dt = I /C

113 milliseconds isn't much of a delay.

And actually the current available to charge the C will be > the steady state figure making delta t shorter than above anyway.

Graham

Reply to
Pooh Bear

You're not very good at this electricity stuff are you ?

Why not learn some basic science ?

Graham

Reply to
Pooh Bear

Please *please* explain how the resistance of a relay coil across a 12V supply affects the charge time for a parallel cap !

Graham

Reply to
Pooh Bear

Or use a PIC ! ;-)

Graham

Reply to
Pooh Bear

Quite the bad mood ehh? A simple Radio Shack project would be like so- you don't like the direct coupling?- then use an optocoupler: View in a fixed-width font such as Courier.

. . 7805/TO-220 . ------- 1K . +----|IN OUT|---+----+--------+-----+ +-/\\/\\--CTS . | | |10V | | | | . | 0.1u | | | | | | 1N914 . +--||----+-------+ / | / +-|-+--/\\/\\--+---+---------------|- \\ | 10K |/ | . | | | | >---+-/\\/\\-|2N4401 | . Vbatt | | | +--|+ / |\\ | . ----- -> | | | | | / e | . 12 / +|2.2u / | | LM339 | | . 10K \\ === \\

Reply to
Fred Bloggs

It doesn't. It affects the _discharge_ time. :-)

Cheers! Rich

Reply to
Rich Grise

I guess you haven't read the whole thread either. The cap _charges_ right away, from the wall wart, and the relay pulls in, since its coil is in parallel with the cap.

When power is removed, the wall wart ceases to provide volts or current, so the capacitor proceeds to _discharge_ through the relay coil, holding it closed for some delay time.

Cheers! Rich

Reply to
Rich Grise

Speaking of not understanding the basics - suppose you put a BMF capacitor and a relay coil in parallel, across a 12V supply. Let the cap charge as long as it needs to, until you're at a steady state, with the relay pulled in.

Now, remove the 12V supply. What happens? When?

Thanks, Rich

Reply to
Rich Grise

Might as well help out that 7805 with input ripple rejection- this works for 12V or 24V: View in a fixed-width font such as Courier.

. . 7805/TO-220 . ------- 1K . +----|IN OUT|-+------+--------+-----+ +-/\\/\\--CTS . | 50V | |10V | | | | . | 0.1u | | | | | | 1N914 . +--||----+-----+ / | / +-|-+--/\\/\\--+---+---------------|- \\ | 10K |/ | . | | | | >---+-/\\/\\-|2N4401 | . Vbatt | | | +--|+ / |\\ | . ----- -> | | | | | / e | . 12 / +|2.2u / | | LM339 | | . 10K \\ === \\

Reply to
Fred Bloggs

Graham,

I don't know why you are missing this, but what you present as fact is blatantly and repeatedly wrong. You seem so intent on making belittling comments - maybe that's why you are missing it. If you breadboard the circuit you'll be able to see the delayed relay dropout with the cap. Or if you rely on your opinion of the poster instead of math or breadboarding, then think about what John Woodgate or Rich Grise said concerning the delay. I assume you have a high opinion of them?

Ed

Reply to
ehsjr

I'd got confused over what kind of delay was wanted !

It still won't work for long - as you noted.

Graham

Reply to
Pooh Bear

No. The plugpoack powers the relay while there's mains. When the mains drop out, the cap. provides - - - Oh, wait. Not with an amplified cap. How about the UPS battery?

1, Lose the cap in parallel with the LED

  1. A bridge is overkill - put a 1N4004 or another LED in antiparallel with the LED.
  2. Remember, I = C * dV/dt. You need enough series resistance so that if you plug it in at the line peak, it will limit the current to something less than the LEDs' peak rating.

And a fuse never hurts. :-)

Cheers! Rich

Reply to
Rich Grise

yeah, but whay are you going to power the relay with, another plugpack plugged into the UPS ?

back to the original design something can probably be done using an optocoupler instead of a plugpack and relay, but a home made a cable with a mains plug on one end and a serial plug on the other might get some strange looks....

hmm, what's the best way to power the LED in an optocoupley from the mains, a big honking resistor or something more subtle?

C1 || ___ L--[680R]--||---~ /\\ ~ || / \\ 250v +--|->---+-----+ 50Hz | \\ / _L_ | N-------------(--_ \\/ ~T~ \\ / LED | ~~ ~ |10u ~T~ (in opttocoupler) +-----------+-----+ now for C1 hmm 730V swing 100 times per second wanting to pass 10mA or slightly more 0.01/(730x100) = 0.139 uf rated for 250VAC

I can get 200nF seems to be a standard size

the 680 ohm resistor is there to stop the power-on surge (if ppower comes on at one of the peaks of the AC cycle) from destroying the diodes in the bridge... probably should be rated for 400V but only needs to be a 1/4 watt part... the bridge needs only to be rated for 500ma and 5v1

maybe a fuse would be a good idea too, eg, 250AC 100ma

comments anyone?

Bye. Jasen

Reply to
Jasen Betts

Yes - there's a diagram of that in a previous reply. The idea is to keep it as simple and safe as possible per the OP's self-described lack of familiarity with electronics. Thus the plugpacks.

For someone experienced, it would be best to do everything inside the UPS. It already senses when mains power drops, and has a nice source of DC. Plenty of room to add whatever circuit is desired - comparator based, timer, relay, your opto circuit, whatever. It's a no-brainer.

Ed

Reply to
ehsjr

why do I need a diode witth a 400V breakdown voltage?

If I do that I may as well lose the other cap too as the resistor will be dropping most of the voltage. also an 1N914 is rated for 100ma and

50v (or better) so that'd be enough antiparallel.

ok worst case is cap reverse charged so that's 350V from the mains and

350 from the cap = 700V, to get that below the 50mA maximum for the LED in the 4N28 optocoupler i'd need a 14K resistor, call it 15K,5%

at 15mA RMS (ideal current for the optocoupler LED) that resistor is going to drop 225V, so we don't need the capacitor...

L // LED ----[15K]---+->|-+ | | 230V +-|

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.