Maker Pro
Maker Pro

Analog switch click... Will a low pass filter smooth it out?

P

PPP

Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound? I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.


Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

Thank you!
P.
 
J

John O'Flaherty

PPP said:
Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound? I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.
Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

No. The discontinuity isn't just or mainly at high frequencies. Your
waveforms show a 200 mV (if I'm reading it right) DC shift between the
two waveforms. No low pass filter can help that. Balancing the average
level of the original input and the filter op amp output might help.
You might want to look at what's happening with no signal going in at
all, and make sure everything is balanced so no DC shift occurs when
you switch.
 
J

John O'Flaherty

John said:
No. The discontinuity isn't just or mainly at high frequencies. Your
waveforms show a 200 mV (if I'm reading it right) DC shift between the
two waveforms. No low pass filter can help that. Balancing the average
level of the original input and the filter op amp output might help.
You might want to look at what's happening with no signal going in at
all, and make sure everything is balanced so no DC shift occurs when
you switch.

Another thought occurred to me- why switch the filter input? Leave the
input connected to the filter all the time, and just select the output
with the analog switch - that might eliminate half your transient
problems.
 
J

Joerg

PPP said:
Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound? I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.


Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

Not by much, as John already wrote. Leaving out the switch on the left
side may help a bit but not completely because you are effectively
banging the output of your circuit from the original source to one that
is phase shifted.

What helps is to gradually ease over the output from the
straight-through line to the filter output and back. This can, for
example, be done via FETs. Since the source is an opamp-based Sallen-Key
it should be low-Z so I suggest to get rid of the input side mux.

BTW the TLV2784 is a rather pricey chip for such a mundane job. Almost
like using a Ferrari to go to the post office. Consider cheaper ones.
The LPV324 comes to mind but that would need at least 2.7V VCC. I bet
there are other cheap ones that go lower.
 
P

PPP

John said:
No. The discontinuity isn't just or mainly at high frequencies. Your
waveforms show a 200 mV (if I'm reading it right) DC shift between the
two waveforms. No low pass filter can help that. Balancing the average
level of the original input and the filter op amp output might help.
You might want to look at what's happening with no signal going in at
all, and make sure everything is balanced so no DC shift occurs when
you switch.


Hi John,

Great suggestion. I'll try that out soon. The last time I tried
something similar I actually did notice a DC level shift at the output
eventhough the output was AC coupled using a 1uF capacitor. However,
this was using the inverting configuration. I'll try it out again using
the attenuator.

I was actually interpreting the waveform shift as due to the attenuator
circuit decreasing the amplitude, but then again I could be wrong. I
think I can verify this with your suggestion.

Thanks!
P.
 
P

PPP

Joerg said:
BTW the TLV2784 is a rather pricey chip for such a mundane job. Almost
like using a Ferrari to go to the post office. Consider cheaper ones.
The LPV324 comes to mind but that would need at least 2.7V VCC. I bet
there are other cheap ones that go lower.


Hi Joerg,

Thanks for the suggestion! I'm still getting familiar with real world
opamps. I've been reading TI's Opamps for Everyone. I really don't have
any price concept right now since I'm just getting free samples. But
you have a point that I should start keeping it in mind because it'll
eventually matter in important projects.

Thanks!
P.
 
PPP said:
Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound? I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.


Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

Thank you!
P.

What is this the intent of the system, not just the switching circuit?
It looks like you are inserting a phase reversal in the path. How could
such a circuit NOT cause a click unless the switch was done at a zero
crossing?
 
P

Phil Allison

"PPP"
For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound?


** You bet it does.

I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.


** The trick for silent audio switching is to provide a fast "cross fade"
from one signal to the other.

The two signal sources each feed via a pair of series resistors ( say
10kohms ) to a common, virtual earth summing point.

At the junction of each resistor pair, a JFET is fitted so it can shunt the
signal to ground if biased on.

The JFETS are driven by antiphase gate ramp voltages so perform the function
of pot with wiper grounded. The change over is smoothly completed in about
50 to 100 mS.

At that moment when both signals have equal attenuation, that attenuation
should be around 3 to 4 dB. This will mean uncorrelated signals sum with
little amplitude disturbance.

The JFETs may be replaced with quick acting CdS photorsistior cells driven
by LEDs for low THD applications.




....... Phil
 
B

Ban

PPP said:
Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound? I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a
click.


Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

Thank you!
P.

Whenever you switch in the maximum your step becomes 2.5Vpp, or whatever
level you have. That is inherent to a phase inverter.
You have to add a zero-detector to your circuit. A comparator clocking a
D-FF situated before the switch in the data line will do that. You have to
use a fast switch, so the output step is just a few millivolts.
BTW, this is a pretty useless thing, if you switch both channels at the same
time, since we are not able to determine absolute phase.
 
P

Phil Allison

"Ban"
Whenever you switch in the maximum your step becomes 2.5Vpp, or whatever
level you have. That is inherent to a phase inverter.
You have to add a zero-detector to your circuit. A comparator clocking a
D-FF situated before the switch in the data line will do that. You have to
use a fast switch, so the output step is just a few millivolts.


** Zero crossing detection and switching will NOT eliminate the click.

A sine wave that instatantly changes polarity, even with no actual voltage
step, will still have an obvious & audible wide band discontinuity.




......... Phil
 
Phil said:
"Ban"


** Zero crossing detection and switching will NOT eliminate the click.

A sine wave that instatantly changes polarity, even with no actual voltage
step, will still have an obvious & audible wide band discontinuity.




........ Phil

There is no discontinuity once the zero crossing circuit is added. Yes,
some high frequency energy which you could show with Fourier analysis,
but the noise should be greatly reduced.

Think of listening to the output of a fullwave rectifier, which would
be a worse case senario. It sounds like a harmonic rich signal, not
clicks.
 
There is no discontinuity once the zero crossing circuit is added. Yes,
some high frequency energy which you could show with Fourier analysis,
but the noise should be greatly reduced.

Think of listening to the output of a fullwave rectifier, which would
be a worse case senario. It sounds like a harmonic rich signal, not
clicks.

To be more accurate, the signal is discontinuous in the first
derivative.
 
J

jasen

Howdy!

I asked a question earlier regarding analog switches. I decided to
capture the output waveform from the oscilloscope using the analog
switch logic channel as my trigger point. Here is what I have:

http://tinypic.com/view/?pic=40pbxiv

I replaced the inverter in my original circuit (see here:
http://tinypic.com/view/?pic=2u6jvp3 ) with an attenuator. I guess it
makes since that the amplitude of the output waveform drops when it
switches.

For those with audio experience, does this discontinuity in the
waveform really cause a clicking sound?
yes.

I figured that if I
instantaneously increase and decrease the amplitude of a sound source,
then I would only hear an annoying amplitude variation and not a click.

that step in the waveform causes the click, only way to stop the click is to
change amplitude more slowly, preferably at a rate lower than audible sound,
Also, if I add a low pass filter at the output of the switch and
configure it to have a 3dB frequency of 20KHz, then will this smooth
out the discontinuity?

yeah, but that will do very little to reduce the click,

Bye.
Jasen
 
P

Phil Allison

<[email protected]

" Google Groper ALert>
There is no discontinuity once the zero crossing circuit is added.


** Bollocks.

The sine wave comes down to zero then instantly reverses direction.

That is a MASSIVE discontinuity, dv/dt changes sign in an instant !!



......... Phil
 
J

John O'Flaherty

PPP said:
Hi John,

Great suggestion. I'll try that out soon. The last time I tried
something similar I actually did notice a DC level shift at the output
eventhough the output was AC coupled using a 1uF capacitor. However,
this was using the inverting configuration. I'll try it out again using
the attenuator.

I was actually interpreting the waveform shift as due to the attenuator
circuit decreasing the amplitude, but then again I could be wrong. I
think I can verify this with your suggestion.

It is decreasing the amplitude, but if you can see a shift in the
average level, that's a DC shift. Imagine a really low pass filter
attached to that signal- you'd see no sine wave, but you would still
see that DC shift. A simple attenuation would have the waveform pulling
in equally on both negative and positive sides, with no change in
average or DC level.
 
P

PPP

jasen said:
that step in the waveform causes the click, only way to stop the click is to
change amplitude more slowly, preferably at a rate lower than audible sound,

Would a voltage controlled attenautor or a digital potentiometer part
of an opamp feedback setup work in attenuating the levels slower? I was
thinking of still using the pulse output from a retriggerable
multivibrator to control the VCA or digital potentiometer. I figured
with this setup I can entirely eliminate the switch. What do you think?

Thanks!
P.
 
P

Phil Allison

<[email protected]>

" Google Groper Alert"

Hence the discontinuity in the first derivative. Still better than
switching in midstream.


** There will be a very audible and disturbing transient.

The electronic cross fade method I outlined will not have one.

Go away - imbecile.




........ Phil
 
Top