Analog switch configuration

Good afternoon, folks!

I have a question regarding the use of analog switches. The switch that I am using is a Texas Instrument TS5A3159A. The datasheet link is found here:

formatting link

This is my schematic:

formatting link

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?

Thank you!

Reply to
PPP
Loading thread data ...

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

martin

Reply to
martin griffith

You might try using the input switch the other way around, so that the

1uF/22k gong into the op amps sumiming junction is either connected to the sound source you want or connected to ground. At the moment the 1uF/22k are acting as an antenna whenever the switch isn't connecting them to your sound source.

You should note that there is a certain amount of capacitance between the power rails and the digital control inputs and your switched output on your digital switch even when the switch is nominally open circuit.

--
Bill Sloman, Nijmegen (but in Sydney at the moment).
Reply to
bill.sloman

Rapid changes in DC offset conditions. Because of the VCC/2 bias configuration, and the fact that no capacitor is ideal (leakage), each time you switch you get a rapid settling of the DC conditions which manifest as a thump or a pop. One way to minimise it would be to use a ± supply and/or op amps with offset null.

But, first I would try putting a DC blocking cap in the output path of the op amp. Might help a little.

nifty

Reply to
niftydog

Have you tried biasing the anolog switch inputs and outputs at 1/2 its supply voltage? You would then need blocking caps to keep the DC out of the audio signal path.

Try using a voltage divider to get the 1/2 supply voltage and coupling it through a 1 meg resistor. Connect it through a separate resistor for each com and NO input. You should be able to get a way with 1 connection to the NC, since it is a direct connection.

Reply to
tempus fugit

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 datasheet 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/2 | _|_ . ---Rx---+ --- 10uF . 2.2k | | . Rx gnd . 2.2k . | . gnd

--
 Thanks,
    - Win
Reply to
Winfield Hill

Nice ascii Win

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

martin

Reply to
martin griffith

Since you have already a properly biased input signal from the previous stage, the phase inverter can be made this way: ___ ___ o--+-|___|---+--|___|--. | 10k | 10k | | | | | | |\\ | | '--|-\\ | | ___ | >---+ '-|___|--+---|+/ 10k | |/OPA365 | \\ o \\ \\. o | Vcc/2 ---+ | ---+ --- |47u === GND (created by AACircuit v1.28 beta 10/06/04

formatting link
I recommend this opamp for single supply R/R non-inverting applications.

--
ciao Ban
Apricale, Italy
Reply to
Ban

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

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,

formatting link
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
Reply to
Winfield Hill

chomp

3v3 rail and audio = a horrible mess

I still haven't come to terms with audio ADCs etc with a single 5V rail, and will stick to a minimum supply of +-12V until they prove the world isn't flat.

Ban's idea ( well I saw it first in Walts' audio opamp cookbook) is rather nice, But how about an audio transformer, with the o/p CT to ground and the cmos switch flipping between the in and out of phase terminals

martin

Reply to
martin griffith

I've made several synchronous demodulators using that technique... the first time would have been around 1970-71.

...Jim Thompson

--
|  James E.Thompson, P.E.                           |    mens     |
|  Analog Innovations, Inc.                         |     et      |
|  Analog/Mixed-Signal ASIC\'s and Discrete Systems  |    manus    |
|  Phoenix, Arizona            Voice:(480)460-2350  |             |
|  E-mail Address at Website     Fax:(480)460-2142  |  Brass Rat  |
|       http://www.analog-innovations.com           |    1962     |
             
I love to cook with wine.      Sometimes I even put it in the food.
Reply to
Jim Thompson

there's a number of issues I can see, one is the sudden voltage step the op-amp input will see, the other is the similar step produced at the output.

as others have said audio is ground referenced so you need a two-rail setup.

if your 3v is two dry cells use the mid-point as earth and power the chips from

+1.5 and -1.5

if you can reduce loose the first switch and leave the op-amp input in-circuit all the time

as I read it your input ac signal should be referenced from VCC/2 after the low-pass filter, but is shown ground referenced, is this an error?

re-draw the circuit as a dual supply setup and something obvious may jump out at you,

the 1uF capacitor looks kind of high for a filter capacitor, if you're not making a high-pass filter there loose it.

the first switch adds as far as I can see nothing but noise to your system, loose it too.

try this circuit, see if it does what you want, the virtual earth of the inverter op-amp shouldn't inject any audio distortion into the passthrough channel

|+1.5V ...... phase select input nc: ------' 0V --------|+/ TLV2784A |/| -1,5V Basically your analogue ground is 1.5V above the digital ground. Using a single-point analogue ground will work better than deriving it ad-hoc wherever it's needed, even if you spend an op-amp on providing it. If your 3V supply comes in two 1.5V parts tap the mid point for your analogue ground. it means you need a two pole switch for the power but it'll probably be worth it.

this is all guesswork, and I'm no expert, also if your input is not low impedance and your output load is not a high-ish impedance it'll probably all go pear-shaped

--

Bye.
   Jasen
Reply to
jasen

Thanks for the input everybody! I'm still digesting the response. However, just a quick comment. My audio source is actually biased around VCC/2. The single supply low pass filter connected to the COM terminal of the first switch outputs the audio signal "riding" on VCC/2.

I am actually trying to build a voice over circuit. I thought the easiest way to do this was by using switches. The inverting circuit in my diagram is there so I can tell if my circuit was really switched. Hopefully, once I get things figured out, I will replace it with an attenuator.

Reply to
PPP

Hi Win! Thanks for the input!

I was actually contemplating using only one switch. But I wondered if using only one switch will decrease the switch isolation. I was doing some initial simulation on PSpice using a similar circuit above and using another analog switch. The results indicated that there were some coupling from the NO to the NC terminal. But then again I don't know how the real circuit would respond.

Also, I was thinking that with the configuration above the inverting opamp would still be inverting a signal even if its function is not required. Wouldn't this be unwanted excess power?

Thanks! P.

Reply to
PPP

I could switch to design to dual supply, but I think working with single supply would be a learning experience for me. So, my audio signals thru out the circuit are being biased at VCC/2.

Good point. This is the first time I've dealt with this type of switch. The only information I gathered about them is from the application notes... namely, from TI and Maxim's. Somewhere there, I read that in order to prevent distortion in my audio signal I should use a switch with a low on-resistance (Ron).

So far, I've tried using a MAX4410 and a TPA6102A2. The MAX4410 seems very sensitive to its surrounding, and since I am not a master in PCB layout, I'm afraid that I may not get it to work properly. The TPA6102A2 seems to be less sensitive, but I'm hearing a lot of static noise in my headphones even when the sound is off. However, I think this may be caused by the noisy output of my soundcard because when I took the sound input off from the circuit it became silent.

Thank you!

Reply to
PPP

I tried this and unfortunately, I did not notice any difference. If this did work, how does the 100K actually eliminate the click?

I finally was able to probe the output and noticed something interesting...well, to me at least. I decided to connect the output of the second switch (right hand in the pic) to a capacitor (~ 2uF since I didn't have any other values). I just wanted to see the output on the scope and was hoping to eliminate the DC bias of the audio signal. However, when the switch switches, the signal bias shifts from 0V to

300mV. Not sure why.

Thank you!

Reply to
PPP

what effect would that crosstalk have in this circuit? there may be some tiny reduction in amplitude, but would it do anything else?

yes, but if you switch the input to the inveryer off it'll bounce round a bit when you switch it back on.

using larger resistances will reduce the power needs but may increase distortion,

if you can arrange to switch the front switch on before the back one and off after it that could reduce power consumption.

how much power does the switch need to operate?

conversely there may be a way to confiure your next stage to invert or not and reduce this stage to a single analogue switch. which just reconfigures the next stage....

Bye. Jasen

Reply to
jasen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.