Connect with us

Looking for a circuit to

Discussion in 'Electronic Basics' started by Nikki, Jul 5, 2004.

Scroll to continue with content
  1. Nikki

    Nikki Guest

    Can I use a 555 timer somehow to do this
    I have a set of those contacts that go on a door or window (there normally
    open) and then when you open the window or door the contacts will close. I
    need a circuit that will deliver a momentary closer for about one second
    even though the window contacts remain closed. Then reset when the door or
    window is closed.
    Thanks Guys
    Nikki
     

  2. 5V
    ----------+------------+---+--+-------------------------+----+---
    | | | | | |
    | | | | | |
    | | | | .---------------. | |
    .-. | .-. | | | | .-.
    |R| - |R| | +----- GND Vcc ---+ |R|
    |1| D1 ^ |2| | | | | |3|
    '-' | '-' | | | U1 | '-'
    | | | | | | | |
    | || | | | | | | |
    ------||-----+---+--|------- Trg Dis --------+
    | || | | | | |
    | C1 | | | Thr --------+
    | +----------------- Out | |
    | | | | | | |
    | | +------- Rst Ctl ---+ |
    | | | | | | |
    \ o | | | | | |
    \ | | | | | ---
    \. | | | | | ---
    o | | '---------------' | | C2
    | output | | |
    | | | |
    | | --- |
    | | --- |
    Gnd | | C3 | |
    ---------+---------------------+-----------------------+----+----

    R1=1k C1=1uF D1=1N4148
    R2=10k C2=10uF
    R3=91k C3=0.1uF U1=TN555CN

    created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

    The length of the one-shot is 1.1*R3*C2. When the switch closes, the
    Trg pin
    is momentarily pulled low, causing the one-shot to fire, since the
    right side
    of C1 will try to follow the left side (which goes from 5V to 0V).
    However, it
    quickly charges back up to 5V due to R2.

    D1 is required to protect Trg from overvoltage. However, it can be
    omitted if
    the 555 you use has input overvoltage protection diodes built in
    (which most
    cmos parts will have)

    C3 is also OK to omit. If there are sensitive parts near the 555, you
    might
    want to put a cap between Vcc and GND, say 1uF.

    Regards,
    Bob Monsen
     
  3. Nikki

    Nikki Guest

    Bob thanks for the info.
    although I know a little about electronics your drawing is over my head.
    Anyway you can draw it on paper and scan it.
    Thanks Nikki
     
  4. John Fields

    John Fields Guest

     
  5. I think you are right. How about this one?

    (Note, please view in mono-spaced font, like courier)

    5V
    ----------o-------o--------o--o-----------------------o----+
    | | | | .---------------. | |
    .-. .-. | | | | | .-.
    |R| |R| | | |--- GND Vcc ---+ |R|
    |1| |2| - | | | | |3|
    '-' '-' ^ | | | U1 | '-'
    | | R4 | | | | | |
    | || | ___ | | | | | |
    ----||--o--|___|-o--|-|--- Trg Dis --------o
    | || | | | | |
    | C1 | | | Thr --------o
    | +-----------|-|--- Out | |
    | | | | | | |
    | | |----- Rst Ctl ---+ |
    | | | | | | |
    \ o | | | | | |
    \ | | | | | ---
    \. | | | | | ---
    o | | '---------------' | | C2
    | output | | |
    | | --- |
    | | --- |
    Gnd | | C3 | |
    ---------o---------------------o---------------------o----+

    R1=1k C1=1uF D1=1N4148
    R2=10k C2=10uF
    R3=91k C3=0.1uF U1=TN555CN
    R4=100k

    created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

    Regards,
    Bob Monsen
     
  6. What happens is that the switch bounces on open cause the node behind
    the cap to wiggle above the rail... The diode behind the 100k resistor
    (or protection diode inside the chip) keeps this from hurting the
    chip's inputs. . On open bounces, the trigger pin never gets lower
    than about 4.5V.

    Give it a try, I built it, it works...
     
  7. OK, then my 555 model must be unrealistic, or my
    schematic/configuration flawed. I still got spurious triggering when I
    simulated it:
    http://www.terrypin.dial.pipex.com/Images/WindowSwTimerSIM2.gif

    (If you want, I'll send you the CKT and PWL.)
     
  8. ----- Original Message -----
    From: "Terry Pinnell" <>
    Newsgroups: sci.electronics.basics
    Sent: Wednesday, July 07, 2004 10:14 PM
    Subject: Re: Looking for a circuit to

    No, you put the diode to 5V on the wrong side of the 100k resistor.

    The problem is that the diode keeps that node from getting up above
    5.7V, so
    the quick drops of the far left side on switch bounce cause the chip
    to trigger.
    Putting the diode on the other side of the 100k resistor means it
    doesn't
    affect that node as much, which can now go up to 10V when the switch
    opens.
    Thus, bounces on switch open now bounce between 10V and 5V rather than
    5V
    and 0V, and therefore don't trigger the 555. The diode simply protects
    the
    555 from any damage that the 10V might cause, and is probably not
    required
    for cmos 555s, since they have input protection diodes anyway.

    Regards,
    Bob Monsen
     
  9. Thanks for the fast reply. Still simulates a retrigger! Can you see
    any other error in this schematic?
    http://www.terrypin.dial.pipex.com/Images/WindowSwTimerSIM3.gif

    If not, has to be the model. Did you simulate as well as build it?
     
  10. I simulated it and built it. However, the bounce.pwl file I used is
    probably different from yours. I'm guessing thats the difference. Here
    is mine. The assumption is that the bounce lasts 10ms.

    + 0 5
    + 1.001 5
    + 1.002 0
    + 1.003 5
    + 1.004 0
    + 1.005 5
    + 1.006 0
    + 1.007 5
    + 1.008 0
    + 1.009 5
    + 1.010 0
    + 1.011 0
    + 2 0
    + 2.001 5
    + 2.002 5
    + 2.003 0
    + 2.004 5
    + 2.005 0
    + 2.006 5
    + 2.007 0
    + 2.008 5
    + 2.009 5
    + 3 5
     
  11. <snip PWL>

    I've since discovered that if I use the alternative CM macromodel,
    '555' instead of the component model 'UA555', your circuit simulates
    OK (with my PWL as well as yours).

    Where was that PWL applied in your simulation? As it's -ve going, I
    assume it is direct to the LH side of your 1uF? Mine was +ve going,
    and went via an intermediate VCVS. I suppose that was redundant, but I
    assume it's immaterial here.

    FWIW, here's my PWL. Similar order of bounce duration to yours, but
    with bouncing on both open and close.

    + 0 0
    + 1m 0
    + 1.1m 5
    + 1.5m 5
    + 1.6m 0
    + 1.7m 5
    + 5m 5
    + 5.1m 0
    + 10m 0
    + 10.01m 5
    + 1.6s 5
    + 1.601 0
    + 1.61 0
    + 1.611 5
    + 1.62 5
    + 1.63 0
     
  12. The PWL file I posted starts with an open switch, waits a second
    before opening the switch, then waits another second before closing
    the switch again. Both the closing and opening bounce for a bit. I
    don't really know whether the bounce profile is accurate, but it seems
    to work with both of the 555 models.

    I've read that switch bouncing occurs over a period of 1ms, from 10 to
    100 times. That is, the switch bounces 10 to 100 times, with a
    frequency between 10kHz and 100kHz. My bounce.pwl file has it bouncing
    with 500Hz frequency over a period of 10ms. Yours has it bouncing with
    50Hz frequency a couple of times. I'm guessing thats the difference.
    If you scope the trigger node using your PWL file, you see that the
    trigger input gets down to 2V on the switch opening... I'm not sure
    why the models differ in their response to this; the mono should
    trigger in both cases.

    Anyway, I believe the circuit works properly. If resiliency to longer
    bounces is required, a larger time constant can be used by increasing
    either the cap or 10k resistor. Increase the 100k resistor in
    proportion to the increase in the 10k resistor. For example, changing
    the 10k to a 22k, and the 100k to a 220k makes the circuit simulate
    properly with your PWL file, at least for me.

    Regards,
    Bob Monsen
     
  13. The PWL file I posted starts with an open switch, waits a second
    before opening the switch, then waits another second before closing
    the switch again. Both the closing and opening bounce for a bit. I
    don't really know whether the bounce profile is accurate, but it seems
    to work with both of the 555 models.

    I've read that switch bouncing occurs over a period of 1ms, from 10 to
    100 times. That is, the switch bounces 10 to 100 times, with a
    frequency between 10kHz and 100kHz. My bounce.pwl file has it bouncing
    with 500Hz frequency over a period of 10ms. Yours has it bouncing with
    50Hz frequency a couple of times. I'm guessing thats the difference.
    If you scope the trigger node using your PWL file, you see that the
    trigger input gets down to 2V on the switch opening... I'm not sure
    why the models differ in their response to this; the mono should
    trigger in both cases.

    Anyway, I believe the circuit works properly. If resiliency to longer
    bounces is required, a larger time constant can be used by increasing
    either the cap or 10k resistor. Increase the 100k resistor in
    proportion to the increase in the 10k resistor. For example, changing
    the 10k to a 22k, and the 100k to a 220k makes the circuit simulate
    properly with your PWL file, at least for me.

    Regards,
    Bob Monsen
     
  14. Hi Terry,

    Although i am familiar with pspice, but had never simulated switch bounce behavior.
    Which part it used to simulate that?

    Thanks
     
  15. Hi Bob,

    I beardboarded your schematic and found that there was no false
    trigger (not even for a single time) due to switch bounce.

    Will you please point out where i'm going wrong?

    Maybe it depends upon type of switch used!

    Thanks
     
  16. Did you breadboard the 'corrected' circuit? If so, there should be no
    false triggering.

    The first circuit I posted had a problem with switch opening, as
    pointed out by John Fields. If you hold the switch closed for 2
    seconds, the LED (or whatever you are powering for 1 seconds) should
    go out. Then, open the switch, and the 555 will be triggered again if
    the switch bounces.

    The second circuit is designed to prevent that by preventing the
    bounce on switch opening from taking the trigger input down to 1.66V,
    and thus never triggering the 555.

    I believe that wwitch bounce is much more likely on switch closing
    than opening, for obvious mechanical reasons. If your switch is not
    bouncing on open, you may not have a problem with the first circuit.

    Regards,
    Bob Monsen
     
  17. I referred your first circuit.
    This is what, that's not happening!
    Exactly this is the case.
     
  18. I use CircuitMaker, which is based on Berkeley Spice3f5/XSpice. To
    simulate bounce, I specify 'Piece-Wise Linear' mode for my signal
    generator, then write a PWL file in my text editor to specify the
    signal I want to simulate, like the one I included earlier in the
    thread. I think PSpice is similar in this context.
     
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

-