Technical Reference

Audio level control with resistive optocouplers



Controlling the level of an audio signal by means of an applied voltage or current has always been problematical but often desirable, particularly when it is necessary to control a circuit from a computer. This application note deals with voltage or current controlled attenuators using optocouplers, primarily in relatively static situations (as opposed to the dynamic control that occurs in compressors, limiters and noise gates where the gain is continuously being changed in relation to the signal). Although the circuit configurations are broadly similar to those used when switching audio signals, the demands on the optocoupler are rather different, as it is being used as a variable resistor rather than being hard ON or OFF.

Audiohm optocouplers offer a unique set of features for controlling audio signal levels.

The main features are:
  1. Very high isolation between control port and audio circuit.
  2. Relatively simple drive circuit.
  3. Relatively low drive requirement (<60 mW)
  4. Very low control feedthrough.
  5. Medium -> good distortion performance.
  6. Large signal voltage range: up to 500 V.
To compare their performance with other methods:
Device Signal voltage Isolation voltage/feedthrough Drive complexity Power consumption # Distortion Speed Cost
Junction FET a few V 0/medium high 2-50 mW medium * fast low
Audiohm coupler 60-500 V >1 KV/v.good medium 2-100 mW med-good med medium
IC VCA ±15 V 0/good low-medium 50-100 mW med-good fast medium
VCA Module ± 15 V 0/v.good low 200-500 mW good fast high
Motor driven potentiometer 50-200 V >1 kv/good high 1 W+ v.good slow high
#including support circuitry *depends on drive circuit


back to top


Attenuator configurations

Resistive optocouplers can be used in either series (Figure 1), shunt (Figure 2) or series/shunt (Figure 3) configurations.The hybrid series/shunt (Figure 4) is a cross between the shunt and series/shunt and offers some advantages.

In most normal solid state audio circuits, the optimum source and oad resistances are going to fall somewhere in between the Ron and Roffof the couplers. There is likely to be a significant asymmetry between the "up" (decreasing attenuation) and "down" (increasing attenuation) times of the series and shunt configurations. If this a problem, it is best to use a coupler with a relatively fast response, for example the NSL-32SR3. This device also shows the best distortion performance of any of the NSL-32 series.This is an important consideration when being used as a linear attenuator, as it will not be driven hard ON or OFF as in a switching circuit. It is better to drive the coupler LED from a constant current source, to minimize the effects of variations in LED forward voltage from device to device and temperature. A simple circuit that gives 1mA per Volt input is shown in Figure 5.

The measurements of the various circuits were taken with an input level of +10 dBu at 1 KHz, and the distortion (THD+N) measured with a 30 KHz bandwidth. Although some of the distortion figures may seem less than ideal, three factors should be kept in mind:

  1. These measurements were taken at fairly high levels, typically corresponding to -6 dBFS on professional equipment. They will decrease rapidly with input level typically being 3 to 4 times less at 0 dBu, and virtually unmeasurable at -20 dBu.
  2. The distortion products produced by an Audiohm coupler are all low order, second and third harmonics, which are less objectionable than high order harmonics produced by crossover artifacts.
  3. In the series/shunt and hybrid series/shunt attenuator configurations the worst distortion occurs at high attenuations. The output signal level is so low that the distortion is unlikely to be noticeable.


back to top


Series Attenuator

Figure 6shows the attenuation and distortion vs. control voltage of the circuit in Figure 1, driven by the constant current source.

Please note that the horizontal scale is in mA, for example 300 m = 300 microamps. Input signal was 1 KHz, +10 dBu. The high dark resistance of the NSL-32SR3 gives quite good attenuation (typically about 80 dB at 1 KHz). However the circuit's usefulness is limited by the non-linear relationship between LED current and attenuation, and high distortion levels at any attenuation level below -10 dB. This is because the voltage across the non-linear cell resistance increases as the coupler turns off. Time constants are approx 0.5 and 12 msec for increasing and decreasing gain respectively. At frequencies above a few hundred Hz, the maximum attenuation is mostly determined by the parasitic capacitance and decreases with frequency.



back to top


Shunt attenuator

In this configuration (Figure 2) a coupler with low RON, for example the NSL-32SR2, provides the best OFF attenuation for a given LED current.

With Rs = 47 K0 and ILED = 10 mA, 60 dB can be readily obtained. However, the time constant for increasing the gain will be approximately 300 msec which will cause a noticeable lag in response. To get an equivalent attenuation from the faster NSL-32SR3 requires an Rs of 100 KOhms, which may give noise and interference pickup problems. The output needs to feed into a high impedance buffer amplifier to minimize insertion loss. A FET input device is ideal.

The attenuation and distortion response of this circuit is shown in Figure 7, note the peak in distortion at 2 to 3 dB attenuation. At very low currents the cell resistance is so high that the non-linear resistance of the cell has little effect, even though it has the full signal voltage across it. At high currents the cell resistance is low with most of the signal dropped across Rs. Since the cell non-linearity is proportional to the cell voltage, distortion is low. It is at currents where the cell resistance is a little less than Rs but still has a large proportion of the signal across it that the worst distortion occurs. Also note that the rising THD+N below 25 dB attenuation is NOT due to distortion, but inherent circuit and measurement system noise. If measured with a FFT analyser, the distortion continues to fall with attenuation.


Alternatively, a two stage attenuator as shown in the Figure 8 can be used. This has the advantage of not taking any more drive current than a single stage, as the LEDs are in series almost doubling the attenuation range for a given Rs. Figure 9 shows the response. Although the control law is not linear, it is gentle enough to give a smooth response if the control voltage is derived from a potentiometer with a reverse logarithmic law.


back to top


Series/shunt attenuator.

This configuration (Figure 3) achieves better OFF attenuation and symmetrical time constants, at the expense of an additional coupler. The circuit could be driven by complementary current sources, but the simple arrangement shown in Figure 10 saves complexity and current consumption, and also provides a reasonable dB/linear control law over a good proportion of the range. With the values shown, the circuit imitates a 5 KOhm potentiometer, although there is some overall variation in total resistance with attenuation as it should be fed from a low impedance source. C1 sets the up and down time constants at about 20 msec, which achieves a fast but smooth audible response. The attenuation and distortion curves are shown in Figure 11.

Note the distortion null at 6 dB attenuation where both couplers have the same resistance.


back to top


The hybrid series/shunt arrangement shown in Figure 12 gives an improvement in distortion performance, Figure 13, by using resistor R3 to drop a proportion of the signal at low to medium levels of attenuation. The "bent" attenuation law is useful, giving greater resolution in the normal working area of the control, and a sharper response towards cut-off. To further improve on this distortion performance there are two possibilities:

  1. Use a coupler with a higher voltage rating, for example the NSL-37V51.
  2. Use two couplers in series to reduce the voltage across each cell.

The temperature dependence of the coupler LED and diode forward voltage drops make the attenuation of these circuits sensitive to variations in ambient. These dependencies can be compensated by running the circuit from a 5V supply that tracks the variation. A suitable circuit is shown in Figure 14. The LED should be an AlGaAs type. The control voltage will also need to be referenced to this.


back to top


Defined Attenuation law:

All the above circuits have a control law, which is determined by the inherent characteristics of the couplers and supporting devices. Although consequently non-linear, it is useable for many simple applications. If a true linear response is desired the circuit of Figure 15 can be used. A shunt attenuator is placed in the feedback loop of IC1, which sets the current through the coupler OP1 so that the feedback voltage on IC1 pin 3 is equal to the control voltage applied to R1. Matched coupler OP2 has the same current flowing through the LED as OP1, forming a shunt attenuator linearly controlled by V_CONTROL. OP1 should feed a high load impedance for best linearity and insertion loss. C1 provides frequency compensation around the loop for stability. The output attenuator is fully floating and can be run hundreds of volts away from the control circuit. This feedback control could equally be applied to a series/shunt circuit giving a floating linear potentiometer output.


back to top


Level Controls and Crossfader:

Frequently in audio mixing it is desirable to fade between one source and another. A standard slider potentiometer can be used for this purpose. Unless the highest quality conductive plastic elements are used, the track rapidly degrades with use resulting in contact noise as the wiper is moved. The circuit in Figure 16 helps reduce this by using the potentiometer (designed for DC use) to generate control voltages. These in turn control two sets of Audiohm couplers that determine the relative gains of the audio channels. Capacitor C1 smooths the wiper voltage of the potentiometer, which is buffered by IC1a to reduce wiper current, thereby reducing contact noise. The complementary control voltages are slightly "bent" by the networks around LD1 and LD2 to offer the smoothest fade law, and then fed to IC2a and IC2b which have OP1 and OP2 in their feedback loops, in the same way as the circuit in Figure 15. As shown with matched NSL-32SR3S couplers the maximum attenuation is typically 60 dB and the insertion loss less than 0.2 dB. For a greater attenuation range two stage attenuators could be used. Alternatively, the A and B signals from the emitters of Q1 and Q2 could be used to fire muting switches when the potentiometer is at either extreme.


Click image to enlarge


back to top


back to top

Silonex offers these documents in support of the product only and does not guarantee the performance of any application designed from the information. It is the customers responsibility to ensure the end product is manufactured correctly.
 
Casco branding graphic