ESP32 Audio Input Showdown: INMP441 vs SPH0645 MEMS I2S Microphones!

atomic14
11 Sept 202007:22

Summary

TLDRIn this video, the host explores MEMS microphone boards for the ESP32, focusing on the SPH0645 and INMP441. These boards integrate audio amplifiers, ADCs, and I2S interfaces, allowing direct connection without an ADC. The host addresses noise issues from previous setups by implementing advanced filtering techniques. After testing, the INMP441 outperforms the SPH0645 and MAX9814, offering a compliant, noise-free, and DC offset-free signal, despite lacking built-in AGC. The video concludes with a comparison of audio quality and power supply noise resilience, highlighting the INMP441 as the superior choice for audio capture on the ESP32.

Takeaways

  • 🎙️ The video discusses options for integrating audio data with the ESP32 using microphone boards.
  • 🔍 Previously, MAX4466 and MAX9814 microphone boards with Electret Condenser Microphones were examined, which output an analog signal requiring an ADC for the ESP32.
  • 📐 MEMS microphones, like the SPH0645 and INMP441, are introduced, integrating audio amplifier, ADC, and I2S interface, allowing direct connection to the ESP32 without an ADC.
  • 🔨 The video creator experienced noise issues on the 3.3V power line from the ESP32 dev board, which were mitigated with an RC filter, an LC filter, and a Low Dropout Voltage regulator.
  • 🛠️ A custom PCB was fabricated to test different microphone boards, including headers for the MAX9814 and the two I2S boards.
  • 🔄 The I2S interface requires at least three lines: serial clock, word select (LRCLK), and data line, with specific operations for left and right channel data transmission.
  • 🚫 An issue with the SPH0645's output not aligning with I2S standards was encountered, but a potential solution was found through forum posts.
  • 📡 Interference between I2S signals and the MAX9814 output was noted, leading to separate ADC signal capture for comparison.
  • 🌐 The INMP441 board outperformed others, being compliant with standards, producing a good signal without DC offset, and handling noisy power supply well.
  • 🔊 The INMP441 board showed less noise compared to the MAX9814, and unlike the MAX9814, it lacks a built-in AGC, requiring software solutions for automatic gain control.
  • 🔗 The video concludes with a recommendation to subscribe and a reference to the GitHub repository containing the code used, with a teaser for the next video on audio output from the ESP32.

Q & A

  • What type of microphones were discussed in the previous video?

    -In the previous video, Electret Condenser Microphones were discussed, specifically using the MAX4466 and the MAX9814 microphone boards.

  • How do Electret Condenser Microphones work?

    -Electret Condenser Microphones work by having a parallel plate capacitor with the distance between the plates varying due to sound waves hitting the diaphragm.

  • What is the difference between the microphones used in the previous video and the MEMS microphones?

    -MEMS microphones are constructed using a Micro-Electro-Mechanical System component, whereas Electret microphones are based on a parallel plate capacitor design.

  • Which two boards with MEMS microphones were examined in the video?

    -The two boards with MEMS microphones examined were the SPH0645 and the INMP441.

  • What components are integrated into the SPH0645 and INMP441 boards?

    -The SPH0645 and INMP441 boards integrate the audio amplifier, ADC (Analog-to-Digital Converter), and the I2S interface.

  • How does the I2S interface differ from the analog signal output of the MAX4466 and MAX9814?

    -The I2S interface on the SPH0645 and INMP441 boards allows for digital audio output that can be directly fed into the ESP32 without using an ADC, unlike the analog signal from the MAX4466 and MAX9814 which requires an ADC.

  • What was the issue encountered when trying to record audio from the SPH0645 board using the I2S interface?

    -The issue encountered was that data was also coming out on the right channel when it should have only been on the left channel, indicating a timing issue not matching the I2S standards.

  • What was the solution found to fix the timing issue with the SPH0645 board?

    -The solution found involved specific settings that were suggested in forum posts to address the timing issues with the SPH0645 board.

  • How did the video creator attempt to reduce noise from the 3v3 power line in the ESP32 dev board?

    -The creator used an RC filter followed by a Low Dropout Voltage regulator, and for the follow-up, an LC filter followed by a capacitor multiplier and another LC filter after the LDO regulator.

  • Which board was determined to be the best performer in the comparison and why?

    -The INMP441 board was determined to be the best performer because it is standards compliant, produces a good signal with no DC offset, and handles a noisy power supply without any issues.

  • What is the only downside mentioned for the INMP441 board compared to the others?

    -The only downside mentioned for the INMP441 is the lack of a built-in AGC (Automatic Gain Control), which would require software implementation for that functionality.

Outlines

00:00

🎙️ Exploring MEMS Microphones for ESP32

This paragraph introduces the exploration of MEMS microphones for use with the ESP32, following a previous examination of Electret Condenser Microphones. The speaker discusses two new boards, the SPH0645 and the INMP441, which integrate the microphone, audio amplifier, ADC, and I2S interface, allowing direct connection to the ESP32 without an ADC. The microphones are described as small, surface-mounted devices with a port for sound entry. The speaker also addresses previous noise issues with the ESP32 dev board's 3v3 power line, detailing an enhanced filtering solution involving an LC filter and a capacitor multiplier. The video script mentions the fabrication of a PCB with headers for the microphone boards and the intention to record from all three simultaneously for comparison. The I2S interface wiring is explained, highlighting the serial clock, word select, and data line functions. An issue with the SPH0645's output not aligning with I2S standards is noted, along with a potential solution found through online research.

05:04

🔊 Comparing Audio Quality and Power Supply Resilience

The second paragraph delves into a comparison of audio quality and the ability to handle noisy power supplies among the microphone boards. The speaker shares recordings captured via the built-in ADC, the INMP441, and the SPH0645, noting the improved noise reduction with the MAX9814 at minimum gain. A key point is the INMP441's superior performance in terms of standard compliance, signal quality without DC offset, and resilience to noisy power supplies, as demonstrated by a test without any filtering. The MAX9814 is found to be noisier in comparison. The paragraph concludes with the speaker's recommendation of the INMP441 board, highlighting its advantages and the only noted downside of lacking a built-in AGC, which would require software implementation. The video ends with a prompt to subscribe, a reference to the GitHub repo for the code, and a teaser for the next video about audio output from the ESP32.

Mindmap

Keywords

💡ESP32

The ESP32 is a microcontroller with integrated Wi-Fi and Bluetooth capabilities. In the video, it serves as the central processing unit for handling audio data from various microphone boards. The script discusses how to interface different microphones with the ESP32, emphasizing the importance of its analog-to-digital converter and I2S interface in processing audio signals.

💡Electret Condenser Microphones

Electret Condenser Microphones are a type of microphone that uses a capacitor with variable distance between its plates to capture sound waves. The script explains that both the MAX4466 and MAX9814 boards use these microphones, which convert sound into an analog signal that needs to be processed by the ESP32.

💡Microphone Boards

The term 'microphone boards' refers to the physical devices that integrate microphones and associated components like amplifiers and analog-to-digital converters (ADCs). The script reviews different types of these boards, such as the MAX4466, MAX9814, SPH0645, and INMP441, and how they are used to capture audio for the ESP32.

💡MEMS Microphones

MEMS stands for Micro-Electro-Mechanical Systems, and MEMS microphones are tiny microphones constructed using this technology. The script discusses the SPH0645 and INMP441 boards, which use MEMS microphones and have integrated audio amplifiers, ADCs, and I2S interfaces, allowing direct connection to the ESP32 without additional ADCs.

💡I2S Interface

The I2S interface is a serial communication protocol used for connecting digital audio devices. The script explains that the I2S interface on the SPH0645 and INMP441 boards can output data directly to the ESP32, simplifying the audio capture process by eliminating the need for an external ADC.

💡Surface Mounted Device (SMD)

Surface Mounted Devices are components that are mounted directly onto the surface of a printed circuit board (PCB). The script mentions that the microphones on the SPH0645 and INMP441 boards are packaged as SMDs, with holes in the PCB for sound to enter.

💡RC Filter

An RC filter is an electronic circuit composed of a resistor (R) and a capacitor (C) used to filter out unwanted frequencies in a signal. The script describes using an RC filter, followed by a Low Dropout Voltage Regulator (LDO), to solve noise issues on the 3v3 power line from the ESP32 development board.

💡Low Dropout Voltage Regulator (LDO)

An LDO is a type of voltage regulator that provides a stable output voltage even when the input voltage varies or drops slightly. The script describes implementing an LDO in the power supply chain to ensure a clean power source for the microphone boards, reducing noise.

💡Power Supply Filter

A power supply filter is a circuit designed to remove noise or interference from the power supply lines. The script discusses the use of an LC filter and a capacitor multiplier in conjunction with the LDO to further clean the power supply for the audio circuitry.

💡Serial Clock, Word Select, and Data Line

These are the three essential lines for the I2S interface. The serial clock synchronizes data transfer, the word select (LRCLK) chooses the active channel, and the data line carries the audio information. The script explains how these lines are used in the context of the I2S interface when connecting microphone boards to the ESP32.

💡AGC (Automatic Gain Control)

AGC is a circuit or software function that automatically adjusts the gain of an amplifier to maintain a consistent output level. The script points out that the INMP441 board lacks a built-in AGC, which means that any required automatic gain adjustment would need to be implemented in software.

Highlights

Exploring options for integrating audio data into the ESP32.

Review of MAX4466 and MAX9814 microphone boards that use Electret Condensor Microphones.

Introduction to MEMS microphones and their integration with audio amplifiers, ADC, and I2S interface.

Discussion on the SPH0645 and INMP441 boards that can output data directly to the ESP32.

Description of the microphone packaging and sound entry design in these boards.

Mention of previous issues with noise on the 3v3 power line from the ESP32 dev board.

Solution to noise issues using an RC filter, a Low Dropout Voltage regulator, and further enhancements.

Fabrication of a PCB with headers for plugging in MAX9814 and I2S boards.

Wiring setup for simultaneous recording from SPH0645 and INMP441.

Explanation of the I2S interface wiring and its function in audio data transmission.

Discovery of a problem with the SPH0645 output not matching I2S standards.

Potential solution found through forum posts to fix timing issues with the SPH0645.

Observation of interference from I2S signals with the MAX9814 output.

Comparison of audio captured via built-in ADC, INMP441, and SPH0645.

Assessment of the INMP441's ability to handle noisy power supply without additional filtering.

Conclusion that the INMP441 board outperforms others in terms of standards compliance and noise handling.

Note on the lack of a built-in AGC in the INMP441 and the need for software solutions.

Invitation to subscribe and check out previous videos on microphone boards.

Announcement of the next video focusing on getting audio out of the ESP32.

Transcripts

play00:00

Hey Everyone, we're back looking at some more options for getting audio data into the ESP32.

play00:09

In the previous video, we looked at a couple of microphone boards (the MAX4466 and the MAX9814)

play00:18

Both these boards use Electret Condensor Microphones which are essentially a parallel plate capacitor

play00:25

with the distance between the capacitor plates varying depending on the sounds waves hitting the diaphragm.

play00:32

Both the MAX4466 and the MAX9814 integrate both the microphone and the audio amplifier.

play00:40

They output an analogue signal which then needs to be fed into the ESP32's analogue to digital converter.

play00:48

In this video, we're going to be looking at a couple of boards with MEMS microphones.

play00:54

These microphones are constructed using a Micro-Electro-Mechanical System component.

play01:00

The two boards I'm looking at are the SPH0645 and the INMP441.

play01:08

What's interesting with these boards is that they integrate the audio amplifier, ADC and

play01:15

the I2S interface.

play01:17

So the output from the boards can be fed directly into the ESP32 without using the ADC.

play01:24

The actual microphones on these boards are packaged up into a small surface mounted device

play01:30

which will either have a hole in the top or the bottom for the sound to enter.

play01:35

Both the boards I am looking at are bottom ported so there is a hole in the PCB to let

play01:39

the sound enter.

play01:40

The principle is similar to the Electret microphone with a capacitor that changes value due to

play01:47

air pressure.

play01:50

You may recall from the previous video that we had some problems with noise on the 3v3

play01:55

power line from the ESP32 dev board.

play01:59

I solved that using an RC filter followed by a Low Dropout Voltage regulator.

play02:05

For this follow-up video, I've gone even further.

play02:07

I have an LC filter followed by a capacitor multiplier.

play02:11

This is followed by our LDO regulator, which then has another LC filter on its output.

play02:18

I may have gone too far...

play02:22

I've had this circuit made up into a PCB and had it fabricated by JLPCB.

play02:29

The board includes headers for plugging in the MAX9814 and the two I2S boards I'm testing

play02:35

in this video.

play02:37

I've wired up the board so that the SPH0645 is on the left channel and the INMP441 is

play02:45

on the right channel.

play02:46

Ideally, I want to be able to record from all three microphone boards simultaneously

play02:53

to compare the outputs.

play02:57

Let's have a look at how the I2S interface is wired up.

play03:01

There are at least three required lines:

play03:04

We have a serial clock - this is used to clock data to or from the peripheral.

play03:10

We have a word select (also called the left-right clock or LRCLK) - this selects the channel

play03:17

that you want to send or receive data for.

play03:19

And finally, we have the data line.

play03:22

When the Word Select is low the right device will tri-state its output

play03:28

and the left channel will send data.

play03:31

when the word select is high the left device will tri-state its output

play03:35

and the right device will send data.

play03:38

I've plugged in the SPH0645 in and left the INMP441 unpopulated.

play03:46

The I2S peripheral is set up to record audio from both left and right channels.

play03:54

When we look at what has been recorded from this configuration

play03:57

we can see there is a small problem.

play04:00

All our data should be coming out in the left channel,

play04:02

but we have some data also coming out on the right channel.

play04:06

This matches with some of the comments I've seen in the forums about the SPH0645 and the ESP32.

play04:14

The output from the board doesn't seem to match up with the I2S standards.

play04:20

After a lot of googling, I came across some forum posts with a potential solution.

play04:26

These settings should fix the timing issues.

play04:28

After some testing, I don't think they interfere with the INMP441 so we can capture some audio.

play04:37

As I said earlier, my initial plan was to capture from all three boards are once,

play04:42

but I've noticed quite a lot of interference from the I2S signals with the MAX9814 output.

play04:48

So I've captured the ADC signal separately from the two I2S signals.

play04:55

Here's the audio captured via the built-in ADC.

play05:03

I've set the gain on the MAX9814 to its minimum value and that does seem to have improved

play05:10

the amount of noise coming through.

play05:12

Here's the audio captured directly from the INMP441

play05:22

And finally, the audio captured from the SPH0645

play05:33

Another question I wanted to answer is how good these I2S boards are

play05:39

at dealing with the noisy power supply.

play05:41

Do we need my power supply filter?

play05:45

Here's the audio with the INMP441 connected directly to the dev board without any filtering.

play06:02

There's no sign of the noise that we saw with the two analogue boards.

play06:06

in the previous video.

play06:08

So, what have we learnt?

play06:10

I think the INMP441 board wins this competition hands down.

play06:16

It seems to be standards compliant

play06:18

It produces a good signal with no DC offset

play06:23

And it seems to handle the noisy power supply without any problems

play06:28

It's much less noisy than the MAX9814

play06:33

The only downside I can find at the moment is the lack of a built-in AGC

play06:38

you will need to do something in software if you want that kind of functionality.

play06:42

So, that's it for this video - please hit the subscribe button if you found it useful

play06:48

and check out the previous video where we looked at the other two microphone boards.

play06:52

The code I used is all in the GitHub repo linked in the description.

play06:57

In the next video, we'll look at getting audio out of the ESP32,

play07:01

another small step to finishing my next project.

play07:04

Thanks for watching!

play07:06

I'll see you in the next video!

Rate This

5.0 / 5 (0 votes)

相关标签
MEMS MicrophonesESP32 AudioI2S InterfaceNoise FilteringMicrophone BoardsAudio AmplifierAnalog to DigitalPower Supply NoiseSignal IntegrityAudio Capture
您是否需要英文摘要?