Interested in ESP32 Audio: kzbin.info/aero/PL5vDt5AALlRfGVUv2x7riDMIOX34udtKD Looking for all my ESP32 projects: kzbin.info/aero/PL5vDt5AALlRdN2KyL30l8j7kLCxhDUrNw
@brodietaylor74673 жыл бұрын
@Kairo Kabir instablaster ;)
@yangjack86953 жыл бұрын
however esp32s3 can't driver sph-0645 microphone sensor ! mybe the register address is different
@djkgk9 ай бұрын
Hello I have an Invensense Ics 43432 microphone how can I use it to calculate decibels values of sound ? Thank You.
@GadgetAddict4 жыл бұрын
Wow these videos are going to save me a lot of time. Thanks for doing these tests. I'm glad you also tested them without your filter.
@jonaslima43984 жыл бұрын
Thanks a lot! I thought the INMP1441 I had bought was broken because it didn't work at all, but your explanation and your code made it work beautifully!
@atomic144 жыл бұрын
That's great news. It can be really hard to debug these things. I've just spent a day trying to work out why an SPI peripheral wouldn't work. Sometimes we really are just fumbling around in the dark.
@leozendo35004 жыл бұрын
this is a perfect conversion from information to knowledge.
@NickReynolds4 жыл бұрын
Thanks, for a clear simple comparison between these and the analogue input.
@atomic144 жыл бұрын
Thanks! I'm surprised at how much better the I2S microphone board is performing. I guess it's a much more modern bit of tech and the processing of the signal is a lot more advanced.
@NickReynolds4 жыл бұрын
@@atomic14 I'm thinking about adding a microphone to an ESP32-CAM board, need to check which pins are free (there aren't many) to see if it's practical or not.
@atomic144 жыл бұрын
Yes, the ESP-CAM is a bit of a pain as they haven't left may pins open. I think you can free up some pins by disabling the flash card if you aren't using it and you can re-use the serial lines once you've programmed the board.
@atomic144 жыл бұрын
If you can find 3 spare pins then you should be good - I know the ESP32-CAM board is pretty limited as they've used up a lot of the pins already.
@maximus68842 жыл бұрын
Thanks for sharing the audio clips. very useful to get the idea before purchase.
@davidt15164 жыл бұрын
And to add insult to injury, with the SPH0645 there is a positive "DC offset" in the digital that is limiting the dynamic range of the linear pcm by 20%-30% in the positive side
@sjetmand8 ай бұрын
Anyone figure out why / a solution to this?
@AndrewTuline4 жыл бұрын
This as well as the analog video (at ESP32 Audio Input Using I2S and Internal ADC - KZbin) are gospel. They sure demonstrates some of the issues we've encountered with our sound reactive fork of WLED.
@atomic143 жыл бұрын
Sound reactive WLED sounds really interesting! I'll have to check it out.
@lel4576Ай бұрын
Very well thought video 👍
@hassaansaleem68865 ай бұрын
Hi there, this is Hassan, at 2:51, you shared the schematic diagram of the circuit, could you let me know which platform you used to make it on. I have a similar project, and I had to make a schematic of it. Unfortunately, I couldn't find any online tool where the mic module could be available. My project uses an SD card, and an esp32 as well, I hope to hear from you soon.
@autorlss15424 жыл бұрын
really good, really helpful! Thanks!
@imjustger Жыл бұрын
Thank you so much, this was so useful.
@ardhanswareska68383 жыл бұрын
Wow, great video. its very helpful for my examination project! Thanks a lot
@atomic143 жыл бұрын
Glad it was helpful! Hope the project went well.
@ijustwanttogosailing82484 жыл бұрын
You might want to add such 'peace of mind' power supply to your ebay page.. Even if as a bare PCB - people who might want one either already have parts to populate it or can get them easily.
@julioguzman51972 жыл бұрын
Great job on explaining this, I am a total noob but it kind of gives me a broad idea of how I should try doing RCA inputs or 3.5 jack input as im using it for the WLED in a car
@wuyongzheng3 жыл бұрын
1:00 the sensor is soldered on the bottom. What's the reason? avoid wind noise? avoid collecting dust? I put the sensor on top, because I think that's where the sound comes from.
@atomic143 жыл бұрын
MEMS microphones come in two different styles, top ported and bottom ported. Top ported versions have a hole in the top of the microphone for the sound to enter. Bottom ported have the hole in the bottom and you need to have a matching hole in the PCB to let the sound in. Both the INMP441 and the SPU0645 are bottom ported.
@wuyongzheng3 жыл бұрын
@@atomic14 oh I see. Thank you.
@HokageUub3 ай бұрын
Hi, I noticed that GND and VDD are not connected to anything in the circuit diagram. Are they supposed to be connect to something?
@soadaiop626012 күн бұрын
What do you recommend for me? I just want a microphone that connects to the ESP32 to convert audio to text that transmits via Bluetooth
@swagathprakash20443 жыл бұрын
Could you please make a video on how to record voice commands and with esp8266 send the audio to raspberry pi over local wifi...please
@abhiroy19934 жыл бұрын
Thanks a lot. Helped me greatly.
@gang2082 жыл бұрын
At time 2'40", you have the GPIO35 wired as SCK (BCLK) which is clock output to the serial clock of the I2S microphone. However, on most (if not all) ESP32, GPIO35 is an input only pin. You code looks correct when using GPIO32, but the Dout should be on a pin other than GPIO32.
@atomic142 жыл бұрын
oooh - good spot! The diagram is wrong.
@alhdlakhfdqw2 жыл бұрын
really amazing video thank you very much! subbed :)
@abhiram40328 ай бұрын
@ atomic14 may i know how to save the recorded audio from the inmp441 to the audacity?
@gauravpurohit1234 Жыл бұрын
how to pass the INMp441 to speaker directly ...is this possible
@aliyunoura Жыл бұрын
Hello sir, please can i have the schematics of the filter? Thenko
@roysigurdkarlsbakk3842 Жыл бұрын
I wonder how you managed to make the ESP32 output the clock signal on GPIO35 - it's input only…
@atomic14 Жыл бұрын
Good spot - that's an error in the diagram. The linked GitHub repo uses the following pins: .bck_io_num = GPIO_NUM_32, .ws_io_num = GPIO_NUM_25, .data_out_num = I2S_PIN_NO_CHANGE, .data_in_num = GPIO_NUM_33
@anuragpaul25822 жыл бұрын
Hi First of All thanks for the demo. I am trying to implement the same and I wanted to ask how are you taking care of the data that's coming as 2's compliment.
@raffyturc4 жыл бұрын
wow! what a BIG difference in audio. I hope youd have a project INMP441(mic) and output it in analog(esp32?) with agc.
@atomic143 жыл бұрын
I've been thinking about doing this for a while!
@chenweiguang2 жыл бұрын
Can i read four INMP441 sound signals at the same time? I want to use esp32+4*inmp441 to make a voice location. Thank you
@wasauce4 жыл бұрын
Great video. Thank you! Do you have the specs / schema for the PCB you created and had made for you? I'd be interested in taking a look and having one made so I can try to follow along directly. I'm new to this and interested in learning. Thank you very much!
@atomic144 жыл бұрын
Here you go - easyeda.com/chris_9044/esp32-audio-board With the INMP441 I'm not sure it's really needed as it seems to handle the noisy power supply pretty well.
@wasauce4 жыл бұрын
@@atomic14 Thank you for the reply. I greatly appreciate it!
@SA-oj3bo2 жыл бұрын
Hi, is it possible to use an I2S microphone + ESP32 and stream the audio captured by the microphone to a PC or RP where it is recorded and analyzed later? Thx for y advise.
@islamothman27552 жыл бұрын
I'm really having problems converting adc buffer or captured sound buffer to a playable .wav format. How did u do it ? Thanks in advance
@hanswurst98662 жыл бұрын
could you try out the Adafruit PDM Microphone which is digital but not I2S and not PWM?
@Zuzu7570 Жыл бұрын
Hi mr atomic14, I faced this error: [E][WiFiClient.cpp:268] connect(): socket error on fd 48, errno: 104, "Connection reset by peer" , could you help me please!
@darealspectrum3637 Жыл бұрын
Thanks for the video very helpful, by chance i have question which of these sensors (mems or analog ones) is capable to use in such projects like beehive sound detection? any advice ..
@dirrelito2 жыл бұрын
Nice video! I'd be very interested in your choice of components for the power supply filtering. What values did you use?
@gang2082 жыл бұрын
Thanks for the convincing demonstration that whenever possible I2S microphone is a better choice. However, it's not clear to me why the INMP441 is "hands down" better than the SPH0645. From the audio, they sound quite similar. Can you elaborate?
@atomic142 жыл бұрын
From what I read there is some weird timing incompatibility - it can be worked around, but it’s not ideal: hackaday.io/project/162059-street-sense/log/160705-new-i2s-microphone
@gang2082 жыл бұрын
@@atomic14 Ah, thanks! I thought the mis-alignment was the problem of the ESP32 I2S, but after reading your code on Github, I realized that the workaround is only needed for the SPH0645. Yes, that makes the INMP441 the preferred device.
@nicolascumu70444 жыл бұрын
Nice video. One of the big advantage of i2s micro mems is the known value of the expected RMS level for 94dB @ 1000 Hz . So you do not really need to calibrate the microphone. I would like to know the diameter of the INMP1441, it would be good if it fit inside 1/2" tube.
@atomic144 жыл бұрын
My callipers says it's about 14.5mm (0.57inch) diameter. All the breakout boards that I've been able to find follow the same form factor. There is this later version of the microphone - the ICS43434 - and there are some breakout boards for it that are really tiny. Unfortunately, they only seem to be available shipped from the US - www.tindie.com/products/onehorse/ics43434-i2s-digital-microphone/
@Shadoweee Жыл бұрын
Would it be posibble to use a proper mic capsule (ie JLI-2555BXZ3-GP) somehow? Then transfer it via wi-fi like You did in one of Your other videos.
@TheKitKiln2 жыл бұрын
Thanks for the video! I have been working on an audio project with the ESP32 and digital mics and have been having trouble getting anything to work. Do you have any tutorials on how to use your source code? I am not sure how to get it on to the ESP32. Thanks!
@Avisqq3 жыл бұрын
Do you know of any microphones compatible with the esp32 that can handle 120db +?
@user-ml1jx3oi8r Жыл бұрын
Is it possible to use audio input (e.g. inmp441 i2s) or audio output (e.g. max98357A i2s) via a port expander? If yes how is it done, especially the pin config? Thanks for any advice.
@gauravpurohit1234 Жыл бұрын
please tell me can we use both to make a line pass for hearing aid solution
@seanyong11234 жыл бұрын
Hi atomic14, really really enjoying your videos and the work you've put into them. I'm trying to follow along with the projects and have downloaded the source code to play around with. I currently am using the INMP441 microphone connected to the ESP32 as per the wiring diagram on the github page. I have been able to get the esp32 to connect over wifi to stream the i2s data back. However, I am running into an issue with the quality of the audio received. I have been importing the audio into audacity with the settings - 16 bit signed PCM, 16000hz sampling rate and mono channel. While I am able to hear most of the high level features of the audio, the audio file is generally very distorted and has lots of hissing and popping noises in the background which is very different to what I've seen in your videos. Do you have any suggestions or advice on what I could potentially be getting wrong? Thanks
@atomic144 жыл бұрын
Hi Sean, Can you open up an issue on the GitHub repo and we can try and troubleshoot what you are seeing, If you can attach a sample of the audio you are getting that would be really useful. Thanks Chris
@Paolosito12454 жыл бұрын
Great video, look forward to use it in my projects, although I have a question, why do you connect the L/R pinout of the INMP441 to 3v3?
@atomic144 жыл бұрын
Hi Gian, I2S is very much based around stereo audio so you have a left and right channel with only one data line for the left and right. You need to tell devices if they are on the left or right channel otherwise they won't know when to send their data. Tieing the L/R line to 3v3 tells it that it should send its data when the left channel is requested.
@rickyelqasem3 жыл бұрын
Is there a breakout board that allows for a line-in instead of a microphone? So it can take audio from an analog source?
@atomic143 жыл бұрын
There's a couple of options, you can use the built-in ADCs - kzbin.info/www/bejne/poHLZJKZnqqgsNU There are also some I2S ADC boards, but they seem to be quite unusual. The majority seem to be I2C. I did find this one though - www.sparkfun.com/products/retired/9365
@rickyelqasem3 жыл бұрын
@@atomic14 what about a decent library? On conventional Arduino there is an audio library that doesn't require a lot of setup... play, record, and not much more .
@seget963 жыл бұрын
Great video! I'm planning to use esp32-cam for an IoT project. There's going to be live video and audio input to watch on smartphone. And there will be a motor and 2 sensors. Can esp32 handle these together? Or is there any other recommendations?
@atomic143 жыл бұрын
An esp32 can certainly handle all of that together. You may struggle with the number of available GPIO pins on the esp-cam boards. A lot of the pins are taken up by the camera board so you aren't left with many.
@seget963 жыл бұрын
@@atomic14 Thank you so much for your attention to my question. I'll consider this.
@atomic143 жыл бұрын
@@seget96 There's a good guide here - randomnerdtutorials.com/esp32-cam-ai-thinker-pinout/ if you aren't using the SDCard you'll get a few pins back.
@seget963 жыл бұрын
@@atomic14 Wow I didn't know that! I appreciate it! Thanks a lot :)
@romainboutet8364 Жыл бұрын
Hi there ! I'm facing a strange issue, the SPH0645 only works when I put WS to ground, I'm using an ESP32-S3 on a custom PCB and I used your tweak settings to make it work however the only way to get a valid output from the mic is to try putting WS to the ground multiple times after the startup... If I don't do that I get random and incoherent values. I'm really struggling to get around this problem, so any help would be welcome ^^
@atomic14 Жыл бұрын
If you join the discord server you can share your schematic+code we can have a look and see if anything is obvious.discord.gg/PKrNGqN6
@shodanxx4 жыл бұрын
Is there a way to use an external wire microphone but retain the i2s interface ? I want to make a wifi wireless headset compatible with pulseaudio I want one esp32 to have two audio output channels and one audio input channel for the microphone. But what chip can take signal from a normal microphone and turn that into a i2s signal ?
@atomic144 жыл бұрын
Hi there, In theory, this is definitely possible. there are a few I2S adc converter chips and if you google you will find some breakout boards. I have read a few forum posts with people struggling to get thingsto work consistently www.esp32.com/viewtopic.php?f=12&t=10749. There are also SPI based ADC converters which you could use instead of I2S. Depending on the board you find you will need a microphone pre-amp to boost the mic signal up to a sensible level.
@gauravpurohit1234 Жыл бұрын
any success, i want to INMp441 mic and stero out from esp32
@emabelloni3 жыл бұрын
Great videos, they helped me a lot! Thank you. I am trying to use a INMP441 to build a guitar tuner but I cannot use the autocorrelation functions to do that. Anyone has ever built a Guitar Tuner with I2S and Esp32?
@rajbirsingh48793 жыл бұрын
Thanx for the great video, I have an INMP441 mic, could you please how to record the sound the play after that
@rajbirsingh48793 жыл бұрын
Hello, please help me how to play the recorded sound.
@atomic143 жыл бұрын
I don't currently have any sample code for recording and playback on device. The sample code I currently have sends the audio to a PC running a small server. The audio is saved to file as raw samples so you need to use a tool like Audacity to load the samples and play them.
@rajbirsingh48793 жыл бұрын
@@atomic14 i think the server you are talking about is your personal one.
@atomic143 жыл бұрын
@@rajbirsingh4879 Yes, the code runs on your local machine. I think you want to record to the device and play back from there? You will be limited by the amount of memory so you will probably want to record to flash or SD card. Recording to flash is quite difficult as it's quite slow. If you have a device with PSRAM then you can record to memory without any problems. I don't have any code to show this at the moment though.
@rajbirsingh48793 жыл бұрын
@@atomic14 Yes, actually I want to record the voice and want to hear what I am recording. I have an SD card adaptor. Please let me know how i can do that
@TechInventorAman4 жыл бұрын
Tell me something , what interface did you use to capture the audio directly into the audacity software. Like the mic is connected to the esp32 and is there any plugin that directly sends the audio to the audacity ?? i would like to know that in detail .
@atomic144 жыл бұрын
Hi there, we stream the audio from the ESP32 to a server running on a laptop or desktop and save the audio to a file. That file can then be loaded into Audacity using the import raw audio feature. Code for the server should be in the repo here - github.com/atomic14/esp32_audio. I don't think there is any plugin that will let you send the audio directly to Audacity,
@TechInventorAman4 жыл бұрын
@@atomic14 Well i did not found the code in order to interface the i2s mic to the esp. I was specifically trying to look for an ino file but i did not found any . Could you guide me as to where is that code in that repo ( sorry if my question sounds stupid to you ) as i am not a very advanced programmer rather a noob but i'm good with hardware stuff .
@atomic144 жыл бұрын
@@TechInventorAman Hi Aman, the code in the demo repo is using platform.io for the IDE. There is a much simplified version here which will work with the Arduiono IDE - github.com/atomic14/ICS-43434-breakout-board
@mariomame6093 жыл бұрын
Very very good
@sjs52562 жыл бұрын
What is the PC software to Display and record the sound data?
@yaczesuaff Жыл бұрын
audacity
@kellyrummins33383 жыл бұрын
I'm in NZ so hard to get components. I can source the SPH0645 from Aussie. I am using the ESP32. Is it worth going down this path or should I be patient and order from further away!
@atomic143 жыл бұрын
I would go ahead and use the SPH0645.
@kellyrummins33383 жыл бұрын
@@atomic14 Thank you for your very fast response. I have been spending a fair bit of time searching. Frustrating when supply is the biggest issue! One board that is available in NZ is Pmod MIC3: MEMS Microphone with Adjustable Gain by Digilent. It appears to have what is needed but I cannot find anyone using it with an ESP32 just the Adruino. Worth a try? (I am newbie at this).
@atomic143 жыл бұрын
@@kellyrummins3338 That should work - it has an SPI interface which the ESP32 supports. The code you see for Arduino should work on the ESP32 as well.
@kellyrummins33383 жыл бұрын
@@atomic14 Fantastic. Thanks again so much. Your audio project videos have been immensely helpful.
@atomic143 жыл бұрын
@@kellyrummins3338 You can also use the built-in ADCs they aren't really that bad for audio input provided you can give your microphones a good clean power supply.
@calebhopper73713 жыл бұрын
Hey chis, I'm wondering if you can help me out with the server side?
@atomic143 жыл бұрын
If you raise an issue on the GitHub project I'll try and help. The server side is very basic - it just records raw audio to a file.
@chaitanyadas18143 жыл бұрын
thanks sir for posting these videos. I am using SPH0645 with sampling rate = 16k , bits per sample = 32, and variable buffer lengths and counts. but no matter what i set buffer lenght and count by recorded audio is FASTER . if i speak for 5 second recorded one is kind of 2 second long. Any comments on that
@atomic143 жыл бұрын
How are you loading the raw data? You could be importing it as stereo - which would cause it to double in speed.
@chaitanyadas18143 жыл бұрын
@@atomic14 thanks for replying. i am only using left channel and am selecting mono while loading raw in audacity. I think the culprit is size attribute in i2s_read() function , i.e the 3rd one. kindly put some light on it
@atomic143 жыл бұрын
@@chaitanyadas1814 when you read the data in are you specifying 16 or 32 bits? In my code and convert the 32 bit data to 16 bits before using it.
@chaitanyadas18143 жыл бұрын
((bits+8)/16)*SAMPLE_PER_CYCLE*4 , i mean this formula from the documentation . what are bits and sample_per_cycle variables in above formula
@atomic143 жыл бұрын
@@chaitanyadas1814 If you look at the sample code attached to the video you can see that the 3rd argument is just the number of bytes you want to read from the I2S device. They are using that formula to try and make sure they read enough bytes to hold complete samples. To be honest I would ignore that formula as it's quite confusing and generally you want to read quite a few samples. If you are using 32 bits then each sample takes up 4 bytes.
@achmadarifmunaji33204 жыл бұрын
can i use INMP441 even if it's not soldered?
@atomic144 жыл бұрын
Hi Achmad - I'm not sure what you mean - can you explain what you are trying to do in a bit more detail?
@raffyturc3 жыл бұрын
is the esp32 powerful enough to bandpass 300Hz-3KHz + DAC?
@atomic143 жыл бұрын
Hi Raffy, it should be yes - they are pretty powerful processors.
@zidqih70814 жыл бұрын
How far the distance between your mouth (as sound source) to the mic?
@atomic144 жыл бұрын
Fairly close. One of the downsides with these mics is that they don't have a built in AGC. They do have great dynamic range - 24bits but using that full dynamic range comes with its own challenges. I've been looking at adding in a very simple AGC which hopefully I'll have a tutorial on soon.