Welcome to Solid State Guitar Amp Forum | DIY Guitar Amplifiers. Please login or sign up.

October 15, 2024, 03:24:58 AM

Login with username, password and session length

Recent Posts

 

Effects switcher - how to prevent engaging two patches?

Started by Miyagi_83, August 23, 2024, 09:29:30 AM

Previous topic - Next topic

Miyagi_83

Hi, everyone.
Firstly, I'd like to state that I wasn't sure where to start this topic because it's not exactly about an effects unit of any kind, but it is meant to switch effects, so here it is. If it's in the wrong place, I'd like to apologize and request that the Moderators move it somewhere proper. Thank you.

I've been thinking about building an effects switcher for my pedalboard to be able to turn on multiple pedals at the click of one footswitch. So, in search of ideas for selecting a given patch, I've found R. G. Keen's article at GeoFex and one by Rod Elliott, among others. Links here:
http://www.geofex.com/article_folders/fxswitchr/fxswitchr.htm
https://sound-au.com/project163.htm
Now, I'm wondering how to overcome the problem of accidentally engaging two (or possibly more) patches simultaneously if I wanted to build a CMOS-based controller. The way I understand R. G. Keen's design (schematic in question), if two footswitches are stomped on, two outputs of the 74HC373 go high, thus turning on two patches. The same is true for most designs provided by Rod Elliott (except the one built around the CD4017 Johnson counter and perhaps the one using SR latches).
I do understand that it'd be easier to use a microcontroller of sorts and make the code something along the lines of:

if input A is HIGH, output A is HIGH else LOW;

and duplicate it for other inputs.
However, I'd like to learn how to do that without turning to digital technology. I am also aware that it will add to the complexity of the circuit which will probably send me down digital path anyway. I'd like to learn nonetheless. Thanks for any suggestions, directions, and explanations.
Have a good one, everyone.
M.

Loudthud

First question, do you just want to select one of several loops of pedals, or do you want random combinations of several pedals ? The random combination thing is much more difficult unless you are using a micro-controller.

Next question, how many loops or combinations do you want or require ?

Miyagi_83

Hi, Loudthud.
The number of loops and their combinations would be done elsewhere. What I'm after here is a circuit for selecting a setting, a patch, as I've called it. You might call them channels, I guess. For example,

I press switch A, output A on the CMOS device goes high (whilst turning the other outputs low) and engages, for example, a transistor connected to, for example, a DIP switch assigned to this particular patch where I've selected, for example, loops 1,3,and 5.
I press switch B, output B goes high (the rest goes low), its corresponding transistor switches on the loops connected to it through a DIP switch where I've selected loops 2, 4, and 6.
And so on.
Does that make sense?
What I'd like to know is how to make the device activate only one of the outputs if, for example, I step on footswitches A and B at the same time, which might happen if the switch box is tight and / or your boots are big.

Loudthud

I didn't see my approach in either of the links you posted. My approach is to build S-R flip-flops from discrete CMOS gates. One of the problems to overcome with S-R flops is that asserting Set and Reset at the same time is really an illegal state. Not all chip manufacturers handle it the same way. My way involves multiple input gates on the Reset side so when you Set one flop, you Reset all the others. If you step on two or more switches, the last one to be released wins and only one output is Set. I think some of Mr Elliot's solutions solve that problem. My solution gets more complicated the more channels you need.


Miyagi_83

Thanks. Now I understand the reason why you asked about the number of loops and channels I need.

Miyagi_83

I just had an idea. How about an AND gate at the output performing some kind of reset when two or more outputs change their states to high? On the other hand, this could be a nuisance with many channels, for instance, if the user stepped on switches 7 and 8 and channel 1 got switched on 🤔

Loudthud

Another subtle problem to solve is switch bouncing where there can be noise across switch contacts that may trigger digital logic. Many circuits just place a capacitor across the switch contacts. Digital logic does not like slow clock transitions. The beauty of S-R flip flops is that you can Set it one hundred times and the output just changes state once. Same with Reset. I dislike circuits where they derive a clock signal by some passive circuit across all the switches. Too much to go wrong. The real digital engineers I've worked with would never use such a circuit.

Kaz Kylheku

I.e. you need your circuit to implement a radio buttons widget, not checkbox widget.  ;)

When you select one thing, the others get deselected.

This could be made somehow programmable. Each effect could have some toggle switch which enables it to be exclusive or not. Exclusive means that when something else is selected (or something else that is also exclusive), it turns off. Otherwise it stays on.  That's not fully general, because it doesn't express subsets (sets of radio buttons exclusive with each other, but oblivious of other sets of radio buttons). If we support two exlusive groups A and B, and a non-exlusive remainder group, we could assign each effect to A, B or off with a simple off-on-off switch.

Actually implementing it all is digital logic.

I would probably use a microcontroller for this, and write a 20 line C program or something.

Otherwise we can think about some capacitor-and-Schmitt-trigger thing to debounce the switches, after which a reset signal is asserted into the assigned exclusive bus, while at the same time, the signal to latch is sent to the preset associated with that button.

The set assignment switches could be DPDT. E.g. when you tie a switch to group A, what it means is that the switch connects to "reset request bus A" which goes to some piece of logic which generates the reset signal on the "reset assert bus A" when that button is pressed. At the same time, the DPDT switch also connects to the "reset assert bus A" for receiving the signal for that group.

If a unit gets both the set signal and the reset signal, we have to make sure set wins.




   
   
ADA MP-1 Mailing ListMusic DIY Mailing List
http://www.kylheku.com/mp1http://www.kylheku.com/diy

Miyagi_83

Quote from: Loudthud on August 23, 2024, 12:59:32 PMAnother subtle problem to solve is switch bouncing

If I were to use CMOS logic sensitive to contact bounce, I'd use a Schmitt-inverter-based circuit. I've tried it in the past with good results. Good for my needs, that is. Therefore, switch bounce isn't that much of an issue for me. Besides, the circuits implementing D-type flip-flops presented by Rod Elliott are immune from contact bounce, as he states in the article posted, so no biggie.

I had an idea that it might be useful to prioritize one input over another in some way and the circuit attached came to my mind. Two switches are presented, but perhaps it could be expanded further? So, as I see it, when one button is pressed, one HIGH signal is applied to one input on the controller of choice. When two buttons are pressed, the HIGH signal goes to the AND or NAND gate (depending on the component used in the blocking circuit) and breaks the connection between the bottom Schmitt inverter and its corresponding input, so only the top channel gets activated.
Does that make sense? Is it feasible?

QuoteI would probably use a microcontroller for this, and write a 20 line C program or something.

Yeah, and, quite likely, I'm going to do the same, but I like to learn, I like to know things.

Miyagi_83

I think I found it. Attached, you can find the diagram for my idea. It's based on a simple diode OR gate with inverters and it appears to be simpler and more effective than my previous idea. At least in my imagination :D
Could someone more knowledgeable than me take a look and tell me if it makes sense? Thanks in advance.

Loudthud

I think you need a resistor to ground on each of the last inverters on the right so the output can go high. Here's my circuit for 3 circuits.

You cannot view this attachment.

Miyagi_83

Quote from: Loudthud on August 24, 2024, 04:03:33 PMI think you need a resistor to ground on each of the last inverters on the right so the output can go high.

Thanks for pointing it out. Are the resistors necessary when the inverters' outputs are tied to a CMOS chip's inputs?

Loudthud

Just when all the input signals are going through diodes.

Miyagi_83

Quote from: Loudthud on August 24, 2024, 04:03:33 PMI think you need a resistor to ground (...)

Well, bless my heart (am I using this phrase correctly, Loudthud? ;) ), at first I thought you meant they should be from the output of the right-most inverters to ground, but then I brushed up on the diode OR gate thing and, boom, the cathodes of the diodes are tied to ground through a resistor in this configuration.
Again, thanks for pointing that out, sir.

Loudthud

Quote from: Miyagi_83 on August 25, 2024, 02:46:57 AMWell, bless my heart (am I using this phrase correctly, Loudthud? ;)

I'm not the best person to explain this, and sometimes phrases such as this do not translate well into other languages, but I'll give it a try.

Typically, the phrase would be 'Well, bless YOUR heart'. This would be used to express gratitude to another person for an act of kindness towards yourself, possibly unexpected. The degree of your gratitude would be somewhat above a mere 'Thank You' or 'Thank You very much'.