Electronically switching audio signals can be a complex matter. There are the obvious problems of interfacing between the control logic, which is running off a 5V supply, and something that is probably controlling a larger voltage swing. In addition the various imperfections of the switch element need to be considered, as they can degrade your audio signal.
Variations in ON resistance with signal voltage can cause distortion when the switch is on and non-linear parasitic capacitance.
OFF resistance can do the same when it is off. There is also the problem of the control signal coupling through into the audio path (charge injection) introducing switching clicks, most noticeable when the audio level is low, as well as Fourier products caused by cutting into the waveform when the level is high (also apparent as clicks).
Audiohm optocouplers offer a unique set of features for controlling audio signal switching. The main features are:
| Device | Signal voltage | Isolation voltage | Drive complexity | Drive power | On Resistance | Off Resistance | Charge injection | Fourier clicks | ON distortion | OFF distortion | Cost |
| Junction FET | 15-60 V | 10...55 V | high | a few mW | 10-500 | >100 M | medium-good* | low | medium* | low | low |
| MOSFET | 20-1K V | +/-20 V | high | a few mW | 1-100 | >100 M | medium-poor | good* | low | medium | low |
| relay | >200 V | >500 V | low-medium | >140 mW | <100 m | >100 M | Good | poor | V.low | V.low | high |
| CMOS switch (4000B) | <20 V | <20 V | V.low | µW | 100...500 | >100 M | medium | poor | medium | low | low |
| analog switch (SSM2402) | +/-20 V | +/-20 V | V.low | 90 mW | 50 | N/A | medium-good | V.good | low | high | high |
| Audiohm coupler | 60-500 V | >1 KV | low | 3-60 mW | 10-500 | 1...>100 M | V.good | V.good | V.low | low-medium | medium |
Resistive optocouplers can be used in either series (Figure 1), shunt (Figure 2) or series/shunt (Figure 3) configurations. The multiway selector (Figure 4) is a variation of the series/shunt configuration and behaves similarly if the source resistances are low. In most normal solid state audio circuits the optimum source and load resistances are going to fall somewhere in between the RON and ROFF of the couplers. There is likely to be an asymmetry in the ON and OFF switching times of the series and shunt configurations.
To get the best OFF attenuation, a coupler with high ROFF, for example the NSL-32SR3 is required. Using the circuit of Figure 1 with RL = 5 K10 and ILED= 10 mA, the following results are obtained:
| ON insertion loss: | 0.25 dB |
| OFF attenuation: | -88 dB @ 1KHz, see Figure 5 |
| TON | <1 msec |
| TOFF | 15 msec |
| ON distortion @1 Hz +14 dBu | <0.0007% |
At frequencies above a few hundred Hz, the OFF attenuation is determined mostly by the cell parasitic capacitance and decreases with frequency. To minimize this effect, RL should be kept as low as possible, commensurate with an acceptable insertion loss and distortion performance. TON will increase and TOFF decrease.
| ON insertion loss (High Z load): | 0.1 dB |
| OFF attenuation: | 52 dB @ 20KHz |
| TON: | 200 msec |
| TOFF: | 2 msec |
| ON distortion @1 KHz +14 dBu | <0.001% |
In the shunt switch the cell capacitance is not significant until Rs is >200 K. Large values of Rs give greater OFF attenuation, at the expense of extended switch TON, which may be unacceptable. Under such circumstances a faster responding coupler, for example, the NSL-32SR3 used at a higher current may give better results. The output needs to feed into a high impedance buffer amplifier to minimize insertion loss.
This configuration achieves better OFF attenuation and symmetrical switching times, at the expense of an additional coupler. A practical implementation of a circuit is shown in Figure 6. The drive can be from any device that can swing within 0.25 V of the rails at 5 mA. The zener diodes in series with the LEDs ensure that only one of the couplers will be on at any one time. The NSL-32SR3 is again the preferred coupler. Fast turn-off minimizes the time when both couplers are conducting, as a considerable load could be placed on the circuitry driving the audio input. As shown the performance is:
| ON insertion loss: | 0.1 dB |
| OFF attenuation: | 110 dB @ 1 KHz, see Figure 7 |
| TON = TOFF: | 3 msec |
| ON distortion @1 KHz +14 dBu | 0.0007% |
If longer switching times are wanted for a subjectively smoother transition, then the circuit of Figure 8 can be used. Here the coupler LEDs are driven by an integrator configured around 1/6 of a 74HCU04. The ON and OFF times of the switch are set by the product of Rt and Ct, and with the values shown are approximately 15 msec.