Momentary switch toggle circuit

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ruffrecords

Well-known member
Joined
Nov 10, 2006
Messages
16,936
Location
Norfolk - UK
I need to use an (illuminated) momentary action push button is an application that requires a toggling action. I have found lots of circuits for doing this including a couple of CMOS gates, a handful of transistors, an NE555 or an 8 pin microcontroller. My only requirements are that the circuit can operate from a 12V supply and operate a signal relay. What have you guys found to be the most reliable approach in an audio application?

Cheers

Ian
 
Personally I prefer the MCU approach, like the cheap and cheerful ATTiny85 (mini Digispark if you choose to use Arduino to program it) because you can write the switching and LED toggling in the same source code, but then I'm not sure if you'd like adding the extra components to bring down that 12V supply.
 
use CD4013


https://electricdruid.net/a-study-of-sub-oscillators/
SH101SubOsc.jpg

a 1nF and a 10K resistor to ground to create a 1ms pusle via a forward diode on the clock input will toggle Q and NOT Q output, the NOT Q will feed the Data input. that will that will alter the Q and NOT Q output.
 
Historically the CD4013 CMOF FF was the typical way to make an alternating latch from a momentary switch closure. Take care to reduce mechanical switch bounce to only get a single toggle per switch push.

A MCU is generally overkill for something this simple, unless you expand the features to take advantage of the MCU.

JR
 
I normally use a 40106 schmitt trigger and a 4013 latch, unless an MCU is already available
 
Alternative you could use the CD4017 / CD4022.
Q1 output is the default after reset, if you don't want the default choice to be on take output Q2.

the diode is not really needed as CD series have diode input protection / voltage clamps.
But to be on the safe side and it's a cheap part.
Cd4017 - groupdiy.jpeg
 
Many thanks for all the suggestions. I decided to go with the small MCU solution because one 8 pin chip can do two push buttons and the logic between the two.

Cheers

Ian
 
Suprised that there aren't any off the shelf switches like that...

I know what you mean. But I think it's the case that nearly all products using this type of switching will have a microcontroller that can handle this. And it's a lot more economic to do it that way. And if no micro then it's easy enough to handle in hardware. Basically small market for switch with this integrated and so high cost.
I wouldn't be too surprised if there is something available in say industrial automation control (eg DIN rail application) but I doubt it for small panel mounting switches.
 
For 2 switches - use CD4098B (dual monostable) and CD4013B (Dual D-type latch) - 2 chips plus, a couple of timing resistors and caps plus a RC for power on reset - job done.
 
For 2 switches - use CD4098B (dual monostable) and CD4013B (Dual D-type latch) - 2 chips plus, a couple of timing resistors and caps plus a RC for power on reset - job done.
I agree. All the simple roggle circuits will work but for the two switches I want to use and the logic between them (one is for Solo and one for Mute) you would need at least two 14 pin devices. A single 8 pin MCU will do the whole job.

Cheers

Ian
 
I know what you mean. But I think it's the case that nearly all products using this type of switching will have a microcontroller that can handle this. And it's a lot more economic to do it that way. And if no micro then it's easy enough to handle in hardware. Basically small market for switch with this integrated and so high cost.
I wouldn't be too surprised if there is something available in say industrial automation control (eg DIN rail application) but I doubt illuminated version of it for small panel mounting switches.
There are plenty of big chunky industrial illuminated push button toggle switches but they are mnot only big but they are all very expensive. The only viable alternative is the illuminated versions of the ALPS SPUN type latching push buttons but these are not readily available. I could always use a regular SPUN with a separate LED.

Cheers

ian
 
1665248714413.png

CD4044

one chip that can handle 4 instances and 8 buttons.
up to 18V.

Texas instruments Little Logic (smaller than DIP 8) but requires a transistor + resistor to create NOT or inverting gate.
https://www.ti.com/lit/gpn/SN74LVC1G79
https://www.ti.com/lit/ds/symlink/sn74lvc1g79.pdfSN74LVC1G79DBV SOT-23 (5) 2.90 mm × 1.60 mm
SN74LVC1G79DCK SC70 (5) 2.00 mm × 1.25 mm
SN74LVC1G79DRL SOT (5) 1.60 mm × 1.20 mm
SN74LVC1G79YZP DSBGA (5) 1.14 mm × 0.91 mm

74*2G79 (DUAL version)

https://www.ti.com/lit/ds/symlink/sn74lvc2g79.pdf
 
Many thanks for all the suggestions. I decided to go with the small MCU solution because one 8 pin chip can do two push buttons and the logic between the two.

Cheers

Ian
The big advantage is that you can make the switch latching or momentary depending on the length of pressure. Quite useful for PFL or mute.
 
That is an interesting idea. How long would you suggest the hold time should be before latching?

Cheers

Ian
First time I was aware of such a feature was with RTS intercom belt-packs. Typically 0.5s of continuous pressure resulted in non-latching mode. It takes a little time to get used to it.take advantage of it.
 
As I said, there is additional logic required to handle the interaction between Solo and Mute. This requires a quad NAND gate so its still two chips.

Cheers

Ian
don't understand!

it's a SET and RESET ic.



Ben Eater (1.655.520 views)

(Ben Eater is awesome.)

these chips are much smaller than any DIP package, like the size of 2 pins of a DIP package and they are the conventional CD4000 / 74LS/HC/C... series ic's:
although max 5.5 volts and single units instead of 2, 3, 4, 5 or 6.

NXP tiny logic (guide).
https://www.nxp.com/docs/en/brochure/Logic-MicroPak.pdf
Texas Instuments Little Logic (guide).
https://www.ti.com/lit/sg/scyt129g/scyt129g.pdf
check them out.

I moved NXP to make them, they appeared after i mailed them and confronted them that Texas Instruments makes them.
 
Last edited:
Back
Top