Angled view of the MAX9814 microphone module and pre-soldered header

MAX9814 Pre-Soldered Microphone AGC Amplifier Module | ShillehTek Product Manual

ArduinoESP32Raspberry PiPicomanual-product-10645386166559
$6.99 USD In stock · Order by 3pm ET, ships today

Overview

The MAX9814 module is an electret microphone with its own amplifier and automatic gain control (AGC). The AGC turns the gain down when sounds are loud and back up when they are quiet, so the output stays usable from a whisper to a shout. The output is an analog audio signal that any ADC input can read.

It suits sound-level meters, clap and voice triggers, audio-reactive LEDs and simple recording on Arduino, ESP32 and Pico boards. The header comes pre-soldered. A Raspberry Pi has no analog inputs, so it needs an external ADC to read this module.

At a Glance

Type
Electret mic with AGC amplifier
Amplifier IC
MAX9814
Supply
2.7 V to 5.5 V
Output
Analog, 2 Vpp max on 1.25 V
Gain
40, 50 or 60 dB
Frequency Range
20 Hz to 20 kHz

Specifications

Parameter Value
Amplifier IC MAX9814 microphone amplifier with AGC
Supply voltage (Vdd) 2.7 V to 5.5 V
Supply current About 3 mA
Output Analog audio, up to 2 Vpp
Output DC offset 1.25 V
Maximum gain 60 dB (Gain open), 50 dB (Gain to GND), 40 dB (Gain to Vdd)
Attack / release ratio 1:4000 (AR open), 1:2000 (AR to Vdd), 1:500 (AR to GND)
Frequency response 20 Hz to 20 kHz
Header pins GND, Vdd, Gain, Out, AR
Board size 25 × 14 mm

Pinout Diagram

The header has five pins: GND, Vdd, Gain, Out and AR. A basic hookup uses only three of them: Vdd, GND and Out. Gain and AR are option pins and can be left unconnected, which gives the highest gain (60 dB) and the 1:4000 attack / release setting. Go by the names printed on the board when you wire it.

MAX9814 microphone amplifier module pinout diagram showing GND, Vdd, Gain, Out and AR pins

Wiring Guide

Power the module, then run Out to an analog input. For the cleanest signal, power Vdd from the 3.3 V pin, which is quieter than the 5 V rail on most boards. The output rests at 1.25 V in silence and swings up to 1 V either side of that with sound.

Arduino Uno / Nano Wiring

Module Pin Arduino Pin Function
Vdd 3.3V Power
GND GND Ground
Out A0 Audio signal
Gain pin: Leave Gain unconnected for 60 dB. Connect it to GND for 50 dB or to Vdd for 40 dB if loud sounds come out distorted.

ESP32 Wiring

Module Pin ESP32 Pin Function
Vdd 3V3 Power
GND GND Ground
Out GPIO 34 Audio signal
ADC1 pins: Use an ADC1 pin, GPIO 32 to 39. The ADC2 pins cannot do analog reads while Wi-Fi is switched on.

Raspberry Pi Wiring

A Raspberry Pi has no analog inputs, so it cannot read the Out pin directly. Put an analog-to-digital converter such as an MCP3008 between the module and the Pi, and read the converter from Python.

Module Pin Connect To Function
Vdd 3V3 (Pin 1) Power
GND GND (Pin 6) Ground
Out ADC input Audio signal
Not to GPIO: Do not wire Out straight to a GPIO pin. The GPIO pins are digital and cannot measure an analog signal.

Raspberry Pi Pico Wiring

Module Pin Pico Pin Function
Vdd 3V3(OUT) (Pin 36) Power
GND GND (Pin 38) Ground
Out GP26 (Pin 31) Audio signal
ADC pins: The Pico has three analog inputs: GP26, GP27 and GP28. Any of them works if you change the pin number in the code.

Code Examples

View or download this product's example code on GitHub.

Both examples measure the peak-to-peak size of the signal over 50 ms windows and print it. Clap or talk near the microphone and watch the number jump. In the Arduino IDE, the Serial Plotter shows it as a live graph.

Arduino and ESP32 — Sound Level

max9814_level.ino
// MAX9814 microphone amplifier - print the sound level (peak-to-peak)
// Arduino Uno/Nano: Vdd = 3.3V, GND = GND, Out = A0
// ESP32:            Vdd = 3V3,  GND = GND, Out = GPIO 34
#if defined(ESP32)
const int MIC_PIN = 34;
const int ADC_MAX = 4095;             // 12-bit ADC
#else
const int MIC_PIN = A0;
const int ADC_MAX = 1023;             // 10-bit ADC
#endif

const unsigned long WINDOW_MS = 50;   // listen for 50 ms per reading

void setup() {
  Serial.begin(115200);
}

void loop() {
  int lowest = ADC_MAX;
  int highest = 0;
  unsigned long start = millis();
  while (millis() - start < WINDOW_MS) {
    int value = analogRead(MIC_PIN);
    if (value < lowest) lowest = value;
    if (value > highest) highest = value;
  }
  Serial.print("Sound level: ");
  Serial.println(highest - lowest);
}

Raspberry Pi Pico — Sound Level (MicroPython)

max9814_pico.py
# MAX9814 microphone amplifier on Raspberry Pi Pico (MicroPython) - print the sound level
# Wiring: Vdd = 3V3(OUT), GND = GND, Out = GP26 (ADC0)
from machine import ADC, Pin
import time

mic = ADC(Pin(26))
WINDOW_MS = 50            # listen for 50 ms per reading

while True:
    lowest = 65535
    highest = 0
    start = time.ticks_ms()
    while time.ticks_diff(time.ticks_ms(), start) < WINDOW_MS:
        value = mic.read_u16()        # 0 to 65535
        lowest = min(lowest, value)
        highest = max(highest, value)
    print("Sound level:", highest - lowest)

Frequently Asked Questions

How do I wire the MAX9814 to an Arduino?
Use three wires: Vdd to 3.3 V, GND to GND and Out to an analog input such as A0. Leave Gain and AR unconnected to start with. Then read the pin with analogRead and look at how far the values swing, as the example on this page does.
Why does the output read about 1.25 V when it is quiet?
That is the DC offset. The amplifier centers its output on 1.25 V so the audio can swing both up and down from a single supply. Sound shows up as movement around that level, up to about 2 V peak to peak. To measure loudness, look at the size of the swing, not at the average value.
What does the Gain pin do?
It sets the maximum gain. Unconnected gives 60 dB, connected to GND gives 50 dB and connected to Vdd gives 40 dB. Start with it unconnected. If loud sounds close to the microphone come out distorted, step down to 50 or 40 dB.
What is the AR pin for?
AR sets the attack and release ratio of the automatic gain control, which is how quickly the gain recovers after a loud sound compared with how quickly it drops. Unconnected is 1:4000, Vdd is 1:2000 and GND is 1:500. The unconnected setting suits most projects.
Can I feed it into an amplifier or a line input?
Yes, through a series capacitor. The output carries a 1.25 V DC offset, so put a capacitor of 1 to 100 uF in series with Out to block it before an audio input. Reading the module with a microcontroller ADC needs no capacitor.
Does it work with a Raspberry Pi?
Not directly, because a Pi has no analog inputs. Add an analog-to-digital converter such as an MCP3008 and read that over SPI, or let a Pico or ESP32 sample the microphone and pass the data on to the Pi.
Can I use it to measure decibels?
Only roughly. The automatic gain control changes the gain as the sound level changes, so the output is not a true, linear measure of loudness. It is ideal for detecting sound, triggering on claps or voices and driving audio-reactive effects. For calibrated sound-level measurement, use a microphone amplifier with fixed gain.

Related Tutorials

Datasheets & downloads

Reference documents for the MAX9814 Pre-Soldered Microphone AGC Amplifier Module. This manual covers wiring and code; the documents below carry the full electrical specifications.