Author Topic: 4066 switch bypass layout  (Read 874 times)

0 Members and 1 Guest are viewing this topic.

Fancy Lime

4066 switch bypass layout
« on: November 06, 2017, 12:11:31 PM »
Hi everyone,

I've been looking into moving away from mechanical true bypass switching with 3PDT switches. R.G. and Andrew have some really nice articles on how to do bypass switching with a multiplexer:
http://www.geofex.com/Article_Folders/cd4053/cd4053.htm
http://www.thetonegod.com/tech/switches/switches.html

Especially the CD4066 + CD4069 (or 4049) option with a momentary switch has minimal parts, seems easy and pretty damn useful. However, to my utter amazement I could not find layouts for this thing. Not that I mind doing it myself but if someone has done it already, why waste the time? Does anyone know a layout for these? Or better yet a source for complete little switching daughter-boards? I have a hard time believing this does not exist already.

Thanks,
Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

Fancy Lime

Re: 4066 switch bypass layout
« Reply #1 on: November 14, 2017, 03:08:38 AM »
Huh... guess I gotta do it myself, then. Just as well.

Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

Rob Strand

Re: 4066 switch bypass layout
« Reply #2 on: November 14, 2017, 03:42:23 AM »
Maybe look at Electroharmonix and DOD.

There was also one in the Washburn stack-in-a-box thread a while back, titles "anyone interested" or something.  I can't find the darn thing with the search.


Edit
I used google, Here's the thread,
http://www.diystompboxes.com/smfforum/index.php?topic=40651.0
the schematic roknjohn link is correct.  My schematic had a couple of bugs, which I explained in the text.
« Last Edit: November 14, 2017, 03:46:59 AM by Rob Strand »
The mind often distorts without gain.

deadastronaut

Re: 4066 switch bypass layout
« Reply #3 on: November 14, 2017, 04:15:38 AM »
subbed... interested in this, and the test results.  8)

http://www.youtube.com/user/100roberthenry
http://deadastronaut.wix.com/index
https://deadastronaut.wixsite.com/effects

^ SPACE PATROL FUZZ/ NANO-8 MIDI DRUMS /CHASM REVERB / TREMSHIFTER / FAZE FILTER/ABDUCTOR II DELAY pcb's + WAH LIGHT PLATES. and sausa

reddesert

Re: 4066 switch bypass layout
« Reply #4 on: November 14, 2017, 06:49:39 AM »
Stripboard layout for CMOS switching with the CD4053 + CD4013: https://www.parasitstudio.se/stripboard-layouts/cmos-switching

A more compact PCB layout for the Tonegod wicked switch with CD4093 + CD4066 is in this thread: http://www.diystompboxes.com/smfforum/index.php?topic=86949.0  This could be built on perf without needing to etch a PCB. I might try that.

ElectricDruid

Re: 4066 switch bypass layout
« Reply #5 on: November 14, 2017, 10:49:12 AM »
How does the 4066 compare with 4053 for this job?

4053 is "easier" in some ways because of the 3PDT format of the switch - just like what you're used to. Plus it has buffers of some type (schmitts?) on the logic inputs, so you can run the chip at 9V and still switch it with 5V logic. But that's the downside too - you can't use a RC filter to slow down the rise time (since the schmitt will switch when it switches just as fast). On the 4066 you have direct access to the something-vet's gates and can make it switch on slowly if you want.

Is this a significant difference? Does the 4053 click if the switching is instant? I notice R.G.s article is all using the 4053

Tom

Fancy Lime

Re: 4066 switch bypass layout
« Reply #6 on: November 14, 2017, 02:23:49 PM »
Hi Tom,

well my thinking behind going with a 4066 instead of a 4053 was that:
1) the 4066 seems more flexible and be used in more projects and may be easier to obtain and I wanted to make this a universal thing that everyone could use
2) we only need a DPDT switch since the LED can be operated separately, so 4066 is fine
3) we need an external Schmitt trigger anyway if we want to operate it with a momentary switch

But in fact the way I am planning it at the moment is to use two boards, one for the 4069 control and one for the actual switch 4053 to stack over each other. This way the actuator, momentary switch and the two boards stacked on top of each other (and held together by some means I have yet to define) take up almost exactly the same space as a typical blue 3PDT switch. In terms of incorporatability into many different projects, this seems the best format to me. And done like this, its totally modular, meaning the 4066 board can be replaced by a 4053 board, depending on what you have or want. I'll design the thing for both.

Cheers,
Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

R.G.

Re: 4066 switch bypass layout
« Reply #7 on: November 14, 2017, 04:36:26 PM »
The 4053 clicks - inaudibly, if you do the design right. The clicks can be down in the tens of microvolts with some care.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

blackieNYC

Re: 4066 switch bypass layout
« Reply #8 on: November 14, 2017, 05:00:35 PM »
Moving away from 3p2t switches?
Using a term said best by PRR, Why?

The logic and relay circuits made to get around 3p2t switches date from back sways when these switches were not as cheap.  They are laborious to build. They are much better suited to mass production than to DIYers.  If 100 out of 50,000 BigPedalCo pedals' stomps fail, they could get a bad reputation online. Just an almost arbitrary guess.
How bad can a switch be? I haven't broken one yet, but I'm just a hobbyist builder. What are these switches good for - 10,000 activations? 50,000? I really don't know, but I'll bet it's a long time. If I had a full time 9-5 job playing guitar, that's 2000 hours in a year. If I hit it ten times per hour ( 80 times each workday) that's 20,000 activations.
I walked away from the 3p2t a couple times - and came crawling back in the dirt, begging for its forgiveness. 
(Nice job. How much does it pay?)
http://29hourmusicpeople.bandcamp.com/
Thing Modulator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

R.G.

Re: 4066 switch bypass layout
« Reply #9 on: November 14, 2017, 11:45:59 PM »
Moving away from 3p2t switches?
Using a term said best by PRR, Why?
Sad experience.

Quote
The logic and relay circuits made to get around 3p2t switches date from back sways when these switches were not as cheap.  They are laborious to build. They are much better suited to mass production than to DIYers.

I would quibble with those statements. in my experience, a $0.50 CD4053 is still cheaper than a 3PDT, even when you add $0.25 of r's and c's. I can pop a 16 pin IC in a PCB with r's and c's and solder them up faster than I can cut and strip eight wires and solder them on both ends, even using my thermal stripping tool. Frankly, putting in one IC seems simpler and better suited to DIYers than wiring switches. But then, it's courses for horses, and all of this is just personal opinion.

Quote
If 100 out of 50,000 BigPedalCo pedals' stomps fail, they could get a bad reputation online. Just an almost arbitrary guess.
Yes, it is.

Quote
How bad can a switch be? I haven't broken one yet, but I'm just a hobbyist builder. What are these switches good for - 10,000 activations? 50,000? I really don't know, but I'll bet it's a long time. If I had a full time 9-5 job playing guitar, that's 2000 hours in a year. If I hit it ten times per hour ( 80 times each workday) that's 20,000 activations.
I do have the advantage of seeing enough pedals and switches to see what the failure rates actually are. The biggest single warranty and repair expense we found was replacing DPDT mechanical switches. What we found was that it doesn't help to tell a guitarist that the switches were good for a zillion operations if they were the one out of thousands who got the bum switch. That can be absolutely true, but that guitarist won't believe you. Pesky humans!

We also found that going to electronic switching and momentary contacts made our returns and repairs for footswitches so low that they just quit being a problem. This was one motivator behind going to lifetime warranties - we no longer had to replace mechanical stomp switches.

Quote
I walked away from the 3p2t a couple times - and came crawling back in the dirt, begging for its forgiveness.

Being unceremoniously dumped into the dust is a humbling experience. Hitting the dirt from a rough ride on analog switches is no reason to go crawling back to anything though. Here in Texas we have a saying: there's never a horse that couldn't be rode, and never a rider that couldn't be throw'd. Get up, dust yourself off, and get back on. You're smarter and more capable than either the mechanical switch or the IC.

R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

Rob Strand

Re: 4066 switch bypass layout
« Reply #10 on: November 15, 2017, 12:08:00 AM »
Here's the same circuit used in the Audioworks pedal (I mentioned above) but with a bit more explanation,

http://www.vagrearg.org/content/switchtoggle

I'm not overly fond of connecting switches to clock lines like this,

http://experimentalistsanonymous.com/diy/Schematics/Phasers/Danelectro%20Pepperoni%20Phaser.gif
« Last Edit: November 15, 2017, 12:11:59 AM by Rob Strand »
The mind often distorts without gain.

Fancy Lime

Re: 4066 switch bypass layout
« Reply #11 on: November 15, 2017, 05:35:12 AM »
Moving away from 3p2t switches?
Using a term said best by PRR, Why?

Hi blackieNYC
Well, why not? No, seriously, you are right: for my tiny prototype building operation it is completely unnecessary. I don't sell or use the pedals live and will likely never see a switch meet the end of its service life. If a switch ever did break I could just replace it without destroying my reputation with myself. Or buy super high quality switches, at my low numbers cost is not as much of an inhibiting factor as it is for commercial sellers. But some argue quite convincingly that electronic switching is better for some applications, like when you want to switch something many many times or by remote control. Or for production quality consistency (see R.G.'s comment). And I'm curious if it is indeed better for me, therefore I want to try it to see myself rather than relying on other peoples assessment, although I know full well that they know what they are talking about better than I do. Totally possible that I will end up abandoning it again, as you did. But I'm a firm believer in learning from mistakes and feel it's best to make the mistakes in public so others can learn from them as well ;) Plus, I just like to know a few different ways to do the same thing. Some people think it's weird that I don't walk the same way to work every morning but choose randomly from four approximately equally long paths. I just tend to find using the same one every day a bit boring.



Here's the same circuit used in the Audioworks pedal (I mentioned above) but with a bit more explanation,

http://www.vagrearg.org/content/switchtoggle

I'm not overly fond of connecting switches to clock lines like this,

http://experimentalistsanonymous.com/diy/Schematics/Phasers/Danelectro%20Pepperoni%20Phaser.gif

Hi Rob,

why aren't you? The Danelectro schematic looks interesting. If it is correct then it seems that a 4013 can directly control a 4053 (and presumably a 4066 as well) plus feed the status LED without the extra buffers that R.G. mentions in his article. Seems a bit too good to be true but if it does indeed work, then the 4013+4066 or 4013+4053 versions would need even less soldering and peripheral resistors than the versions using a hexinverter Schmitt trigger for flipflopping. Just the two chips. Weirdly enough I was unable to find another Danelectro schematic that uses the same switching scheme. I'm sure someone here must have tried this?

Andy
« Last Edit: November 15, 2017, 05:38:05 AM by Fancy Lime »
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

anotherjim

Re: 4066 switch bypass layout
« Reply #12 on: November 15, 2017, 06:02:34 AM »
Never fear driving a LED direct from logic. Full 20mA brightness isn't necessary. My experience with indicators tells me that the contrast between the light on & off against the background is a clue the brain spots very easily without the light being particularly bright. Use a LED colour that's a big contrast with its surroundings, and 2mA gives enough light to show the status. Pick hi bright LED's if you like more shiny rather than push more current.
Total package power dissipation comes into play, but you usually only have one LED to drive and other loads on the chip are usually negligible.

"So lets stay within the limit of sureness: lets consider the fuses you have available and lets see what you have to do to light them up..." Farfisa Partner 15 drum machine manual.

Fancy Lime

Re: 4066 switch bypass layout
« Reply #13 on: November 15, 2017, 11:40:42 AM »
How about the bounce? In R.G.'s version a transistor is making the up-shift for triggering the clock also working as a debouncer. In the Danelectro circuit this is done only by a, R-C pair. Probably needs to be tested if that works will all momentary switches or only with good ones with little bounce. If that works, then one 4013 plus two 4066 make a nice double switcher for a multi pedal. Either with two separate actuators or just one that cycles through all settings.

Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.

Rob Strand

Re: 4066 switch bypass layout
« Reply #14 on: November 15, 2017, 05:53:34 PM »
Quote
why aren't you? The Danelectro schematic looks interesting. If it is correct then it seems that a 4013 can directly control a 4053 (and presumably a 4066 as well) plus feed the status LED without the extra buffers that R.G. mentions in his article. Seems a bit too good to be true but if it does indeed work, then the 4013+4066 or 4013+4053 versions would need even less soldering and peripheral resistors than the versions using a hexinverter Schmitt trigger for flipflopping. Just the two chips.
As a general rule the reason it is not a good idea to put slow and/or noisy signals on clock lines.  YOu can end-up with false clock trigger and oscillations- generally weird behaviour.  The "correct" way around this is to put a Schmidt trigger between the switch+RC network and the clock input.
(I don't know why) but I did a google search and found this,
https://electronics.stackexchange.com/questions/71610/slow-clock-edge-causing-issues-with-d-flip-flop-behavior

Yes on paper it is a nice clean solution.  It's the type of circuit that makes an engineer cringe when it goes into production as you never know what might come back in those 1000's of units out there.   Maybe it could tweaked with two resistors to make  Schmidt trigger around the *4013* must be a non-inverting type.  Using this idea,

http://solarbotics.net/bftgu/pix/schmitt_cmos.gif

Having said that the Boss/Ibanez transistor circuit is conceptually the same. However, I believe the "loop gain" of these transistor circuit is low and avoids some of the weird behaviour you see with logic gates (which are designed for sharp clock transistions.).   

You need things to be reliable but then look at Ibanez's Soundtanks.  They used a small debounce cap which ends-up causing bounce issues when the switch get old.

Quote
Weirdly enough I was unable to find another Danelectro schematic that uses the same switching scheme.
I have seen a few variations in the switching circuit on Danelectros. IIRC on some models (maybe like the FAB Tone) there was a separate switching board which done the switching.   When people trace these circuits I don't think they bothered tracing the switching board so you don't see it on some schematics.
« Last Edit: November 15, 2017, 06:08:12 PM by Rob Strand »
The mind often distorts without gain.

blackieNYC

Re: 4066 switch bypass layout
« Reply #15 on: November 16, 2017, 08:23:49 AM »
I still disagree with you RG, and you won't hear that much from me.  You see pedals in numbers no one else is likely to ever experience.  I have no doubt the switch will go first, if the whole assembly is well done.  But you're still going to have to wire up jacks and an LED, and since we have not found him a pcb (have we? I'll take one -please don't tell RG) that's ready to go, he needs to perf up two ICs or etch a pcb. I think the cost of the switch is fine - because I'm a hobbyist.  I work small, and this is going to take up as much room as the effect circuit.  My wicked switch is working quite nicely where I needed it.  But I'll add that for silent switching and a few more parts, the Boss configuration seems to be the thing. 
I must say, for my next 7-in-1 pedal I am considering a CMOS alternative. But if it takes up too much Time and Space, I will go with the switch. 
http://29hourmusicpeople.bandcamp.com/
Thing Modulator, Magnus Modulus +,Meathead, 4049er,Great Destroyer,Scrambler+, para EQ, Azabache, two-loop mix/blend, Slow Gear, Phase Royal, Escobedo PWM, Uglyface, Jawari,Corruptor,Tri-Vibe,Battery Warmers

anotherjim

Re: 4066 switch bypass layout
« Reply #16 on: November 16, 2017, 12:11:36 PM »
Quote
Maybe it could tweaked with two resistors to make  Schmidt trigger around the *4013* must be a non-inverting type.  Using this idea,
...since you usually want Q or /Q to toggle and remember rather than follow the input, I'm not sure if that's an option. I have tried it but...
If one half of the 4013 is unused, then...
... Look at the full 4013 truth table, and see that there is a way of using S input (while the opposite R is held active = High for 4013) that gives you the non-inverting function between S and Q needed to make a Schmitt trigger with resistors. You don't get a complementary output on /Q because the R input must hold that on. Also tie D and Clk Low, they arn't used.


"So lets stay within the limit of sureness: lets consider the fuses you have available and lets see what you have to do to light them up..." Farfisa Partner 15 drum machine manual.

Rob Strand

Re: 4066 switch bypass layout
« Reply #17 on: November 16, 2017, 01:09:14 PM »
Quote
since you usually want Q or /Q to toggle and remember rather than follow the input, I'm not sure if that's an option. I have tried it but...
If one half of the 4013 is unused, then...
... Look at the full 4013 truth table, and see that there is a way of using S input (while the opposite R is held active = High for 4013) that gives you the non-inverting function between S and Q needed to make a Schmitt trigger with resistors. You don't get a complementary output on /Q because the R input must hold that on. Also tie D and Clk Low, they arn't used.

I think you are right.  The Schmitt output must follow the input.  It can't do that with a toggling register.  In one state the output will follow the input but in the other it can't.

There is another way to debounce *SPDT* switches with an RS flip-flop:
http://www.electronicshub.org/wp-content/uploads/2015/06/Switch-de-%E2%80%93-bounce-circuit-using-NAND-SR-flip-%E2%80%93-flop.jpg

but now you lose the toggle.
The mind often distorts without gain.

ElectricDruid

Re: 4066 switch bypass layout
« Reply #18 on: November 16, 2017, 01:48:12 PM »
With regards to slow clocks on inputs, Wikipedia has a good list of devices with Schmitt trigger inputs:

https://en.wikipedia.org/wiki/Schmitt_trigger

Scroll down until you find  "[show] List of IC including input Schmitt triggers".

Rather than using the 4013, we'd have to use a NAND chip and roll our own flip-flop (so we won't get two out of the one package) but we can get everything we need for debouncing, controlling the 4066, and driving an LED.

Tom

Fancy Lime

Re: 4066 switch bypass layout
« Reply #19 on: November 16, 2017, 02:48:21 PM »
Alright guys,

I suggest we do this right and compile a list of what will and what wont work. What I like about these switchers is that they are extremely adaptable for many different things that may need switching, not just bypass. A CD4066 with a dual flipflop could for example also be used to cycle through 4 different tone caps or something, with just a few changes to the wiring. I am planning to make a modular design in which a CD4066 or a CD4053 are controlled by a Hexinverter, Quad-NAND Gate or dual Flipflop. That way everyone can use whatever they have or fine tune to whatever they need.

Control chip:
CD4013 dual Flipflop: Needs extra transistor on the clock input. Can drive two bypass switches either independently or sequentially.
CD4049, CD4069 Hexinverter: No extra active components, drives one switch.
CD4011, CD4093 NAND: No extra active components, drives one switch.

Switch:
CD4066: four individual bilateral On/Off switches, many different possibilities.
CD4053: three individual unidirectional SPDT switches, easy 3PDT wiring.

What should be added? I wouldn't include discrete flipflops and the like here since the point of this is partly quick and easy assembly and hence low(ish) parts count.

Cheers,
Andy
Sound is like a complex number. It consists of a real and an imaginary part but that does not mean that the imaginary part does not exist. The unit for measuring the imaginary part is called 'mojo'.