Maker Pro
Maker Pro

Help with LED circuit

I’ve modded a guitar amp by adding a foot switch that allows me to remotely select its 4 presets. The foot switch uses 4 momentary switches, each one in parallel with a momentary switch in the amp. The idea is to control the amp without having to visually monitor its status. I would like to add LEDs to the foot switch but being that the switches are momentary, I need a driver or dc voltage router that can activate the appropriate LED by latching a DC voltage, then releasing it when another switch is selected. I envision a one to one connection, i.e. switch 1 connectable only to output for LED 1 and so on. A circuit in between would latch a supply voltage until another switch/LED is selected. I’m looking for an IC that can be configured to do this but my inexperience has me struggling to figure this out or even identify a starting place. I’m happy to do the work if some one could point me in the right direction. Of course, collaborating on this would be great!
6091F557-AEA6-4431-B42F-A560CE69C132.jpeg
 
Last edited by a moderator:

bertus

Moderator
Hello,

You could use 3 MC14013 chips.
Each chip has 2 flip-flops.
Each flip-flop could be connected like this:
4013 toggle.png
Clock will be the momentairy switch.

Bertus
 

Attachments

  • MC14013B.pdf
    89.4 KB · Views: 3
What you are after is called a "radio button" circuit. This is an electronic version of the "bail" function in a bank of ganged switches. Press one, anything else that was pressed is released. Named for the tuning system on a (old) car radio.

Important details:
1. Power source(s) available for the circuit.

2. Signal level on the switches now. That is, what is the open-circuit voltage on the switch contacts before pressing?

3. Are the switches pulling a signal line down to GND, up to a voltage source (5 V, 9 V, whatever), or something else.

A schematic of what the switches are connected to now would be of great help.

I assume that the switches now are SPST. Any chance of replacing them with DOST or DPDT? This would let the switch control both the pedal and the LEDs without any connection between them, possibly messing up the pedal action.

ak
 
Bertus, AnalogKid, thanks for the info! The term "radio buttons" really helped me narrow things down. I found a circuit that uses only 2 ICs and a filter cap. I'll likely use a wall wart for power. I'd be curious to know what you think.
RadioPB (2).GIF
My foot switch connection to the amp. I'm using RJ45 panel mount connectors with Cat5 cable between the amp and the foot switch.
pcb wide low.jpg under switch low.jpg cabled low.jpg
 
Last edited:
A wall wart has a fully-isolated output, so that should eliminate grounding problems between the LED circuit and the amp circuits. But it doesn't eliminate all problems. Still need to know the open-circuit voltage across un-pressed switch contacts. For each switch, was either pin connected to the ground plane surrounding all pins? In your photo, the soldered wires obscures this.

For each switch pin there are three options: connect to a trace on the visible outside layer, connect to a trace on some other layer, or connect to the ground plane. for a connection to some other layer, there will be a round or square pad completely isolated from the surrounding plane, like having a little moat around it. For a connection to the ground plane, there probably will be 2 to 4 little bridges across the moat. This technique is called a thermal relief pad. It makes an electrical connection to the plane without the large thermal mass of a 360 degree connection that affects the soldering process. Sure would be nice to know what's under the wires.

That is a strange way to achieve a radio button circuit. Also, the circuit has no switch de-bouncing, so the activated output might not stay on when the footswitch is released. More on that later ...

ak
 
Last edited:
Still need to know the open-circuit voltage across un-pressed switch contacts. For each switch, was either pin connected to the ground plane surrounding all pins? In your photo, the soldered wires obscures this.
ak

Point A shows 3.3v to point B as well as to the chassis. But, point B doesn't show continuity with the chassis. Point C to D shows 3.3v. NOTE: The diagram in post 5 is inaccurate.
RJ45 foot switch.jpg

Pic of the pcb before the foot switch mod.
switches clean.jpg
 
Background:

All radio button circuits have two elements in common - a latch (1 bit for each switch input) and a signal based on all of the switch inputs OR-ed together - one signal that goes high whenever *any* switch is pressed. This can be done with resistors or diodes.

One approach is to have a multi-bit latch like a 4-bit or 8-bit part with a common clock input. Each switch signal goes to one input, and the common signal drives the clock input. the idea is that any time any button is pressed, the latch stores the status of all switches. In theory, only one switch signal will be a 1 and all other signals will be 0's.

The other approach is to have a 1-bit latch for each switch, like a set-reset flipflop, and the common signal goes to all of the reset inputs. The idea is that the common signal makes a short pulse, shorter than the minimum time the switch will be pressed. So very quickly, all ff's are reset and then one of then still has a set signal. A variation of this puts a short R-C delay network in series with each set input and no pulse-former on the reset signal. Now the reset signal is high as long as the switch is pressed. When the switch is released, the reset signal goes low immediately, and one ff's set input goes low a few milliseconds later, leaving that ff in the set condition. With CMOS parts, the R-C delay network can be just a high-value resistor, using the gate's input capacitance for the C.

That's the theory. Several people on these forums have done one or both methods in the past. I tend toward the first approach because you can get an 8-bit patch with relatively high-current output transistors in a single package. This can eliminate driver transistors for the LEDs, depending on their current req.

ak
 
Background:

All radio button circuits have two elements in common - a latch (1 bit for each switch input) and a signal based on all of the switch inputs OR-ed together - one signal that goes high whenever *any* switch is pressed. This can be done with resistors or diodes.

ak

Thanks again ak. Some of this is making sense. I’m a guitar builder and just a hobbyist with electronics so I appreciate the info you’ve provided. Here’s a circuit that appears to be what you’re describing as a basic radio button design. I’m thinking 4069s. They support a wide range of input voltages but I’m not certain they’ll handle 20mA for a red LED.

Thoughts? Type of diodes to use?

https://www.simplecircuitdiagram.com/2399-radio-buttons-using-push-on-switch-latching-circuit/

981FD84F-DADB-40C3-A644-B63AE65733B9.gif
Guitarnut
 
What you show is a version of the second approach. I've seen this sch before and am not wild about it. The latches are set and reset by briefly overpowering an output with 100 ohms to the positive power supply. I'm working on a version of that that does not abuse the parts.

I started this response last night but forgot to finish and send it. Here is something from last year that illustrates the first approach. R2 and C1 delay the latch command to let the switches stop bouncing and present clean signals to be latched. AC series CMOS has an output stage rated for 24 mA per output, which should be enough to see the LEDs under stage lighting. If not, the latch sections can be paired up for lotsa current.

ak

RadioButtons-8-1-c.gif
 
Last edited:
Thanks again AK. This looks very manageable for me. I took a pass at a component layout. Would you mind checking my work?
led driver layout.jpg
 
I found several mistakes in my layout above in post #11. For instance, I misidentified pin 11. :) Anyway, I have all of the parts in to build a prototype, but I just haven't had any luck soldering those small pads on a perfboard. So, I have some 170 point breadboards coming in this week. I redrew the circuit to work on this platform. It's a little more challenging to do a layout on breadboards because of all of the mini buses but I think I got it figured out. The Xs are pins that I'll need to snip/bend on the IC socket and resistor network. Any input much appreciated.

radio buttons breadboard layout.jpg
 
You are using an American 2Nxxxx transistor but you are wrongly using the European BCxxx pin locations.
 

Attachments

  • 2N4403.png
    2N4403.png
    12.2 KB · Views: 1
Last edited:
The transistor wired backwards might have been damaged a little since its Absolute Maximum allowed reverse-biased emitter-base is only 5V.
 
A little issue with my switches. These are supposed to be DPDT Momentary, which to be honest, I've never heard of previously. The issue is the state of the switch never changes. Pins 2 & 3 on one side and pins 1 & 6 on the other always show continuity even when the switch is pressed. 4 & 5 never connect when the switch is pressed. Am I missing something or did I get bad switches?

DPDT Momentary.jpg
 
Manufacturer / vendor / part number / website for the switch?

If it were me, I'd have enough spares that I could open up one and see the innerds.

Make up a 6x6 truth table showing the various connections pressed and unpressed. A pattern should emerge.

ak
 

Harald Kapp

Moderator
Moderator
If it were me, I'd have enough spares that I could open up one and see the innerds.
Second that.
Make up a 6x6 truth table showing the various connections pressed and unpressed.
Good to analyze a working switch. But: with 2-3 and 1-6 always connected and 4-5 never connected this table is becoming rather small. However, read on...

@Guitarnut may have measured incorrectly.
These are supposed to be DPDT Momentary,
This means that the switch will have one connection in the resting state and another connection in the active state. It does not mean that the switch changes between two connections each time it is toggled.
Your description sounds like you assume the following function:
Switch connects e.g. 2-3, after toggling 3-4 should be connected. This is not the case. The magic word here is "momentary". While 2-3 are connected in the resting position of the switch, 3-4 are only connected momentarily while the switch is being toggled/pressed. You have to measure the connection at this time. After release, again 2-3 will be connected.
My guess is that last one is which you measured.
 
This means that the switch will have one connection in the resting state and another connection in the active state.
.
Thanks. Well, that being said, it's the wrong config for what I need anyway. I have 2 circuits that I need to trigger momentarily with a single footswitch. The only DPST momentary switches I've found are too light weight for the application.
 
Top