View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

Discover the performance of two MEMS microphone boards, the SPH0645 and the INMP441, when connected to an ESP32. This video showcases their audio recording capabilities, noise handling and overall usability, with the INMP441 emerging as the winner!

Related Content
Transcript

[0:00] Hey Everyone, we’re back looking at some more options for getting audio data into the ESP32.
[0:09] In the previous video, we looked at a couple of microphone boards (the MAX4466 and the MAX9814)
[0:18] Both these boards use Electret Condensor Microphones which are essentially a parallel plate capacitor
[0:25] with the distance between the capacitor plates varying depending on the sounds waves hitting the diaphragm.
[0:32] Both the MAX4466 and the MAX9814 integrate both the microphone and the audio amplifier.
[0:40] They output an analogue signal which then needs to be fed into the ESP32’s analogue to digital converter.
[0:48] In this video, we’re going to be looking at a couple of boards with MEMS microphones.
[0:54] These microphones are constructed using a Micro-Electro-Mechanical System component.
[1:00] The two boards I’m looking at are the SPH0645 and the INMP441.
[1:08] What’s interesting with these boards is that they integrate the audio amplifier, ADC and
[1:15] the I2S interface.
[1:17] So the output from the boards can be fed directly into the ESP32 without using the ADC.
[1:24] The actual microphones on these boards are packaged up into a small surface mounted device
[1:30] which will either have a hole in the top or the bottom for the sound to enter.
[1:35] Both the boards I am looking at are bottom ported so there is a hole in the PCB to let
[1:39] the sound enter.
[1:40] The principle is similar to the Electret microphone with a capacitor that changes value due to
[1:47] air pressure.
[1:50] You may recall from the previous video that we had some problems with noise on the 3v3
[1:55] power line from the ESP32 dev board.
[1:59] I solved that using an RC filter followed by a Low Dropout Voltage regulator.
[2:05] For this follow-up video, I’ve gone even further.
[2:07] I have an LC filter followed by a capacitor multiplier.
[2:11] This is followed by our LDO regulator, which then has another LC filter on its output.
[2:18] I may have gone too far…
[2:22] I’ve had this circuit made up into a PCB and had it fabricated by JLPCB.
[2:29] The board includes headers for plugging in the MAX9814 and the two I2S boards I’m testing
[2:35] in this video.
[2:37] I’ve wired up the board so that the SPH0645 is on the left channel and the INMP441 is
[2:45] on the right channel.
[2:46] Ideally, I want to be able to record from all three microphone boards simultaneously
[2:53] to compare the outputs.
[2:57] Let’s have a look at how the I2S interface is wired up.
[3:01] There are at least three required lines:
[3:04] We have a serial clock - this is used to clock data to or from the peripheral.
[3:10] We have a word select (also called the left-right clock or LRCLK) - this selects the channel
[3:17] that you want to send or receive data for.
[3:19] And finally, we have the data line.
[3:22] When the Word Select is low the right device will tri-state its output
[3:28] and the left channel will send data.
[3:31] when the word select is high the left device will tri-state its output
[3:35] and the right device will send data.
[3:38] I’ve plugged in the SPH0645 in and left the INMP441 unpopulated.
[3:46] The I2S peripheral is set up to record audio from both left and right channels.
[3:54] When we look at what has been recorded from this configuration
[3:57] we can see there is a small problem.
[4:00] All our data should be coming out in the left channel,
[4:02] but we have some data also coming out on the right channel.
[4:06] This matches with some of the comments I’ve seen in the forums about the SPH0645 and the ESP32.
[4:14] The output from the board doesn’t seem to match up with the I2S standards.
[4:20] After a lot of googling, I came across some forum posts with a potential solution.
[4:26] These settings should fix the timing issues.
[4:28] After some testing, I don’t think they interfere with the INMP441 so we can capture some audio.
[4:37] As I said earlier, my initial plan was to capture from all three boards are once,
[4:42] but I’ve noticed quite a lot of interference from the I2S signals with the MAX9814 output.
[4:48] So I’ve captured the ADC signal separately from the two I2S signals.
[4:55] Here’s the audio captured via the built-in ADC.
[5:03] I’ve set the gain on the MAX9814 to its minimum value and that does seem to have improved
[5:10] the amount of noise coming through.
[5:12] Here’s the audio captured directly from the INMP441
[5:22] And finally, the audio captured from the SPH0645
[5:33] Another question I wanted to answer is how good these I2S boards are
[5:39] at dealing with the noisy power supply.
[5:41] Do we need my power supply filter?
[5:45] Here’s the audio with the INMP441 connected directly to the dev board without any filtering.
[6:02] There’s no sign of the noise that we saw with the two analogue boards.
[6:06] in the previous video.
[6:08] So, what have we learnt?
[6:10] I think the INMP441 board wins this competition hands down.
[6:16] It seems to be standards compliant
[6:18] It produces a good signal with no DC offset
[6:23] And it seems to handle the noisy power supply without any problems
[6:28] It’s much less noisy than the MAX9814
[6:33] The only downside I can find at the moment is the lack of a built-in AGC
[6:38] you will need to do something in software if you want that kind of functionality.
[6:42] So, that’s it for this video - please hit the subscribe button if you found it useful
[6:48] and check out the previous video where we looked at the other two microphone boards.
[6:52] The code I used is all in the GitHub repo linked in the description.
[6:57] In the next video, we’ll look at getting audio out of the ESP32,
[7:01] another small step to finishing my next project.
[7:04] Thanks for watching!
[7:06] I’ll see you in the next video!


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts