MAX9812 MICROPHONE AMPLIFIER MODULE

All pictures are for illustrative purposes only.

PID# 16042

CA$6.50
Out of Stock
Quantity

Request a large quantity quote

Description

  1. GND
  2. VCC, which can be either 3.3V or 5V (a 3.3V stabilizer is included)
  3. OUT, which should be connected directly to an arduino analog input pin

The module is based on the MAX9812 chip from Maxim Integrated. It’s a low-cost fixed gain (20dB) microphone amplifier IC. 

Here’s the Arduino sketch I used:

// selecting the analog input pin
const int inputPin = A0;
// size of the window
const int inputWindow = 100;
// placeholder for a single measurement
unsigned int inputSample;

void setup() {
  // initializing the analog input
  pinMode(inputPin, INPUT);
  // initializing the serial communication
  Serial.begin(9600);
}

void loop() {

  // two variables for minimum and maximum values in window
  unsigned int inputMax = 0;
  unsigned int inputMin = 1024;

  // loop for the window
  for (unsigned int i = 0; i < inputWindow; i++) {
    // read in a single value
    inputSample = analogRead(inputPin);
    // get the minimum and maximum value
    inputMin = min(inputMin, inputSample);
    inputMax = max(inputMax, inputSample);
  }

  // send the values on serial
  Serial.print("Min: ");
  Serial.print(inputMin);
  Serial.print("  Max: ");
  Serial.print(inputMax);
  Serial.print("  Diff: ");
  Serial.print(inputMax - inputMin);
  Serial.println();
}

And this is the output after uploading and running the sketch:

serial_monitor