Blog

MAX9814 Microphone Amplifier Module with Auto-Gain Control for Arduino

MAX9814 Microphone Amplifier Module

Auto-Gain Control Electret Mic Amplifier for Arduino Projects

Introduction

The MAX9814 is a complete microphone amplifier with automatic gain control (AGC), featuring low-noise amplification and adjustable gain settings. This module provides clean audio signal conditioning for Arduino sound detection, voice recognition, and audio recording applications.

MAX9814 Module

Key Features

🎤 Integrated Mic

High-quality electret microphone

📶 Auto Gain Control

Adjustable AGC for varying input levels

🔊 Low Noise

1.5μV input noise (typical)

Low Power

0.4mA shutdown current

Technical Specifications

Supply Voltage 2.7V – 5.5V (3.3V or 5V compatible)
Gain Range 40dB, 50dB, 60dB (selectable)
Frequency Response 20Hz – 20kHz
Output Type Analog (AC-coupled)
Current Consumption 3.5mA (typical at 5V)
AGC Attack/Release Adjustable via external capacitor

Pin Configuration

MAX9814 Pinout
Pin Label Description Arduino Connection
1 VDD Power (2.7-5.5V) 5V
2 GND Ground GND
3 OUT Audio Output A0 (Analog Input)
4 GAIN Gain Selection See gain selection table
5 AR AGC Release Control Optional capacitor to GND

Gain Selection

GAIN Pin Connection Gain Use Case
Left open 60dB Quiet environments
Connected to GND 50dB Normal voice levels
Connected to VDD 40dB Loud environments

Basic Wiring (Arduino)

// MAX9814 Connections:
// VDD → 5V
// GND → GND
// OUT → A0 (Analog Input)
// GAIN → (See gain selection table)
// AR → (Optional 1μF capacitor to GND)

// For best results:
// - Keep microphone away from noise sources
// - Use shielded audio cable for long connections

Basic Sound Detection

const int micPin = A0;

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

void loop() {
  int soundValue = analogRead(micPin);
  
  // Remove DC offset (approx. VCC/2)
  int adjustedValue = abs(soundValue - 512);
  
  Serial.print("Sound Level: ");
  Serial.println(adjustedValue);
  
  // Simple threshold detection
  if(adjustedValue > 50) {
    Serial.println("Sound detected!");
  }
  
  delay(50);
}

Advanced Applications

Audio Visualization

// FFT analysis with Arduino
#include "arduinoFFT.h"

arduinoFFT FFT;
#define SAMPLES 128
double vReal[SAMPLES];
double vImag[SAMPLES];

void setup() {
  // Sample audio at consistent intervals
}

void loop() {
  for(int i=0; i

AGC Timing Adjustment

// Add capacitor to AR pin for:
// - Smaller value: Faster AGC response
// - Larger value:  Slower AGC response
// Typical values: 1μF to 10μF

// Example wiring:
// AR pin → 4.7μF capacitor → GND
// (Better for music with dynamic range)

Clap Detection

// Detect sudden loud sounds
unsigned long lastClap = 0;
const int clapTimeout = 500;

void loop() {
  int peak = 0;
  for(int i=0; i<10; i++) {
    int val = abs(analogRead(micPin) - 512);
    if(val > peak) peak = val;
    delay(1);
  }
  
  if(peak > 100 && millis() > lastClap + clapTimeout) {
    lastClap = millis();
    Serial.println("Clap detected!");
  }
}

Audio Recording

// Record to SD card
#include 

File audioFile;

void setup() {
  SD.begin(4); // CS on pin 4
  audioFile = SD.open("audio.raw", FILE_WRITE);
}

void loop() {
  int sample = analogRead(micPin);
  audioFile.write(sample >> 2); // 8-bit conversion
  delayMicroseconds(125); // 8kHz sampling
}

Troubleshooting

No Signal Output

  • Verify power connections (VDD and GND)
  • Check electret microphone is properly soldered
  • Test with different gain settings

Constant High/Low Output

  • Ensure proper DC bias (should be ~VCC/2 at idle)
  • Check for shorts in the output connection
  • Test with known good module if possible

Excessive Noise

  • Add 0.1μF capacitor between VDD and GND
  • Keep away from digital noise sources
  • Use shorter wires between module and Arduino