i can't get the audio decoded and I can't play it on any client/Wi-Fi enabled device. and I'm not sure the audio data sent via udp is in the format its suppose to come in although I used a UDP monitor to receive some HEX streams
@@oniyaolaiya9826 One of the projects I did was send audio data to the Node.js server based on WebSocket and output PCM to the speaker on the computer (Mac). Please refer to this. ua-cam.com/video/vq7mPgecGKA/v-deo.html
@@ThatProject thank you very much! That will be like an alternative just to show the technical staff on my project. I think this would earn me the marks I need
I was struggling to implement I2S since I don't have any experience with boards other than the basic Arduino. Your tutorial makes it easy for beginners like me! Thank you so much for this tutorial!
Hi, you're using 16 bits/sample, so in the loop function, you need to declare the "sample" variable as int16_t. That's the reason why you see the squarewave flipping around when no sound detected
Giuliano Dias Hello. I believe it's not gonna be a problem. The I2S Interface for ESP8266 is working the same as ESP32. But on the other my project like recording audio for the WAV file, you need to do with ESP32 instead of ESP8266.
i notice in the code it calculates number of samples by "int samples_read = bytesIn / 8;" may i ask why it is devided by 8 not 4? isn't the 2-channel 16-bit sample size of 4 bytes? appreciate if someone could clarify it. cheers
To do that, wouldn't it be necessary to use an analog mic rather than a digital MEMS microphone? It acquires digital data via i2s. It is so, outputting this again as analog is like performing an unnecessary process.
Thanks for your fantastic videos! I have, perhaps a silly question, from looking at the info of the INMP441, I think your video shows the board mounted with the speaker facing towards the breadboard instead of facing up? Isn't the flat part with the text identifying the pins, the bottom of the board and the other non-flat side the top?
You meant the mems microphone, not the speaker. is that correct? Anyway, there is a hole in the center of the PCB so I believe it doesn't really matter.
If you don't have any issues with connecting the I2S mems microphone, then it's possible that this code no longer works due to an update to the Arduino ESP32 Core version. Have you tried it on 2.0.X?
I think this code does not work form the wave form shoved from the serial plotter. There is a problem addressable reversing the code form PlatformIO for the same project. I'm not able to read platformIO program structure, otherwise i had one it myself.
I don't know about that part because I don't use PlatformIO, but the serial plotter is not a big deal. You just need to check that the data is normally outputted from INMP441 in this "warm-up" project.
Hi I am Currently studying in Pennsylvania university with a major in CS, and loved this project. I just wanted to know if you can share me the link to purchase the right esp32 that you use. Regards Dev
You are a college student. Welcome. I also majored in CS. It's a very interesting field. Anyway, the ESP32s are very different depending on the manufacturer, but they are pretty much the same. It'd be good to search for ESP-WROOM-32 Development Board and purchase it. Something like this, amzn.to/3jdHbs9
i did the mistake and bought max9814(only analog output) instead of a microphone with i2s interface like INMP441.. is there any way to use i2s protocol with max9814?
@@ThatProject yes... i have find some libraries using max9814 but they are much more complicated and ugly than i2s libraries.. by the way, am i free to use your code as part of a scientific paper research? (of course if i am asked to give the code, ill credit you and other possible sources)?
@@ThatProject Yes i know, and actually you have really nice content! (i like that you also have flutter apps and make more whole projects).. i just ask because it depends from the paper maybe ill use your code, but maybe ill never ask to show that (it depends from the papers contents), so i will not give you any credits that way (because it will be only content based, like: i use a microphone this microphone and esp32 o record people voice and extract this characteristics etc. in this case i will not have any "way" to credit. But if code has to be included..then for sure! Also, what do you think in the flutter vs ionic development...i want to do a very limited app, and i have worked enough with web dev (html/css/js), but i also have heard good things about flutter..and i want fast results..
Easy Now IMHO, strongly recommend using Flutter than Ionic. If you need to connect with the hardware part, the Flutter is the answer. Of course, it cannot beat the native applications (iOS, Android). Except for these, it's the best.
Hi Nice videos! I need to use a INMP441 with ESP32 ti make a Guitar Tuner. Any suggestion? (FFT is quite inaccurate. Best is autocorrelation or YIN algorithms)
Hi, I have normal Lolin32, and I tried to connect them in a similar fasion but in the serial monitor I have weird characters. Could it be that a pin is not well connected?
@@ThatProject Thank you so much for your reply , do you ahve anything that can help me to understand more about the INP441 way of use and why it's negative values
@@ThatProject yeah! been following this up just now 😄 btw just a quick question. since this I2S mic is way better at getting audio, would it be possible for a 'noise cancelling' OR 'speech filter' on esp8266? not much of a coder
ٰ Hi. You're right. And as you know, this is just plotting with the pure byte values from INMP443. To get similar to the real waveform, it needs to be processed.
Hi I get the error 'i2s_pop_sample' was not declared in this scope, when I open i2s.h for ESP32 dev I also not see 'i2s_pop_sample' . I found an update with a link to github in a question below, but this update seems not to work here. I get only 128 as a value and the flow stops after a few seconds. Please advise! Thx.
Hi there! I'm using an Inmp441 with my ESP32 and it seems to be working (recording), but the volume of the recording is very low. Any ideas why this might be happening?
In my recording project, void i2s_adc_data_scale(uint8_t * d_buff, uint8_t* s_buff, uint32_t len) { ... d_buff[j++] = dac_value * 256 / 2048; ... } If you look at this part, the last buffer value is divided by 2048. To increase volume, you can adjust this value, like 1024. But the noise will increase as well.
Hi Nice video explanation about esp32 and i2s. Will this work on Cs code esp-idf? I tried using it on esp32 s3 korvo2 where mic is already embedded on it. I wasn't successful, what should I change
@@ThatProject Nop, that would be epic project, too hard :) if you teach it on or off that would be achivment :) Nice intro tutorial, cant wait to see more. Great work as usual, keep them coming.
In these cases, the i2s pin connection is usually incorrect. i2s capture at the same time as image capture is very limited, so please check this as well.
@@ThatProject yes i have tried different codes but it is outputing only 0's. the soderig i've done is pretty good i am concern that did i burned the mic inside?? and one more thing when touch all bare pins on mic with finger it is giving random values.
Thank you for your effort, I tried running your code with your configuration; it is working but i am also getting negative values, might there be something i am doing wrong? I have changed some pins could that be the problem? Thank you
The signal of noise has both negative and positive values like a sine graph. Please check that the amplitude increases as the noise increases. If so, it works fine.
@@ThatProject Thank you for your quick answer the amplitude works fine, but how do you costrain the serial output to positive values like you show in the video?
Awesome, finally I'll get my lazy ass to make use of these modules I bought a year ago! All the information I've found so far had some unclear parts but this looks super simple. What are you planning for the application using them? Personally my top interest would be streaming audio over WiFi (in whatever quality or encoding that works on VLC Player for example ). But I've got the picture it's not trivial a t all. Most examples I've found seem to focus around storing WAV files to an SD card. This could be useful but not as much as streaming for me.
Ristomatti Airo It seems like this series will be very long. I'll do my best to cover all types of applications. At first, I try to do easy things come first. For instance, something like figuring out the noise dB in real-time with a filter. I hope I can handle the streaming audio as well.
@@ThatProject okay ... I used the sd pin (devided it on my breadboard) in order to input the voice signal in an LED and for some reason I don't get the same signal as the one in the Arduino plotter. my goal is to input the voice signal into the LED do you have any idea how I could do it ? I wanted to take the "sample" and attribute it to a PWM pin of the esp
@@hayaabitbol5648 All right, all the data from INMP441 is digital. If you watch this video, you can see both the part where you change the data to integers and the part you draw on the screen. ua-cam.com/video/5q5a5pee4ZQ/v-deo.html
24bit has better quality, but requires more data handling and memory usage. For 16bit, you read and process 2 bytes per sample. uint16_t sample = (data[0]
@@ThatProject cool I was trying something in the similar direction. Also, Why are the mean value of samples being displayed ? whenever I try to get the RAW data I only end up getting 0's continuously.
@@Abinav-p1b It looks like there is an issue with the byte data obtained from i2s. I think you should check the i2s connection first and then check the microphone.
Kunal Paradkar To be honest, I couldn't do the exact test. However, the sound level meter project carried out with a 48 kHz sampling rate and had no problem.
Hello,is there any chance you could help me with some advice in a project related to filtering audio with a ESP32 and a SGTL5000 codec in realtime. This work can be paid, let me know if you are interested!
Hello, nice tutorial. I just have one question. When trying to verify the code, an error pops up saying "driver/i2s.h: No such file or directory". What do I need to install or add? Thanks in advance.
@@ThatProject Hi, i have the same problem with the "driver/i2s.h: No such file or directory" too. I've download the arduino-esp32 core but when i tried to install it, it said "Specified folder/zip file does not contain a valid library". What can i do to fix this? Thanks before.
Sir, when i use the code i am encountering with an error - 'i2s_pop_sample' was not declared in this scope. Could you please guide me on this. Thank you.
@@ThatProject Thankyou sir. I have checked and not facing the error now :). Sir, after uploading code onto ESP32 board(connected to INMP441) I could only see 0's coming on serial monitor. Could you please guide me on this. Thank you.
@@ThatProject I have checked the pin connection on the ESP32 DEVKIT repeatedly but the results are the same. Here's a list of pin connections that I use: (1) I2S_WS to D15, (2) I2S_SD to D13, (3) I2S_SCK to D2, (4) GND to GND, and (5) VDD to 3V3. is there something wrong?
@@ThatProject Actually I also took the initiative to try it with other INMP441. I'm afraid that there will be broken parts during the soldering process. beginner question, is INMP441 very sensitive to heat, impact and others that can affect its performance ?. Thank you for taking the time to respond to some of my questions beforehand.
@@ThatProject I'm not that clever. I can see it needs 2 additional arguments but never really understood * and &. Can you give the syntax please? Might be worth putting the alternate lines in the Github example.
@@WINGNUT307 Please try this one github.com/0015/ThatProject/blob/master/ESP32_MICROPHONE/ESP32_INMP441_SETUP_ESP-2.X/ESP32_INMP441_SETUP_ESP-2.X.ino This is updated code to work with version 2.x. Through this, you can understand the difference.
Hi. I'm very happy because your video can help me about INMP441. But I don't know about the value of INMP441 read and plot in Serial ?. You can talk about it with me ?
@@ThatProject Thank you. Ex. The data coming out of INMP441 is 655535. it = 1111 1111 1111 1111. It's true ?. And I'm had read a comment of Son Mai. I declared the "sample" variable as int16_t, but the data coming out of INMP441 appears negative value and I don't understand why it have a negative value.
error: 'i2s_pop_sample' was not declared in this scope int bytes = i2s_pop_sample(I2S_PORT, (char*)&sample, portMAX_DELAY); ^~~~~~~~~~~~~~ note: suggested alternative: 'i2s_adc_disable' int bytes = i2s_pop_sample(I2S_PORT, (char*)&sample, portMAX_DELAY); ^~~~~~~~~~~~~~ i2s_adc_disable exit status 1 Compilation error: 'i2s_pop_sample' was not declared in this scope
Since this code was written based on Arduino ESP32 Core 1.0.6, it cannot be built in the latest version. Please check this code. github.com/0015/ThatProject/blob/master/ESP32_MICROPHONE/ESP32_INMP441_SETUP_ESP-2.X/ESP32_INMP441_SETUP_ESP-2.X.ino
Hey Nice video. Can you please tell me how to use that code with ICS43434. I tried your code by changing pin configuration as per my circuit but still it didn't work.
Thanks. Well, The ICS43434 and INMP441's Breakout Board are almost the same. Please check the pin connection with your ESP32. That's all I can say now.
Good view mate!!! i am trying to achieve something similar with SPH0645LM4H but failed. If you have done this project using the SPH0645, please let me know. I am lost.
Hello. You can make your own device. I tried to include all steps as much as possible in my tutorial videos. so just follow these and let me know If you run into any trouble.
@@ThatProject Thank you for your response. I am new to MEMS microphone and I would like to use that in a research study I am working on two-phase flow in channels. My goal is to characterize the flow based on noise level. I have some questions for you; 1) would I be able to use another microphone (like this www.digikey.com/en/products/detail/EV_ICS-43434-FX/1428-1119-ND/6140311?WT.z_cid=ref_netcomponents_dkc_buynow&) with the same board and code? 2) would this code (and wiring) work on other Arduino boards? (I am also new to Ardinuo as well) 3) what is the output of this MEMS microphone. Can I get voltage in time domain?
@@mmortazav 1. Sound level meter using ICS-43434 is possible. 2. I'm not dealing with Arudino, so I don't know if my code will work properly. 3. I used the INMP441 microphone in my project, invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf Please check the datasheet for your further information.
HI I must say that you made a fantastic job with this little I2S microphone. I bought one yesterday evening and hope to receive it quite fast to test your code ! I have eaten all your videos on this topic and will come back for sure many times ! What I would like to do is a simple streaming of sound buffer via UDP over wifi so that I could hide a microphone into my hive and listen at the "Bees music" at home on my Android. I already know how to read a PCM stream on Android and output it on the loudspeaker. I don't know if it would be easy to push the buffer over UDP instead of recording the wav file as you did in video #4 and of course let run this process as long as le UDP connection is active ? Thank you for sharing all this --> I follow your channel now ! JP
Thanks for watching my video. Well. I need to drill down it from my side before telling you. It seems that it doesn't much difficult sending data via UDP over WIFI. I'll take a look after the ongoing project is over. Thank you for your understanding.
@@ThatProject Hi, thanks for this fast reply ! I have found these two links which have tried (and more or less succeed) streaming over UDP www.esp32.com/viewtopic.php?t=15185 esp32.com/viewtopic.php?t=7882 I am not in a hurry, still waiting for the microphone coming from China :-)
sorry if i write wrong because i know a little ENGLISH thank for video . I code like that but error "driver/i2s.h" please give me link library "driver/i2s.h" thank you
Jake Montalbano The i2s.h file is included in the ESP32 Core. If it's installed properly, you can run it without any problems. github.com/espressif/esp-idf/blob/master/components/driver/include/driver/i2s.h
@@ThatProject thank you! i can run it. and now I waching part 1 " ua-cam.com/video/QREKVWaZLi4/v-deo.html " many times but i don't understand how to convert data of i2s microphone to decibel. can you show for me more document about i2s microphone thank you for your help>
Subscribe - ua-cam.com/users/ThatProject
I have been trying to get a code to broadcast audio streams from I2S dma for my final year project work
@@oniyaolaiya9826 Unfortunately, I'm not sure what you need. Anyway, Good luck with your final project.
i can't get the audio decoded and I can't play it on any client/Wi-Fi enabled device.
and I'm not sure the audio data sent via udp is in the format its suppose to come in although I used a UDP monitor to receive some HEX streams
@@oniyaolaiya9826 One of the projects I did was send audio data to the Node.js server based on WebSocket and output PCM to the speaker on the computer (Mac). Please refer to this. ua-cam.com/video/vq7mPgecGKA/v-deo.html
@@ThatProject thank you very much!
That will be like an alternative just to show the technical staff on my project. I think this would earn me the marks I need
I was struggling to implement I2S since I don't have any experience with boards other than the basic Arduino. Your tutorial makes it easy for beginners like me! Thank you so much for this tutorial!
Hi, you're using 16 bits/sample, so in the loop function, you need to declare the "sample" variable as int16_t. That's the reason why you see the squarewave flipping around when no sound detected
Thank you for your comment. Yes, that's right. The purpose of this video was to display the values from the sensors.
Exacly, please pin this comment
tried it using int16_t, but nothing happens. Seems like something is wrong there
Hi, i will start to build this one but i only have the esp8266. Is it work for your project? Thank you so much.
Giuliano Dias Hello. I believe it's not gonna be a problem. The I2S Interface for ESP8266 is working the same as ESP32. But on the other my project like recording audio for the WAV file, you need to do with ESP32 instead of ESP8266.
i notice in the code it calculates number of samples by "int samples_read = bytesIn / 8;"
may i ask why it is devided by 8 not 4? isn't the 2-channel 16-bit sample size of 4 bytes?
appreciate if someone could clarify it. cheers
I would like the output of the microphone to go to an amplifier then a speaker or headphone instead of the serial monitor or plotter. Possible?
To do that, wouldn't it be necessary to use an analog mic rather than a digital MEMS microphone? It acquires digital data via i2s. It is so, outputting this again as analog is like performing an unnecessary process.
Very helpful video. Is there a way to store the audio via serial on the PC?
I’ve never tried with Serial but sent the audio stream via WebSocket, WiFi. ua-cam.com/video/vq7mPgecGKA/v-deo.html
Thanks for your fantastic videos! I have, perhaps a silly question, from looking at the info of the INMP441, I think your video shows the board mounted with the speaker facing towards the breadboard instead of facing up? Isn't the flat part with the text identifying the pins, the bottom of the board and the other non-flat side the top?
You meant the mems microphone, not the speaker. is that correct? Anyway, there is a hole in the center of the PCB so I believe it doesn't really matter.
@@ThatProject Sorry, yes I meant microphone :-) Thanks for the response, that makes sense.
Thanks for the video, i need to build a sonometer and i need to have the sound as analog value, do you have any ideas, thanks
I'm getting continuous zero values from the serial monitor. I checked the code and pins and it's still zeroes. What do you think is the issue?
If you don't have any issues with connecting the I2S mems microphone, then it's possible that this code no longer works due to an update to the Arduino ESP32 Core version. Have you tried it on 2.0.X?
@@ThatProject I'm trying it on 2.0.18. Which version do you recommend to use?
@@dasunisaparamadu2876 I think I used 2.0.7.
I think this code does not work form the wave form shoved from the serial plotter. There is a problem addressable reversing the code form PlatformIO for the same project. I'm not able to read platformIO program structure, otherwise i had one it myself.
I don't know about that part because I don't use PlatformIO, but the serial plotter is not a big deal. You just need to check that the data is normally outputted from INMP441 in this "warm-up" project.
Great video!
Really helpful for my current project!!
Hi I am Currently studying in Pennsylvania university with a major in CS, and loved this project.
I just wanted to know if you can share me the link to purchase the right esp32 that you use.
Regards
Dev
You are a college student. Welcome. I also majored in CS. It's a very interesting field. Anyway, the ESP32s are very different depending on the manufacturer, but they are pretty much the same. It'd be good to search for ESP-WROOM-32 Development Board and purchase it. Something like this, amzn.to/3jdHbs9
i did the mistake and bought max9814(only analog output) instead of a microphone with i2s interface like INMP441..
is there any way to use i2s protocol with max9814?
Easy Now oh my... There is no I2s interface in the MAX9814. You need to find a manner to use this... datasheets.maximintegrated.com/en/ds/MAX9814.pdf
@@ThatProject yes...
i have find some libraries using max9814 but they are much more complicated and ugly than i2s libraries..
by the way, am i free to use your code as part of a scientific paper research? (of course if i am asked to give the code, ill credit you and other possible sources)?
Easy Now Sure. It would be an honor! As you know, all source code in this video is available in my Github. Good luck.
@@ThatProject Yes i know, and actually you have really nice content! (i like that you also have flutter apps and make more whole projects)..
i just ask because it depends from the paper maybe ill use your code, but maybe ill never ask to show that (it depends from the papers contents), so i will not give you any credits that way (because it will be only content based, like: i use a microphone this microphone and esp32 o record people voice and extract this characteristics etc. in this case i will not have any "way" to credit. But if code has to be included..then for sure!
Also, what do you think in the flutter vs ionic development...i want to do a very limited app, and i have worked enough with web dev (html/css/js), but i also have heard good things about flutter..and i want fast results..
Easy Now IMHO, strongly recommend using Flutter than Ionic. If you need to connect with the hardware part, the Flutter is the answer. Of course, it cannot beat the native applications (iOS, Android). Except for these, it's the best.
Hi
Nice videos! I need to use a INMP441 with ESP32 ti make a Guitar Tuner. Any suggestion? (FFT is quite inaccurate. Best is autocorrelation or YIN algorithms)
Hey, It's gonna be an interesting project.
I don't have a good idea yet because it's not my field. I'll let you know if I have a good idea.
hello! do you know if there is any way to connect a speaker and play a sound but the esp32-cam?
I don't get it. Why ESP32-CAM? Do you need to play some sounds in ESP32-CAM??
I see many intructions about esp32 for this problem. How to carry on esp32 camera ? Thank you
Sorry. I don't get your question. About what problem? And Why you mentioned ESP32CAM here?
how can i send this audio stream to my flutter project
Hi, I have normal Lolin32, and I tried to connect them in a similar fasion but in the serial monitor I have weird characters. Could it be that a pin is not well connected?
Weird characters? If so, how about the serial baud rate for your console monitor?
Tried them all, it's like plotting rectangules and such@@ThatProject
Changed it, and now it shows 0.0 only@@ThatProject
Are this module can recognize voice and answer
Nope. it's just getting audio data from i2s. It may be possible by using various ML, but it is unreasonable as a standalone.
Does this mic work on the 8266 Nodemcu?
I believe you can use the I2S MEMS microphone on ESP8266 so this one is also working.
@@ThatProject Thank you
Hello everyone , is it normale that i get negative and positive values ?
@@ahdsoualhia3907 Yes, that's correct. If you think about the wave shape, you can see why it's a negative number.
@@ThatProject Thank you so much for your reply , do you ahve anything that can help me to understand more about the INP441 way of use and why it's negative values
can you help me fix driver/i2s.h: No such file or directory
Have you installed the Arduino ESP32? docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-boards-manager
hi I have this mic module. but dont know what to do with it 😄
raffy turc I was like that at first. I hope my video helps.
@@ThatProject yeah! been following this up just now 😄
btw just a quick question. since this I2S mic is way better at getting audio, would it be possible for a 'noise cancelling' OR 'speech filter' on esp8266?
not much of a coder
As far as I know, implementing it without a third-party library would be almost impossible.
Nice project. I wanted to ask why waveform does not look as one would expect but realized that bytes of the data are flipped.
ٰ Hi. You're right. And as you know, this is just plotting with the pure byte values from INMP443. To get similar to the real waveform, it needs to be processed.
great! are you can make audio doorbell with this?
Yeah. Take a look at this one. ua-cam.com/video/Fj21iHHUvf4/v-deo.html
It's triggering with sound level to take a picture.
Hi I get the error 'i2s_pop_sample' was not declared in this scope, when I open i2s.h for ESP32 dev I also not see 'i2s_pop_sample' .
I found an update with a link to github in a question below, but this update seems not to work here. I get only 128 as a value and the flow stops after a few seconds. Please advise! Thx.
oh sorry, I re-edited my code. Please check it again.
@@ThatProject Thanks I will try it this weekend!
Can be able to audio streaming from laptop or mobile using this technique...?
Well, It's a little bit hard for audio streaming with this.
Hi there! I'm using an Inmp441 with my ESP32 and it seems to be working (recording), but the volume of the recording is very low. Any ideas why this might be happening?
In my recording project,
void i2s_adc_data_scale(uint8_t * d_buff, uint8_t* s_buff, uint32_t len)
{
...
d_buff[j++] = dac_value * 256 / 2048;
...
}
If you look at this part, the last buffer value is divided by 2048. To increase volume, you can adjust this value, like 1024. But the noise will increase as well.
Hi
Nice video explanation about esp32 and i2s. Will this work on Cs code esp-idf? I tried using it on esp32 s3 korvo2 where mic is already embedded on it. I wasn't successful, what should I change
Unfortunately, this project is based on Arduino. You have to write down your code for ESP-IDF. I believe there is an i2s example for IDF.
Nice! Can we use this to recognise speech ?
Thắng Huy It's hard to recognize the human voice with this. Let's do easy thing first. 😉
@@ThatProject Nop, that would be epic project, too hard :) if you teach it on or off that would be achivment :)
Nice intro tutorial, cant wait to see more.
Great work as usual, keep them coming.
Jedan Decko Thanks always🙏
@@jedandecko5585 you can use google voice API...
How to connect this sensor more than 1 sir
I am getting a constant 655356 value instead of the analog output. I used ESP dev board and INMP441.Can u help me out how to rectify it
When you first asked me a question, you said only NaN was printed. What has changed?
@@ThatProject When I run that its producing that ,so I started with the basic code now its printing values 0 its not changing when any audio is played
@@shwethas2613 As I said before, there seems to be a problem with the INMP441 module itself. I really want to help you, but there seems to be no way.
i am getting an error with the code
driver/i2s.h: No such file or directory
Please check you installed the ESP32-Arduino. docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide
Hi I am using an ESP32 CAM, reading value stays at -1.00
In these cases, the i2s pin connection is usually incorrect. i2s capture at the same time as image capture is very limited, so please check this as well.
@@ThatProject i2s pin should be correct
@@alexsteiner6103 That’s not good. Can you try ESP version 2.0.6 instead??
@@ThatProject i tried to run it w platformio seems to work
@@alexsteiner6103 Does this mean that it works in 2.0.x but not in the latest version 3.x.x?
I've tried the code from github. I wanna ask why the data I get is always -1....
Please re-check the pin to which your i2s mems microphone is connected.
Please do not have a working code for visual studio code ?
I have SPE0645LM4H sensor in ESP32. Thanks for answer :)
Unfortunately, I don't have SPE0645LM4H.
Awesome, Please how can I get the driver/I2C library?
You don't need a separate library to use i2c.
@@ThatProject sorry I2S, i have not able to get it into my Arduino code
@@aliyunoura If ESP Arduino Core is installed, you can use it without problems. github.com/espressif/arduino-esp32
my inmp441 only prints 0's, i checked all the connections are fine.
does it gets damaged with improper soldering??
It could go wrong by soldering, but it's unlikely. Have you tried with code other than mine?
@@ThatProject yes i have tried different codes but it is outputing only 0's.
the soderig i've done is pretty good i am concern that did i burned the mic inside??
and one more thing when touch all bare pins on mic with finger it is giving random values.
@@RandomGuy-hi2jm 🤔 I don’t think it’s from your soldering. Could it be that there was a hardware problem from the beginning???
@@ThatProject yes the problem is from the beginning, i think i got defected board i try to buy a new one. well thankyou for replies.
@@RandomGuy-hi2jm My pleasure. I'll wait for good news.
Thank you for your effort, I tried running your code with your configuration; it is working but i am also getting negative values, might there be something i am doing wrong? I have changed some pins could that be the problem? Thank you
The signal of noise has both negative and positive values like a sine graph. Please check that the amplitude increases as the noise increases. If so, it works fine.
@@ThatProject Thank you for your quick answer the amplitude works fine, but how do you costrain the serial output to positive values like you show in the video?
@@Buddhavari Well, to get only positive values, you need to set like this, uint16_t sBuffer[bufferLen];
@@ThatProject super thank you a lot
Awesome, finally I'll get my lazy ass to make use of these modules I bought a year ago! All the information I've found so far had some unclear parts but this looks super simple. What are you planning for the application using them? Personally my top interest would be streaming audio over WiFi (in whatever quality or encoding that works on VLC Player for example ). But I've got the picture it's not trivial a t all. Most examples I've found seem to focus around storing WAV files to an SD card. This could be useful but not as much as streaming for me.
Ristomatti Airo It seems like this series will be very long. I'll do my best to cover all types of applications. At first, I try to do easy things come first. For instance, something like figuring out the noise dB in real-time with a filter. I hope I can handle the streaming audio as well.
@@ThatProject You might find this project helpful in the quest of dB. It's something I'm also interested in. :) github.com/ikostoski/esp32-i2s-slm
@@ristomatti Wow, it seems already implemented fully.
@@ThatProject Yes and it also doesn't look like it was that easy to me at least. :D
hiii, the voice data comes from the SD pin ?
Yeah, it's coming from i2S_SD.
@@ThatProject okay ... I used the sd pin (devided it on my breadboard) in order to input the voice signal in an LED and for some reason I don't get the same signal as the one in the Arduino plotter.
my goal is to input the voice signal into the LED do you have any idea how I could do it ?
I wanted to take the "sample" and attribute it to a PWM pin of the esp
@@hayaabitbol5648 Did you check the data from INMP441 first? Please check if the signal data is printed out first.
@@ThatProject yeah it is printed out on the plotter
@@hayaabitbol5648 All right, all the data from INMP441 is digital. If you watch this video, you can see both the part where you change the data to integers and the part you draw on the screen. ua-cam.com/video/5q5a5pee4ZQ/v-deo.html
may i use this thing with pi pico?
It’s made based on the ESP32 board. So, all the i2s parts need to be changed to work on the pico board.
Hi, this microphone gives 24 bit op right?
then why are you using 16bit?
24bit has better quality, but requires more data handling and memory usage.
For 16bit, you read and process 2 bytes per sample.
uint16_t sample = (data[0]
@@ThatProject cool I was trying something in the similar direction. Also, Why are the mean value of samples being displayed ? whenever I try to get the RAW data I only end up getting 0's continuously.
@@Abinav-p1b It looks like there is an issue with the byte data obtained from i2s. I think you should check the i2s connection first and then check the microphone.
@@ThatProject the microphone gives data with your project codes but when I make changes i only keep getting 0 !? :(
@@Abinav-p1b Are you serious? What changes did you make?
Sampling rate = 44.1kHz, did the esp produce all frequencies faithfully?
Kunal Paradkar To be honest, I couldn't do the exact test. However, the sound level meter project carried out with a 48 kHz sampling rate and had no problem.
Hello,is there any chance you could help me with some advice in a project related to filtering audio with a ESP32 and a SGTL5000 codec in realtime. This work can be paid, let me know if you are interested!
Hi. The audio signal processing is not my field, so I don't think it'll be possible. Thank you for contacting me.
Hello, nice tutorial. I just have one question. When trying to verify the code, an error pops up saying "driver/i2s.h: No such file or directory".
What do I need to install or add? Thanks in advance.
That is the part of the default Arduino-esp32 core. Please check if this is installed properly. github.com/espressif/arduino-esp32
@@ThatProject Hi, i have the same problem with the "driver/i2s.h: No such file or directory" too. I've download the arduino-esp32 core but when i tried to install it, it said "Specified folder/zip file does not contain a valid library". What can i do to fix this? Thanks before.
Sir, when i use the code i am encountering with an error - 'i2s_pop_sample' was not declared in this scope. Could you please guide me on this. Thank you.
i2s_pop_sample is included in driver/i2s.h. Please check if ESP32 Arduino Core is installed properly. github.com/espressif/arduino-esp32
@@ThatProject Thankyou sir. I have checked and not facing the error now :). Sir, after uploading code onto ESP32 board(connected to INMP441) I could only see 0's coming on serial monitor. Could you please guide me on this. Thank you.
@@galleakhila3588 Not sure what you did. Please check the pin connection and check with other INMP441 too. Sometimes there is a faulty sensor.
Sir, i have checked with my connections , i am getting the output. Thank you Sir! for taking time to reply back and solving my queries. :)
same error i am getting please guide me
Does anyone know if the INMP441 will work with the raspberry pi zero?
Why not?
Communication is done with i2c
Rasberry has this protocol
@@kirillyatsenko5365 Thanks Kirill!
when trying to open the serial monitor I get the value 0. I used eps32 devkit v1. any suggestions for my problem?
Could you please check the i2s pin you connect with ESP32?
@@ThatProject I have checked the pin connection on the ESP32 DEVKIT repeatedly but the results are the same. Here's a list of pin connections that I use: (1) I2S_WS to D15, (2) I2S_SD to D13, (3) I2S_SCK to D2, (4) GND to GND, and (5) VDD to 3V3. is there something wrong?
@@achmadarifmunaji3320 Well, it doesn't look like a problem, but it's weird. Is there a problem with INMP441? Have you tested it with another spare?
@@ThatProject Actually I also took the initiative to try it with other INMP441. I'm afraid that there will be broken parts during the soldering process. beginner question, is INMP441 very sensitive to heat, impact and others that can affect its performance ?. Thank you for taking the time to respond to some of my questions beforehand.
@@achmadarifmunaji3320 I'm not sure about that. I used a product that doesn't need soldering.
How to send Inmp4441 stream data to a2dp?
Have you tried this?
github.com/pschatzmann/ESP32-A2DP
Hi, i did everything as you did, but i'm getting only 0's
Which ESP version are you using? For this project, you need to run it under ESP 1.0.6 instead of 2.0+.
Hey my microphone not working 😭 please help me
There are many solutions in the comments here. Please take a moment to find out if there is a solution that is right for you.
Hello ! Awesome work ! Is it possible to save the sample to .wav file to send it to an API for example ? Thanks !
Paul Savoye Thanks! Yes, I'll make that project in this series. Stay tuned.
i am getting " i2s_pop_sample was not declare in this scope".can anyone guide me
i2s_pop_sample() is deprecated. This project is made on ESP 1.0.6. If you are using the latest version of the ESP board, please use i2s_read().
@@ThatProject i2s_pop_sample error solved .thank you sir
@@ThatProject I'm not that clever. I can see it needs 2 additional arguments but never really understood * and &. Can you give the syntax please? Might be worth putting the alternate lines in the Github example.
@@WINGNUT307 Please try this one github.com/0015/ThatProject/blob/master/ESP32_MICROPHONE/ESP32_INMP441_SETUP_ESP-2.X/ESP32_INMP441_SETUP_ESP-2.X.ino This is updated code to work with version 2.x. Through this, you can understand the difference.
is it doable in Arduino ESP32 instead IDF?
Imran Alam Yes, Of course. It’s working seamlessly on the ESP32 Arduino IDE.
I have ESP32 2.0.x. What can I do?
Uploaded new code for ESP version 2.0.x
github.com/0015/ThatProject/tree/master/ESP32_MICROPHONE/ESP32_INMP441_SETUP_ESP-2.X
Can I integrate INMP441 with esp32cam gpio?
Using INMP441 and ESP32CAM together in this project. ua-cam.com/video/Fj21iHHUvf4/v-deo.html
Hi. I'm very happy because your video can help me about INMP441. But I don't know about the value of INMP441 read and plot in Serial ?. You can talk about it with me ?
Hello. Which part you don't get?
@@ThatProject I don't understand the value Module INMP441 read. Is its unit Db or what?
@@dungxihaiyan9447 No. No. The data coming out of INMP441 is byte digital data. This is the digital converted value of the analog signal.
@@ThatProject Thank you. Ex. The data coming out of INMP441 is 655535. it = 1111 1111 1111 1111. It's true ?. And I'm had read a comment of Son Mai. I declared the "sample" variable as int16_t, but the data coming out of INMP441 appears negative value and I don't understand why it have a negative value.
@@dungxihaiyan9447 Since int16_t is a signed type, it has negative numbers. If it is of type uint16_t, you can only get positive numbers from it.
error: 'i2s_pop_sample' was not declared in this scope
int bytes = i2s_pop_sample(I2S_PORT, (char*)&sample, portMAX_DELAY);
^~~~~~~~~~~~~~
note: suggested alternative: 'i2s_adc_disable'
int bytes = i2s_pop_sample(I2S_PORT, (char*)&sample, portMAX_DELAY);
^~~~~~~~~~~~~~
i2s_adc_disable
exit status 1
Compilation error: 'i2s_pop_sample' was not declared in this scope
Since this code was written based on Arduino ESP32 Core 1.0.6, it cannot be built in the latest version. Please check this code. github.com/0015/ThatProject/blob/master/ESP32_MICROPHONE/ESP32_INMP441_SETUP_ESP-2.X/ESP32_INMP441_SETUP_ESP-2.X.ino
@@ThatProject oh, thank you
Hey Nice video. Can you please tell me how to use that code with ICS43434. I tried your code by changing pin configuration as per my circuit but still it didn't work.
Thanks. Well, The ICS43434 and INMP441's Breakout Board are almost the same. Please check the pin connection with your ESP32. That's all I can say now.
Good view mate!!!
i am trying to achieve something similar with SPH0645LM4H but failed. If you have done this project using the SPH0645, please let me know.
I am lost.
I do not have any projects using SPH0645. I'll try it out when I get a chance.
please make tutorials on audio recording and playback using sdcard
Joseph Terlumun Yes, I will try to proceed with the related project.
@@ThatProject thanks a lot bro
Hi, can you make one of these for me? We can negotiate on the price.
Hello. You can make your own device. I tried to include all steps as much as possible in my tutorial videos. so just follow these and let me know If you run into any trouble.
@@ThatProject Thank you for your response. I am new to MEMS microphone and I would like to use that in a research study I am working on two-phase flow in channels. My goal is to characterize the flow based on noise level. I have some questions for you; 1) would I be able to use another microphone (like this www.digikey.com/en/products/detail/EV_ICS-43434-FX/1428-1119-ND/6140311?WT.z_cid=ref_netcomponents_dkc_buynow&) with the same board and code?
2) would this code (and wiring) work on other Arduino boards? (I am also new to Ardinuo as well)
3) what is the output of this MEMS microphone. Can I get voltage in time domain?
@@mmortazav 1. Sound level meter using ICS-43434 is possible. 2. I'm not dealing with Arudino, so I don't know if my code will work properly. 3. I used the INMP441 microphone in my project, invensense.tdk.com/wp-content/uploads/2015/02/INMP441.pdf
Please check the datasheet for your further information.
HI
I must say that you made a fantastic job with this little I2S microphone.
I bought one yesterday evening and hope to receive it quite fast to test your code !
I have eaten all your videos on this topic and will come back for sure many times !
What I would like to do is a simple streaming of sound buffer via UDP over wifi so that I could hide a microphone into my hive and listen at the "Bees music" at home on my Android.
I already know how to read a PCM stream on Android and output it on the loudspeaker.
I don't know if it would be easy to push the buffer over UDP instead of recording the wav file as you did in video #4 and of course let run this process as long as le UDP connection is active ?
Thank you for sharing all this --> I follow your channel now !
JP
Thanks for watching my video. Well. I need to drill down it from my side before telling you. It seems that it doesn't much difficult sending data via UDP over WIFI. I'll take a look after the ongoing project is over. Thank you for your understanding.
@@ThatProject Hi, thanks for this fast reply !
I have found these two links which have tried (and more or less succeed) streaming over UDP
www.esp32.com/viewtopic.php?t=15185
esp32.com/viewtopic.php?t=7882
I am not in a hurry, still waiting for the microphone coming from China :-)
sorry if i write wrong because i know a little ENGLISH thank for video . I code like that but error "driver/i2s.h" please give me link library "driver/i2s.h" thank you
Jake Montalbano The i2s.h file is included in the ESP32 Core. If it's installed properly, you can run it without any problems.
github.com/espressif/esp-idf/blob/master/components/driver/include/driver/i2s.h
@@ThatProject thank you! i can run it. and now I waching part 1 " ua-cam.com/video/QREKVWaZLi4/v-deo.html " many times but i don't understand how to convert data of i2s microphone to decibel. can you show for me more document about i2s microphone thank you for your help>
Jake Montalbano Ummm If so, It would be helpful if you refer to the original author's explanation. hackaday.io/project/166867-esp32-i2s-slm