Skip to content

MEMS MICROPHONE SENSOR

What is a MEMS microphone and how is it different from the conventional transducer?

MEMS (Micro-Electromechanical Systems), are miniaturized systems that contain both electric and mechanical components with dimensions ranging from mm(millimeters) to um(micrometer). These systems can be used to create a wide array of sensors from accelerometers, microphones, etc. In this article, we are focused on the MEMS microphone, which is an electro-acoustic transducer. this particular sensor converts the sounds/vibrations into capacitance variations which can be converted to either analog or digital output. The mics are effectively etched into semiconductive silicon wafers. A pressure-sensitive moveable membrane (diaphragm) is etched behind a stationary perforated plate. The perforated stationary plate and the diaphragm act together to form a capacitor.

MEMS microphone internal structure


These microphones target all audio applications where requirements need them to be small in size, reliable, affordable, and of good sound quality. When we try to compare the MEMS microphone with ECM (Electret condenser), the MEMS microphone has a higher (performance density) which allows you to assess and cancel out the noise and is less sensitive to vibrations and temperature changes.

In this article, we’ll go through how to get the SPH0645 MEMS microphone to work. We are using the ESP32 microcontroller with the microphone to create a project to check the sound level (dB) in the surroundings.

I2S connection in ESP32:

SPH0645ESP32
VIN3V3
GNDGND
BCLK26
DOUT33
LRCL25
SELNO CONNECT
MICROPHONE TO ESP32 CONNECTION

To begin this project, we have to first install the library from GitHub by author Ivan Kostoski. Once we download the zip folder and go to Arduino IDE> Sketch > Include library> Add Zip library > add the downloaded ZIP file.

Once the library is installed, we get the code from the repository under the name esp32_i2s_slm.ino. we need to modify the code according to the pin connection on esp32 for i2s protocol and change the mic equalizer setting to the desired microphone breakout board of choice, in our case SPH0645.

We can run the code and understand what result we get from the serial monitor.

Sound level (dB) from SPH0645

The displayed result in the serial monitor is in dB which we can see is working. We can alter this code to our specific requirement or application.

Leave a Reply

Your email address will not be published. Required fields are marked *