Help, I Need Somebody That Knows A Lot About CD4066s

Started by Paul Marossy, January 07, 2019, 03:53:48 PM

Previous topic - Next topic

Paul Marossy

I have a problem that I just can't figure out, first time I think in the 17 years or so that I have been building stuff.  :o

I have a circuit that has the following topography:

A pre-gain control which is a gain control of the first opamp stage of a JRC4558 (IC-1A, non-inverting), a drive control which is the gain control for the second opamp stage (IC-1A, non-inverting). That is followed by the tone section which uses a pair of CD4066s (IC-3 & IC-4). The tone control kind of pans between the two CD4066s. Followed by that is another JRC4558 dual opamp on the output stage (IC-2), which starts out as inverting when the signal gets to it and then becomes non-inverted on the second stage. There is a 4PDT switch which selects between various clipping diode arrangements on IC-1 and the filters in the CD4066s (which I presume inverts the signal, need to verify that).

I have this thing on my bread board and it works fine. So I tried to build it this weekend and it's a major fail so far.  :icon_cry: My problem is that the biasing on IC-1 is off, and then the signal really dies at IC-3 & IC-4. I have vref to the wipers of the two drive pots on IC-1, to the input of IC-1, and on IC-2 pins 3 & 5.

So with that block diagram in mind, what do you think could be screwing up my biasing? I don't have a schematic to share, but I am fine with generalities. I just don't know where to start looking in this case. I can not find anywhere that I have made a mistake - I had a couple which I fixed, but every time I do something I get a new set of problems. Very perplexing....

Mark Hammer

This is confusing, Paul.  The CD4066 is a quad CMOS switch.  Are you referring to a different chip and mislabelling it as CD4066?

Paul Marossy

Quote from: Mark Hammer on January 07, 2019, 05:22:38 PM
This is confusing, Paul.  The CD4066 is a quad CMOS switch.  Are you referring to a different chip and mislabelling it as CD4066?

Nope. I know it's confusing, but it's switching between different hi & low pass filter arrangements.

I'd upload that part of the schematic if I had somewhere to upload it.

Mark Hammer

I use imgur.  If you just want to post a drawing but don't need to have an account to reaccess it, it works fine.

Thanks for providing the missing info.  I sort of figured it was something like that.  I just wasn't absolutely sure, based on your description.

R.G.

Mark is correct - the CD4066 is a quad CMOS switch. It works very well, but there are a few gotchas.

The 4066 has protection diodes on all the control inputs, and almost certainly substrate diodes from the channels to the power supplies. If you try to switch a signal that's outside that range, it gets clamped to the + or - supply by these substrate diodes. This gets to being an issue with bipolar supplies on opamps being switched with a 4066 on either the +V or -V of the opamps. The 4066's power supply needs to encompass the whole signal range for it to switch well.

This can be avoided somewhat by capacitor-breaking DC levels and biasing the 4066 in/out pins to half the 4066's power supply. This has the side advantage of minimizing switching clicks.

The input control voltage has to be within the 4066 power supply range too, and needs to be nearly full range. So if the 4066 is running from 5V, the controls only need to be about 4V for a 1; but if it's running from 15V, you have to get a control input over ... um, 11V as best I can remember without looking it up. Unlike some CMOS parts, the inputs don't do logic level translation so you can control higher voltage switching with a TTL inpu signal.

Schematics would help pick this stuff out.
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.

Paul Marossy

Quote from: R.G. on January 07, 2019, 06:15:49 PM
Mark is correct - the CD4066 is a quad CMOS switch. It works very well, but there are a few gotchas.

The 4066 has protection diodes on all the control inputs, and almost certainly substrate diodes from the channels to the power supplies. If you try to switch a signal that's outside that range, it gets clamped to the + or - supply by these substrate diodes. This gets to being an issue with bipolar supplies on opamps being switched with a 4066 on either the +V or -V of the opamps. The 4066's power supply needs to encompass the whole signal range for it to switch well.

This can be avoided somewhat by capacitor-breaking DC levels and biasing the 4066 in/out pins to half the 4066's power supply. This has the side advantage of minimizing switching clicks.

The input control voltage has to be within the 4066 power supply range too, and needs to be nearly full range. So if the 4066 is running from 5V, the controls only need to be about 4V for a 1; but if it's running from 15V, you have to get a control input over ... um, 11V as best I can remember without looking it up. Unlike some CMOS parts, the inputs don't do logic level translation so you can control higher voltage switching with a TTL inpu signal.

Schematics would help pick this stuff out.


That could explain a few things. Here is a link to a schematic, which I know would help.
http://s1262.photobucket.com/user/Paul_Marossy/media/CD4066%20Tone%20Control_zpsaxoikuxk.jpg.html
Sig from IC-1 enters at point "A", point "B" goes to IC-2.

Mark Hammer


Rob Strand

Don't you want something like this?



You don't really need to switch the input side on all the filters.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Paul Marossy

#8
Quote from: Rob Strand on January 07, 2019, 08:17:13 PM
Don't you want something like this?



You don't really need to switch the input side on all the filters.

No idea lol, it's just something that I reverse engineered nine years ago. I could have made a mistake on there but it does work OK on my bread board 

Rob Strand

#9
QuoteNo idea lol, it's just something that I reverse engineered nine years ago. I could have made a mistake on there but it does work OK on my bread board

That's a while back!  As drawn it might pass signal but to me it doesn't look right.  It doesn't switch the LPF and the HPF circuits.   The HPF circuit is always isolate, it just hangs off the treble side of the pot without passing signal through it.

With the changes it becomes a muff type tone control with switchable parts,

http://www.muzique.com/lab/tone3.htm

In one position it will have one set of parts Rb Cb, Rt, Ct  and in the other position it switches in completely different set of parts Rb Cb, Rt, Ct ; b = bass , t = treble.

The way you have drawn the 4066's with the directions might throw you off a bit.   The signal passes in the direction shown for IC 3A, IC 3B, IC 4A, IC 4B, IC 4C.   But for the other three switches (IC 3C, IC3D, IC 4D) the signal passes in the opposite to the direction shown.

If you redraw it you might see the pattern more easily.

The diodes look like they are the clipping diodes for the part of the circuit before the tone control.

As an aside, you could greatly simply the circuit.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Fancy Lime

+1 for what Rob said.

If I get the slightly convoluted schematic right, you use a hardware DPDT switch to control two CD4066 quadruple CMOS switches to change the response of a Big Muff style tone control. Something you can just as well do with the DPDT directly (with some redesigning of the R and C values to keep the same frequency response). So if you reverse-engineered this, I would like to know from where to understand the reason why the original circuit had the redundant CD4066's in the first place. Is the switch located hundreds of miles from the rest of the circuit?

Andy
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Paul Marossy

Quote from: Rob Strand on January 07, 2019, 11:37:25 PM
QuoteNo idea lol, it's just something that I reverse engineered nine years ago. I could have made a mistake on there but it does work OK on my bread board

That's a while back!  As drawn it might pass signal but to me it doesn't look right.  It doesn't switch the LPF and the HPF circuits.   The HPF circuit is always isolate, it just hangs off the treble side of the pot without passing signal through it.

With the changes it becomes a muff type tone control with switchable parts,

http://www.muzique.com/lab/tone3.htm

In one position it will have one set of parts Rb Cb, Rt, Ct  and in the other position it switches in completely different set of parts Rb Cb, Rt, Ct ; b = bass , t = treble.

The way you have drawn the 4066's with the directions might throw you off a bit.   The signal passes in the direction shown for IC 3A, IC 3B, IC 4A, IC 4B, IC 4C.   But for the other three switches (IC 3C, IC3D, IC 4D) the signal passes in the opposite to the direction shown.

If you redraw it you might see the pattern more easily.

The diodes look like they are the clipping diodes for the part of the circuit before the tone control.

As an aside, you could greatly simply the circuit.

Thanks for the input. I think you're probably right about everything. My tone control didn't seem quite right, and it's probably because the Pin 9s aren't connected together. I never had the actual unit to look at, only images of the six layers of the PCB, and that is what I had to use to reverse engineer it and then breadboard it to verify that it worked. I got most of it right I think but I seem to still have a few issues... one being my biasing of IC-1. I don't think the CD4066s have anything to do with that issue, so I still need to figure that out. One of the things I wonder about with this setup though is signal inversion, or phasing or whatever applies ha ha

Paul Marossy

Quote from: Fancy Lime on January 08, 2019, 08:55:44 AM
+1 for what Rob said.

If I get the slightly convoluted schematic right, you use a hardware DPDT switch to control two CD4066 quadruple CMOS switches to change the response of a Big Muff style tone control. Something you can just as well do with the DPDT directly (with some redesigning of the R and C values to keep the same frequency response). So if you reverse-engineered this, I would like to know from where to understand the reason why the original circuit had the redundant CD4066's in the first place. Is the switch located hundreds of miles from the rest of the circuit?

Andy

I think probably one reason why they did it that way was to not have noise when you switched between modes. That's the impression I get from the CD4066 data sheet, that you can use them in that fashion. The switch is located literally center of the six layer PCB. The PCB fits into a Hammond 1590B sized box. EVERYTHING is mounted on that board - the jacks, the bypass switch, the mode switch, etc. That is all I know about it.

Fancy Lime

Hmm... well it can be tricky to get mechanical switches really noise free, especially cheap ones from back in the day. So that seems like a reasonable explanation.
My dry, sweaty foot had become the source of one of the most disturbing cases of chemical-based crime within my home country.

A cider a day keeps the lobster away, bucko!

Rob Strand

QuoteI never had the actual unit to look at, only images of the six layers of the PCB, and that is what I had to use to reverse engineer it and then breadboard it to verify that it worked. I got most of it right I think but I seem to still have a few issues... one being my biasing of IC-1.
To me it looks like you got most of it right.  It's pretty easy to make a couple of errors.  Like the red-line to the treble control is just a missed track.    The fixes are only my best guess but they make sense (to me, lol) and seem to at least follow the intent of the circuit.   Overall, not too different to what you traced.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Paul Marossy

Quote from: Rob Strand on January 08, 2019, 03:09:19 PM
QuoteI never had the actual unit to look at, only images of the six layers of the PCB, and that is what I had to use to reverse engineer it and then breadboard it to verify that it worked. I got most of it right I think but I seem to still have a few issues... one being my biasing of IC-1.
To me it looks like you got most of it right.  It's pretty easy to make a couple of errors.  Like the red-line to the treble control is just a missed track.    The fixes are only my best guess but they make sense (to me, lol) and seem to at least follow the intent of the circuit.   Overall, not too different to what you traced.

I re-drew that part of the schematic to make it a little easier for me to follow. It makes more sense to me now. In this case, even though I missed something, it still worked. I'm going to try this stuff out tonight when I get home from work.

Paul Marossy

Just to bring this to a conclusion, with those two tweaks the tone control now works like you would expect. It seems to be like a bass boost, mid-cut and sort of treble boost depending on how you set the control. Kind of cool but I wonder if there's a simpler way to do it that doesn't involve quad CMOS switches...

Rob Strand

QuoteJust to bring this to a conclusion, with those two tweaks the tone control now works like you would expect. It seems to be like a bass boost, mid-cut and sort of treble boost depending on how you set the control. Kind of cool but I wonder if there's a simpler way to do it that doesn't involve quad CMOS switches...
Cool.  It's worth giving it a try with just a switch.

There's another thread running which pointed out some issue with DC shifts in that circuit which can cause pops.   If you AC couple that problem goes away.  Maybe the original design of the CMOS circuit had the same issue and didn't realize it was the DC shift and not the actual switch.

Some other ideas is to try not to switch the whole filter in and out but the switching the values or some of the values is parallel.  For example the 22n bass cap could be left in place and another 22n switch in parallel to get roughly 47n.      10M bleed caps can also help.


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.