Connect with us

Latching a N.C. pushbutton

Discussion in 'Electronic Basics' started by jtm, Jan 5, 2005.

Scroll to continue with content
  1. jtm

    jtm Guest

    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
     
  2. Andrew Holme

    Andrew Holme Guest

    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/
     
  3. jtm

    jtm Guest

    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
     
  4. Rob Gaddi

    Rob Gaddi Guest

    Check out the CD4043.
     
  5. Andrew Holme

    Andrew Holme Guest

    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.
     
  6. Andrew Holme

    Andrew Holme Guest

    You might also want to think about power-on reset; flip-flops power-up in a
    random state.
     
  7. 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
     
  8. jtm

    jtm Guest

    Neat part
    Would it also have problems of being in an unknown state after startup?
     
  9. Rob Gaddi

    Rob Gaddi Guest

    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.
     
  10. Andrew Holme

    Andrew Holme Guest

    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.
     
  11. Andrew Holme

    Andrew Holme Guest

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

    jtm Guest


    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
     
  13. Andrew Holme

    Andrew Holme Guest

    jtm wrote:
    [snip]
    That's impossible.
    I don't understand. You'll have to draw me a diagram: ascii would be fine.
     
  14. jtm

    jtm Guest

    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?




     
  15. jtm

    jtm Guest

    this should display better

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



     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-