Interested in ESP32 Audio: kzbin.info/aero/PL5vDt5AALlRfGVUv2x7riDMIOX34udtKD Looking for all my ESP32 projects: kzbin.info/aero/PL5vDt5AALlRdN2KyL30l8j7kLCxhDUrNw
@Kai-Made3 жыл бұрын
I am curious how the pinout and wiring would be affected if I use the Firebeetle esp32 from DFRobot? The firebeetle has a rather distinct series of pins exposed and while it supports i2s I am not sure where to connect this. Googling ended me up finding this...so I am gonna poke it and see what happens...
@atomic143 жыл бұрын
@@Kai-Made In theory, you should be able to use any of the pins on the firebeetle as the ESP32 is pretty flexible when it comes to GPIO pins and will route the peripherals to whatever pins you tell it to use.
@Kai-Made3 жыл бұрын
@@atomic14 you are correct. A little trial and error. Using the pre-designed library I was concerned it was pointing to certain pins and I just wanted to make sure my MC had them. I figured it out. The max98357 amp module is not very loud though, and I have done the resistor pull to make it 15dB, still not noticeably loud. I was hoping to use the combo to sound an alarm and have a device speak to the user... like "buzz buzz do something xyz". But I am floating around 20dB, might have to get a larger amp...not sure yet. more testing required.
@atomic143 жыл бұрын
@@Kai-Made That's interesting, I've always found it too loud! How are you powering it? You should connect it directly to the 5v power. Also, by default, it plays (right+left)/2. You can either set it up to only plat the left or right channel or output both left and right. What kind of speaker are you using - that can make a big difference.
@Kai-Made3 жыл бұрын
@@atomic14 2.5 inch 4ohm speaker from bluetooth thing I cabbaged. I was using 3.3V, I will try using 5V next chance I get. I will try it with the pulldown to boost to 15dB as well...and see how it goes. I just don't think I will be getting a useable audible alarm from this...was hoping to use it in the field on a project I am trying to sort out. We need a 80dB alarm and piezos just aren't doing it...because the encasement/box we put it in. It would have to be external, and all the "waterproof" piezos we have sources are terrible, but the water proof speakers we have found seem to work well and that is why I was testing...
@balintarszenovits24302 жыл бұрын
Thank you for your videos, I am new into electronics, and I learned a lot by them! :) I am working on a project, which uses the MAX98357A amplifier with an 8 ohm 1.5W speaker for now, and I have encountered a weird issue. Hardware: Nodemcu 32S, MAX98357A, 8ohm 1.5W speaker, which I want to exchange to a 4ohm 3W one. The power supply is a 5/3.3V breadboard power supply at the moment. I want to feed 5 Volts for both the MAX98357A, and for the ESP32. I connected the power source positive side to the 5V pin of the ESP32, and to the VIN pin of the MAX98357A. Both the groundings of the ESP32 and MAX98357A meet in a common star shape before going back to the negative side of the power source. When I powered the system, the speaker was completely silent almost, I heard some extremely quiet cracking from it. I tried to check the speaker by a multimeter, if does it receive any Voltage. When I connected the negative needle to the negative side of the speaker, the speaker starting giving sound, but a very cracky distorted one. After I connected to positive needle of the multimeter too, the sound became clear. If I remove the multimeter, no sound again. Then I pulled out the grounding of the MAX98357A completely, and it started giving the cracky sound again. In the end, I tried connecting the gain pin to a GND pin on the ESP32, then it gave proper sound. The same effect happens with both the 3V3 and GND pin of the ESP32. Connecting the GAIN into the star shaped grounding wires of the ESP32 and MAX98357A, no sound again. Could you help me please, what am I doing wrong? What is the issue with my 5V configuration? Why does the star shaped grounding solution not work, and why did it start working when I connect the GAIN pin to the 3V3 or GND pin of the ESP32?
@LongWayToCome3 жыл бұрын
Just amazing. Thanks you a lot
@mrcalomx2 жыл бұрын
In the video you mention that you put the 100k resistor connected to the GDN to get the maximum gain but in the image it is connected to the VIN. What is correct? Thanks
@GilgaFrank4 жыл бұрын
Many thanks for this video series! The ESP32 is a great platform for I2S audio, I've abandoned the STM32 and build a Linux box to take advantage of PlatformIO.
@atomic144 жыл бұрын
PlatformIO is great - I struggle to see how people use the Arduino IDE for anything more than one file.
@GilgaFrank4 жыл бұрын
@@atomic14 I would recommend the ESP-Prog JTAG debugger as well, it's great to be able to step through code. Andreas Speiss has a video on it.
@atomic144 жыл бұрын
I’ll have to have a look at that. Being able to debug on device would be amazing.
@chrisgallagher85 Жыл бұрын
Great video - and thanks you good sir
@davibento64712 ай бұрын
1:03 This means that i can't connect the output into another amplifier?
@harrysmbdgs17 күн бұрын
Correct. I believe it uses the speaker’s voice coil as part of its output filter circuit, which would not be possible with a high impedance input circuit on secondary amplifier.
@Clebrw2 жыл бұрын
Hello, great video. I would like to know if it is possible to put an amplifier at the output of the i2s max98357 to amplify even more?
@noweare16 ай бұрын
I think he said you could not use it as a pre-amp.
@alexandrepiel2 жыл бұрын
@atomic14 Thx for this nice video. How can we know which pin are working for I2S? Is it also working on ESP32C3? What would be the pins for the Seeed Studio XIAO ESP32C3?
@MrAsteliks0074 жыл бұрын
This may sound like a strange question but is it possible for the ESP32 to collect and play audio over Wi-Fi like in an intercom? Would it be possible to add a camera to this intercom? And of course could you try making this project?
@atomic144 жыл бұрын
Definitely possible - the only problem with a camera is that most camera boards don't leave many pins spare so it can be tricky to add anything extra. But it certainly feels possible to do the whole thing. Even better if you could add a screen as well! I'll need to look at my ESP-CAM board again and see how many pins are spare.
@MatteoDelChiaroWulpi4 жыл бұрын
@@atomic14 I'd love to make an intercom! And with me, tons of people trying to do an intercom or a smart doorbell
@ijustwanttogosailing82484 жыл бұрын
@@MatteoDelChiaroWulpi Hey!! I'm also looking at making an intercom - with a record function.
@axramar1992 Жыл бұрын
Hi sir ,How to upload multiple wav/amr/mp3 files to external 8mb Winbond flash memory and use Esp32 as an audio player?
@EszHuzky2 жыл бұрын
Hey, Thanks for the video. I am trying to stop the ESP32 from playing the sample file in a loop, but I cannot find this point it in the code. Is the a while condition that I have to remove?
@G-Code_official Жыл бұрын
can we not play a wav file coded as hex file through I2S max98357A. I tried using Xtronicals example and it worked without I2S but was very noisy and would like to do the same using I2S . The problem is I am not an embedded systems developer I am able to manage but do not have in depth knowledge in this regard can you please guide me?
@kramkhirinroddara5324 Жыл бұрын
Hi, Do you have the solution for playing sound from internal flash ( .hex file) by using esp32 + I2S MAX98357?
@andrewjefferies83913 жыл бұрын
Do you have an example of using the Arduino Nano RP2040 connect as a USB Microphone ? I'm looking for Arduino IDE code to test/ listen to the mic audio quality.
@imignap Жыл бұрын
Thought I would add this, BUT for the ESP32S3 i2sconfig I had to add/set the .left_align = true to get the serial data to most significant byte first or the audio was complete garbage. Only found this by creating a generated count up int16_t buffer and outputting thru i2s_write and using the saleae logic analyzer to see this was the issue.
@itdecoder20189 ай бұрын
Can we use LM386 or PAM8403 Audio Amplifier instead of MAX98357A?
@MihailNikolayevich2 жыл бұрын
Thank you for your hard work. Can you tell me if it is possible to control the playback of files in your "i2s_output" library? For example play 001.wav, then stop it close and play 002.wav.... Like a playlist.
@amir.hsekandarpour33633 жыл бұрын
hi it's very good. I have a question.. is it possible to send data of music by wifi connection? like bluetooth audio module but i want do it by wifi. thanks for answering. I use wemos r1 d1.
@tryssss4 жыл бұрын
on my MAX I2s amp, i need to tied "gain" to the ground for this work !
@atomic144 жыл бұрын
Interesting - I was testing mine last night and it works without the gain connected - though I am wondering if should be connected - the docs are not clear.
@tryssss4 жыл бұрын
@@atomic14 After i try to let it open....and it works too with higher gain.
@CamoPeng11 ай бұрын
Sorry for the noob question - but why use DMA?
@2586Filip2 ай бұрын
You probably made an error in calculating the resistor value for the right channel. 390K seems to work with 5V VIN, 39K has the same as a jumper - left channel only.
@zachtos22 жыл бұрын
Is there a difference in audio quality if you used an audio codec like SGTL5000? or is the quality all depend on the ESP32 ability to keep up?
@JLNweb2 жыл бұрын
Hello, Great and big thank you for your work. I just tried, it works, but I couldn't find how to stop a piece of music in progress... It plays in a loop, but I would like to put several pieces of music in a row, but how to stop the one in progress, thank you.
@EszHuzky2 жыл бұрын
@JLNweb I have the same issue. Let me know, when you found a solution for it, please!
@JLNweb2 жыл бұрын
@@EszHuzky Hello, I use the library "Audio.h" instantiation "Audio audio;" and there are commands such as: - "audio.connecttoFS(SPIFFS, MyFile.c_str());" - "audio.connecttohost(URL.c_str());" - "audio.stopSong();" - "audio.isRunning()" etc. Easy to use with that!
@zoomingh3 жыл бұрын
I use ( gr- sakura full )to catch analog voice & get digital then analog to loudspeaker. Can you give me like that by esp or any arduino board? Plz Thanks You are great
@exploringgodscountry4 ай бұрын
I keep blowing up these bloody amps. Tried the sparkfun breakout and jumpered for L and R... blew up an amp. Bought Adafruit and powered SD acording to left and right... Blew up another chip. Reading the datasheet over and over again. I think I've got it configured correctly for Left and right but really confused.
@atomic144 ай бұрын
That is strange they are normally pretty robust. How are you wiring it up?
@exploringgodscountry4 ай бұрын
@@atomic14 I got two spark fun ones and wired them up according to their hookup guide. Next I jumped right and left... One of them broke. The other one has crackling noise now but still functions. I ordered two ada fruit ones... And one broke hooking it up configured for right and left channels. This time I ordered 4 so hopefully at least two will work for prototype I am trying to build.
@atomic144 ай бұрын
@@exploringgodscountry When you say you "jumped right and left" what do you mean?
@exploringgodscountry4 ай бұрын
@@atomic14 I mean jumpered. The spark fun ones come with configurable jumpers.
@atomic144 ай бұрын
Looking at the sparkfun docs, by default the board will mix LEFT+RIGHT. If you just want left or right, you need to cut the link on the "mono" jumper. Then put a solder blob on either the L, or the R, depending on what channel you want it to output. If you are connecting both L and R then that is incorrect.
@mauricecraft8902 жыл бұрын
Is it possible to have a SPH0645 mic input with the MAX98357 amplifier output to a headphone using the ESP32?
@atomic142 жыл бұрын
Yes, you can have one I2S peripheral running input and another one running output.
@stephanhans48042 жыл бұрын
Hello atomic14, I like your videos about the ESP32 and it's audio capabilities. I'm trying to build an internet radio with two ESP32. Why two?: because with an ESP32 (due to Phil Schatzmann) you can only use either wifi or bluetooth (not both at the same time). But I'm planning to use a bluetooth speaker with the internet radio, just because the sound of my BT-speaker is much better than the squeeky 3W at the max98357. So I need both: wifi and bluetooth. Now I'm looking for an example that uses the I2S of an ESP32 as input and parses the audio data to a bluetooth speaker. Have you ever tried such a thing (ESP32 Audio Input with I2S DMA and A2DP output)?
@machinelearning39173 жыл бұрын
Thank you for making this type videos!!! They are very cool and useful!! Are this notebooks and libraries still valid for microspeech keyword spotting for esp32 or have they al ready been deprecated? I am tryig different ways, but Tensorflow moves too fast and there is no much support. Thank you very much! Best regards!
@akshayviruss3 жыл бұрын
Hi there, am new to electronics and am actually trying to build a portable speaker with a class D amplifier. I found a lot of bluetooth connectivity options but streaming music over wifi is extremely limited. I am on a tight budget and was wondering if this module can somehow be used to receive music from a phone or pc and supply it to the amplifier like a much costlier WA31 Up2Stream wifi audio receiver
@atomic143 жыл бұрын
Hi Akshay - it's definitely possible - I don't have any code to show it, but you can write code on the ESP32 that listens for data on a TCP socket and you should be able to just send raw samples from your machine to it and then play it on the ESP32. Let me know if you find any good examples on your search.
@akshayviruss3 жыл бұрын
@@atomic14 like I said, am new to all of this and other than knowing it's somehow possible, everything else just few right over my head 😅
@AminShahsavar4 жыл бұрын
Good videos - thank you! I'm wondering if it's possible to stream incoming bluetooth audio (e.g. sent from Phone) and have the ESP32 output it to a stereo system (having it's own amplifier, I presume) using your method?
@atomic144 жыл бұрын
Looks like Espressif have you covered: github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/classic_bt/a2dp_sink You'll need to use the idf to build their example (or pull it apart) - I might try and do a video on the subject.
@AminShahsavar4 жыл бұрын
@@atomic14 would be great to have a video on it! :) Just to clarify: I am not talking about web radio streaming - since I've seen some examples on that before. What I haven't found as of a month or two ago is actual audio streaming from one BT player (e.g. phone playing Spotify) to the ESP, which then outputs to a board with a 3.5mm jack or similar, that would connect to a speaker system.
@gunnarthielebein59823 жыл бұрын
@@AminShahsavar please see the examples provided by the ThingPulse team for their Icon64 product. docs.thingpulse.com/guides/icon64-esp32-rgb-led-audio/
@AminShahsavar3 жыл бұрын
@@gunnarthielebein5982 Thank you Gunnar, looks very good!
@sebydocky50803 жыл бұрын
Hi, I am just a new subscriber of your channel.... Your work is just amazing... Just a basic question : Is the method presented here is the best to play sound files on ESP32 in term of quality (rather than using the builtin DAC ?). Kind regards
@atomic143 жыл бұрын
The built-in DAC is a bit noisy but works ok. Here's my video on outputting using the DAC: kzbin.info/www/bejne/opinpmtujplkZ9E and another one on outputting with I2S directly: kzbin.info/www/bejne/d6WbgXeHaMxqfLM - personally I think using I2S gives better quality - the built-in DAC is pretty noisy and doesn't have good linearity. But it's great for directly driving things like headphones.
@sebydocky50803 жыл бұрын
@@atomic14 Thanks for your fast answer. I ordered the max98357A w/ 3W 4ohm speaker. I am planning to use your I2S integration coupled with a K210+ESP32 board to do a 'cat detector" for garden. In the sens to avoid them to damage fresh ground.... by playing a dedicaced repulsive sound (changing randomely according to a special portfolio)
@atomic143 жыл бұрын
@@sebydocky5080 oooh nice. One of my friends built a cat squirter and trained it to recognise his cats and squirt any other cat: robdobson.com/2017/08/machine-learning-the-good-the-bad-and-the-ugly/
@sebydocky50803 жыл бұрын
@@atomic14 Haha nice project as well ... Well ML is my party, so I am not afraid about that ....:) Thanks for your answers in anycase. I am planning to plug everything into Home Assistant I like to use ESPhome in general... but actually no support of I2S (yet)...
@TronDiscSeller3 жыл бұрын
Thanks for the code and stuff, really useful. But I am facing this distortion while playing wav files, tried from SPIFF and WavData.h, but the same distortion exists, Please help me. I am using the same circuit
@atomic143 жыл бұрын
What kind of distortion are you seeing? If you can upload a recording of it we can have a listen and see if it's something that can be fixed.
@TronDiscSeller3 жыл бұрын
@@atomic14 Thanks for the reply, I really need to finish this project. If we can talk over a video call or something, that would be really helpful. I am more than happy to pay for your time
@atomic143 жыл бұрын
@@TronDiscSeller You can email me from the Channel -> About screen.
@TronDiscSeller3 жыл бұрын
@@atomic14 Thank you sir, I have emailed you
@TechInventorAman4 жыл бұрын
Do you think that the sound quality of this is just amazing or do you think there could have been a better solution ?
@rhalfik4 жыл бұрын
SSm3582 is better. MAx is clean unless you overdeive it off course, which is easy to do with so little power.
@HX20034 жыл бұрын
What do you think of the audio quality? On another note, I can't drive more powerful speakers with this so I'm currently considering the TAS5825m which is also an I2S amp, hopefully that will work.
@atomic144 жыл бұрын
To be honest - hard to tell on the audio quality front, I was driving it at full power without a proper speaker enclosure and from the same USB power supply as the ESP32, so probably not ideal conditions. Looking at the datasheet for the TAS5825m it should work. Sounds like you are working on an interesting project!
@hfe18333 жыл бұрын
Awesome, can you make video similar to this but producing engine sound for rc car
@atomic143 жыл бұрын
There's an interesting project called Faust - faust.grame.fr/ I will do a video on it soon.
@hfe18333 жыл бұрын
@@atomic14 thanks for info
@aarriikknn33ll3 жыл бұрын
Can this code be used in Arduino ide? Thanks! (Never used anything else than Arduino ide)
@atomic143 жыл бұрын
Yes you can, it's just a bit of a pain to manage multiple files in the Arduino IDE.
@aarriikknn33ll3 жыл бұрын
@@atomic14 okay thanks, tried it out and it compiled. Thanks for your help in the diy community ❤️
@PTyakiniku3 жыл бұрын
@@aarriikknn33ll how you manage multiple files? i am new in Arduino IDE. I will be really appreciate as it is my project in college
@aarriikknn33ll3 жыл бұрын
@@PTyakiniku Just open it'll work
@2.0-u3h2 жыл бұрын
Good video but where's the code and how to use the code ?
@bamblaster25647 ай бұрын
But....why?
@AkashJadhavIT4 жыл бұрын
great tutorial, but before starting I have one question, in My project I need to connect 1. 10 Small LED RGB White 5V (Planning to use PCA9685) 2. 2 DC motors 6v or 12v (Planning to use L298N) 3. 4 Stepper motor SG90 9gm ((Planning to use 2nd PCA9685) 4. Control over WIFI/Bluetooth, by Android app(which I can develop) 5. 1 Speaker with MicoSD mp3 audio in it (MAX98357A/SD car reader) Can I use ESP32 for these all or do I have to buy other chips as well ?
@atomic144 жыл бұрын
I think you should be good - the ESP32 does I2C so can drive the PCA9685 no problem. Does the PCA9685 have a stepper motor driver?
@AkashJadhavIT4 жыл бұрын
@@atomic14 yes PCA9685 is pwm servo controller has its own ic and power input, also they can be daisy chained with ewch other upto 96 boards . With only 3 input pins from esp32. I am worried about other devicesi will ve connecting and whether esp32 has enough pins for other output I will be connecting
@atomic144 жыл бұрын
@@AkashJadhavIT There's a really good video here that discusses which pins can be used - along with a handy spreadsheet - kzbin.info/www/bejne/goqQYnd-id2Fd80