Re: Analog switch configuration



martin griffith wrote...
Winfield Hill wrote:
martin griffith wrote...
"PPP" pispaspos wrote:

I have a question regarding the use of analog switches. The switch
that I am using is a Texas Instrument TS5A3159A. The data*** link
is here: http://focus.ti.com/docs/prod/folders/print/ts5a3159a.html

This is my schematic:
http://img361.imageshack.us/my.php?image=switchschematicoo4.jpg

If I disconnect the inverting opamp and just directly connect the NO
channels together, I don't notice any popping or clicking noise in my
audio output. But when I insert the inverting op amp, the popping and
clicking becomes apparent.

What causes the clicking / popping noise in this configuration?
Is there another way to configure this circuit?

Try putting a 100K to gnd before the 1uF
try a 22uf in series of the o/p of the opamp, then a 100K to gnd

Also put a scope on the o/p of the opamp see if there is anything
funny happening.

Exactly right. Here's pispaspos' circuit.

. o--------------------------o
. ---o / \ o----- out
. o--||---R--+----R-----+----o
. | _ | | invert
. '--|- \ | 100k
. | >---' |
. Vcc/2 ---|+_/ gnd

When he selects the invert position, the signal has Vcc/2 added
to it. When he selects the direct position, it doesn't. Hence
the click. Your suggestions solves that problem by eliminating
the dc signal from the inverted pathway.

. o-----------------------------------o ts5a3159
. ---o / 1uF 2.2k 2.2k 22uF \ o----- out
. o--+--||----R--+----R-----+--||--+--o
. | | _ | | invert
. 100k '--|- \ | 100k
. | | >---' |
. gnd Vcc/2 ---|+_/ gnd

This still leaves the problem that pispaspos is switching a signal
at ground level, with a single-polarity-powered CMOS switch that
can only operate to -0.6 volts below ground, without clipping.

On the data*** page 3, we find "Absolute Minimum and Maximum
Ratings" that say, "Analog voltage range min ?0.5V, max V+ +0.5V,
which means that all the switched signals must be no more than
0.5V below ground, or 0.5V above the supply rail. In the absence
of a coupling capacitor, the renegade HV capacitors can be charged
appropriately, but this can result in biat-setpoint clipping and
distortion.

We can solve this by placing the 22uF coupling caps on the
in and out signal lines, outside of the switches:

. 22uF o---------------------o 22uF
. --||-+--o / 22k 22k \ o--||--+----- out
. | o---R--+----R-----+---o | headphone amp
. 10k | _ | invert |
. | '--|- \ | 10k
. | | >---' |
. +----------------|+_/ gnd
. |
. Vcc/2

Or, dealing with the Vcc/2 bias issue head on, assuming the
input-signal dc path is present and accounted for.

. 22uF o---------------------o 22uF
. --||-+--o / 22k 22k \ o--||--+----- out
. | o---R--+----R-----+---o | headphone amp
. 10k | _ | invert |
. | '--|- \ | 10k
. | | >---' |
. '---+--10k---+---|+_/ gnd
. Vcc | _|_
. ---Rx---+ --- 10uF
. 2.2k | |
. Rx gnd
. 2.2k
. |
. gnd

Nice ascii Win

Thanks! I just now corrected a small Vcc/2 typo above.

On second thoughts, get rid of the first switch, connect the 1uf
to the signal in, keep the 22uF o/p cap. I suggested. So the
o/p switch just switches between the input and the inverted
signal.

Excellent idea to eliminate the input switch.

.. -----+--------------------------------o
.. | 1uF 22k 22k 22uF \ o----- out
.. '--||-----R--+----R-----+-||--+--o headphone amp
.. | _ | | invert
.. '--|- \ | 10k
.. | >---' |
.. Vcc ---10k---+---|+_/ gnd
.. 4V max | tlv2780
.. 10k
.. |
.. gnd

But using only one large 22uF cap means the remaining switch is
still limited to a -0.5V swing, potentially causing clipping, or
if the source signal is ac coupled, causing capacitor charging
on the negative peaks. An extra electrolytic would eliminate
any issue during full 3V peak-peak signal swings.

.. 47uF ts5a3159
.. --||-+----------------------o 47uF
.. | 22k 22k \ o--||--+----- out
.. '----R--+----R-----+---o | headphone amp
.. | _ | invert |
.. '--|- \ | 10k
.. | >---' |
.. Vcc ---Rx--+---|+_/ gnd
.. 3.0V | tlv2780
.. 4V max Rx
.. |
.. gnd

On the other hand, we don't know about pispaspos' source and
destination circuit biasing, perhaps the electrolytics can be
eliminated in the full design, after the dust settles.

Now, addressing pispaspos' choice of cmos switch IC. Why use a
large-area 1.3-ohm switch for relatively high-Z audio signals?
The coupling-cap electrolytic sizes, large as they are, aren't
meant for use with loads much below say 1k, which implies a 5,
10 or even 20-ohm switch should be fine. To my mind, if the
switch was dealing directly with a 40-ohm headphone signal, then
a 1-ohm Ron would be well used. I know the ts5a3159 is cheap,
only 56 cents, but somehow it just seems like overkill to me.

I wonder what pispaspos will choose for his headphone amplifier
in his 3-volt low-voltage powered system?

Commenting on TI's tlv2780 amplifier series, which pispaspos
selected, http://focus.ti.com/docs/prod/folders/print/tlv2780.html
it's pretty ballsie for TI to bring out a full family of opamps
(six types, in four packages, including a legacy miniDIP) with
only a 4-volt maximum supply-voltage rating! Whoa! Couldn't
they push it up to say 5.5V, to expand the market? Also, these
opamps have pretty wimpy output transistors for a low-voltage
cmos process: 33 ohms for the p-type when powered at 2.7 volts,
and 50 ohms at 1.8 volts. This means you need to limit your load
draw to say 2mA (or 1k) to avoid losing too much of your already-
limited low-voltage output swing. Sheesh, couldn't TI have done
better with their fabulous 4-volt cmos process? I mean, look at
their 1-ohm switch (5-ohms at 1.8 volts) in a 6.5-volt process.


--
Thanks,
- Win
.