single pulse when depressed, active High

Discussion in 'The Projects Forum' started by Louie Andrew Capulso, Sep 15, 2015.

  1. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    #I don't know what I'm looking for, or what is the term for it, and i've been searching till 2AM and still no solution.

    so, I have a push button and I want an output that is active high and gives a pulse when I depress the button to HIGH.

    Figure:
    `````````````````````````long press``````````short press
    Push Button/ input = ________--------------_________--_______
    Output..................= ------------___-----------------------___--------

    _----- HIGH
    --___ LOW


    #I am gonna connect it to DOWN pin in 74LS192 Up/Down counter. pulse should be enough to activate the DOWN pin (maybe 100ms or less) and must be HIGH all the time.
    The reason why I need this is because if the DOWN pin stays at LOW, when I activate UP pin, it counts double or triple. It is when I press and hold the push button, giving LOW to DOWN pin, then count UP, it messed up until I release the DOWN push button.
    My outputs are Clean when I tested them.
    555 monostable doesn't seem to work on what I need. I don't know if I did something wrong.

    note:
    My time and resources are limited. Logic ICs, 555, Caps, Resistors, and 2N2222 Transistors, and I think it's enough. I can buy or Order some components if needed, but it takes time to arrive, so.. meh.
    I am actually making a Coin counter for our project. and I want to avoid multiple counts on a single coin when the Start button (down count) is being depressed.
     
  2. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,801
    1,105
    Welcome to AAC!
    :confused: How can a pulse be high all the time? How are you handling switch contact debouncing?
     
  3. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    I need HI - LO - HI pulse. is that impossible? I don't think so. maybe a misunderstanding? I didn't mean "all the time", what's the right term for that?

    I'm using RS NAND Latch for debouncing. I used schmidt's Trigger too, but prefer the Latch.
     
  4. dannyf

    Well-Known Member

    Sep 13, 2015
    1,824
    364
    Quite simple to implement:

    1) with a mcu + programming: you're essentially looking for a pin change of state.
    2) use a capacitor to generate a pulse from the input signal and use that pulse to drive a pulse stretcher -> it can be built out of a 555 or a gate + diode.
     
  5. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    1) Programming is not an option.
    2) I need a schematic, please refer one or at least give me an Idea what to ask google. :D
     
  6. paofanello

    New Member

    Jul 16, 2015
    8
    1
    Hi! I don't understand very well what do you need... but this circuit does what you have "draw" :)
    555.png
    You must only choose the value of the components... if it is the circuit that you are waiting for, I can help you!
     
  7. dannyf

    Well-Known Member

    Sep 13, 2015
    1,824
    364
    It is a typical pulse stretcher for 555 timers.

    Another way is to apply the pulse to the reset pin.
     
  8. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    I'll give this one a try. what are the values? I'll use +5V power source.
    what I need was when I either Press and hold the switch or Press then release immediately, the output should be a single pulse with t=100ms.

    and in this image, at the pin3/Output, what does that thing do? I'm guessing it's an inverter. hmm.o_O
     
  9. eetech00

    Active Member

    Jun 8, 2013
    650
    112
    Hi

    So the output should be normally high, and go low, for a fixed duration, no matter how long the button is held down, or pressed multiple times, Right?

    Button press produces single pulse from button de-bouncer to trigger 555 should work.
     
  10. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    What you describe is called a monostable multivibrator because it is derived from a type of oscillator circuit called a multivibrator, but it makes only one output pulse rather than repeating the pulse continuously. There are several different kinds, but because you want the same length output pulse whether the input pulse is longer than it or shorter than it narrows things down to the classic circuit that completely ignores the input once it has been triggered.

    There are many different circuits that can do this. What is the power source for this circuit, its voltage, and the available current? Also, what kind of switch is it? And finally, how is the output signal used? Every little piece of information helps.

    You mention getting two or three counts on one button press. This probably is due to contact bounce. When a switch closes, the contacts bounce together befor settling down into constant contact. A 7400 series logic component can respond in a few nanoseconds, and has no trouble seeing one switch push as 20 or 50 inputs to be counted. Using a circuit to filter out the very fast bounce signals is called debouncing the switch input. This can be a very small separate circuit of incorporated into the monostable. Contacts also bounce when they are separated and that might happen after the output pulse has ended, triggering another pulse. So the debouncer must handle this. Most debounce circuits work with a SPST switch and introduce a short delay between the first instance of the switch signal (the start of bouncing) and the cleaned up debouncer output. This delay usually is less than 50 ms, typically around 20-30 ms. If this is a problem and you need an instantly debounced switch signal, this can be done by changing to a SPDT switch contact arrangement.

    That's enough to start.

    ak
     
  11. eetech00

    Active Member

    Jun 8, 2013
    650
    112
    This should do the job.
    the output is normally high, and goes low, for a fixed duration, no matter how long the button is held down, or pressed multiple times.
     
  12. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    Thanks. I'm gonna try this one.
     
  13. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    I had Latch that acts as a debouncer, and also tested 555 Clock to count and still get double counts until I connect UP pin to GND, and Vcc for DOWN pin. I am using a 2 Pin switch that is look like the one in Computer mouse click button. I dunno what you call them, but I added a 3rd Pin for debouncing and works pretty well.

    As a power source, i'm gonna use a +5V DC, probably from the Computer ATX Power Supply or from USB ports. let's say 500mA to 1A, and I think it's enough for my Project.
    My circuits are all Digital, Digital inputs and output, de-bounced switch in Input and digital clock in output and normally high.
     
  14. paofanello

    New Member

    Jul 16, 2015
    8
    1
    I'm not an expert... so I am glad if you can teach me something... but why use a debouncer at the trigger of a 555? It's important if the monostable time is very small, but the OP said 100ms, that I think it's ok for debounce!

    You're right, if there aren't big load to control, with this idea we can eliminate the inverting transistor
     
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    The counter changes state (either up or down) when the appropriate count input transitions from low to high *while the other input is held high*. If you leave any unused input floating, it can flap around and cause all kinds of grief.

    ak
     
  16. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    yes, and that's what i'm trying to fix. UP pin should be LOW if I want to activate the DOWN Count. and the DOWN pin should be HIGH in order to count UP properly.

    The UP pin is connected through schmidt's trigger to the coin drop sensor (IR sensor).
    The Down pin is connected to the switch.
    I was using Latch NAND to debounce and gives a good result, HIGH when depressed, LOW when released.
    But the problem is when the button is Pressed and hold, then I'll try to drop a Coin (count up), it counts UP twice, which is a bad design.
    now, I need a solution and the Schematics to try on.


    I'm gonna try this one now and get back if this solve the problem.
    I'm still open for alternative solution though.
     
  17. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    I think debounced switch is not needed here. That was just a solution for my past problems, but it's not enough.
     
  18. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    No. The UP pin must be HIGH if you want to count down. The DOWN pin must be HIGH if you want to count up. Whichever way you are counting, the other pin must be HIGH, as stated on the datasheet.

    This will go a lot faster if you post your current circuit schematic including wiring to external switches.

    ak
     
  19. Louie Andrew Capulso

    Thread Starter New Member

    Sep 15, 2015
    14
    0
    I am so sorry, Schmitt's trigger seems to be inverted output. is that normal?
    I will provide a schematic in a bit.
     
  20. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,542
    1,251
    Most IC logic gates that have Schmitt trigger inputs are inverting, such as the 74xx14, 40106, and everybody's favorite, the 4093. Also, standard 2-gate Set-Reset flipflops (either NAND or NOR) are inverting from Set to Q and Reset to -Q.

    ak
     
    Louie Andrew Capulso likes this.
Loading...