Electret Microphone Sensor

Overview

The BOB-09964 breakout board couples a small electret microphone (100Hz-10kHz) with a 60x mic preamplifier to amplify the sounds of voice, claps, door knocks or any loud enough to be picked up by a microcontroller's analog-to-digital converter.

The Electret Mic Breakout translates amplitude (not volume) by capturing sound waves between two conducting plates (one a vibrating diaphragm and the other fixed) in the microphone and converting them into electrical waves. These electrical signals are then amplified and picked up by your microcontroller’s ADC.

Documentation for this sound sensor is available here.

Connecting to Arduino

There are only three pins that you need to worry about on the MIC sensor. Wired as follows:

MIC Sensor Pins Arduino Pins
AUD A0
GND GND
VCC 3.3V

Code example

This sketch reads and displays sound level to serial. It prints "Sound" on loud sound.

/********************
 *  Program:  MIC Sensor tester
 *  Description: print audio volume level to serial. Print "Sound" on loud sound.
 ********************/

#define AUDIO_READ_PIN A0 // Analog pin 0 to read the output of the sensor
#define SENSITIVITY 850  

void setup(){
  Serial.begin(115200); // initialize the serial port
}

void loop(){
  int sound_wave =   analogRead(AUDIO_READ_PIN);
  Serial.print(sound_wave);
  
  if (sound_wave > SENSITIVITY) {  // On loud sound
    Serial.println("Sound!");
    delay(500);
  }  
  delay(100); // ms
}

The raw source of the sketch example is visible here.

Enjoy!