
AN-1451| Application Note
LM4935 Automatic Gain Control (AGC) Guide
LM4935 Automatic Gain Control (AGC) Guide
Automatic Gain Control (AGC) Overview
A microphone is typically used in an environment where the level of the audio source is unknown. The LM4935 features an Automatic Gain Control (AGC) circuit that addresses this situation by compensation for significant variations in level from a microphone's input. It maintains a fixed level during recording or playback. The following scenarios showcase the real world benefits of the AGC circuit:
National Semiconductor Application Note 1451 Alvin Fok April 2006
(With AGC) The AGC automatically lowers the microphone preamplifier gain. This prevents voice signal clipping. The resulting undistorted, unclipped voice signal is then presented to the user on the receiving end. Scenario 2: A user talks too softly or too far away from the microphone. (Without AGC) The resultant low-level voice signal may not be heard clearly or at all by the user at the receiving end. (With AGC) The AGC will automatically increase the gain of the microphone preamplifier to a level that is heard clearly by the user at the receiving end. As shown in the scenarios above, the AGC operates by automatically adjusting the gain of the microphone preamplifier to maintain a pre-defined target level at the amplifier's output.
Scenario 1: A user talks too loudly or too close to the microphone. This causes a clipped voice signal at the output of the microphone preamplifier. (Without AGC) The user at the receiving end hears a clipped signal. This clipped signal sounds distorted. Further, it may damage the receiving-end transducer or may cause hearing loss.
20184702
FIGURE 1. AGC Loop
AGC Operation
The AGC circuit adjusts the level of the input applied to the ADC. This optimizes the dynamic range of the voice data when the level of the source is unknown. A target level for the output is set so that any transients on the microphone input will not clip during normal operation. The AGC circuit compares the output of the ADC to this target level and increases or decreases the gain of the microphone preamplifier to compensate. The ADC's full dynamic range is realized when the AGC optimizes microphone preamplifier output signal magnitude. To ensure that the AGC circuit does not reduce the quality of the speech by constantly modulating the microphone pream-
plifier gain, the ADC output is passed through an envelope detector. The envelope detector frames the output of the ADC into time segments roughly equal to the phonemes found in speech (AGC_FRAMETIME). To calculate this, the AGC circuit must also know the ADC's sample rate (ADC_SAMPLERATE). If, after a programmable number of these segments (AGC_HOLDTIME), the level is consistently below target, the microphone amplifier's gain is increased at a programmable rate (AGC_DECAY). If the signal ever exceeds the target level (AGC_TARGET), the gain of the microphone is reduced immediately at a programmable rate (AGC_ATTACK). The AGC's operation is demonstrated in Figure 2.
AN-1451
2006 National Semiconductor Corporation
AN201847
AN-1451 Application Note national Download PDF
Add this permalink to your bookmarks for future download of AN-1451 ApplicationNote
Permalink: http://application.emcelettronica.com/national/AN-1451