Maker Pro
Maker Pro

Latching a N.C. pushbutton

J

jtm

Jan 1, 1970
0
I have a N.C. momentary pushbutton that keeps a circuit pulled low (.9 mA
flows). When the button is pushed the circuit goes to 5V. I need to latch
the circuit when the button is pushed, until a Reset button is pushed. I
cannot change the existing circuit so I'll have to add "this" inline with
the switch.

Perhaps a type of flip-flop or NAND gates, suggestions?
TIA
 
A

Andrew Holme

Jan 1, 1970
0
jtm said:
I have a N.C. momentary pushbutton that keeps a circuit pulled low
(.9 mA flows). When the button is pushed the circuit goes to 5V. I
need to latch the circuit when the button is pushed, until a Reset
button is pushed. I cannot change the existing circuit so I'll have
to add "this" inline with the switch.

Perhaps a type of flip-flop or NAND gates, suggestions?
TIA

This sounds a bit like a homework question.

You can do it with NAND gates, NOR gates or flip-flops. You can do it with
J-K flip-flops, S-R flip-flops or D-types. Take your pick.

Have a look at http://wearcam.org/ece385/lectureflipflops/flipflops/
 
J

jtm

Jan 1, 1970
0
Andrew Holme said:
This sounds a bit like a homework question.

You can do it with NAND gates, NOR gates or flip-flops. You can do it
with
J-K flip-flops, S-R flip-flops or D-types. Take your pick.

Have a look at http://wearcam.org/ece385/lectureflipflops/flipflops/

no homework...

From what I can tell the J-K needs a clock pulse which I don't have. Looks
like a (non-clocked) S-R type is what I need but searching for it just
points me to the D type, which also seems to need a clock. Do you have a
part number for a non-clocked S-R?
jtm
 
A

Andrew Holme

Jan 1, 1970
0
jtm said:
no homework...

From what I can tell the J-K needs a clock pulse which I don't have.
Looks like a (non-clocked) S-R type is what I need but searching for
it just points me to the D type, which also seems to need a clock.
Do you have a part number for a non-clocked S-R?
jtm

You can use an edge from the push button to clock a JK or a D-type.

You can make an S-R using 2 NAND gates or 2 NOR gates (see the link I
posted).

74HC279 contains 4 S-R flip-flops but it would be much better to make your
own using a quad-NAND (e.g. 74HC00) or quad-NOR. You need to invert the
push-button signal (with one of the spare NANDs) to drive a NAND type S-R
flip flop; the S-R inputs are active low. With a NOR type flip-flop the
inputs are active high.
 
A

Andrew Holme

Jan 1, 1970
0
You might also want to think about power-on reset; flip-flops power-up in a
random state.
 
P

petrus bitbyter

Jan 1, 1970
0
jtm said:
I have a N.C. momentary pushbutton that keeps a circuit pulled low (.9 mA
flows). When the button is pushed the circuit goes to 5V. I need to latch
the circuit when the button is pushed, until a Reset button is pushed. I
cannot change the existing circuit so I'll have to add "this" inline with
the switch.

Perhaps a type of flip-flop or NAND gates, suggestions?
TIA

Looks like some 5k6 pull-up to 5V. Some input is kept low by the switch but
when the switch is pushed the input is pulled high via the resistor. So you
have to disconnect the switch and put some latch or flipflop instead of
which the output should be able to sink that 0.9mA. No problem for an old
workhorse like an LS74 or the newer HCT74. You can clock it with the switch
you disconnected the same way the original circuit did using a 5k6 pull up.
Pull the D input high and provide some power on reset to make sure the
circuit starts in the off state. Problem will be the reset button. An
existing reset button will not reset the flipflop unless you make som
provisions for it. I'll make no assumptions here. You'd better make sure you
know how that button is connected.

petrus bitbyter
 
J

jtm

Jan 1, 1970
0
Neat part
Would it also have problems of being in an unknown state after startup?
 
R

Rob Gaddi

Jan 1, 1970
0
jtm said:
Neat part
Would it also have problems of being in an unknown state after startup?
Absolutely, but if you're clever with the capacitors you use to debounce
the two buttons you can choose to have whichever switch input you would
prefer asserted on power up.
 
A

Andrew Holme

Jan 1, 1970
0
jtm said:
Neat part
Would it also have problems of being in an unknown state after
startup?

Yes; and you only need one flip-flop, not four.

You can do the whole thing with a HCMOS quad NOR: use the spare gates to
combine an RC-generated power-on reset with the pushbutton reset. The
latter must be active high (another NC button to ground); and the power-on
reset capacitor must (unconventionally) go to +5V to get the right logic
sense. Finally, for maximum realism, you could use a small logic-level
drive MOSFET to provide an open-drain output.

See http://www.holmea.demon.co.uk/Image474.gif

In the last resort, if you need a longer reset pulse, use a quad 2-input
Schmitt NOR instead.
 
A

Andrew Holme

Jan 1, 1970
0
jtm said:
I have a N.C. momentary pushbutton that keeps a circuit pulled low
(.9 mA flows). When the button is pushed the circuit goes to 5V. I
need to latch the circuit when the button is pushed, until a Reset
button is pushed. I cannot change the existing circuit so I'll have
to add "this" inline with the switch.

Perhaps a type of flip-flop or NAND gates, suggestions?
TIA

Have you considered a mechanical latching pushbutton? You could use a
single buttton or on/off radio buttons.
 
J

jtm

Jan 1, 1970
0
Andrew Holme said:
Yes; and you only need one flip-flop, not four.

You can do the whole thing with a HCMOS quad NOR: use the spare gates to
combine an RC-generated power-on reset with the pushbutton reset. The
latter must be active high (another NC button to ground); and the power-on
reset capacitor must (unconventionally) go to +5V to get the right logic
sense. Finally, for maximum realism, you could use a small logic-level
drive MOSFET to provide an open-drain output.

See http://www.holmea.demon.co.uk/Image474.gif

In the last resort, if you need a longer reset pulse, use a quad 2-input
Schmitt NOR instead.


Great information...but I just had an idea (realize I'm pretty much a
newbie):
Since I need to latch the existing circuit I was going to take the NOR-Latch
output and drive a PNP (2N3906) transistor that I put in series with the
existing pushbutton. The NOR latches high and 'opens' the transistor.

This got me thinking. When the existing circuit goes high can't I just drive
the transitor directly from that, essentially creating a self-latching
circuit with a single transistor (emitter feeding back to base) and a couple
resistors? No external power needed.

I tried this and it seems to work. I'm not sure this is a good ideas since
when the exisitng circuit is 'closed' my transistor is all sitting at 0
volts.When the circuit opens it goes to 5V and my transistor only then gets
'powered up". If this is a good idea ?

Thx
 
A

Andrew Holme

Jan 1, 1970
0
jtm wrote:
[snip]
Since I need to latch the existing circuit I was going to take the
NOR-Latch output and drive a PNP (2N3906) transistor that I put in
series with the existing pushbutton. The NOR latches high and
'opens' the transistor.

This got me thinking. When the existing circuit goes high can't I
just drive the transitor directly from that, essentially creating a
self-latching circuit with a single transistor (emitter feeding back
to base) and a couple resistors? No external power needed.

That's impossible.
I tried this and it seems to work. I'm not sure this is a good ideas
since when the exisitng circuit is 'closed' my transistor is all
sitting at 0 volts.When the circuit opens it goes to 5V and my
transistor only then gets 'powered up". If this is a good idea ?

I don't understand. You'll have to draw me a diagram: ascii would be fine.
 
J

jtm

Jan 1, 1970
0
Hope this shows up ok:

+5V
|
| R1=5K
|----^^^---
| |
|--------
/| |
| |
|----^^^---
| R2=10K
|
o|
|NC Pushbutton
o|
|
|
===
G


This works, I think this is how:
When the pushbutton is closed the circuit is pulled low, the base goes low,
and the transistor conducts. When the pushbutton is open the base goes
high, opening the transistor, opening the circuit, even after the pushbutton
returns to the NC position. R2 has to be about double R1.

With this setup I do have a power-on problem...it trips every time. I tried
the RC method to try to keep the base low for a period of time after
power-up but could not get it to work. suggestions?




Andrew Holme said:
jtm wrote:
[snip]
Since I need to latch the existing circuit I was going to take the
NOR-Latch output and drive a PNP (2N3906) transistor that I put in
series with the existing pushbutton. The NOR latches high and
'opens' the transistor.

This got me thinking. When the existing circuit goes high can't I
just drive the transitor directly from that, essentially creating a
self-latching circuit with a single transistor (emitter feeding back
to base) and a couple resistors? No external power needed.

That's impossible.
I tried this and it seems to work. I'm not sure this is a good ideas
since when the exisitng circuit is 'closed' my transistor is all
sitting at 0 volts.When the circuit opens it goes to 5V and my
transistor only then gets 'powered up". If this is a good idea ?

I don't understand. You'll have to draw me a diagram: ascii would be
fine.
 
J

jtm

Jan 1, 1970
0
this should display better

+5V
|
| R1=5K
|----^^^---
| |
|--------
/| |
| |
|----^^^---
| R2=10K
|
o|
|NC Pushbutton
o|
|
|
===
G



jtm said:
Hope this shows up ok:

+5V
|
| R1=5K
|----^^^---
| |
|--------
/| |
| |
|----^^^---
| R2=10K
|
o|
|NC Pushbutton
o|
|
|
===
G


This works, I think this is how:
When the pushbutton is closed the circuit is pulled low, the base goes
low, and the transistor conducts. When the pushbutton is open the base
goes high, opening the transistor, opening the circuit, even after the
pushbutton returns to the NC position. R2 has to be about double R1.

With this setup I do have a power-on problem...it trips every time. I
tried the RC method to try to keep the base low for a period of time after
power-up but could not get it to work. suggestions?




Andrew Holme said:
jtm wrote:
[snip]
Since I need to latch the existing circuit I was going to take the
NOR-Latch output and drive a PNP (2N3906) transistor that I put in
series with the existing pushbutton. The NOR latches high and
'opens' the transistor.

This got me thinking. When the existing circuit goes high can't I
just drive the transitor directly from that, essentially creating a
self-latching circuit with a single transistor (emitter feeding back
to base) and a couple resistors? No external power needed.

That's impossible.
I tried this and it seems to work. I'm not sure this is a good ideas
since when the exisitng circuit is 'closed' my transistor is all
sitting at 0 volts.When the circuit opens it goes to 5V and my
transistor only then gets 'powered up". If this is a good idea ?

I don't understand. You'll have to draw me a diagram: ascii would be
fine.
 
Top