Design Article
Design an audio interface that accepts both differential and single-ended signals
Jason Hansen, ON Semiconductor
1/9/2006 5:00 AM EST
The output of an MP3 player or handset is a single-ended signal designed to drive a 32-Ω earpiece speaker. A typical external speaker system is 4 to 8 Ω for one speaker, with the possibility of multiple speakers per channel. Due to the low impedance, the 32-Ω driver can't support the external speaker drive to provide sufficient volume.
The external speaker system will vary in quality, volume levels, and number of speakers. Therefore, a generic amplifier isn't tuned to drive these speakers. A speaker system made for MP3 players will have a headset jack input and can accept the single-ended output from a stereo signal. Some newer high-end speaker systems will accept a differential signal. To make these systems backwards compatible, they must also accept a single-ended signal.
Single-ended and differential signals will produce different volume levels because the differential signal is twice the single-ended signal. Human hearing follows a logarithmic curve from soft to loud. Hence, a linear control can't be used (Fig. 1).

There are several methods to detect and implement a single-ended/differential audio amp that will amplify the input signal to an equal output. The interface connectors between the systems are assumed to be at least five pins to accommodate the differential signal. A ground connection between the two devices is essential. At first glance, one would think that ac coupling capacitors would eliminate a ground connection because the signal is dc independent. But experience shows that it's necessary to provide excellent noise performance.
The first problem is detecting whether the input is single-ended or differential. Two of the many circuits to implement are an extra pin on the connector to detect the input signal's dc level. Designating an extra pin on the connector is the easiest technique, but it may not be feasible if space is severely constrained. The source device can either leave the pin open or short it to ground.
The second technique to detect the differential signal is to use a comparator to detect the signal's dc level that will be grounded or have the differential signal present. The inputs from both paths must pass thru an very low pass filter. The primary signal must be divided down to the range of 50% to 25% of its dc level. This will assist false detection if the system is in a differential mode with a low-frequency, high peak-to-peak ac signal (Fig 2). This technique can't be used if the source signal's dc level is ground.

The second part of the circuit is the audio amplifier. The solutions to this circuit depend upon the required sound quality. A true differential input provides a higher sound quality than a differential signal going into one amplifier. The true differential amplifier requires an additional circuit to produce the differential input from a single-ended signal.
The easiest implementation for the audio amplifier is the signal into one amplifier (Fig. 3). In single-ended mode, the differential input won't produce a signal, allowing the non-inverting input to set up at 0.5Vcc, which is the standard single-ended input configuration. The analog switch will remain open to create a gain of 2 for the amplifier. In differential mode, the analog switch will close, creating a gain of 1. The difference between the signals will create an equal output signal level for the different input modes.

A second implementation uses a true differential amplifier to drive the speaker. Such an amplifier offers better noise immunity. Unlike the previous example, the input must be a differential signal into the audio amp. The differential signal can be created using an op amp or a transformer. The op-amp implementation has the convenience of size, but the difficulty of balancing the input signal (Fig. 4). The op amp's gain is set to -1 to create an inverted signal of the single-ended input. An analog switch will switch the audio amplifier's input between the inputs. The differential signal will be fed directly into the audio amplifier.

An alternate to using the op amp to create a differential signal is to use a 1:1 transformer. This transformer simplifies the circuit, but can add some size, particularly height, to the solution. Remember that the transformer's frequency range must be within the audio signal range the system will amplify. The input from the source must use an ac bypass capacitor to eliminate a dc short to ground. An analog switch is needed to change the amplifier's gain between 2X for single-ended input and 1X for differential input.

The volume control has several circuit options to implement with a standard single-turn potentiometer. As previously demonstrated, a logarithmic response in the potentiometer is desired to produce a smooth volume increase with a turn of the knob (Fig. 1, again). The potentiometer will counter the circuit, resulting in a linear response. With the differential input, a dual potentiometer is a must for a mono system and a quad must be used for the stereo system.
The easiest implementation is to place the resistor in the potentiometer between the input audio signal and ground. The wiper will connect to the audio amp's input. The output from the wiper is a ratio of the input signal. If the audio amplifier has a high current input requirement, it'll affect the audio amp's input resistor ratio, and hence not produce the desired gain. Additional issues arise when the capacitors are combined with the potentiometer resistance, potentially creating band-pass filters (with roll-off frequency moving with the potentiometer).
A solution is to add an op amp to the potentiometer's wiper (Fig. 6). From the input, the circuit sees the potentiometer's static resistance. The op amp directly drives the audio amp, therefore eliminating the gain differential. The potentiometer can't be referenced to ground for this circuit to eliminate clipping of the output signal because audio amplifiers can't truly be rail-to-rail.


About the author
Jason Hansen works as a field applications engineer for On Semiconductor. Currently, he's focused on charging and power-management system solutions for portable products. Hansen can be reached at Jason.Hansen@onsemi.com.

