2

I found this circuit here from a few years ago, posted thanks to tcrosley:

74LS122 circuit

Using the 74LS122 I found that it produces a short pulse both on latching the input high AND to low. The problem is I can't work out how to make the output pulse on just one of those input states and not the other.

I would like to connect a toggle switch to the input that produces a pulse output when toggled on, but, importantly, produces no output when toggled off (the circuit in its current form produces a pulse on both toggle states!). Any help with this would be gratefully received.

Also, from what I can gather from the IC spec sheet, it seems this chip doesn't need any switch debounce on the input, if I am correct.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Tim Higham
  • 21
  • 1
  • One simple possibility is to use a switch between your power input and the circuit/motor. Another is, depending on output Q, would be to use a diode if the voltage is low enough. This might be more of a hack than a proper solution. – tanto Apr 22 '20 at 22:07

2 Answers2

0

The trigger input only causes a pulse on the falling edge of A1 as per the functional table (from the datasheet).

enter image description here

You cannot generate a clean clock edge directly with a mechanical switch, you will get a number of high and low pulses (in general) on opening and on closing, so you definitely need debouncing if you want to reliably trigger the one-shot with a mechanical switch.

In general, if an edge matters, you will most likely need debouncing. If a level matters you may not need debouncing.

One method is to use a SPDT switch with a NAND gate like 74LS00, another is to use an RC filter with a Schmitt trigger gate such as a 74HC14 to get a clean pulse (the '122 does not have Schmitt trigger inputs so it would have to be added externally).

schematic

simulate this circuit – Schematic created using CircuitLab

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • 1
    Thank you very much - that's very helpful, I'll try that. I hadn't realised debouncing was so important. Thanks for your help. – Tim Higham Apr 22 '20 at 23:03
0

The problem is that the one-shot is getting triggered by switch bounce in both directions, that is, on both opening and closing.

If you can make your switch be a SPDT you can use an R-S latch to make a clean 'on' and 'off' transition to the one-shot.

If you can't do that, then you can use an RC filter approach to filter the switch input to reject the bounce noise.

This is a common problem, lots to find on the interwebs about it. Example: https://circuitdigest.com/electronic-circuits/what-is-switch-bouncing-and-how-to-prevent-it-using-debounce-circuit

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • Thanks very much hacktastical that is very helpful. I'll get going right away with the debounce circuit... Many thanks! – Tim Higham Apr 22 '20 at 23:04