3 channels from 2 footswitches - Sanity check (think I figured it out)

General discussion area for tube amps.

Moderators: pompeiisneaks, Colossal

Post Reply
Snicksound
Posts: 116
Joined: Sat Apr 04, 2020 5:08 pm

3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by Snicksound »

So I need the ability to shunt 3 specific nets to ground based on a standard off the shelf 2-button footswitch.
Switch 1 - Overrides everything and gives me the Clean channel (Channel 1) when the light is on (and thus the switch is "open")
Switch 2 - Selects between Channel 2 and 3 (selection makes no difference as long as Channel 1 is engaged, but it's pre-armed if you will, LED still stays lit on the switch if Channel 3 is ready to go)

I have to admit, I let Gemini help me with some of the brainstorming, because this is out of my wheel house. I've figured out how to control relays from transistors (there will be as much as 5 relays + 2 optocouplers active at once, don't want to send that through the footswitch), but creating what are basically logic gates was a first.

So here's what I have:
Screenshot 2026-08-14 215021.png
The 330R resistors are already in the footswitch, just put everything in the schem to help.

It can get confusing fast, because a LED turned on means the switch is open. But here goes
SW1 light turned on = Channel 1 override:
- Qa ON
- Qa2 OFF (base grounded through Qa)
- Qmaster OFF (neither Ch2 or Ch3 can see ground)
- Qch 1 ON (Qa2 collector at 12V)
- Channel 1 is active!

SW1 closed
SW2 light turned on = Channel 3
- Previous scenario is flipped so Qch1 is OFF while Q master is ON
- Qb ON, therefore Qb2 and Qch2 OFF
- Qch3's ON
- Channel 3 is active

SW1 closed
SW2 closed (no light at all)
- Top part stays the same
- Qb ON, which turns ON Qb2 and Qch2
- Qb2 on turns OFF Qch3
- Channel 2 is active
You do not have the required permissions to view the files attached to this post.
nuke
Posts: 667
Joined: Tue Sep 17, 2024 6:59 pm
Location: Silicon Valley

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by nuke »

This is easier if we start from the beginning and define the desired behavior and map it out logically.

You've got two switches, which equal 2-bits of logic.
From 2 bits of data, you can get four conditions:

0 + 0 = A
0 + 1 = B
1 + 0 = C
1 + 1 = D

What this tells us is that with two switches, we can have four states.

Define what you want your amp channel selection to do in each of these four possible states.

The logic term for this kind of thing is a "2 to 4 decoder". This means it takes two bits of data in, and outputs out of the 4 outputs as high and the rest low. This is also sometimes called a "one-hot". Sometimes this is also called a demultiplexer, or "demux".

Fortunately, there are 2 to 4 decoder chips, which simplify your work a heck of a lot. They're cheap and easy to use too.

Some common 2-4 decoders are 74xx139 and the CD4555 and CD4556.

The 74xx139 are 5V supply, where the CD4555 is CMOS. CMOS can work with up to a 20V power supply, so its a good choice for your 12v available power.

A CD4555BE is less than $1.50 in 16-pin through-hole DIP. A lot cheaper in SMD if you can build with that. The CD4555 outputs a "high" on the pin selected by the two bits input. There's also a CD4556 that outputs a "low" on the selected output pin.

What's cool, is you even get two of these decoders in the same package. Only need one decoder in your circuit, so no big deal to leave the other decoder unused.

Datasheet link:
https://www.ti.com/product/CD4555B
Snicksound
Posts: 116
Joined: Sat Apr 04, 2020 5:08 pm

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by Snicksound »

nuke wrote: ↑Sat Aug 15, 2026 6:56 am This is easier if we start from the beginning and define the desired behavior and map it out logically.

You've got two switches, which equal 2-bits of logic.
From 2 bits of data, you can get four conditions:

0 + 0 = A
0 + 1 = B
1 + 0 = C
1 + 1 = D

What this tells us is that with two switches, we can have four states.

Define what you want your amp channel selection to do in each of these four possible states.

The logic term for this kind of thing is a "2 to 4 decoder". This means it takes two bits of data in, and outputs out of the 4 outputs as high and the rest low. This is also sometimes called a "one-hot". Sometimes this is also called a demultiplexer, or "demux".

Fortunately, there are 2 to 4 decoder chips, which simplify your work a heck of a lot. They're cheap and easy to use too.

Some common 2-4 decoders are 74xx139 and the CD4555 and CD4556.

The 74xx139 are 5V supply, where the CD4555 is CMOS. CMOS can work with up to a 20V power supply, so its a good choice for your 12v available power.

A CD4555BE is less than $1.50 in 16-pin through-hole DIP. A lot cheaper in SMD if you can build with that. The CD4555 outputs a "high" on the pin selected by the two bits input. There's also a CD4556 that outputs a "low" on the selected output pin.

What's cool, is you even get two of these decoders in the same package. Only need one decoder in your circuit, so no big deal to leave the other decoder unused.

Datasheet link:
https://www.ti.com/product/CD4555B
That's amazing thank you. That's why I prefer talking to humans hahaha, you don't know what you don't know so it's harder to figure out things that you've never done before.

So this CD4555BE, yes, simple way to process the signal from my footswitch. If anything, it makes the schematic much simpler to understand! And less chance of screwing up the PCB layout and having to start over again (on a 12" long board, that would suck).

Now, I ran into a couple issues: with the 12V supply, it would require 8-9V or so on the A/B pins to register, and because of the LED and the resistor built into the footswitch, I can only get about 5V. So I kept the first two transistors that will allow going to near 12V on the "high" state. This flips the switch state so just have to properly map out the outputs accordingly. e.g. Channel 1 now needs to be active whenver Pin A is "low" instead of "high".

Next problem was... The outputs will not drive the 2N2222A transistors hard enough for the current required (as many as 5 relays and 2 optocouplers).
This could be achieved by putting additional transistors in front, or going with MOSFET, but then I found out about these darlington arrays that are designed specifically to drive relays! Hurray!

Send the CD4555BE outputs to an ULN2003A and voilà!
(ULN2003A will drop about a volt, but it's okay cause my 12VDC will actually run a little high as it's unregulated)

Am I crazy or does that work perfectly?
Screenshot 2026-08-15 162354.png
You do not have the required permissions to view the files attached to this post.
Snicksound
Posts: 116
Joined: Sat Apr 04, 2020 5:08 pm

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by Snicksound »

For fun, this is what I'm planning for the "12V" supply (that will only be used for switching and panel LEDs)

Basically, a delon voltage doubler from the unused 5VAC tap. I used to do this then regulate down to 5VDC for relays, but realized I was getting 12V+ before the regulator and said regulator would get really hot (I'd just mount it to the chassis so it could dissipate its energy). Something I picked up from Ceriatone. It worked well when I was only using 2-3 relays at most.

Now, realizing I don't really need regulation for relays, this seems like it would work.
5VAC is 7.07V peak, minus the diode drop that's 6.37VDC. In a doubling configuration that's 12.74VDC!
Given that mains voltage is almost always above 120VAC, more like 13.2-13.3VDC.
Hence R72 which allows me to put an extra filtering node for super clean DC.
8.2 was calculated to get back to approximately 12VDC even when mains are just at 120VAC.

Not enough headroom for regulation, but enough headroom for the relays to stay on even when driven through the Darlington array.
Screenshot 2026-08-15 163429.png
You do not have the required permissions to view the files attached to this post.
nuke
Posts: 667
Joined: Tue Sep 17, 2024 6:59 pm
Location: Silicon Valley

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by nuke »

I usually regulate the 5VAC rectified/doubled winding down to something stable. 9V regulators are standard stuff, you can make them a little higher with a diode on the ground pin, for instance if you want 11v. It's nicer when you have logic chips involved, if the power supply has some regulation on it of some kind. CMOS are frequently used on battery power, so they work as long as the power is relatively stable in the short time.

When faced with a logic problem, engineers are taught to define the problem first, then do the analysis and boolean algebra to arrive at the solution to implement in circuitry.

If you go back to the table above, instead of A, B, C, D, write in the desired amplifier channel selections you want.

Then we'd work back from there.
flemingmras
Posts: 111
Joined: Sat May 02, 2026 5:07 am

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by flemingmras »

Throw it all on a microcontroller with a ULN2003A as the final driver. Then you can add MIDI switching support. Atmel ATmega328P could easily handle this, which you could easily code with a Arduino UNO R3.
User avatar
chief mushroom cloud
Posts: 441
Joined: Tue Jan 18, 2005 5:42 pm
Location: Peenemunde CA

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by chief mushroom cloud »

Would this work for you?
It's just a 3PDT and a DPDT footsw w/ leds and led current resistors.
Basic Footswitch Rev1.pdf
You do not have the required permissions to view the files attached to this post.
Don't overthink it. Just drink it.
Snicksound
Posts: 116
Joined: Sat Apr 04, 2020 5:08 pm

Re: 3 channels from 2 footswitches - Sanity check (think I figured it out)

Post by Snicksound »

chief mushroom cloud wrote: ↑Mon Aug 17, 2026 3:22 pm Would this work for you?
It's just a 3PDT and a DPDT footsw w/ leds and led current resistors.
Basic Footswitch Rev1.pdf
The point is really to use an off the shelf Apex ASFS2 dual button footswitch, because a touring guitarist can pick one up literally anywhere in Canada at any Long & McQuade. Should it fail on the road, easy replacement! And uses a basic TRS cable.

The decoder chip suggestion above works perfectly for the need. Along with the Darlington array to control the relays, the need is met.

Just need to place an order and breadboard this now.
Post Reply