A pp lication Note 02

575 views

Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

A pp lication Note 02

  1. 1. Audio Interface Design Application Note 02 for GSM Applications Siemens Cellular Engines Version: v06 DocID: mc4x_5x_AN_02_Audio_v06 Supported products: MC4x, MC5x, MC38x, TC45, XT5x
  2. 2. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s Application Note 02: Audio Interface Design for GSM Applications Supported products: MC4x, MC5x, MC38x, TC45, XT5x Version: v06 Date: September 09, 2005 DocId: mc4x_5x_AN_02_Audio_v06 Status: Confidential / Released General Notes Product is deemed accepted by Recipient and is provided without interface to Recipient’s products. The documentation and/or Product are provided for testing, evaluation, integration and information purposes. The documentation and/or Product are provided on an “as is” basis only and may contain deficiencies or inadequacies. The Documentation and/or Product are provided without warranty of any kind, express or implied. To the maximum extent permitted by applicable law, Siemens further disclaims all warranties, including without limitation any implied warranties of merchantability, completeness, fitness for a particular purpose and non-infringement of third-party rights. The entire risk arising out of the use or performance of the Product and documentation remains with Recipient. This Product is not intended for use in life support appliances, devices or systems where a malfunction of the product can reasonably be expected to result in personal injury. Applications incorporating the described product must be designed to be in accordance with the technical specifications provided in these guidelines. Failure to comply with any of the required procedures can result in malfunctions or serious discrepancies in results. Furthermore, all safety instructions regarding the use of mobile technical systems, including GSM products, which also apply to cellular phones must be followed. Siemens or its suppliers shall, regardless of any legal theory upon which the claim is based, not be liable for any consequential, incidental, direct, indirect, punitive or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information or data, or other pecuniary loss) arising out the use of or inability to use the Documentation and/or Product, even if Siemens has been advised of the possibility of such damages. The foregoing limitations of liability shall not apply in case of mandatory liability, e.g. under the German Product Liability Act, in case of intent, gross negligence, injury of life, body or health, or breach of a condition which goes to the root of the contract. However, Claims for Damages arising from a breach of a condition which goes to the root of the contract shall be limited to the foreseeable damage which is intrinsic to the contract, unless caused by intent or gross negligence or based on liability for injury of life, body or health. The above provision does not imply a change on the burden of proof to the detriment of the Recipient. Subject to change without notice at any time. The interpretation of this general note shall be governed and construed according to German law without reference to any other substantive law. Copyright Copying of this document and giving it to others and the use or communication of the contents thereof, are forbidden without express authority. Offenders are liable to the payment of damages. All rights reserved in the event of grant of a patent or the registration of a utility model or design. Copyright © Siemens AG 2005 mc4x_5x_AN_02_Audio_v06 Page 2 of 33 09.09.2005
  3. 3. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s Contents 0 Document History .........................................................................................................5 1 Introduction ...................................................................................................................6 1.1 Supported Products ...............................................................................................6 1.2 Related Documents ...............................................................................................6 1.3 Approval Considerations........................................................................................7 1.4 Terms and Abbreviations.......................................................................................8 2 Overview of Audio Interfaces.......................................................................................9 2.1 General Usage of the Microphone Interfaces 1 and 2 ...........................................9 3 Solutions for the Digital Audio Interface (DAI).........................................................10 4 Solutions for Analog Audio Interfaces......................................................................11 4.1 Typical Audio Problems .......................................................................................11 4.1.1 Power Supply Related Audio Problems ...................................................11 4.1.2 RF Related Audio Problems.....................................................................12 4.1.3 How to Avoid Echo Problems at the Headset Interface ...........................13 4.2 Internal Microphone Feeding (Audio Input 2 Only) ..............................................14 4.3 External Microphone Feeding..............................................................................14 4.3.1 Simple Microphone Feeding ....................................................................15 4.3.2 Balanced Microphone Feeding ................................................................16 4.4 Galvanically Coupling the Speaker Signal...........................................................17 4.5 Decoupling the Speaker Signal ...........................................................................18 5 Overvoltage Protection...............................................................................................19 5.1 Spark Gaps..........................................................................................................19 5.2 Clamp Diodes ......................................................................................................19 5.3 Clamp Diodes with External Serial Resistor ........................................................19 5.4 Z-Diodes ..............................................................................................................20 5.5 Capacitors............................................................................................................20 6 Using AT commands to Control the Audio Interface...............................................21 6.1 Supported Audio Modes ......................................................................................21 6.2 Adjusting the Volume...........................................................................................22 6.2.1 Calculating dB ..........................................................................................23 6.2.2 Specifying the Value of the Volume Steps ...............................................23 6.2.3 Changing Microphone Sensitivity.............................................................25 6.2.4 Using an External Audio Processing Codec ............................................25 6.3 Changing Physical Audio Interface......................................................................26 6.4 Extended Usage of the MICP2 Pin ......................................................................27 7 Speakerphone Mode ...................................................................................................28 7.1 Mechanical and Quality Issues ............................................................................28 7.2 Short Introduction to DSP Algorithms ..................................................................29 7.3 Speakerphone Reference Application .................................................................30 7.4 Speakerphone Reference Environment...............................................................30 8 Siemens Reference Setup ..........................................................................................31 9 List of Parts and Accessories....................................................................................32 9.1 Suppliers of Acoustic Devices .............................................................................32 10 Sample Circuit for a Simple Phone Application.......................................................33 mc4x_5x_AN_02_Audio_v06 Page 3 of 33 09.09.2005
  4. 4. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s Figures Figure 1: Block diagram of digital and analog interfaces selectable with AT^SAIC ................. 9 Figure 2: Block circuit for DAI to analog converter ................................................................. 10 Figure 3: Sample circuit for analog to DAI box....................................................................... 10 Figure 4: Ground bouncing problem (example)...................................................................... 11 Figure 5: TDMA noise/humming in the output spectrum ........................................................ 12 Figure 6: Recommended serial resistors for semiconductor inputs ....................................... 12 Figure 7: Principle circuit explaining the echo at 3-wire headset interfaces........................... 13 Figure 8: Idealized diagram of the fed audio input 2 terminal ................................................ 14 Figure 9: Circuit of microphone feeding at the module’s non-fed audio interface 1 ............... 15 Figure 10: Circuit of microphone feeding at fed audio input 2 with opamp near microphone 15 Figure 11: Circuit of a balanced microphone feeding............................................................. 16 Figure 12: Idealized diagram of the audio output terminal ..................................................... 17 Figure 13: Speaker decoupling .............................................................................................. 18 Figure 14: Circuit for transforming balanced to unbalanced signals ...................................... 18 Figure 15: Spark gap.............................................................................................................. 19 Figure 16: Audio parameters selectable with AT commands ................................................. 23 Figure 17: Siemens Car Kit Portable HKP-500 ...................................................................... 28 Figure 18: Speakerphone arrangement with Car Kit Portable................................................ 30 Figure 19: Siemens reference equipment .............................................................................. 31 Figure 20: Sample circuit for a simple phone application....................................................... 33 Tables Table 1: Selectable audio modes (with factory default audio parameter set)......................... 21 Table 2: Default values of audio modes (subject to change) ................................................. 22 Table 3: Summary of products listed in this Application Note ................................................ 32 Table 4: Suppliers of acoustic devices ................................................................................... 32 mc4x_5x_AN_02_Audio_v06 Page 4 of 33 09.09.2005
  5. 5. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 0 Document History This chapter reports modifications and improvements over previous versions of the document. Preceding Application Note 02: "Audio Interface Design", Version 05 New Application Note 02: "Audio Interface Design for GSM Applications", Version v06 Chapter What is new 1.3 Updated approval considerations 4.1 New Chapter: Typical Audio Problems 4.5 Added remarks on balanced to unbalanced signal conversion. 5.2 Added note on filter for VDD line. Preceding Application Note 02: "Audio Interface Design", Version 04 New Application Note 02: "Audio Interface Design for GSM Applications", Version v05 Chapter What is new 1.1 Added further supported products. 4.3.2 Added note on balanced microphone feeding and cable length of application. 6.2.2 More detailed list of volume settings. Preceding Application Note 02: "Audio Interface Design", Version 03 New Application Note 02: "Audio Interface Design for GSM Applications", Version v04 Chapter What is new 1.1 Added further supported products. 2 New overview of audio interfaces. 4 Added information on typical audio problems in GSM applications 5 Recommendations for RF decoupling. 6.2.1 New Chapter: “Calculating dB” 6.3 Settings of AT^SAIC storable to user profile (not applicable to Siemens GSM modules released before August 2003) 7 Added information on Siemens Car Kit Portable mc4x_5x_AN_02_Audio_v06 Page 5 of 33 09.09.2005
  6. 6. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 1 Introduction This application note provides technical recommendations for integrating audio accessories into cellular applications based on Siemens GSM modules. It discusses various solutions for typical design approaches, evaluates strategies of overvoltage protection, explains the concept of speakerphone operation, and then focuses on audio specific AT commands. A list of sales contacts and a summary of the discussed audio accessories is included. 1.1 Supported Products • MC45 • MC46 • MC55 • MC56 • MC388 • MC389 • TC45 • XT55 • XT56 1.2 Related Documents [1] Hardware Interface Description of your Siemens wireless module [2] AT Command Set for your Siemens wireless module [3] Release Notes related to the firmware of your Siemens wireless module The latest product information and technical documents are ready for download on the Siemens Website or may be obtained from your local dealer or the Siemens Sales department. To visit the Siemens Website you can use the following link: http://www.siemens.com/wm mc4x_5x_AN_02_Audio_v06 Page 6 of 33 09.09.2005
  7. 7. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 1.3 Approval Considerations The Siemens GSM modules listed above have been type approved for use with the Siemens reference equipment described in Chapter 8. Regarding audio performance, compliance with the TS 51010-1 specification and GCF recommendations has been certified for the parameters provided by audio mode 1 and audio interface 1. The settings are optimized for the reference handset (type Votronic) connected to the evaluation kit DSB45. To ensure that the reference parameters are always within the limits demanded by the standards they cannot be changed by AT command. Furthermore, the reference parameters are set as factory default. If the customer’s application is a mobile device with inbuilt microphone and speaker it needs to be compliant with the TS 51010-1 requirements specified for frequency response, loudness, listener side tone and noise suppression. All measurements shall be done with the mobile device connected to the artificial mouth and the artificial ear test set. Siemens offers assistance in adjusting the internal DSP to ensure that mobile devices with internal microphone and loudspeaker are fully standard compliant. This is achieved by creating a customized audio parameter file which can be downloaded onto each mobile device. The service is available on request, for further information please contact Siemens. If the customer’s application connects to an external headset or speakerphone it is not necessary to fulfill the above GSM specifications. Yet, to achieve a high standard of audio quality in the final product and to shorten the time of development Siemens is offering the same audio parameter customization service. For this kind of applications, the focus is on customizing frequency response, echo cancellation and noise reduction parameters according to the properties of the connected peripherals. Outside Europe, there may be further international, national or government standards and regulations to be observed for type approval. mc4x_5x_AN_02_Audio_v06 Page 7 of 33 09.09.2005
  8. 8. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 1.4 Terms and Abbreviations Abbreviation Meaning AF Audio Frequency DAI Digital Audio Interface dBm0 Digital level, 3.14dBm0 corresponds to full scale, see ITU G.711, A-law DSB45 Development Support Box 45 EMC Electro Magnetic Compatibility EMI Electromagnetic Interference EPP Earpiece Positive EPN Earpiece Negative ESD Electrostatic discharge FFC Flat Flexible Cable GSM Global System for Mobile Communication MICP Microphone Positive MICN Microphone Negative n.c. Not connected NLMS Normalized Least-Mean-Square opamp Operational amplifier PCB Printed Circuit Board SIM Subscriber Identifier Module SNR Signal-to-noise ratio RF Radio Frequency TDMA Time Division Multiple Access VANA Voltage Analog VREF Voltage Reference mc4x_5x_AN_02_Audio_v06 Page 8 of 33 09.09.2005
  9. 9. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 2 Overview of Audio Interfaces Using the AT^SAIC command you can switch back and forth between each of the analog interfaces and the digital interface. See also Chapter 6.3 for details on how to use AT^SAIC. The two analog outputs are identically designed. The two analog inputs are slightly different and intended for use with different devices. The DAI replaces the AD/DA converter unit of the module. Thus, all digital filters, gains and DSP functions are usable via DAI. If a flat frequency response without influence of DSP is requested, audio modes 5 or 6 are recommended. MIC1 <mic> 2.65V 1k <inCalibrate> MIC2 1k -∞...0dB A 10uF <inBbcGain> D Speech coder 1k +0...42dB in 6dB steps 1k RFSDAI, RXDDAI <sideTone> <io> <ep> <outBbcGain> D Speech decoder + A <outCalibrate[n]> neg. gain (attenuation) n = 0...4 0dB; -6db, -12dB; -18dB TFSDAI, TXDDAI AT parameters are given in brackets <…> and marked red and italic. Figure 1: Block diagram of digital and analog interfaces selectable with AT^SAIC 2.1 General Usage of the Microphone Interfaces 1 and 2 Microphone interface 1 is high impedance (~50kOhm) and shall be used preferably if an opamp or a CODEC is connected or additional microphone feeding is needed. Microphone interface 2 is high impedance (~1kOhm) and shall be used preferably if internal microphone feeding can be used, e.g. for an internal microphone. To reduce or increase the gain of the module you may use the AT^SNFI command. Compare chapter 6.2.3. mc4x_5x_AN_02_Audio_v06 Page 9 of 33 09.09.2005
  10. 10. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 3 Solutions for the Digital Audio Interface (DAI) Figure 2 and Figure 3 show an example of using the digital audio interface of the module. The Motorola codec MC145483 can be replaced with a DSP. For a GSM module the frequency of the clock generator is not fix, but the MC145483 accepts only discrete frequencies. Framesync master is the module (TFSDAI line) and thus the GSM network. GSM module DAI to analog converter 4.096 MHz Clock Generator SCLK 13-Bit-Linear- TXDDAI CODEC TFSDAI RFSDAI RFXDAI MC145483 Figure 2: Block circuit for DAI to analog converter This DAI analog converter is well suited for evaluating and testing a telephone handset and can be used instead of the headset interface of the DSB45. R6 U2A U2B +3.0V 1 2 3 4 1k + C6 R5 100uF C4 420pF 1k 74HCU04 R10 74HCU04 100R R1 75k R3 1k C4 100nF C3 Mic1 R11 10M 10nF 2 Y2 1 +3.0V U1 MICROPHONE 4.096MHz 6 20 R2 75k R4 1k C4 100nF C3 C3 VDD VAG 19 22pF 22pF 10 TI+ 18 C3 PDI TI- 17 C4 420pF speaker gain 100nF TG 2 J1 7 RO- 3 R7 20k R8 100k LS1 2 1 FSD 14 FSR PI 4 4 + + 3 FST PO- 5 6 + + 5 9 PO+ 8 + + 7 SCLK 11 BCLKR 1 SPEAKER 10 + + 9 12 MCLK VAGREF + + TxDD 8 BCLKT 16 CON10AP RxDD 13 DR HB 15 C3 bottom view DT VSS 100nF MC145483 R9 100k Figure 3: Sample circuit for analog to DAI box The logical levels and the interface at connector J1 are compatible to the DSB45 DAI interface. mc4x_5x_AN_02_Audio_v06 Page 10 of 33 09.09.2005
  11. 11. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4 Solutions for Analog Audio Interfaces It is recommended to use a microphone with a sensitivity of at least –44 ±3 dB/Pa at 2V and 2kΩ (0dB=1V/Pa, 1kHz). It should be equipped with two internal EMI capacitors for GSM 900/1800 MHz bands. External ESD protection is required to protect the microphone from damage. Even a high-quality microphone should be placed at least 5 cm away from the antenna. Keep in mind that big level differences between the two audio inputs may cause cross talk from the higher level input to the lower level input. 4.1 Typical Audio Problems 4.1.1 Power Supply Related Audio Problems Audio problems may occur due to insufficient power supply filtering and different GND levels between PCBs. The example in Figure 4 shows the problem of ground bouncing which, in principle, can affect speaker and microphone path: 850/900MHz call; pulseform: Pmax = 2W EP VBATT GSM module Iripp = 2A Vsig = 160mV EN Vbatt = 4.2V ½Vsig + Vripp GNDmod = 80mV+20mV! R = 10mOhm Vripp = 20mV GNDmain main PCB Figure 4: Ground bouncing problem (example) The example assumes the following scenario: • Typical peak power consumption is 2A. • Typical connector resistance is 5…20mOhms. In this example the speaker connected from EP to GND would have an SNR of only 12dB! mc4x_5x_AN_02_Audio_v06 Page 11 of 33 09.09.2005
  12. 12. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.1.2 RF Related Audio Problems A typical audio problem arises with the demodulation of 900/1800/1900 MHz RF frequency of the antenna signal. Figure 5: TDMA noise/humming in the output spectrum The microphone should be equipped with two internal EMI capacitors for GSM 900/1800 MHz bands (12…18pF + 33pF). Semiconductors are always a source of RF demodulation. This behavior can only be cancelled by hardware and layout changes! • Each semiconductor (e.g. ESD diodes etc.) needs to be RF-decoupled using a capacitor from 10 to 33pF. • Serial resistors >50Ohms including the internal capacitance of the semiconductor (e.g. opamp or analog switches etc.) act as low pass for GSM frequencies (see Figure 6). • On the PCB, these capacitors and resistors shall be placed close to the semiconductor and/or input pins. VBATT+ microphone to GSM module 1k...10k Ci 1k...10k opamp Figure 6: Recommended serial resistors for semiconductor inputs mc4x_5x_AN_02_Audio_v06 Page 12 of 33 09.09.2005
  13. 13. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.1.3 How to Avoid Echo Problems at the Headset Interface Commonly, a headset uses 4 wires to connect to a GSM device. Two wires are needed for the headphone and two for a balanced or unbalanced microphone and the push to talk button. Using a 3-wire headset interface is possible, but not recommended. As shown in Figure 7 a 3-wire headset interface may generate an electrical echo which can be heard by the far end listener. EPP GSM module EPN MICP MICN Vin = Vmic + Vep,R R = 32Ohms =10mV +1mV! Vep = 100mV AGND GNDdig Vmic = 10mV Rline = 300mOhm Vep,R = 1mV main PCB Figure 7: Principle circuit explaining the echo at 3-wire headset interfaces The example in Figure 7 assumes the following scenario: • Typical earpiece resistance: 32Ohms • Typical cable, connector and EMI part resistances together: 0.1…2Ohms Recommended solution: To avoid the effect of reduced voice quality while using a 3-wire headset, Siemens recommends a 4-wire headset interface (either balanced headset speaker or separated GND wires for microphone and headset-speaker). mc4x_5x_AN_02_Audio_v06 Page 13 of 33 09.09.2005
  14. 14. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.2 Internal Microphone Feeding (Audio Input 2 Only) Your GSM module comes with a balanced internal microphone feeding at the module’s audio input 2 as shown in Figure 8. The microphone signal is very sensitive to any disturbances from the power supply, ground bouncing or direct RF intrusion and demodulation. Therefore, a balanced microphone line will be the best choice. +2.65V R3 1.0k,1% R1 1.0k,1% Mic2 MICP2 2 1 MICN2 MICROPHONE + C6 R2 10uF 1.0k,1% 1 2 ESD protection R4 1.0k,1% GSM Engine GND Figure 8: Idealized diagram of the fed audio input 2 terminal 4.3 External Microphone Feeding For an external feeding solution audio input 1 of the module is the best choice (shown in Figure 9). You may also use audio input 2 with external microphone feeding, but due to its lower input resistance you will need to invest some more parts to obtain the same result as with interface 1. For details see Figure 10 and Figure 11. ESD devices used in the following two solutions are explained in Chapter 5. mc4x_5x_AN_02_Audio_v06 Page 14 of 33 09.09.2005
  15. 15. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.3.1 Simple Microphone Feeding This chapter discusses simple feeding circuits for an electret microphone (R1, R2, C6). Figure 9 presents a solution for audio input 1. +3.0V +3.0V e.g. portpin D1 2 R1 2.7k 1 BAV99/SOT 3 C11 R2 10pF 2.2k C1 L1 MICP1 100nF Mic1 R10 L4 2 1 MICN1 100nF C5 2k MICROPHONE + C6 AGND C3 22uF 10nF 0R R9 GND_ANA GND_ANA GND_ANA GND_ANA Figure 9: Circuit of microphone feeding at the module’s non-fed audio interface 1 If the module input with the lower impedance (audio input 2) is used, or if there is a large distance between the microphone and the module, then an additional opamp is recommended. If the output resistance of the operational amplifier at Figure 10 is below 3 Ohms, the circuit will be sufficiently balanced, also at the fed lower impedance input 2. The opamp shown in Figure 10 should be placed as far as possible from the antenna. C7 +3.3V +3.3V +3.3V 27pF D1 2 R6 R1 100k R3 120k 2.7k 1 BAV99/SOT U1A 3 11 LMV824/SO R8 C4 - 2 R4 10k MICP2 10uF 1 C11 + 3 R5 10k 10k C5 R2 10pF 2.2k MICN2 C10 1uF C12 L1 4 27pF 10pF R7 Mic2 + C6 100k L4 2 +3.3V 1uF 1 MICROPHONE + C6 AGND C3 22uF 10nF 0R R9 GND_ANA GND_ANA GND_ANA GND_ANA GND_ANA GND_ANA Figure 10: Circuit of microphone feeding at fed audio input 2 with opamp near microphone For the example shown in Figure 10, C10, R4 and R5 have been chosen to suppress the demodulation near the operational amplifier. C11 has been added to suppress the demodulation at diode D1. As the cable length of acoustic devices usually is some cm, ferrite beads L1 and L4 (e.g. Murata BLM18HG601) are recommended to protect the circuit from mc4x_5x_AN_02_Audio_v06 Page 15 of 33 09.09.2005
  16. 16. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s RF intrusion. Avoid placing a GND next to these parts. The GND_ANA net should be a separate small net connected to GND at a single point. This can be done, for example, by using a resistor as shown in the example above (R9) or connecting to the module’s AGND pin. 4.3.2 Balanced Microphone Feeding Figure 11 shows a balanced feeding circuit for a microphone. The distance from the GSM module should be kept as short as possible. This is essential to take into account the small level of the microphone signal and to avoid ground bouncing between GSM module and application. If you decide to apply this external feeding circuit, we recommend to use a microphone with a sensitivity of at least –38 ±3 dB/Pa at 2V and 2kΩ (0dB=1V/Pa, 1kHz). +3.3V e.g. portpin R3 +2.9V 1.5k,1% D2 2 1 BAV99/SOT 3 R1 C3 1.0k,1% 4.7nF,5% C10 10pF L1 JP1 JP2 C4 LS2 MICP2 10uF L2 4 4 D1 C1 3.6V L3 3 3 MICN2 10uF 10nF SPEAKER C5 L4 2 2 Mc2 + C6 R2 1 1 2 33uF 1.0k,1% 1 C2 C7 +2.9V Jack Handset 4.7nF,5% 10pF D3 MICROPHONE 2.9V 2 R5 1 BAV99/SOT 1k R4 R6 1.5k,1% 6.8R 3 +2.9V EPP2 EPN2 6.8R C9 R7 C9 C8 1uF 47nF 47nF Figure 11: Circuit of a balanced microphone feeding R3, R4, C6 have been chosen to smoothen the feeding voltage. C7 and C10 have been added to suppress the demodulation at the D1 diode. At the non-fed input MIC1, the capacitors C4 and C5 may be 100nF. Balanced microphone feeding is recommended if the cable of the final product (for example a GSM telephone) is not shielded and exceeds 10 cm. mc4x_5x_AN_02_Audio_v06 Page 16 of 33 09.09.2005
  17. 17. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.4 Galvanically Coupling the Speaker Signal The GSM module is able to drive speakers held close to the ear (Figure 12). C3 forms a 2.5kHz, 1st order noise deemphasis filter. A corresponding preemphasis is preconfigured in audio mode AT^SNFS=2 and 3. This reduces noise floor of the power amplifier. The frequency response and loudness largely depends on the measurement method, casing, fitting and impedance. An impedance of 16Ω (louder) to 32Ω is recommended. The outputs of the modules listed in Chapter 1.1 are not short circuit protected. Figure 11 also shows a sample circuit of speakers directly connected to the GSM module. R6 and R7 are necessary to prevent module amplifiers from oscillating while C8 and C9 protect the module from ESD pulses. EPP R6 6.8R L1 LS1 L2 EPN R7 6.8R SPEAKER C1 C2 470pF 470pF C3 GND GND GSM 1 2 4.7uF E SD protec tion Engine Deemphas is 2.5kHz for E P2 only Figure 12: Idealized diagram of the audio output terminal mc4x_5x_AN_02_Audio_v06 Page 17 of 33 09.09.2005
  18. 18. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 4.5 Decoupling the Speaker Signal The speaker signal is balanced. Due to ground bouncing this signal cannot simply be used as unbalanced signal (see chapter 4.1.1). Therefore it is recommended to apply an opamp which transforms the reference point. C10, R1, R2 avoid RF-demodulation at the output of U1. C7 +3.3V 27pF R3 20k R6 120k +3.3V U1A 4 C5 0.47uF R8 10k R1 10k PA EPP1 2 BAV99/SOT C4 L1 1 LS1 3 D1 L2 1 EPN1 C6 100uF R2 10k 11 0.47uF R4 10k R5 20k C10 SPEAKER R7 + C6 C9 27pF 47nF 100k 1uF 3 2 +3.3V Figure 13: Speaker decoupling Often, a simpler circuit for transforming balanced into unbalanced signals is sufficient. The circuit according to Figure 14 is suitable e.g. for connecting the balanced outputs to an audio codec like AC97 if the digital audio interface cannot be used. +3.3V R8 1k R6 R4 C6 18k 2k2 10uF C3 R7 1k C5 EP1 C1 1uF R1 10k 27pF 3 1uF EPP1 1 GND 2 C4 Q1 BC847C EPN1 27pF C2 10uF R2 2k2 R5 R3 22k 2k2 Figure 14: Circuit for transforming balanced to unbalanced signals mc4x_5x_AN_02_Audio_v06 Page 18 of 33 09.09.2005
  19. 19. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 5 Overvoltage Protection This chapter describes solutions for overvoltage protection recommended for ESD protection. You can use one of the described solutions or a combination of several methods. 5.1 Spark Gaps The most common way to provide ESD protection is to use spark gaps, as for example applied to the SIM interfaces of Siemens GSM modules. Spark gaps should be located close to the possible place of flashover. One tip must be connected to the ground Groundpane Signal plane, the other one to the point to be protected. max. Advantages: Low cost, if included in the layout. 0.2mm Disadvantage: Value of the ignition voltage is fuzzy. Figure 15: Spark gap 5.2 Clamp Diodes A pair of diodes (e.g. BAV99) is required; the anode must be connected to GND and the cathode to the positive supply voltage (see schematics in Figure 10, Figure 11 Figure 13). Note: Do not use the VDD line (2.9V) of the module without filtering as shown in Figure 11. Advantages: Low cost, requires minimum space. Disadvantages: The overvoltage is fuzzy as it largely depends on the internal resistor of the diode. The effect can be improved with Schottky diodes or high current diodes. Semiconductors always are a source of RF demodulation. Each semiconductor needs to be RF decoupled using a capacitor from 10 to 33pF. 5.3 Clamp Diodes with External Serial Resistor A resistor connected in series to the clamp diodes will reduce the current flowing through the diodes. This way, voltage drops over the diodes can be minimized. The higher the value of the resistor the lower the voltage drop of the diodes, but the higher the voltage drop of the resistor. Semiconductors always are a source of RF demodulation. Each semiconductor needs to be RF decoupled using a 10..33pF capacitor. mc4x_5x_AN_02_Audio_v06 Page 19 of 33 09.09.2005
  20. 20. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 5.4 Z-Diodes Especially supplied electret microphones should be protected with a Z-diode connected in parallel (see Figure 11). Semiconductors always are a source of RF demodulation. Each semiconductor needs to be RF decoupled using a capacitor from 10 to 33pF. 5.5 Capacitors In addition to the solutions described above, it is recommended to use capacitors connected to GND, especially in the audio lines (see Figure 10, Figure 11 and Figure 13). mc4x_5x_AN_02_Audio_v06 Page 20 of 33 09.09.2005
  21. 21. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 6 Using AT commands to Control the Audio Interface The audio parameters of all GSM engines can easily be configured with AT commands. Below you can find a number of examples showing how to use audio specific AT commands. The full set of AT commands is specified in [2]. 6.1 Supported Audio Modes Table 1 contains a summary of the audio modes supported by Siemens GSM modules. Further details are explained in [1] and [2]. The audio mode can be selected with the AT^SNFS command. Table 1: Selectable audio modes (with factory default audio parameter set) No Name AT command Purpose MIC2 Description . feeding 1 Default AT^SNFS=1 Approval 2.65V MIC1, EP1, adapted to Handset configuration Votronic Handset HH-SI- of module 30.3 with DSB45 Support Box Not adjustable 2 Basic AT^SNFS=2 2.65V MIC2, EP2, adapted to Speakerphone Siemens CarKit Portable 5 volume steps selectable 3 Headset AT^SNFS=3 2.65V MIC2, EP2, adapted to Mono-Headset S45 5 volume steps selectable 4 User Handset AT^SNFS=4 Approval 2.65V MIC1, EP1, Votronic configuration Handset HH-SI-30.3 with of customer DSB45 Support Box application 5 volume steps selectable 5 Plain Codec AT^SNFS=5 0V MIC1, EP1, no filtering, 5 volume steps selectable 6 Plain Codec AT^SNFS=6 0V MIC2, EP2, no filtering, 5 volume steps selectable When shipped from factory, Siemens GSM modules are set to interface 1 and audio mode 1. This configuration is optimized for the Votronic HH-SI-30.3/V1.1/0 handset and used for type approving the Siemens reference equipment. Audio mode 1 has fix parameters which cannot be altered. To adjust the settings of the Votronic handset simply select another audio mode. mc4x_5x_AN_02_Audio_v06 Page 21 of 33 09.09.2005
  22. 22. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 6.2 Adjusting the Volume There are several ways to adjust the volume of the connected audio devices. Each audio mode uses 5 volume steps, which can be selected with the parameters <outStep> or <level>. The steps can be set with the following commands (where <outStep> or <level> are identical). AT^SNFV=<outStep> AT+CLVL=<level> AT^SNFO=<outBbcGain>,<outCalibrate[0]>,...<outCalibrate[4]>,<outStep>,<sideTone> The values of the 5 volume steps <outStep> and <level> can be specified with the parameters <outCalibrate[0]> …<outCalibrate[4]> of the AT^SNFO command. Table 2 contains the module’s factory settings. No matter which command you use to set the volume, the selected step (<outStep> or <level>) will be stored non-volatile when the GSM module is powered down with AT^SMSO or reset with AT+CFUN=1,1. Users should be aware that the selected volume step is a global setting, i.e. when selecting another audio mode with AT^SNFS the value of <outStep> or <level> does not change. This is also true for mute operation, which will be retained when, during a call, another audio mode is selected. To mute the microphone you have two commands: AT^SNFM and AT+CMUT. All the parameters configurable with AT^SNFO need to be saved with AT^SNFW for use after restart, except for <outStep> or <level>. Please take into account that AT^SNFW will save all values currently selected in audio modes 2 to 6. Table 2: Default values of audio modes (subject to change) Mode Default settings (to be queried with AT^SNFO?) ^SNFS=1 ^SNFO=1,16384,16384,16384,16384,16384,4,8192 (no steps) ^SNFS=2 ^SNFO=1,4685,6301,8500,11205,15115,4,0 (2.5dB steps) ^SNFS=3 ^SNFO=2,1253,2452,4891,9759,16383,4,682 (6dB steps) ^SNFS=4 ^SNFO=1,10337,11598,13014,14602,16384,4, 8192 (1dB steps) ^SNFS=5 ^SNFO=0,16384,16384,16384,16384,16384,4,0 (no steps) ^SNFS=6 ^SNFO=0,16384,16384,16384,16384,16384,4,0 (no steps) mc4x_5x_AN_02_Audio_v06 Page 22 of 33 09.09.2005
  23. 23. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 6.2.1 Calculating dB dBm0 is a measure of digital telecommunication signals. It relates to the digital coded signal on the digital side of the network. It should not be confused with any electrical unit. For example, 3,15dBm0 corresponds to a fully gained digital coded sine wave. For Siemens GSM modules, the correlation between the digital value and the amplitude of the analog signal at 1kHz is given in [1]. • dBm0p is the psophometric weighted dBm0 value. • dBV relates to 1Vrms and dBm relates to 1mWrms while you can convert each other assuming a telecom typical nominal resistance of 600Ohms as 1Veff = 0dBV ~ + 2.2 dBm. • dB is just a gain (G) or attenuation (negative gain). It can be used for both RF and AF, while for RF you usually compare power (P) at a constant impedance and for AF you compare voltages (V). G = 10*log(P1/P2) = 20*log(V1/V2) Some common values / samples: V1/V2=10 G=20dB P1/P2=10 G=10dB V1/V2=2 G~6dB P1/P2=2 G~3dB V1/V2=20 G~26dB P1/P2=20 G~13dB 6.2.2 Specifying the Value of the Volume Steps In audio modes 2 – 6, the value of the volume steps can be specified with the parameters <outCalibrate[0]>,...<outCalibrate[4]> of AT^SNFO. 2.65V 1k 1k <inCalibrate> -∞...0dB A 10uF +0..42dB in D Speech coder 1k 6dB-steps <inBbcGain> 1k <sideTone> D Speech decoder + A <outCalibrate[n]> (0dB; -6db, n = 0...4 -12dB; -18dB) <outBbcGain> AT parameters are given in brackets <...> and marked red and italic. Figure 16: Audio parameters selectable with AT commands mc4x_5x_AN_02_Audio_v06 Page 23 of 33 09.09.2005
  24. 24. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s Examples: AT^SNFS=4 (select User Handset) AT^SNFO? ^SNFO=1,10337,11598,13014,14602,16384,4,4096 (default 1dB steps) steps AT^SNFS=4 (select User Handset) AT^SNFO=1,6528,8192,10368,13056,16384,4,4096 (2dB steps) AT^SNFW (write to non-volatile memory) or AT^SNFS=4 (select User Handset) AT^SNFO=1,4096,5824,8192,11616,16384,4,4096 (3dB steps) AT^SNFW (write to non-volatile memory) Now, AT+CLVL=<0...4> or AT^SNFV=<0...4> will adjust the volume according to the steps thus defined. All permanent settings selected with AT^SNFO and saved with AT^SNFW can be reset to their default values: AT^SNFD (recall manufacturer default) The value of the side tone is adapted automatically depending on the volume. It is sufficient to set the side tone only once, according to the requirements of the used equipment. This eliminates the need to make changes, whenever you reconfigure the remaining audio parameters with AT^SNFO. mc4x_5x_AN_02_Audio_v06 Page 24 of 33 09.09.2005
  25. 25. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s The following example shows an alternative approach to use 6dB step analog attenuators. This way, better noise characteristic can be achieved at smaller loudness rates. The AT+CLVL command does not work for this method of loudness control because it is kept at a fix value. Therefore, type the full command line if a new volume step is needed. AT^SNFS=4 (select User Handset) AT^SNFO=0,16384,16384,16384,16384,16384,4,4096 (default + 6 dB) AT^SNFO=0,12288,12288,12288,12288,12288,4,4096 (default + 3 dB) AT^SNFO=1,16384,16384,16384,16384,16384,4,4096 (default volume) AT^SNFO=1,12288,12288,12288,12288,12288,4,4096 (default − 3 dB) AT^SNFO=2,16384,16384,16384,16384,16384,4,4096 (default − 6 dB) AT^SNFO=2,12288,12288,12288,12288,12288,4,4096 (default − 9 dB) AT^SNFO=3,16384,16384,16384,16384,16384,4,4096 (default − 12 dB) AT^SNFD (recall manufacturer default) 6.2.3 Changing Microphone Sensitivity The microphone path contains 6dB step analog amplifiers and a digital multiply value. As described in the previous chapter the setting can be made permanent. AT^SNFS=4 (select User Handset) AT^SNFI? ^SNFI=5, 32767 (default) AT^SNFI=2, 32767 (default − 18 dB) AT^SNFW (write to non-volatile memory) These permanent settings can be reversed by AT^SNFD (recall manufacturer default) 6.2.4 Using an External Audio Processing Codec If an external audio processing codec is used, you should adjust the levels between codec and module as high as possible in order to improve SNR on this path. e.g.: AT^SNFS=4 (select User Handset) AT^SNFO=0,10337,11598,13014,14602,16384,4,8192 (no analog attenuation for speaker) AT^SNFI=0,32767 (no analog gain for microphone) mc4x_5x_AN_02_Audio_v06 Page 25 of 33 09.09.2005
  26. 26. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 6.3 Changing Physical Audio Interface To switch back and forth between all three audio interfaces you can use the command AT^SAIC=<io>[,<mic>[,<ep>]] The AT^SAIC Write command is usable only in audio modes 2 – 6. If AT^SNFS=1, any attempt to use the AT^SAIC Write command returns “+CME ERROR: operation not allowed”. This is because all default parameters in audio mode 1 are determined for type approval and are not adjustable. The factory defaults of AT^SAIC vary with the selected audio mode. If AT^SNFS=1 or 4 or 5, then AT^SAIC=2,1,1 If AT^SNFS=2 or 3 or 6, then AT^SAIC=2,2,2 Examples: AT^SAIC=1 selects the digital interface only. AT^SAIC=2,1,2 selects the analog interfaces MIC1 and EP2. AT^SAIC=2,2,3 selects the analog interfaces MIC2, EP1 and EP2 while both speakers always get the same output power. The settings made with AT^SAIC of AT^SNFS can be stored to the audio profile set with AT^SNFW. AT^SNFD can be used to reset the factory defaults. mc4x_5x_AN_02_Audio_v06 Page 26 of 33 09.09.2005
  27. 27. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 6.4 Extended Usage of the MICP2 Pin The power supply of the MICP2 pin (2nd analog audio interface) is programmable via the command AT^SNFM=[<MicSwitch>],MicVccCtl>] This gives you greater flexibility in connecting audio accessories or using the MICP2 pin for a variety of functions other than audio. The parameter <MicSwitch> mutes or activates the microphone at the currently selected audio interface. The parameter can only be set when there is an active call. In addition, the parameter <MicVccCtl> controls the power supply of MICP2. Note that the first parameter <MicSwitch> must be omitted when setting <MicVccCtl>. AT^SNFM=,0: Permanently switches off the power supply at MICP2. AT^SNFM=,1: Permanently switches on the power supply at MICP2. AT^SNFM=,2: Default setting. Power at MICP2 is applied only during a call. This means that with AT^SNFM=,0 or AT^SNFM=,1 the power supply can be controlled independently of GSM activity. The permanent power supply can be used to feed an audio application even when the GSM part is inactive, for example if the host device integrates a dictaphone or voice recorder connected in parallel to MICP2 and MICN2. The setting AT^SNFM=,1 makes MICP2 a permanent 2.65V general purpose output. However, the 2kOhms inner resistance of the MICP2 circuit allows to drive a low-current device only or requires to include an additional transistor or gate to increase output power. Also, consider the time constant resulting from the 2kOhms inner resistance and 10µF capacitance of the MICP2 circuit. mc4x_5x_AN_02_Audio_v06 Page 27 of 33 09.09.2005
  28. 28. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 7 Speakerphone Mode The speakerphone mode (AT^SNFS=2) has been optimized for the “Siemens Car Kit Portable HKP-500” and for a special arrangement of microphone, speaker and user (see Figure 18). Physically, audio interface 2 (default) or 1 can be used. EP2 output is followed by a power amplifier with 20..40dB gain. The external microphone amplifier with 26...40dB gain needs to have good noise characteristic. Final adjustments can be done easily with AT^SNFO, AT^SNFI and AT^SNFW. For product information on the Siemens Car Kit Portable HKP-500 see Chapter 9. Figure 17: Siemens Car Kit Portable HKP-500 7.1 Mechanical and Quality Issues High sensitivity of microphone and small speaker distortion increase the efficiency of DSP echo cancellation and noise reduction routine. If the microphone is sealed with rubber or glue on its backside, this reduces the backward sensitivity of the microphone. The speaker shall combine high modulation of membrane with low distortion. A lot of distortion is produced in the plastic housing of the speaker or, for example, in the glass display of PDA or phone. A high speaker volume will be achieved if forward and backward volume of the speaker are well separated by sealing the speaker at the housing. mc4x_5x_AN_02_Audio_v06 Page 28 of 33 09.09.2005
  29. 29. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 7.2 Short Introduction to DSP Algorithms The Speakerphone mode involves several DSP algorithms which are influencing each other more or less. echo cancelling algorithm: Based on the NLMS algorithm, an adaptive digital filter searches for parts of the known speaker signal within the microphone signal in order to substract them. It‘s filter length is 22msec. automatic gain adaptions This is used as echo suppression if the echo cancelling cannot work properly or the result of the cancelling algorithm is not sufficient. It attenuates the party that is currently not speaking and it amplifies the currently speaking party. dynamic compression limitation: For car applications it is nice to raise the far end talker loudness automatically above the car environmental noise. noise reduction algorithm This is a collection of algorithms using the various voice characteristics or the characteristic of car noise in order to keep the voice understandable while the noise is dropped. mc4x_5x_AN_02_Audio_v06 Page 29 of 33 09.09.2005
  30. 30. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 7.3 Speakerphone Reference Application MIC2 50cm V≈100 50cm GSM engine V≈26 50cm EP2 Figure 18: Speakerphone arrangement with Car Kit Portable In speakerphone mode, there is no filter implemented. Therefore, the frequency response of the connected acoustic devices should be flat. There is nearly no automatic gain control in the microphone path, due to the better voice quality. Users can only adjust the loudness. A dynamic compression of approx. 10dB, depending on environmental noise, is activated in the receive path, which is pleasant, particularly in noisy environment (car). 7.4 Speakerphone Reference Environment For the purpose of testing and evaluating the performance of a speakerphone application, a Siemens Car Kit Portable HKP-500 can easily be connected to the DSB45 Support Box. The Car Kit Portable needs to be fed by an external 12V power source, while the DSB45 must be supplied from an additional 9V power supply unit. The quality achieved with this simple environment is already usable for vehicle mounted hands free products. mc4x_5x_AN_02_Audio_v06 Page 30 of 33 09.09.2005
  31. 31. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 8 Siemens Reference Setup To give one example, the following description proceeds from the audio design approach used for the Siemens reference GSM setup. The reference equipment includes the following components: • GSM module • DSB45 Support Box (evaluation kit designed to test and type approve Siemens cellular engines and to provide a sample configuration for application engineering) • SIM card reader integrated on the PCB of the DSB45 Support Box • Handset type Votronic HH-SI-30.3/V1.1/0 • Antenna cable that connects the antenna connectors of the GSM module and of the DSB45 Support Box • PC as MMI Antenna or 50 Ohms cable to system simulator Antenna RS-232 PC DSB45 GSM engine Flex cable 160mm DAI cable for acoustic measuring SIM DAI Box GSM - Power supply (optional) tester (preferred) Handset Acoustic tester Figure 19: Siemens reference equipment Audio approval measurements can be done using the following equipment: 1. DAI-Box while the acoustic audio transmission path is evaluated excluding the GSM connection and 2. GSM tester, while the acoustic path including the GSM codec is evaluated by the acoustic tester. mc4x_5x_AN_02_Audio_v06 Page 31 of 33 09.09.2005
  32. 32. Application Note 02: Audio Interface Design for GSM Applications Confidential / Released s 9 List of Parts and Accessories Table 3: Summary of products listed in this Application Note Product Company Ordering information Siemens Car Kit Portable Siemens Siemens ordering number: L36880-N3015-A117 DSB45 Support Box Siemens Siemens ordering number: L36880-N8101-A100-3 Votronic Handset VOTRONIC Votronic HH-SI-30.3/V1.1 VOTRONIC Entwicklungs- und Produktionsgesellschaft für elektronische Geräte mbH Saarbrücker Str. 8 D-66386 St. Ingbert Phone: 06 89 4 / 92 55-0 Fax: 06 89 4 / 92 55-88 e-mail: contact@votronic.com Infineon DAI-Box Infineon Q67250-H0241 9.1 Suppliers of Acoustic Devices The following list does not represent any kind of quality evidence for specific products. Its just a starting point for further investigations: Table 4: Suppliers of acoustic devices Company URL Country Product types Panasonic www.panasonic.com USA mic, rcv, spk Hosiden www.hosiden.co.jp Japan mic, rcv, spk Bujeon www.bujeon.com Korea mic, rcv, spk Keyrin www.keyrin.com Korea rcv, spk YiLi, IEA www.yili-e.com, China, mic www.ieahk.com.hk Hong Kong Abbreviations: mic: microphones rcv: receiver (= small speakers, low dynamic range) spk: speaker mc4x_5x_AN_02_Audio_v06 Page 32 of 33 09.09.2005

×