AN168 Application Note ACOUSTIC PATH DESIGN FOR FULL-DUPLEX CELLULAR HANDS-FREE CAR KITS This application note describes a design procedure coupled with some testing procedures to enable a system designer to implement a low cost full-duplex cellular hands-free system for cars using the CS6422 Enhanced Echo Cancelling IC. This application note focuses on the design of the acoustic path, that is, the path between the acoustic output (AO) and the acoustic input (APO) of the CS6422.
AN168 TABLE OF CONTENTS 1. DESIGN PROCESS AND CONSIDERATIONS ........................................................................ 1 1.1 Design Flow ....................................................................................................................... 1 1.2 Mechanical Design ............................................................................................................. 4 1.2.1 Selecting the Acoustic Components ................................................................
AN168 LIST OF FIGURES Figure 1. Speaker Distortion.................................................................................................................... 4 Figure 2. Speaker Driver Distortion ......................................................................................................... 6 Figure 3. Generic Speaker Driver Configuration ..................................................................................... 7 Figure 4. Using RVol to Implement Volume Control................
AN168 1.2 Mechanical Design The performance of full-duplex hands-free designs is strongly influenced by the mechanical hardware, far more so than comparable half-duplex systems. Upgrading a half-duplex design by adding a full-duplex echo controller without changing the half-duplex mechanical hardware typically results in a system whose performance is unacceptable. This section describes the critical parameters of the mechanical design that ensure quality full-duplex operation.
AN168 1.2.1.3 Speaker Housing Requirements The quality of the speaker housing affects the performance of the system because the speaker can induce vibrations in its housing if it is not properly mounted. These vibrations tend to create “buzzing” artifacts which are not linear and result in poor echo canceler performance. Speakers that are supplied after-market in a housing and speakers that are part of the car's radio system generally do not present problems.
AN168 V Gain = --------Vin Speaker Driver Vout where Vin = full-scale voltage at the AO pin of the CS6422, which is 1 Vrms, or 0 dBV. Additionally, the gain can be expressed in dB using the following relationship: Rx Out VCC Gain ( dB ) = 20 × log ( Gain ) GND Figure 2. Speaker Driver Distortion The Appendix lists five example speaker driver circuits that are suitable for full-duplex hands-free systems. 1.3.
AN168 CS6422 A0 +20 dB R1 + + R2 Attenuation Gain Figure 3. Generic Speaker Driver Configuration CS6422 D/A RVol Speaker Driver Acoustic Echo Canceler Mic Preamp TVol + Σ A/D 3 Microcontroller Figure 4. Using RVol to Implement Volume Control 1.3.3 Volume Control In most half-duplex systems, volume control is implemented by changing the gain of the speaker driver.
AN168 1.3.4 Acoustic Coupling Figure 5 shows the three most common places for distortion to be introduced into the acoustic path. These are the speaker driver, the speaker, and clipping at the A/D converter after the mic preamp. With careful choice of the speaker and speaker driver gain, we can eliminate the first two by using the techniques previously discussed. The third distortion source, clipping at the A/D converter, is controlled by limiting the amount of acoustic coupling.
AN168 Speaker Driver Speaker AO DAC 1 2 Air CS6422 Coupling 3 APO ADC Mic Preamp Microphone Figure 5. Three Common Sources of Acoustic Path Distortion Speaker Driver Speaker AO DAC Air Acoustic Path = -9dB CS6422 Coupling APO ADC Mic Preamp Microphone Figure 6. Acoustic Coupling Design Target Acoustic Coupling (dB) 0 500 1000 1500 2000 2500 3000 3500 4000 0 -10 -20 -30 -40 -50 -60 -70 -80 Frequency (Hz) Figure 7.
AN168 maximum value of this curve is then noted, and gain is added or subtracted at the mic preamp in order to set this maximum value to -9 dBV (with TGain set to 0 dB). This procedure is further described in the Tests section of this note. The loop gain method uses howling to determine the optimum mic preamp gain. In short, the phone network is disconnected from the CS6422, and TVol, RVol and NSdt are used to create a +9 dB path between APO and AO inside the CS6422.
AN168 The register settings to accomplish the above are as follows: reg 0: 47a0 (or c7a0 if internal mic preamp is used) reg 1: 26a2 reg 2: 0004 (default) reg 3: 0006 (default) reg 4: 0008 (default) reg 5: 033a Note: If the mic preamp gain is not easily adjustable in the test circuit, coarse amounts of gain can be added by using the TGain control, which can be set to 0 dB, +6 dB, +9.5 dB, or +12 dB. 1.3.
AN168 Configure the CS6422 from reset with the following: 1) Mic set to '1' or '0', depending on whether the internal mic preamp is used or not 2) GB = 0.75 dB/ms 3) RVol = +18 dB (this is the default setting; RVol should be set between +6 dB and +30 dB) 4) Taps = 55.
AN168 This parameter can be tested using the Half-Duplex Alternate Counting Test as described in the Tests section. 9) RSD controls the enable/disable of the receive suppression engine. The receive suppressor is a noise squelch that provides 24 dB of attenuation to the receive path when the far-end talker is silent. The receive suppressor operates in half-duplex and full-duplex modes.
AN168 typically employ the sidetone only on the analog interface, leaving the digital interface sidetone-free. If it is not possible to disable the sidetone or work around it by using a different interface, then the presence of the sidetone must be considered in the design of the system. To minimize the loop gain as well as to prevent the local mic signal from being echoed out the speaker, it is necessary to enable the Network Echo Canceler and to allocate Taps to it.
AN168 1.5.1 Acoustic Coupling 1.5.1.1 Loop Gain Method The term ‘Acoustic Coupling’ refers to the gain between the AO and the APO pins on the CS6422. It includes the speaker driver gain, the efficiency of the speaker, the loss in the air path between the speaker and the microphone, the sensitivity of the microphone, and the gain of the microphone preamp. Here we present two methods of measuring the acoustic coupling, the loop gain method and the frequency response measurement method.
AN168 CS6422 Adjust AO Disconnect Network +?dB 0dB RVol - Receive Volume Speaker Driver -?dB -12dB NSdt - Network Sidetone Air Coupling TVol - Transmit Volume APO 12dB 30dB Mic Preamp Adjust RVol until howling begins; AC = 0 - RVo l - Mic -Spkr Figure 11.
AN168 the frequency of the howl itself is the frequency at which the loop gain, whose frequency response is dominated by the acoustic coupling, is maximum. 1.5.1.2 Frequency Response Method Measuring the frequency response of the acoustic path in the target environment is strongly recommended. In general, the flatter the frequency response, the better the performance of the echo canceler.
AN168 There are two tests which should be performed, a Frequency Sweep distortion test and a Buzz test. means that there is no echo at those frequencies to cancel. 1.5.2.1 Frequency Sweep Test The graph that we need is a relative THD+N curve that is weighted with the acoustic coupling information. This curve can be constructed by normalizing the acoustic coupling curve by shifting it vertically such that the maximum value is set at 0 dB then adding this normalized curve to the relative THD+N curve.
AN168 Coupling-Weighted THD (%) 1.2 1 0.8 0.6 0.4 0.2 0 0 500 1000 1500 2000 2500 3000 3500 4000 Frequency (Hz) Figure 14. Coupling-Weighted THD+N Similar to harmonic distortion, these ‘buzzing’ artifacts cause elevated levels of residual echo because they result from a non-linear phenomenon that the echo canceler cannot model. The test for buzzing is similar to the frequency sweep distortion test.
AN168 discussed earlier in this note. 2) Configure the CS6422 from reset with the exception of the following: 5) Turn OFF the white noise source. 6) Set ACC to ‘Normal’. 7) Turn ON the white noise source. a) Mic set to '1' or '0', depending on whether the internal mic preamp is used or not 8) Record the band-limited RMS voltage level at NO after 5 seconds or more of white noise. b) HDD = ‘1’ The ERLE is the difference in dB voltage levels of (8) and (4): c) GB = 0.
AN168 The difference between the two RVol values is the worst-case ERLE of the echo canceler. Here is the detailed procedure: 1) Set up the speaker and microphone and mic preamp gain for -9 dB of acoustic coupling.
AN168 sults. just starts howling. Record this value. See Figure 16. 6) Disconnect the signal source from NI (or simply turn it off). 9) Set ACC to ‘cleared’. 7) Close the loop by setting NSdt to ‘-12dB’, RVol to ‘0 dB’, and TVol to ‘+12 dB’. 10) Decrease RVol until the system just stops howling. Record this value. See Figure 17.
AN168 the two RVol values in dB. 1.5.4 Call Testing and Coefficient Optimization on changes in path. In this test, the CS6422 is loaded with the starting register configuration set listed earlier in this note, which is repeated here for convenience: The following tests are useful for optimizing the CS6422 register settings. These tests should be performed in a car, not a lab. They can be performed in a lab, but the resulting coefficients and settings will not be optimal for actual car use.
AN168 reg 2: 0a14 1.5.4.1.3 Subtest C, Transmit Suppression test reg 3: a046 This test verifies that the TSThd parameter is set correctly, which controls the engagement of the Transmit Suppressor. If TSThd is set too high, the suppressor will not engage reliably, and the far-end listener will hear residual echo during single-talk. reg 4: 5008 reg 5: 018a For the EC Convergence Test, we also disable Half-Duplex mode and the Transmit Suppressor by setting HDD = TSD = ‘1’.
AN168 The Half-duplex alternate counting test tests the half-duplex behavior of the system. This test is useful even if half-duplex mode is disabled, because the half-duplex engine controls in part the training of the adaptive filters. the delay between the system switching from transmit mode to receive mode. RHDet and THDet control the SNR level at which speech is detected.
AN168 2) Decoupling and loading capacitors should be placed as close as possible to the pins they decouple (AVDD, AGND, DVDD, DGND, MB, CLKI, CLKO), with the smaller-valued capacitor closest to the pin. speaker driver, typically BATTGND if the speaker driver is powered from the +12V battery source. This prevents the speaker driver from amplifying noise caused by potential differences between AGND and BATT GND.
AN168 1.6.2.3 +12VBATT/BATTGND Components 1) Cell-phone battery charger circuitry 2) Speaker driver (if powered from +12V source) Most cellular phones provide two grounds at the hands-free connector, DGND and AGND. DGND ties to the phone battery, and should be connected to BATTGND on the hands-free kit. The cell phone’s analog interface pins are referenced to the AGND signal, and this AGND should tie to AGND on the hands-free kit.
AN168 1.7.4 Acoustic coupling The maximum acoustic coupling (across frequency) between the speaker and the microphone should be limited to -9 dB. This can be tested and verified by using techniques described earlier. 1.7.5 Training sequence The Acoustic Echo Canceler trains only when the far-end is talking while the near-end is silent. When 28 the system is in half-duplex mode, the AEC trains whenever the receive path is active.
AN168 2. APPENDIX - EXAMPLE SPEAKER DRIVER CIRCUITS In the following pages are 5 example speaker driver circuits. In each case, the maximum gain is listed that the speaker driver can assume for the associated power supply voltage and a 4 ohm speaker. If less gain is needed, R1 can be increased or R2 can be decreased. As discussed previously, volume control should be implemented using the RVol control inside the CS6422. DO NOT allow the gain of the speaker driver to be changed during a call.
MC33202 U3 CS6422_A0 + C8 10uF +5V C1 0.047uF C7 0.1uF R1 12.1k C6 10uF + MC33202 +5V R6 10K R5 10K Vbias R3 16.2k MC33202 - + U2 C4 4700pF (COG) C5 0.47uF C2 = 1/[2 * PI * R2 * (4 kHz)] C1 = 1/[2 * PI * R1 * (300 Hz)] Gain = R2/R1 C3 1200pF (COG) R4 16.2k Figure 21. Example 4 kHz, 3-Pole Butterworth Low-Pass Filter Vbias U1 + - 30 R2 12.
AN168REV2 CS6422_A0 R1 301K R2 12.1K C3 10uF C2 3300pF C5 100uF Figure 22. TDA 1519A Schematic Gain = [R2/(R1+R2)]*[200] Gain = +17.8dB 15 Watts into 4 ohms C1 1800pF + 9 1 + U1 + - TDA1519A - + 8 7 3 2 5 -28.2dB 6 4 +46dB C6 0.
CS6422_A0 R2 12.1K R1 340K C2 3300pF C3 10uF + 2 1 - + TDA2003 U1 4 C4 0.1uF + C5 100uF Figure 23. TDA 2003 Schematic Gain = [R2/(R1+R2)]*[1+R4/R5] Gain = +10.7dB 3 Watts into 4 ohms C1 1500pF +14V 5 3 -29.3dB R3 39.2 C7 470uF C6 39nF R5 2.
AN168 2.3 Example 3: TDA1905 -- 2.5 Watts into 4 Ω R2 R3 Gain = ⎛ --------------------⎞ × ⎛ 1 + -------⎞ ⎝ R1 + R2⎠ ⎝ R4⎠ The schematic for the TDA1905 speaker driver is shown in Figure 24. The TDA1905, from ST, is capable of supplying 2.5 Watts of RMS power into a 4 Ω load with less than 2% THD. The gain required to achieve 2.5 Watts is +10 dB, which is implemented with an attenuation stage of -30 dB followed by the TDA1905 gain implemented as +40 dB.
AN168 2.4 Example 4: LM1877-- 2 Watts into 4 Ω 2.5 Example 5: LM4861-- 1 Watt into 4 Ω The schematic for the LM1877 speaker driver is shown in Figure 25. The LM1877, from National Semiconductor, is capable of supplying 2 Watts of RMS power into a 4 Ω load with less than 2% THD. The gain required to achieve 2 Watts is +9 dB, which is implemented with an attenuation stage of -17 dB followed by the LM1877 gain implemented as +26 dB. The schematic for the LM4861 speaker driver is shown in Figure 26.
AN168REV2 C1 6200pF R2 12.1K R1 73.2K C2 3900pF C3 10uF + R4 1M R7 1M R5 1.33K 9 8 7 6 C5 100uF Figure 25. LM 1877 Schematic Gain = [R2/(R1+R2)]*[1+R3/R5+R6/R5] Gain = +9dB 2 Watts into 4 ohms CS6422_A0 -17dB - R6 13.3K R3 12.1K - + 14 + + 1 3-5,10-12 13 U? LM1187 2 C6 0.1uF + +14V +26dB C9 0.1uF R9 2.7ohm C8 0.1uF R8 2.
CS6422_A0 C1 0.047uF R1 12.1K C3 10uF + - LM4861 8 5 U? C4 0.1uF Date Revision DEC ‘99 REV1 Original Release MAR ‘06 REV2 Update company contact information, legal statement. Figure 26. LM 4861 Schematic Gain = (2)*(R2/R1) Gain = +6dB + R2 12.1K +5V 1 Watt into 4 ohms + 3 2 4 6 7 1 C2 3300pF C5 100uF 4 Ohm SPEAKER LS1 AN168 3.