CMOS switch bounce help

Started by mmaatt25, February 19, 2012, 01:31:31 PM

Previous topic - Next topic

mmaatt25

Hi,

I built this CMOS switcher using CD4017 and CD4066 and 2N2222 for the triggers. Functionally it works, controlling four inputs selectable sequentially and three ouputs (one via a Tillman preamp) selectable sequentially.

The problem:  The momentary switches a very sensitive in that they both interfere with the input and output selection, when clearly that should only affect what their controlling eg input or output.

Here it is:



Thanks

Matt

R.G.

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.

mmaatt25

Hi RG,

These are the two halfs (input & Output) minus the Tillman preamp. The only omission is there isn't a 0.1uf cap between the output (four switcher) and the input (three switcher).





Thanks

Matt

R.G.

There are several things that could be happening. I think that one big one is that making either switch shorts the 9V with a 4.7uF cap, perhaps bouncing erratically.

I would do this:
- remove the transistor(s); the CMOS doesn't need it, and is probably better off without it.
- replace the cap with 0.01uF
- replace the 10K across the cap with 220K
- replace the 1K with some larger resistor; 10K to 100K is fine; this goes from the switched end of the cap to the 4017 input
- use the switch to "short" the cap to +9. Actually, I'd put a 1K in series with the momentary footswitch.

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.

mmaatt25

#4
Thanks RG.

I looked at this today and discovered an error I'd made on the Tillman preamp (as an aside I love the Tillman preamp for it's "simplicity" an and what it adds to my tone, BUT I have never built one without issue!! This time I thought I'd be clever and replace the 6K8 drain resistor with a 10k trimmer as I've never found the 6K8 resistor actual biases the J201 any where near. The 10k trimmer only got the J201's to around 8Vdc @ drain, I ended up with a 20k resistor to get 5Vdc @ drain???.).

So back to the bounce issue.  With the errors on the Tillman rectified switch bounce all gone, without implementing your suggestions (which I am gratefull for).

The only thing I then had to sort out was that you could hear a faint signal being passed even if the desired input/output wasn't selected.  I cured this by grounding the (I'm using switching mono jacks) all the tips. I still can here a faint signal when i connect my Ipod?? but not guitars. Signal level maybe??

Thanks again.

Matt

mmaatt25

#5
OK everything is functioning as it should except if I have two amps connected to two outputs I can hear a distorted signal through the amp that is not selected!

I've modified the schematic with some help. Hopefully this will cutout the cross talk.




Thanks
Matt

PRR

Shouldn't there be DC-block capacitors (and bleed resistors) on the outputs?
  • SUPPORTER

mmaatt25

Quote from: PRR on February 21, 2012, 08:45:36 PM
Shouldn't there be DC-block capacitors (and bleed resistors) on the outputs?

I've put a 2.2uf cap between one of the outputs and the tillman preamp i havve attached to it. I found that when the output to the Tillman was selected it was knocking the drain voltage from (unselected) 4.9vdc to (when selected) 1vdc. This must have been caused because Ive biased the inputs with 4.5vdc (voltage divider and 2m2 resistors on inputs).

Should I also put caps on the other two outputs?? I only chose 2.2uf on the other output to Tillman because it was handy? Is this value OK??

Where do the bleed resistors go and what do they "bleed"??

Thanks

Matt

PRR

#8
> 2.2uf ... OK??

Yes. 0.1u to 10u when the 2u run out.



I cut/pasted 4 outputs; if you want 3 you know what to do.
  • SUPPORTER

mmaatt25

Thanks PRR.

I implemented what you added to the schematic (before I read  your post), except I got the order wrong (compared your schematic).  From the output of the CD4066  I had the 1K resistors, then 1uf caps, then 2M2 resistors.

So now  I still have crosstalk, but I'm not sure if this is because of the order as outlined?

I've connected two amps, my Roland 80x (solid state) and my AC15 (tube). I can only detect crosstalk with my Roland 80x, nothing with my AC15??

Anyway this is now out for sea trials with the bass player in the band I'm in. He only uses one amp and I explained the crosstalk issue if using two amps.

I'm going to breadboard this as I'd like to iron out this crosstalk issue.


R.G.

CMOS switches are quietest when 100% of the signal in/out pins are tied to a bias voltage of 1/2 their power supply.  To Paul's update, I would add nine more 2.2M resistors - one each to pins 2, 3, 9 and 10 of both chips one to the juncture of 4, 8, and 11 on the second chip.

CMOS biased this way has equal-and-opposite feedthrough from both the P and N switches, so it is about as quiet as these switches can get, on average.
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.

PRR

> the 1K resistors, then 1uf caps

Order not very important.

R.G. is probably (surely!) correct that "off" CMOS switches should be mid-rail.

There's also the "infinity problem". A series switch must have a good low load or else attain "infinite" off impedance. Guitar amp inputs are very high impedance. Say 500K, 0.5Meg. If you want 60db or 1000:1 attenuation the "off" switch must be 500Meg! Well-used CMOS can be in this range, but good PCB needs careful cleaning (and the old paper PCB won't do 100s-Meg except in a desert). We can't get "infinity enough" in a real world with 500+K guitar inputs.

The broadband leakage would be reduced with a load. 10K load will suck CMOS leakage real good. However it would also suck guitar pickup tone.

Is the leakage full-range or tinny treble? A mere 1pFd of stray capacitance across the switch will be 500Megs at 300Hz. Now that's only 100:1 or 40dB down at 3KHz. Typical non-fussy layouts may have 10pFd or more across the "off" switch.

Finally it is poor-form to leave unused inputs "disconnected" (hanging on 100s of Megs). That begs all the hum buzz and radio in the room to come in.

A perhaps-improved plan would have more CMOS after the output-selector 4066 to shunt all un-wanted outputs to audio ground (Vref, half supply). Say the series switch is 100Meg and the to-ground switch is 1K. That's 100,000:1 or 100db attenuation, and dozens of pFd or soggy PCB dosn't hurt enuff to notice. Another 4066 and a few inverters. (Or there are 2-pole CMOS switches.)

FWIW: many 'professional' studio matrix systems right-away buffer all inputs and outputs for just these reasons (though also so one input can drive 8 outputs without worrying about loading).
  • SUPPORTER

senko

You may have already solved the switch bounce problem, but for years I've used an almost fail-proof solution:  Use Schmitt Triggers!  The 4093 and 40106 are great for switch bounce problems and are compatible with the 4017 (CMOS family). 

Personally, I like the 4017, but using BCD counters will open your circuit up to a world of new options.  The 4029 is a great place to start.

I don't think this helps in any way, but I just have to get this out on the interwebs.  :icon_twisted: :icon_evil: :icon_twisted:
Check out my webpage http://www.diyaudiocircuits.com and send me suggestions about what you want to see!  I do all sorts of things with audio equipment, from guitar pedals to circuitbending to analog synthesizers.

mmaatt25

Thanks for the replies.

Here's the latest schematic, which incorporates RG's suggestions (if I've understood correctly)


R.G.

What I had in mind is more like this:


The idea is that all CMOS switching pins are held at Vref = 1/2Vdd at all times. The outputs are pulled to 0V/ground.

There is a built-in compromise in the resistor value used to pull each CMOS pin to Vref. The smaller that resistor, the smaller any residual imperfections in the switching are, and the quieter it is. However, if you will use this for a straight guitar input, it really needs to be upwards of 1M to avoid loading. The 2.2M resistor value is a compromise in this situation.

I personally would buffer inputs 1-4, then change the resistors on the CMOS pins to 33K to 100K. If you cannot or don't want to buffer the inputs, go with 2.2M.
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.