1
\$\begingroup\$

I've built a D-Type flip flop + Schmitt trigger to convert a momentary switch in a toggle switch using an SN74HC74N Dual D-Type Positive-Edge-Triggered Flip-Flops With Clear and Preset and a CD40106BE CMOS Hex Schmitt-Trigger Inverters and all works fine. enter image description here

enter image description here

Anyway, I'm using two different logic components for this circuit.

The question is: is there a kind of component that integrate on a single chip all the requested features to do the same?

\$\endgroup\$
4
  • \$\begingroup\$ There sure is. Have you searched for them? \$\endgroup\$
    – Justme
    Nov 4, 2022 at 15:27
  • \$\begingroup\$ It looks like you have an esp32 on your board, so what value does the discrete logic add? If you wanted push button on/off, it could be done more effectively using other techniques. \$\endgroup\$
    – Kartman
    Nov 4, 2022 at 15:59
  • \$\begingroup\$ Just to note that (a) reset pulse generator R5/C2 should go directly to U2A /1CLR, not through logic gates. Using logic gates in power-up circuits is an oft-seen mistake. Logic gates produce a valid output when their supply rail is within limits. When the rail's rising, the gate should be considered as producing any output voltage, so including not a solid good LOW on /1CLR. Using the RC directly solves all that. Also, (b) connect a diode across R5 (anode to C5, cathode to supply) to fast discharge C5 at switch-off so it doesn't discharge thru the gate input diode or put higher voltage on it. \$\endgroup\$
    – TonyM
    Nov 4, 2022 at 16:57
  • \$\begingroup\$ Hi. Thanks for all reply. Really I haven't a physical momentary switch but a BLE signal that have a duration of few seconds. This interface is a part of a more complex system based on Home Assistant that wants to create a BLE relay. I'll publish the full project on Hackster the next week \$\endgroup\$
    – M4Biz
    Nov 4, 2022 at 17:49

2 Answers 2

2
\$\begingroup\$

Yes there is. Here's a part number of one SN74HCS74.

\$\endgroup\$
2
  • \$\begingroup\$ Seems good. I'll try. Thanks \$\endgroup\$
    – M4Biz
    Nov 4, 2022 at 17:49
  • \$\begingroup\$ Hi bunker. I'm searching for this components but it seems to me that it is available only as SMD? I'm right? And if yes, is there any componenents that is produced in PDIP package? \$\endgroup\$
    – M4Biz
    Nov 4, 2022 at 18:11
1
\$\begingroup\$

Not bad. Couple of points worth mentioning. Make all of the nets the same colour! There is no signifigance to the colour scheme used. Also, for clarity, shove that pin 2-6 net above the VDC1 label. Must, must, must always have bypass capcaitors on IC supply pins, as close as possible to the pins. The standard is 0.1uF (AKA 100nF) ceramic. If all of the +5V supplies are the same then label them as such. Debounce the switch. It is mechanical and the contacts literally bounce several times before settling in. The simplest way is to add a capacitor to the input of U1A, say 10mS to 100mS time constant. BTW, put a scope on the switch and see the bounce. Pin 1 /CLR probably does not need Schmitt trigger input, it is an asynchronous clear. Just connect it to the RC, use 0.1uF and select R for much longer than the supply rise time. From the data sheet, the 74HC74 t-r and t-f (input rise and fall times) at 5V is 450nS max. That is far shorter than the bounce time of a switch (mS?) so a Schmitt trigger is required. I think T.I. has small single Schmitt devices.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.