Latching relay circuit with timed override

I can't quite figure out how to do this, and I'm hoping someone might have a suggestion.

I'm trying to achieve the following behavior in a system:

- When a momentary pushbutton is pressed the system powers on.

- When the pushbutton is pressed again, nothing happens (i.e. the power stays on).

- When the pushbutton is held down for x seconds, the system powers off.

In other words, I'm trying to replicate the behavior of computer ATX power switches (in fact the system contains an ATX supply). The design I have right now has a couple of diodes and a SPDT relay. What I have right now is the following: Vbattery feeds into the pushbutton, then to a diode, and then into the relay coil which connects to ground. I also connect Vatx through a diode to the coil input (so the coil input floats at the higher diode output). The load loop (simplified) goes from Vbattery through the normally open relay contact, then to the atx supply, and then to ground. When the pushbutton is pressed from an "off" state, the coil will energize, close the relay, and power will go to the atx supply. When the atx turns on, it feeds Vatx to the relay coil via the diode, thus keeping the relay closed when the pushbutton is released. (There might be a cap at the coil input to give it an extra push in case the pushbutton is released too quickly?). That, I think, takes care of the latching, but now I'm not sure how to turn it off. I'm pretty sure I can use some long time constant RC circuit to reduce the voltage across the coil and open the relay, but I'm not sure how to do it. I need to use the same pushbutton. Right now, once the relay is latched, pressing the button won't do anything (actually it will probably cause the battery to drive the coil instead of the atx while it is depressed since Vbattery is 12+V and Vatx is 12, but the

*effect* will be nothing). Seems to me I could connect an RC arrangement between the pushbutton and the diode on the battery line, and charge it by holding the button down. But I don't know how to interface it to the rest of the circuit. I thought about feeding the charging cap to a FET or something to break the coil circuit, but that would probably require a comparator etc and seems unnecessary. I'd greatly appreciate any advice anybody could offer.

Some things to note:

  1. I'm not totally (stress *totally*) insane - there are reasons why I'm trying to control the atx like this, the main one being that when the atx is turned off, it's not totally off (the mainboard still draws power for wake-up junk) and I need absolutely zero current draw when in the off state.
  2. Actually turning the atx on requires some additional stuff, like a timed pulse to shunt the power-on pins to actually get things going. The button will have to remain depressed througout this period (unless there's a better way). Right now I'm going to use a little micro and fet to do this.
  3. The power-off override needs to be fairly no-nonsense, which is why I don't want to rely on the micro to handle it. I'd really like it if I could keep this part of the circuit analog, as I think it's the next best thing to a mechanical switch.
  4. If you've gotten this far, I really appreciate it. Thanks.
Reply to
swpulitzer
Loading thread data ...

--- Here's how to do it with a couple of 7555's (or a 7556) and a quad

2-input nand (HC00 or 4011).

The first timer is set to the delay you want (how long you have to keep S1 made before the relay opens) by changing the 1 megohm resistor or the 2µF cap, that time given by:

T = 1.4RC,

and it's currently set for about 3 seconds.

The timing of the second timer is non-critical and is currently set to output a pulse about 140ms wide.

View in Courier.

Vcc>-+---------+-----+-------+-------------+----+-------+ | | | | | | | [10K] [10K] [1M] +---+---+ [10K][1M] +---+---+ | | | |_ Vcc | | | |_ Vcc | +-[0.1µF]-+-----|--O|T OUT|-[0.1µF]-+----|--O|T OUT|--+ | | | | | | | | | +-----+ | +---|TH 7555| +---|TH 7555| | | | | | |_ _| | |_ _| | | O | | +--O|D R|O-+V +--O|D R|O-|-+V | O | | +| | GND | | | GND | | | | | [2µF] +---+---+ [0.1µF]+---+---+ | | | | | | | | | GND>-+-----|---|-----+-------+------------------+-------+ | | | | +---|--+--A | | | Y---+ +------------------------------+ | +--B | | | A B | Y +V | | | | | +-------+ | | |K | O-->C | A--+ [DIODE] [COIL]- - - -| | +--Y | | O-> | | | B--+ +-------+ | | | | | +------>NO | +--A | C | Y--+------[1000]--B NPN +--------B E | GND

-- John Fields Professional Circuit Designer

Reply to
John Fields

Conceptually:

OnRelay N/O

  • ---o--- ^----+ | Push | Off button | Relay --- | N/C -------
  • ---o o---+---o---o---+-------|OnRelay|----Gnd | ------- | -------- | Time | -------- | Delay |---|OffRelay|---Gnd -------- -------- | Gnd

For the time delay, you could use something like this:

  • ----+--------------+------+ | | | [R] [D] [OffRelay] | | | | +------+ | | | / +---+---[ZD]---[R]---| NPN | | \e [C] [R] | | | | Gnd --+---+-----------------+

Ed Gnd

Reply to
ehsjr

--- Oops... forgot to break-debounce the switch.

I'll try to get to it sometime today.

-- John Fields Professional Circuit Designer

Reply to
John Fields

Awesome. Thanks, guys!

Reply to
swpulitzer

--
Forget it, it\'s a bogus circuit.

I\'m working on a single chip solution (quad 2-input NAND and a
handful of discretes) and should be done later on today.
Reply to
John Fields

On Wed, 22 Feb 2006 15:37:30 -0600, John Fields wrote:

--- Done.

It's on abse:

news:// snipped-for-privacy@4ax.com

Plus, I simulated it in SWCAD. Works pretty good and it powers up in the OFF state.

Here's the simulation file:

Version 4 SHEET 1 880 680 WIRE -688 96 -688 -112 WIRE -688 432 -688 176 WIRE -544 176 -544 128 WIRE -544 272 -544 240 WIRE -544 432 -688 432 WIRE -544 432 -544 272 WIRE -432 128 -544 128 WIRE -432 160 -432 128 WIRE -432 272 -544 272 WIRE -432 272 -432 240 WIRE -384 128 -432 128 WIRE -384 128 -384 32 WIRE -352 128 -384 128 WIRE -320 336 -320 320 WIRE -320 432 -544 432 WIRE -320 432 -320 416 WIRE -272 272 -432 272 WIRE -272 320 -320 320 WIRE -224 128 -288 128 WIRE -224 256 -224 128 WIRE -224 432 -320 432 WIRE -224 432 -224 336 WIRE -224 464 -224 432 WIRE -176 -112 -688 -112 WIRE -176 -80 -176 -112 WIRE -176 128 -224 128 WIRE -176 128 -176 0 WIRE -96 32 -384 32 WIRE 32 32 -32 32 WIRE 128 128 -176 128 WIRE 128 208 128 128 WIRE 128 304 128 272 WIRE 128 320 128 304 WIRE 128 432 -224 432 WIRE 128 432 128 400 WIRE 160 32 96 32 WIRE 208 304 128 304 WIRE 208 336 208 304 WIRE 208 432 128 432 WIRE 208 432 208 400 WIRE 320 -112 -176 -112 WIRE 320 -80 320 -112 WIRE 320 32 224 32 WIRE 320 32 320 0 WIRE 400 -112 320 -112 WIRE 400 -80 400 -112 WIRE 400 32 320 32 WIRE 400 32 400 -16 WIRE 464 224 464 64 WIRE 480 224 464 224 WIRE 496 32 400 32 WIRE 496 64 464 64 WIRE 592 64 560 64 WIRE 592 224 544 224 WIRE 592 224 592 64 WIRE 592 256 544 256 WIRE 592 304 208 304 WIRE 592 304 592 256 WIRE 640 64 592 64 FLAG -224 464 0 SYMBOL cap 192 336 R0 SYMATTR InstName C1 SYMATTR Value 3.3e-6 SYMBOL res 112 304 R0 WINDOW 0 -41 30 Left 0 WINDOW 3 -57 57 Left 0 SYMATTR InstName R1 SYMATTR Value 1e6 SYMBOL cap 224 16 R90 WINDOW 0 -39 34 VBottom 0 WINDOW 3 -38 35 VTop 0 SYMATTR InstName C2 SYMATTR Value .1E-6 SYMBOL voltage -320 320 R0 WINDOW 0 -53 5 Left 0 WINDOW 3 -242 110 Invisible 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value PULSE(0 5 1 1E-6 1E-6 1.3) SYMBOL res 304 -96 R0 WINDOW 0 -45 38 Left 0 WINDOW 3 -50 65 Left 0 SYMATTR InstName R3 SYMATTR Value 1E6 SYMBOL Digital\\\\and 528 -16 R0 SYMATTR InstName A1 SYMBOL Digital\\\\and 512 304 R180 SYMATTR InstName A2 SYMBOL voltage -688 80 R0 WINDOW 0 -53 5 Left 0 WINDOW 3 -242 110 Invisible 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value PULSE(0 1 0 .025) SYMBOL diode 416 -16 R180 WINDOW 0 -37 37 Left 0 WINDOW 3 -68 2 Left 0 SYMATTR InstName D2 SYMATTR Value 1N4148 SYMBOL sw -224 240 R0 WINDOW 0 32 15 Left 0 WINDOW 3 32 44 Left 0 SYMATTR InstName S1 SYMBOL Digital\\\\and 64 -48 R0 SYMATTR InstName A3 SYMBOL Digital\\\\and -64 -48 R0 SYMATTR InstName A4 SYMBOL diode 112 208 R0 SYMATTR InstName D3 SYMATTR Value 1N4148 SYMBOL diode -288 112 R90 WINDOW 0 0 32 VBottom 0 WINDOW 3 32 32 VTop 0 SYMATTR InstName D4 SYMATTR Value 1N4148 SYMBOL res -448 144 R0 WINDOW 0 -45 38 Left 0 WINDOW 3 -50 65 Left 0 SYMATTR InstName R2 SYMATTR Value 1E6 SYMBOL cap -560 176 R0 WINDOW 0 -53 29 Left 0 WINDOW 3 -51 60 Left 0 SYMATTR InstName C3 SYMATTR Value .1e-6 SYMBOL res -192 -96 R0 WINDOW 0 -45 38 Left 0 WINDOW 3 -50 65 Left 0 SYMATTR InstName R4 SYMATTR Value 1000 TEXT -702 506 Left 0 !.tran 10 TEXT -712 544 Left 0 !.model SW SW(Ron=1 Roff=10Meg Vt=0.5Vh=0) TEXT 672 64 Left 0 ;OUT

-- John Fields Professional Circuit Designer

Reply to
John Fields

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.