Working Principle
The MAX9814 is an electret microphone amplifier with automatic gain control (AGC). An electret condenser microphone converts acoustic pressure waves into tiny electrical signals (µV range). The MAX9814’s low-noise preamplifier boosts this signal, and the AGC circuitry automatically adjusts gain to maintain a consistent output level across varying sound intensities — preventing clipping on loud sounds while amplifying quiet ones.
Electrical Characteristics
MAX9814 Key Specifications
| Parameter | Value |
|---|---|
| Supply Voltage | 2.7–5.5 V DC |
| Output Type | Analog (AC-coupled, centered at VCC/2) |
| AGC Gain Settings | 40 dB, 50 dB, 60 dB (selectable via GAIN pin) |
| Attack/Release Ratio | Selectable: 1:500, 1:2000, 1:4000 |
| THD+N | 0.04% (typical) |
| Supply Current | ~3 mA |
| Frequency Response | 20 Hz – 20 kHz |
Interfacing with an MCU
The MAX9814 breakout outputs an analog audio signal centered at ~1.25 V (at 3.3 V supply) or ~2.5 V (at 5 V). Connect OUT to an ADC pin. The GAIN pin selects max gain: float = 60 dB, GND = 50 dB, VCC = 40 dB. The A/R pin selects attack/release ratio.
Calibration
The AGC handles level normalization automatically. For sound level metering, calibrate against a known reference source (e.g., 94 dB SPL calibrator) and map ADC peak-to-peak voltage to dB SPL. For frequency analysis, sample at ≥ 40 kHz (Nyquist for 20 kHz audio) and apply FFT.
Code Example
// MAX9814 sound level meter with peak detection — Arduino
#include <Arduino.h>
#define MIC_PIN A0
#define SAMPLE_MS 50 // 50 ms window
#define QUIET_THRESH 30 // ADC units — below this = ambient
#define LOUD_THRESH 200 // ADC units — above this = loud
void setup() {
Serial.begin(115200);
Serial.println("MAX9814 Sound Level Meter");
Serial.println("Level | Bar");
}
void loop() {
unsigned long start = millis();
int sig_max = 0, sig_min = 1023;
while (millis() - start < SAMPLE_MS) {
int sample = analogRead(MIC_PIN);
if (sample > sig_max) sig_max = sample;
if (sample < sig_min) sig_min = sample;
}
int peak_to_peak = sig_max - sig_min;
float voltage = peak_to_peak * (3.3 / 1023.0);
// Visual bar graph
int bars = map(peak_to_peak, 0, 500, 0, 30);
bars = constrain(bars, 0, 30);
Serial.print(peak_to_peak);
Serial.print("\t|");
for (int i = 0; i < bars; i++) Serial.print("=");
if (peak_to_peak > LOUD_THRESH) Serial.print(" LOUD!");
else if (peak_to_peak < QUIET_THRESH) Serial.print(" quiet");
Serial.println();
delay(100);
}
Real-World Applications
Industrial Noise Monitoring
Factory safety systems use MEMS microphones with AGC amplifiers to continuously monitor ambient noise levels. When sound exceeds OSHA’s 85 dB TWA threshold, the system triggers visual/auditory warnings and logs exposure data for worker safety compliance — all driven by simple analog sensors and MCU-based FFT processing.
Limitations
- Analog noise: MCU ADC sampling introduces quantization noise; use external 16-bit ADC for audio-quality capture.
- AGC lag: The automatic gain control has a finite attack time; very sharp transients (claps, impacts) may clip before gain reduces.
- Wind noise: Outdoor use requires a foam windscreen to prevent low-frequency wind turbulence from dominating the signal.
- Not a dB meter: Raw ADC values are uncalibrated. True SPL measurement requires reference calibration and frequency weighting (A-weighting).