Do I need to bias a CD4066 when switching.

Started by alparent, April 01, 2011, 07:43:28 AM

Previous topic - Next topic

alparent

I'm working a a project using CD4066's to switch signals.
Then I reed up on R.G.'s site about this http://www.geofex.com/Article_Folders/cd4053/cd4053.htm (Mostly the biasing part.)

Do I need also do this with CD4066? From reading the datasheet I'm thinking maybe not?

And why 2.2uf for the input/output capacitor? Is that the value that keeps the signal as unchanged as possible or are other values also acceptable?

Thanks!

Mark Hammer

You should probably mention that this is within the context of an Arduino-based switching system, and say a bit about the power supply used.

alparent

Ok. I'll be switching the CD4066 with arduino.
5v for arduino, but the CMOS will be at 9v, so will the control pins.......controled by 9v using inverting NPN's.

R.G.

Quote from: alparent on April 01, 2011, 07:43:28 AM
Do I need also do this with CD4066? From reading the datasheet I'm thinking maybe not?
All simple CMOS switches are similar inside. All of them will produce the least clicking if they are biased to half of the power supply seen by the CMOS chip.

QuoteAnd why 2.2uf for the input/output capacitor? Is that the value that keeps the signal as unchanged as possible or are other values also acceptable?
The value of the input/output cap is chosen based on the requirements of the rest of the circuit, not on the fact that CMOS is switching. When the switch is allowing signal through, the input and output caps are effectively in series, so the effective capacitance with 2.2uF in and out is 1.1uF approximately. Other values may be acceptable, depending on the rest of your circuit, not on the CMOS.


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.

alparent

Ok. Thanks R.G.


So what about the value of the bias resistors?



I will have 4 inputs connected to one 4066 all of those outputs connected to one FX Out. Then the FX In connected to all inputs of the second 4066 and and then 4 possible outputs.

So I need to bias all inputs on the first 4066 and the output going to FX Out. Also bias the FX In and all outputs of the secound 4066.
Same thing for the 2.2uf cap.
Right!

R.G.

Quote from: alparent on April 01, 2011, 11:13:13 AM
So what about the value of the bias resistors?
The value of the bias resistors serves two competing needs. The lower the value, the less residual click from the 4066; but the bigger the coupling capacitors must be, and the more loading on whatever drives the input, and vice versa. The values I used are ones which worked well for me before.

There are always tradeoffs.
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.

merlinb

Quote from: R.G. on April 01, 2011, 11:28:37 AM
The value of the bias resistors serves two competing needs. The values I used are ones which worked well for me before.
For some reason I read the last sentence on your diagram as "Over 50k really does it up the brown". hmm...

R.G.

Quote from: merlinb on April 01, 2011, 11:40:39 AM
For some reason I read the last sentence on your diagram as "Over 50k really does it up the brown". hmm...
The value of the bias resistors serves two competing needs. The lower the value, the less residual click from the 4066; but the bigger the coupling capacitors must be, and the more loading on whatever drives the input, and vice versa. The values I used are ones which worked well for me before.

There are always tradeoffs.
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.

alparent

Quote from: R.G. on April 01, 2011, 11:50:54 AM
The values I used are ones which worked well for me before.

And the magic value to use with a 47uf cap would be? ..... Or should I understand that you want me to figure that part out? 

R.G.

Quote from: alparent on April 01, 2011, 01:38:14 PM
And the magic value to use with a 47uf cap would be? ..... Or should I understand that you want me to figure that part out? 
If you mean, is there a magic value to use with 47uF caps instead of the recommended 2.2uF DC blocking caps on the 4053, then it pretty much doesn't matter. There is no magic value, only values which give more or less bass loss. I certainly don't mind helping you figure it out, but eventually it would be of value to you to know how to do that for yourself.

The value of the DC blocking caps is picked to make bass losses through two capacitors in series (the input to the 4053 and the output from the 4053) be small when connected to whatever load is connected to the 4053. The 4053 is either an open circuit or a several-hundred-ohm resistor, depending on whether it's closed (i.e. connected) or not. What matters for the capacitor size is what load is after the 4053. If that load is 10K, then the bass rolloff for two 2.2uF caps in series is
F = 1/(2*pi*10K*1.1uF) = 14.5Hz. If you use 0.22uF caps, that becomes 145Hz, and you lose appreciable bass. This is an oversimplification, and in practice the pullup/bias resistors on the 4053 load the signal too; in the 510K case, they load the signal by 255K after the first 2.2uF cap coming into the 4053. This is almost never an issue, as that would be a much lower bass cutoff than the end result of a hypothetical 10K load on the output and the two 2.2uF caps in series.

So, if you are planning to use 47uF caps instead of 2.2uF caps, you could load this down by about 20 time more, or 10K/20 = 500 ohms on the output and still keep the 14Hz rolloff. That is an oversimplification too, as the internal switch resistance becomes significant as you go to lower and lower external loads.

Hence the admonishment in item 6: If the external load is over 5K, the internal switch resistances' nonlinearity will make very little distortion. If you're over 50K with the external loading, any variations from the internal switch resistances being nonlinear will make very little difference indeed.

There is no magic value for any of this. There is only Ohm's law and its extension to AC values where caps cause frequency loss. There is a magic equation:

F = 1/(2*pi*R*C)

Which tells you the half-power point for a single resistor/single capacitor frequency rolloff. The only tricks are in figuring out what resistances and capacitances matter in doing a quick and simple estimate. Knowing what matters and what has little effect is always a tricky estimate.
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.

amptramp

If you have a lot of calculations to do for RC frequency response, you can always use this:

http://www.muzique.com/schem/filter.htm

R.G.

Quote from: amptramp on April 01, 2011, 04:35:42 PM
If you have a lot of calculations to do for RC frequency response, you can always use this:
http://www.muzique.com/schem/filter.htm

... and forever impair your ability to understand what's going on.    :icon_biggrin:
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.

alparent

#12
Quote from: R.G. on April 01, 2011, 03:50:10 PM
Quote from: alparent on April 01, 2011, 01:38:14 PM
And the magic value to use with a 47uf cap would be? ..... Or should I understand that you want me to figure that part out?  
If you mean, is there a magic value to use with 47uF caps instead of the recommended 2.2uF DC blocking caps on the 4053, then it pretty much doesn't matter. There is no magic value, only values which give more or less bass loss. I certainly don't mind helping you figure it out, but eventually it would be of value to you to know how to do that for yourself.

The value of the DC blocking caps is picked to make bass losses through two capacitors in series (the input to the 4053 and the output from the 4053) be small when connected to whatever load is connected to the 4053. The 4053 is either an open circuit or a several-hundred-ohm resistor, depending on whether it's closed (i.e. connected) or not. What matters for the capacitor size is what load is after the 4053. If that load is 10K, then the bass rolloff for two 2.2uF caps in series is
F = 1/(2*pi*10K*1.1uF) = 14.5Hz. If you use 0.22uF caps, that becomes 145Hz, and you lose appreciable bass. This is an oversimplification, and in practice the pullup/bias resistors on the 4053 load the signal too; in the 510K case, they load the signal by 255K after the first 2.2uF cap coming into the 4053. This is almost never an issue, as that would be a much lower bass cutoff than the end result of a hypothetical 10K load on the output and the two 2.2uF caps in series.

So, if you are planning to use 47uF caps instead of 2.2uF caps, you could load this down by about 20 time more, or 10K/20 = 500 ohms on the output and still keep the 14Hz rolloff. That is an oversimplification too, as the internal switch resistance becomes significant as you go to lower and lower external loads.

Hence the admonishment in item 6: If the external load is over 5K, the internal switch resistances' nonlinearity will make very little distortion. If you're over 50K with the external loading, any variations from the internal switch resistances being nonlinear will make very little difference indeed.

There is no magic value for any of this. There is only Ohm's law and its extension to AC values where caps cause frequency loss. There is a magic equation:

F = 1/(2*pi*R*C)

Which tells you the half-power point for a single resistor/single capacitor frequency rolloff. The only tricks are in figuring out what resistances and capacitances matter in doing a quick and simple estimate. Knowing what matters and what has little effect is always a tricky estimate.

Thanks for that very informative response......... :icon_smile: But I was talking about what resistor value should I use with the 47uf cap in the biasing section (you know....2 resistors and a 47uf cap, give you Vr.) I tried 10k resistors and it gave me half the voltage (that's what I need right?) but I'm sensing it's probably not that simple and there is something I'm forgetting!


But now I understand why 2.2uf where used for the DC blocking caps. Isn't learning great!

R.G.

Quote from: alparent on April 04, 2011, 07:18:21 AM
Thanks for that very informative response......... :icon_smile: But I was talking about what resistor value should I use with the 47uf cap in the biasing section (you know....2 resistors and a 47uf cap, give you Vr.) I tried 10k resistors and it gave me half the voltage (that's what I need right?) but I'm sensing it's probably not that simple and there is something I'm forgetting!


But now I understand why 2.2uf where used for the DC blocking caps. Isn't learning great!
Sorry. I played you the wrong lecture tape.

The correct lecture tape for this one is at geofex - the question happens often enough that I wrote it down. It's here: http://geofex.com/circuits/Biasnet.htm
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.

alparent

My Keen & Hammer lecture tapes collection is a real gold mine. And it keeps getting bigger!

alparent

After reading the info you send me I went with the LM386 idea.........works great!

One last question......in your info about CD4053 in some example you put 510k resistor between Vr and the CMOS in other you put 1M.
Is the explanation for that already in the info you sent me and I missed it.....or is that another lecture tape I don't have yet?

R.G.

Quote from: alparent on April 05, 2011, 01:08:46 PM
One last question......in your info about CD4053 in some example you put 510k resistor between Vr and the CMOS in other you put 1M.
Is the explanation for that already in the info you sent me and I missed it.....or is that another lecture tape I don't have yet?
It is in the info that you alreday have, just not highlighted explicitly. In one case I used half a meg, in another, 1M. Those resistors are "pulldown resistors" except they pull the 4066 pin to a bias voltage, not ground. In this case, they funnel the small internal "click" current from the CMOS switching to the bias voltage. The smaller that resistor, the smaller any leftover click from the CMOS switching is, but the more they load whatever drives the pin. The larger, the less they load whatever drives the CMOS pin. It's much like pulldown resistors where, the exact value doesn't matter all that much, and matters even less if what drives the CMOS switch with signal is an active device and not a raw guitar input.

I have actually used values from 10K (driven by opamp outputs) to 1M (driven by a guitar signal) with good results. If the input signal to the switch will be an unbuffered guitar, then you need a higher resistor, like 510K to 1M. If it's always inside a buffered pedal, then you can go much lower. It's all in that set of compromises I mentioned - lower resistors are lower remaining click noise, but harder to drive.
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.

alparent

OK since I'm going to be switching unbuffered guitar signal I'm going to go with the 1M resistors. And If I get any clicking will try the 510k then.

Thank R.G.

R.G.

Quote from: alparent on April 05, 2011, 04:53:54 PM
OK since I'm going to be switching unbuffered guitar signal I'm going to go with the 1M resistors. And If I get any clicking will try the 510k then.
Given the application, that's exactly what I'd do.

Well, actually, I'd buffer the guitar signal, but for reasons not having to do with this setup.  :icon_lol:
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.

alparent

#19
Quote from: R.G. on April 05, 2011, 05:03:07 PM
Well, actually, I'd buffer the guitar signal, but for reasons not having to do with this setup.  :icon_lol:

OK now you've done it!  :P
Now you have to tell me why and how you would do this?

I'd need something with no knobs or switches and something that will not tint the signal being switched.