4053 switching problem (pops)

Started by ElectricDruid, November 19, 2019, 09:46:12 AM

Previous topic - Next topic

ElectricDruid

Hi All,

I'm doing some experiments using a 74HC4053 for switching. This is for a little PIC experiment board I'm working on, with a view to doing some super-lo-fi "DSP" (hohoho!) so everything is running on +5V, including the op-amps (hence the MCP6002 rail-to-rail 5V op-amp). I read through RG's page on dealing with CMOS switching, and have done the following:


https://electricdruid.net/wp-content/uploads/2019/11/SwitchingScheme-scaled.jpg

The Vbias is 2.5V, created by 100K/100K/47u. The two switches are controlled by a pin on the PIC itself. The idea is to be able to select the straight-through signal, or the via-PIC's-ADC-and-DAC signal.

In terms of what I think this might do if I can get the pops out of the switching, I was thinking of a bitcrusher/sample rate reducer, a simple Ring Mod, and a lo-fi digital tremolo. That'll keep me out of trouble for starters.

Anyway, the problem is that I get a pop in the audio when switching the effect on (so both switches down). It isn't as bad  switching off, which might be significant, but I can't work out what it means!

Any ideas? I'm getting a bit stuck, and it's frustrating.

Thanks,
Tom

ElectricDruid

I've just been examining the "pop" itself on the oscilloscope, and it's very consistent. And it also looks very digital!

The output jumps higher and then lower before settling back at the bias level. The difference between the top of the high part and the bottom of the low part is 960mV (ouch! no wonder it pops!) and it goes high for 16usec and low for 48usec. Those times are suspicious too. I'll do more experiments and see if I can find anything that matches those times.

R.G.

Good on you for doing the spade and shovel work. I never used the 74HC4053, only the CD4053. It is possible that the HC version has some tinkering with the actual switching devices inside the signal path.

Getting no popping with a 4053 is dependent on the parasitic capacitances of the P-channel and N-channel devices that actually switch the signal matching. If this is true, the feedthrough of the actual control signals inside the chip tend to cancel. The requirement of having the chip in and out pins biased to half the power supply is a best-guess scenario for allowing the best cancellation. The cancellation gets worse with biases closer to the power supplies. Best cancellation may not be at exactly the middle of the power supply, as the N and P channel switch transistors may have slightly different characteristics.

- at least in the CD series devices. HC family is a re-working of the concept in a smaller, faster logic process. I do not know for certain, but it is very possible that they did some things inside the chip to make it better suited for the lower voltage. Hence, kudos for plowing the new ground.

You might try varying the Vbias fed to the switch pins a bit up and down from exactly the center to see if there is a better cancellation point.
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 the Enable pin goes high, all switches go open so you may get better results from taking the enable pin high then changing the selection then lowering the Enable pin.

anotherjim

Since it all happens between buffers, do the impedances have to be so high? 1M makes it more sensitive to noise and parasitic capacitance. I'd try scaling down to 100k.

ElectricDruid

#5
Thanks both. Those are very interesting ideas that I'd never have thought of.

There's one other quirk. It seems like the 74HC4053 is set up for controlling audio in the +/-5V range with a 0-5V logic signal. Currently I'm using it like RG's suggestion for the CD4053, with the Vee and Gnd pins tied together for single supply operation (see image in next post). Perhaps that's not a good idea with this chip.

Another possibility would be to split the 9V supply and then run the 4053 on +/-4.5V, with the PIC running on 0-4.5V. The 5V PIC variant is good down to 2.3V, and the MCP6002 is supposed to work at 1.8V, so they're ok. That might be closer to the designer's intention and therefore might give better results. Do you think I'd need to buffer the virtual ground for such a stunt? Running a PIC and similar off a simple voltage divider sounds pretty dodgy to me, but I haven't tried it.


ElectricDruid

The 1M is just taken straight from RG's diagram, but it may not be the best choice here, dunno. RG, what do you think?


R.G.

Lowering the bias resistors might help. Depends on the mechanism of the pop. If it's the namby-pamby feedthrough capacitance or just straight charge deposition as is common to describe it in analog switch lit these days, lower bias resistors will reduce it linearly with resistance drop. Since you have it between buffers, go for it. Make them 10K, and if you don't get bass loss, you're in. The article on geofex was written before some of forum's participants learned to read, during an era when I got lots of flac like "you can't get tone from a stone" and "nope, hard contact switches are the only way; anything else poisons your sound" and the like. Also, the article was written with the intent of using it to replace DPDT footswitches, which were expensive at the time. So having bias resistors of 1M or so was needed to stay pure with the guitar tones canon that input impedances must be 1M.

So sure - twiddle the bias resistors.

In my dotage I've become more or less completely without respect for magic component values. Unless I can see some way it's magic, I'll rip out anything and try some other value. What could it hurt?

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.

anotherjim

Looking in the datasheet though, it does appear to assume balanced supplies for the analogue switch. The equivalent circuit looks like it ought to work if Vee=Gnd, but there is no data for that.


Mr. Lime

QuoteIn terms of what I think this might do if I can get the pops out of the switching, I was thinking of a bitcrusher/sample rate reducer, a simple Ring Mod, and a lo-fi digital tremolo.

Looking forward for your approach, Tom!
Glad you jumped on the 4053 and experiment with it.
I'm excited about your PIC as well.  :D
Thanks for help

ElectricDruid

Quote from: anotherjim on November 20, 2019, 04:24:41 AM
Looking in the datasheet though, it does appear to assume balanced supplies for the analogue switch. The equivalent circuit looks like it ought to work if Vee=Gnd, but there is no data for that.

Yeah, it definitely works with Vee=Gnd. I get clean audio through it - that part is fine. It's just the switching is a bit noisy...but there's lots of reasons why that might be the case. I just have to narrow it down a bit.

ElectricDruid

Ok, I've re-jigged the circuit. Instead of running everything on 0-5V, I've now got a virtual ground so I've got a +/-4.5V supply. This makes the 74HC4053 much happier and the pops have virtually disappeared. So it seems that the 74HC4053 isn't so happy in a single supply situation as the CD4053 used to be.

That's the good news. However, it's thrown up another problem!

The PIC's ADC is now making an awful racket - lots of ADC noise. I suspect this is because it doesn't like being run from a virtual ground up to my +4.5V (AKA 9V) rail. Probably digital noise from the chip finishes up getting into the ADC if it hasn't got a "proper" ground. Not sure quite how to deal with this.

One way would be to have a chip (7660, whatever) making a negative supply from the +9V so I had +/-9V and then use regulators to get to a +/-5V supply. Seems like a lot of parts to get +/-5V when I already have +/-4.5V with virtually no parts, but it has the advantage of using a proper ground in the middle.

This circuit keeps getting bigger...sigh!

diffeq

Quote from: ElectricDruid on November 21, 2019, 04:40:23 AM
Ok, I've re-jigged the circuit. Instead of running everything on 0-5V, I've now got a virtual ground so I've got a +/-4.5V supply. This makes the 74HC4053 much happier and the pops have virtually disappeared. So it seems that the 74HC4053 isn't so happy in a single supply situation as the CD4053 used to be.
Theoretical question: will it work at all if a +2.5V Vref is created with an opamp (like this one, with 100R/10uF "ringing prevention" RC and minus trimmer) and connected to GND pin of 74HC4053? Such Vref is low impedance, not much different in this regard from 0V ground. +/-2.5V operation, from chip's perspective.

Scruffie

Quote from: ElectricDruid on November 21, 2019, 04:40:23 AM
Ok, I've re-jigged the circuit. Instead of running everything on 0-5V, I've now got a virtual ground so I've got a +/-4.5V supply. This makes the 74HC4053 much happier and the pops have virtually disappeared. So it seems that the 74HC4053 isn't so happy in a single supply situation as the CD4053 used to be.

That's the good news. However, it's thrown up another problem!

The PIC's ADC is now making an awful racket - lots of ADC noise. I suspect this is because it doesn't like being run from a virtual ground up to my +4.5V (AKA 9V) rail. Probably digital noise from the chip finishes up getting into the ADC if it hasn't got a "proper" ground. Not sure quite how to deal with this.

One way would be to have a chip (7660, whatever) making a negative supply from the +9V so I had +/-9V and then use regulators to get to a +/-5V supply. Seems like a lot of parts to get +/-5V when I already have +/-4.5V with virtually no parts, but it has the advantage of using a proper ground in the middle.

This circuit keeps getting bigger...sigh!
Are you using just a discrete V.Ref? That really sounds like a job for a buffered one.

Occasionally with discrete I've found using 'bipolar' style filtering (steadying?) caps helps, so one from the positive rail to V.Ref and one from V.Ref to ground.

Or why not try a 5V regulator with a schottky diode to drop the voltage closer to 4.5V.

anotherjim

Since it isn't true bypass - why not keep the ADC input always connected and only switch the output side?

ElectricDruid

Quote from: Scruffie on November 21, 2019, 05:46:50 AM
Are you using just a discrete V.Ref? That really sounds like a job for a buffered one.

Yes, it's buffered with a TL072 follower. I didn't dare try it with a simple divider alone. That sounded like it was *asking* for trouble!


Quote
Occasionally with discrete I've found using 'bipolar' style filtering (steadying?) caps helps, so one from the positive rail to V.Ref and one from V.Ref to ground.
Yeah, worth a shot.

Quote
Or why not try a 5V regulator with a schottky diode to drop the voltage closer to 4.5V.
Not sure I understand what you're suggesting here. I've got 4.5V already. I can't put a regulator on it because I haven't got any volt-drop to run the regulator. OR if I put the regulator from 0V to 9V, I finish up with the PIC's "ground" down at -4.5V w.r.t. the 4053, which expects the logic to be on 0V to +4.5V.


ElectricDruid

Quote from: anotherjim on November 21, 2019, 06:41:37 AM
Since it isn't true bypass - why not keep the ADC input always connected and only switch the output side?

Yeah, I could do, but I've got three switches in the chip, so I might as well use at least two of them rather than using one and wasting two. I suppose I hoped that tying the ADC to ground when not in use might reduce noise in the circuit (it reduces the DAC output to a string of midpoint voltages)...although I could just turn the DAC off when not in use instead (doh!).
I suppose the other reason is I'm vaguely doing this with one eye on using the result for noiseless switching of other circuits, not just this PIC-based thing, and grounding the inputs of those might be more important than it is here.

Scruffie

Quote from: Scruffie on November 21, 2019, 05:46:50 AM
Are you using just a discrete V.Ref? That really sounds like a job for a buffered one.
Quote

Yes, it's buffered with a TL072 follower. I didn't dare try it with a simple divider alone. That sounded like it was *asking* for trouble!
The TL072 isn't always super happy working as a V.Ref buffer, I can't remember the specifics but it might be worth trying another op amp.

Quote
Or why not try a 5V regulator with a schottky diode to drop the voltage closer to 4.5V.
Quote
Not sure I understand what you're suggesting here. I've got 4.5V already. I can't put a regulator on it because I haven't got any volt-drop to run the regulator. OR if I put the regulator from 0V to 9V, I finish up with the PIC's "ground" down at -4.5V w.r.t. the 4053, which expects the logic to be on 0V to +4.5V.
Maybe I'm misunderstanding, I thought you were now running from 9V with a 4.5V 'virtual' ground, I was just suggesting trying a regulator instead of a voltage divider for the virtual ground as it might be a bit steadier.

ElectricDruid

Quote from: Scruffie on November 21, 2019, 06:53:50 AM
Maybe I'm misunderstanding, I thought you were now running from 9V with a 4.5V 'virtual' ground, I was just suggesting trying a regulator instead of a voltage divider for the virtual ground as it might be a bit steadier.

Ah, ok, now I get it! Thanks. Yeah, that might work.

anotherjim

If the ADC is oversensitive when the input is at high impedance, try a series resistor into the ADC pin. With the S&H cap it will form a low pass and can probably be as high as 10k without limiting the audio band. But I think a better solution would be to have a buffer always in front of the ADC. That will keep a low source impedance there no matter what the bypass is doing.