I'm building a multimode analogue filter for a synth project I am working on. I've been following some schematics I found in the wild.

The project is working nicely on the breadboard so far but I have to use a mechanical SP4T rotary switch to patch any one of my 4 outputs (Notch, HP, LP, BP) to my audio output.

I'd like to do away with the rotary switch and replace this with a single momentary push button. Each press of the push button will switch to the next output and keep going for every push. I would then use 4 LEDs to indicate which output was in use.

I'm reasonably new to all of this and really must read up on my logic IC's and their applications.

I'm thinking this would be done with an octal latch maybe? Any ideas?

  • \$\begingroup\$ Please post the schematic, or a link to the schematic. From your description, it sounds like the mechanical rotary switch might be connecting analogue audio signals, not digital logic signals. In which case logic gates will not work. Have a search for analog (or analogue) multiplexers. We can probably understand a schematic enough to be clear. \$\endgroup\$
    – gbulmer
    Commented Sep 13, 2014 at 3:45

2 Answers 2


If your circuit runs from +5 only your signals must be between 0 and 5V, right?

If so, the easiest way might be to use a 74HC4066 + a 74HC4017 + a 74HC132 (to debounce the pushbutton and for reset). You can use 4 low-current LEDs and a single resistor to indicate which output is currently active.

The 5th output (Q4 if they're numbered from 0) goes to the reset input so that it only counts from 0..3 (for four outputs).. if you feed it through two of the remaining three gates, you can use another RC to reset the counter to 0 at power-up.

  • \$\begingroup\$ Sorry to literally duplicate your whole answer in my comments to @BradHolland. I was responding before I had even scrolled up to see that there was an additional answer to this question. \$\endgroup\$ Commented Sep 13, 2014 at 12:48
  • \$\begingroup\$ @MichaelKaras Great minds think alike (and fools seldom differ). ;-) \$\endgroup\$ Commented Sep 13, 2014 at 13:10

You do not want a octal latch. Instead what you want is an Analogue MUX.

A 4-1 Analogue MUX should do what you want. There are many options and factors to consider when selecting such a part. Some important ones are:

  • Is the analogue signal bipolar (i.e. swing above and below GND?
  • What is the peak voltage swing range of the analogue signal to be switched?
  • What power supply voltage is available to run this circuit?
  • What is the source impedance of the signal driver?
  • What is the load impedance the gets driven by the output of the analogue MUX / SWT.

You may want to look at the data sheet for a part called a CD4052 for a part that may work in your application.

  • \$\begingroup\$ thanks Michael I'm working with line audio level signals here. as audio is an ac signal i guess that makes it bi-polar, doesn't it? The circuit runs on +5v The cd4052 seems like a great candidate. However, looking at this the binary needed to select between 4 outputs would need two pushbutton switches, would it not? So I'd need some kind of binary counter IC aswell? \$\endgroup\$ Commented Sep 13, 2014 at 4:04
  • \$\begingroup\$ @BradHolland - These days most designers would use a low cost microcontroller to manage the selection of a MUX like this. This way they could have one switch that could be pressed in various ways to change the mux accordingly. For example a long press could return the selection back to the first setting. Short presses could advance the selection to the next setting. In your case since you want just one switch for four selections you would design a circuit to have the switch increment a binary counter. You will have to debounce the switch so that noise at contact closures (continued) \$\endgroup\$ Commented Sep 13, 2014 at 12:31
  • \$\begingroup\$ (continued from above) do not advance your counter more than one position. If you want to try something slightly different you could build your own MUX with a package of CD4066 analogue switches. This would give you four enables that need to be driven one at a time to select the channel. Then use a special type of counter called a Johnson Counter that sets one output active at each clock input. A CD4017 is one such counter that would accept your debounced switch input. To reduce the count sequence length of the CD4017 from 10 down to 4 you need to add some additional gates to (continued again) \$\endgroup\$ Commented Sep 13, 2014 at 12:41
  • \$\begingroup\$ (continued from above) reset the counter after the 4th output. (i.e. effectively tie the Q5 back to MR input). The johnson counter approach also makes it easier to get the four additional signals to drive your four LEDs. \$\endgroup\$ Commented Sep 13, 2014 at 12:43
  • \$\begingroup\$ With regard to your line level audio signals. If they are capacitor coupled or DC referenced to VCC/2 then the CD4052 should work for you off your 5V supply. \$\endgroup\$ Commented Sep 13, 2014 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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