Searching an intelligent 4 input selector box

Started by Elijah-Baley, December 07, 2024, 04:04:16 AM

Previous topic - Next topic

Elijah-Baley

Hello!
After an AB box to plug two guitars, a friend of mine, would like an... ABCD box! Four guitars, at least. Better if there is a stereo output, I still don't know if I can do it isolated or not.

He want a footswitch version and I'm searching some schematics.

I found this one:



It's ok, but maybe not so smart as I wanted. I still have to figured out the diagram about it.

I would like to have a schematic with one footswitch with a sequential selection of the 4 input (or 5 input!), of course with one LED for each input.

Then I found this one:
https://www.mikehillservices.com/webshop/switching-pedal-shop/a-b-c-d-guitar-switcher-input-switching-pedal-4-in-1-out/

I need a larger box, but could be nice.

Do you have some good projects?
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

ElectricDruid

At the point at which you get to four inputs, you're looking at either solid-state or relay-based switching. The footswitches become simple SPST buttons which act as controls, rather than being part of the switching path themselves. You could do the control circuit with something like a 4017 decade counter. You keep pressing the button, and it moves to the next input, turning off the previous input. That'd be good for up to ten inputs!

The circuit wouldn't need to be too complicated either - just a debounced footswitch to clock the 4017, the 4017 for the control, and some relay drivers.

If you want more flexibility, you start getting into Arduino or some other microprocessor to do the control. Then you can have whatever control system you can dream up.

Elijah-Baley

Thank you, ElectricDruid.
I guess something like 4017 could be enough. But is kind of new for me, I have to find some good schematic for my purpose.
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

RickL

It can be done completely mechanically. Divide your inputs into two groups (A/B and C/D). Switch 1 selects either A/B or C/D. Switch 2 selects either A or B and switch 3 selects either C or D. LEDs can indicate which group has been selected and which input within that group has been selected.

Using the same principle this could be expanded to 8 or 16 inputs. Or, with less efficiency, 5, 6 or 7 inputs. For the 5 input example you would have 3 sub-groups (A/B, C/D and E). Switch 1 selects between the group of A/B and C/D or just E. Switch 2 selects either A/B or C/D, switch 3 selects either A or B, switch 4 selects either C or D. In this case you would presumably use input E as the input you used most often because it could always be accessed by a single button press.

Elijah-Baley

Yes, mechanically can be done, somehow. For example, like you just said.
Meanwhile, I was looking at this: https://paulinthelab.blogspot.com/2014/05/1-of-4-guitar-instrument-selector.html

It could be the one I'm searching. Just one footswitch to pass in order from Input A to input D.
I just need to understand if I can add one input more, what happen if I don't plug one or two guitars, if I can set it un-switched, somehow, looking at the datasheet of the CD4017 and the CD4066.
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

ElectricDruid

Quote from: Elijah-Baley on December 07, 2024, 01:20:00 PMMeanwhile, I was looking at this: https://paulinthelab.blogspot.com/2014/05/1-of-4-guitar-instrument-selector.html

It could be the one I'm searching. Just one footswitch to pass in order from Input A to input D.
I just need to understand if I can add one input more, what happen if I don't plug one or two guitars, if I can set it un-switched, somehow, looking at the datasheet of the CD4017 and the CD4066.

You'll notice that on that schematic the Q4 output of the 4017 is connected back to the Reset input, so the counter cycles around 0-1-2-3-0-1-2-3-etc. You can move that reset to any of the ten outputs, so you can have it cycle through as many or as few as you need. There's no way to blank all of the outputs of the chip, so you can't turn everything off without adding something else - one of the outputs will always be on / one of the channels will always be selected. You could add further 4066 chips to add more inputs if required. There's four SPST switches on each 4066, so two chips gives you up to eight inputs.

I don't like that schematic much, I'm afraid. There's no DC conditions set for the 4066 at all. The inputs and outputs are both connected via DC blocking caps, but the chip doesn't have any DC level set either. You should read RG's page about CMOS switching to improve that:

http://www.geofex.com/Article_Folders/cd4053/cd4053.htm

The page deals with the 4053 triple SPDT switch, but the 4066 quad SPST is basically the same thing. The important part here is the details about getting the DC biasing of the switches right, and coupling the signals in and out with capacitors (the schematic you found does that part right, at least).

HTH

Elijah-Baley

Let me see if I got it. 8)
In this schematic I could add two 1M (or 2.2M) one across the ground and one across 9v after (or before?) the input cap for any "channel"?
And... a 1M across the ground at the output of the buffer?

«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

R.G.

As Tom says, you will want to bias the signal pins of the CD4066 to half its power supply. From my own experience, it will almost certainly pop when you change signals.

I strongly recommend that you make a 10K/10K bias divider with a filter cap to ground, then run a 1M or so resistor from 4066 pins 1, 2, 3, 8, and 10 to the bias voltage, and also from pin 2 of the TL081.

The 10M/10M bias resistors on the TL081 will add excess thermal noise.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ElectricDruid

Quote from: R.G. on December 09, 2024, 06:48:17 PMalso from pin 2 of the TL081.
You mean pin 3, RG. I know you know that.

But yes, otherwise...Do what the man says! Set up a nice bias supply with a 10K/10K voltage divider and (say) 22uF to Ground. 1M resistors from the 4066 inputs to ground, between the chip and the caps. Same again on the output, 1M to bias. Remove the two 10M resistors on the TL081 and replace with another 1M to the bias.

For bonus points / to save a few parts, you might be able to connect the 4066 output directly to pin 3 of the op-amp (no cap) so they only need one 1M to the bias supply. Try it and see.

It might also be possible to drop D1/R1/C6 and just connect Q4 direct to the Reset input. I've certainly seen sequencer circuits that do this, so it should be ok. The way it works is that the Q4 output goes high, so then the Reset goes high too, the counter resets to zero, at which point Q4 goes low again. And this is all over in nanoseconds!

HTH

Rob Strand

Quote from: ElectricDruid on December 09, 2024, 07:56:05 PMBut yes, otherwise...Do what the man says! Set up a nice bias supply with a 10K/10K voltage divider and (say) 22uF to Ground. 1M resistors from the 4066 inputs to ground, between the chip and the caps. Same again on the output, 1M to bias. Remove the two 10M resistors on the TL081 and replace with another 1M to the bias.

For bonus points / to save a few parts, you might be able to connect the 4066 output directly to pin 3 of the op-amp (no cap) so they only need one 1M to the bias supply. Try it and see.
A single Vref like that is the best way to avoid pops.

Quote from: ElectricDruid on December 09, 2024, 07:56:05 PMIt might also be possible to drop D1/R1/C6 and just connect Q4 direct to the Reset input. I've certainly seen sequencer circuits that do this, so it should be ok. The way it works is that the Q4 output goes high, so then the Reset goes high too, the counter resets to zero, at which point Q4 goes low again. And this is all over in nanoseconds!

As is the circuit does two things:  It resets off Q4 however it is using R1 and C6 to provide a reset pulse at power up so it doesn't start in a random state.

The thing that catches my eye is the 4017 is powering the LEDs and the controlling 4066. Good idea to check of the output swings high enough for the 4066.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

Quote from: ElectricDruid on December 09, 2024, 07:56:05 PMYou mean pin 3, RG. I know you know that.
DOH!!! Yeah, what he said!

Quote from: Rob Strand on December 09, 2024, 08:45:58 PMThe thing that catches my eye is the 4017 is powering the LEDs and the controlling 4066. Good idea to check of the output swings high enough for the 4066.
Yeah. The LED is a big load for an unbuffered CMOS gate. It might be possible to eagle-eye the datasheet for the 4017 and a high efficiency LED and get away with it. Even simpler conceptually to just hang a CD4049 on the outputs for LED driving. The TI sheet for the 4017 seems to imply that something over 1.5ma will start dropping off the output voltage.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ElectricDruid

Ok, I think I've made all the tweaks everyone has come up with. It's turned into a very collaborative project!



If anyone spots anything else, please shout.

Elijah-Baley

Thanks for your answers.
I will try to follow all your little tips!

But I had to work on veroboard, I didn't want anything too large. Is the CD4069 really necessary?

Meanwhile, I'm working on the layout based on the paul in the lab's one with this mod.
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

ElectricDruid

Quote from: Elijah-Baley on December 12, 2024, 09:16:39 AMIs the CD4069 really necessary?
That depends how much LED current you draw if you connect the LEDs direct to the 4017 outputs like Paul-in-the-lab does. If you draw too much, the voltage will get pulled down so much the 4066 won't switch properly, or you'll fry the 4017 output stages. They weren't really designed to drive LEDs. It'd be sensible to read the datasheet for the particular 4017 chip you're using and see what output current it can provide (mA), and what power dissipation the chip can tolerate without burning up (mW).

That said, if you use modern LEDs (which give lot of light for not a lot of current) you can probably drop it. Alternatively, you could use four transistors to drive the four LEDs instead. But that doesn't seem like much space gain to me.

Good luck with it.

Elijah-Baley

I'd like to know something more about the current draw, the risk, and see if I can use it in a safe way.

I'm finding a lot of schematics, projects, PCBs with just a 4017 and LEDs.

https://www.ti.com/lit/ds/symlink/cd4017b.pdf?ts=1733953480648&ref_url=https%253A%252F%252Fwww.google.com%252F

Is it good to know this?
«DC INPUT CURRENT, ANY ONE INPUT..............±10mA»
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

Elijah-Baley

Hello,
I drawn a veroboard layout, starting from the original paulinthelab one, but heavily based on the ElectricDruid's schematic. :)
The layout (UNVERIFIED and still to check it out well!) is 22 x 18.

So, looking at the ElectricDruid's schematic, there's just some changes. I kept the input caps 1uF and the 10uF output, to avoid any low end cut. I reduced even R4 560R to 100R, for a little bit more transparent signal.
I guess all these changes make a tiny difference.
Another change is about the biasing of the TL071, not for my choice, but due to the layout design. Two 2.2M resistors on the 9v and on the ground. I think that is ok (or even better?).

Next challenge is try to set the reset of the CD4017. I'm not sure if that is possibile, but I'd like to make it automatically using switched jack.
Of course if you need this box you have to use at least two guitars, and I want to make something to alternate only the first two input if you use two of them, or three input if your use three, or four input if you use all four.
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

FiveseveN

Quote from: Elijah-Baley on January 03, 2025, 04:05:48 AMI'm not sure if that is possibile, but I'd like to make it automatically using switched jack.
Yes but you'll need a couple of AND gates and the two spare inverters. And it will only work if you plug the guitars in sequentially. I.e. if you only use two inputs but they're A and C it will act as if you're using 3 inputs.
At some point a microcontroller makes more sense than all of this discrete logic, particularly if your goal is to keep it small. It could for example identify which inputs are used as well as how many, and only switch between those. It could recall the last state at power up, you can reprogram it to behave differently without changing the hardware etc.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

Elijah-Baley

Ok, thanks.
This thing is becoming a bit complicated if I need a lot of stuff.

What about a microcontroller? I don't know if that is out of my skill. What I need?
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel

FiveseveN

Do you have any experience at all with writing code (ideally C)? The Arduino landscape is aimed at beginners and there are a lot of resources for all levels. But how fast you can get where you're headed depends of course on where you're starting from.
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

Elijah-Baley

Non experience with programming.
I still like to build analogue stuff and I don't have watched anything about arduino, but one of this days...  ;D
«There is something even higher than the justice which you have been filled with. There is a human impulse known as mercy, a human act known as forgiveness.»
Elijah Baley in Isaac Asimov's The Cave Of Steel