Thanks for adding the part about the partition tables. That something I was having issues with on one of my projects. Finally I understood how it works
Thank you so much! Immaking a silly little project and ive spent hours for a simple libary for simply directly plaiyng an mp3 file into a speaker from the esp32. Saved my day
2:34 even @ 45kbps song can be hearable with quite a bit of (glitches), my own experience was with PCM 8bit and 4k sampling rate, (yes I go as low as that), even recorded songs were recognizable, and I saved plenty of space, BTW there is Speech codecs that save even more space.
I’m working on a project that uses I2S with an esp32 on a custom pcb. I actually have a working version already but have slight noise and would love larger volume and possibly a physical volume control. I would love to get some advice on my schematic. I found your video and you seem to have the knowledge I lack. Let me know if you’d be open to some consulting, paid obviously.
Good video. I would use FATFS or LittleFS instead because SPIFFS is not being developed anymore and is buggy, especially when you reach about 80%+ of total capacity.
Hi there, tks for the code example, but... I need some help, I having some errors in the code, could you help me to understand whats is happening Please? See below the VSCODE errors message. . "message": "narrowing conversion of 'sample_rate' from 'int' to 'uint32_t' {aka 'unsigned int'}", "message": "missing initializer for member 'i2s_driver_config_t::mclk_multiple' [-Wmissing-field-initializers]", "message": "missing initializer for member 'i2s_pin_config_t::mck_io_num' [-Wmissing-field-initializers]", Tks so much.
I cant seem to get this to work with internal DAC, I have 25/26 to the amp to small speakers. Playing a song with tones works, but can’t play a wav or mp3 file off a microSD it plays a constant clicking hum.
hello, can u help me. i want to play two different music on both internal DAC in esp32 at same time (1st one is play on pin25 & 2nd one is on pin26 at same time) please help!
I've added this link (amazon affiliate link) to the description - amzn.to/3wdinpW these look the same as the ones I have - though I'm not actually sure where my one came from...
@@atomic14 I am afraid I misunderstood your comment about the breakout board. It is little more that a stereo socket but I thought it included some amplifiying chip. Thanks anyway!
@@alfem Sorry - yes - it just avoids you having to chop up your headphone cable. If you're looking for an analogue amplifier then there are a few good breakout boards available: www.adafruit.com/product/2130 though if you want an amplifier then I'd use the I2S output and a MAX98537 board.
Hello ! Thank you so much for this extremely detailed and useful video ! Would you please help me on this : - for direct DAC output to headphone thru RC, what R value have you implemented ? EDIT : ok you answered 500-2kohm in the vid sorry ;) I've searched for DAC max output current, some say 12mA, other 40mA, would you know about that ? What's you experience on this ? - for MAX98357 option, in order to use same stereo headphones, how should I connect both MAX N-output together ? Is it possible to connect them directly on jack ground ?(I suppose not...) Thank you so much for all the content you're sharing, it is truly helpful!!
It would be interesting to see the ESP32 receiving the sound data over WiFi. The bitrate for the audio is quite low so shouldn’t be a problem. Like a DIY audio chromecast!
does there exist an I2S interface that doesn't have an amplifier and only gives analog outputs ? I want to use dual TPA3110 amplifiers after the Max amplifier, but it shuts down for some reason.
Hey atomic14, im currently working a project that requires a model aircraft to have small leds and play a takeoff sound after a button is clicked. Do you think this method of playing audio would work on a esp32-s3? I don't need the internet so I'm looking to buy a smaller cheaper board. Thanks!
Hello, thank you for the tutorial. I am going to try minimp3 library but don't know if I should use all the code downloaded from GitHub or just if taking the minimp3.h header file would be enough as the whole library is not so light.
I am trying to play tts from Google what I get as base64 on an esp32 with the dac pin (25) but so far no luck. I tried mulaw but that got out distorted and it seems it is also not only 8 bit. I tried converting it but no luck so switched to mp3. Does someone has a small script that does this? I can’t find it.
is the situation with the capacitor due to the signal on the DAC being offset AC? i.e. the pin is DC (never negative) so is it essentially chucking out 1.6V when silence is played meaning the speaker, if there is a speaker involved, would only ever move half way? Therefore, if you put a capacitor in you get a brief moment of noise while the cap charges to 1.6V and then Voltage is effectively zero. When the DAC output goes up, this is passed while the cap charges, and when it goes down, the Cap discharges. This way the speaker sees AC?
The speaker would move half way for silence and then oscillate around that half way point instead of oscillating around its "neutral" point - so it will still work, but it's not ideal. There's some good explanations here as to why that is bad: electronics.stackexchange.com/questions/233230/why-are-dc-signals-bad-for-loud-speakers
@@atomic14 Thanks for the link! Interesting read and indeed hadn't considered that you are pulling more current when applying an unchanging DC voltage to a speaker. That said. If you are outputting a square wave say that is default off at zero volts, doesn't seem to be too much issue with putting it to a speaker, just means you'll only get movement in one direction. Not ideal but not the end of the world either. In the case of the DAC though, I'm assuming the wave is oscilating about the 1.65V mark, in which case using a capacitor to get rid of that offset would be a good idea. Otherwise would be defaulting to having it stuck half way out in one direction and not moving.
I tried to compile project using Visual Studio Code and Platformio, but it failed. I got some error message related to compiler configuration rather than code itself. I prepared project to compile it u8sing Arduino IDE. To make it simple I put all libraries together with main code to the same catalog and modified #include paths accordingly. It compiled and uploaded, also uploaded mp3 file to spiffs. Set configuration to ESP32 DAC. It doesn't play - ports 25 and 26 shows arrount 0 vaoltage on the scope. Maybe my porting to Arduino IDE is not as it should be?? Could somebody who succeeded to compile and run it using Arduino IDE publish ported project?
Ei atômico, ou quem esteja vendo, sou brasileiro, use o google tradutor. gostaria que alguém me ajuda. uso arduino ide, com codigos .ino. mas seus arquivo no github não tem esta extensão, pergunta, como faço para gravar seu código no esp 32 por ide arduino?
When I was making it, I was just thinking, I'll plug this into the line in, get a nice recording, it will sound great. So many computers in the house - not a single one has a line-in input!
@@atomic14 My desktop one still has, but it's getting a bit long in the tooth. Now it all moved over to USB. but then I still love the sound of records.
Excellent I was trying to decode RTP stream using the same way but unfortunately not successfully if you can support me with this I will be grateful to you thank you.
Terrific, and simple. Sounds great too! To compile in ESP32 arduino framework, just need to change I2S_COMM_FORMAT_STAND_I2S to I2S_COMM_FORMAT_I2S.
Thanks for adding the part about the partition tables. That something I was having issues with on one of my projects. Finally I understood how it works
No problem - I didn't really understand it until I actually did that bit - the documentation is a bit all over the place.
I'm surprised a good channel like this only has a few subscribers, it should have more than 1 million subscribers
agreed 100%
Thank you so much! Immaking a silly little project and ive spent hours for a simple libary for simply directly plaiyng an mp3 file into a speaker from the esp32. Saved my day
That’s great! I can’t claim any credit for the MP3 code. Someone much more clever than me made that.
Another excellent video thank you once again.
Thanks - was good fun to make. I had no idea that decoding the MP3 data would be so easy. Definitely a case of standing on the shoulders of giants...
Loving your videos since day 0.
Excellent explanation and demonstration :-)
Thanks!
the noise might be caused by delays during data processing (stalls caused by buffer reallocation for example)
Excellent and practical. Thank you so much!
Glad you liked it.
at 6:55 it says there's a link to the video about that board, but there's only a link to a playlist
Where is the link to the stereo MAX98537 board? It says in the video you've linked to the design files. Thanks.
2:34 even @ 45kbps song can be hearable with quite a bit of (glitches), my own experience was with PCM 8bit and 4k sampling rate, (yes I go as low as that), even recorded songs were recognizable, and I saved plenty of space, BTW there is Speech codecs that save even more space.
off-topic: nice reference :) thanks for bringing up memories from long time ago
:)
"haha how silly, 1.3 sec song". Then I read the title.
Nice, have you thought about adding AVS Alexa voice services to Marvin?
I’m working on a project that uses I2S with an esp32 on a custom pcb. I actually have a working version already but have slight noise and would love larger volume and possibly a physical volume control. I would love to get some advice on my schematic. I found your video and you seem to have the knowledge I lack. Let me know if you’d be open to some consulting, paid obviously.
Fantastic gave me an idea of making a story teller for my kids
That’s a great idea - if you get a module with 16mb of flash then you can actually store quite a bit of audio.
But how do you upload the mp3 to esp32?
Good video. I would use FATFS or LittleFS instead because SPIFFS is not being developed anymore and is buggy, especially when you reach about 80%+ of total capacity.
Hi there, tks for the code example, but... I need some help, I having some errors in the code, could you help me to understand whats is happening Please? See below the VSCODE errors message.
.
"message": "narrowing conversion of 'sample_rate' from 'int' to 'uint32_t' {aka 'unsigned int'}",
"message": "missing initializer for member 'i2s_driver_config_t::mclk_multiple' [-Wmissing-field-initializers]",
"message": "missing initializer for member 'i2s_pin_config_t::mck_io_num' [-Wmissing-field-initializers]",
Tks so much.
yes im getting these too. did u find a fix?
Found this from a search, subbed when i saw Napalm
Death 7"
Can mp3 be played using micropython?
I cant seem to get this to work with internal DAC, I have 25/26 to the amp to small speakers. Playing a song with tones works, but can’t play a wav or mp3 file off a microSD it plays a constant clicking hum.
hello, can u help me. i want to play two different music on both internal DAC in esp32 at same time (1st one is play on pin25 & 2nd one is on pin26 at same time) please help!
did u find a solution
Excellent as always. for a future project could you add DSP processing?
That's a great idea!
Awesome video! I can't find the link to the breakout board you mention at 6:49. Should I blame my old eyes or it is not in the video description?
I've added this link (amazon affiliate link) to the description - amzn.to/3wdinpW these look the same as the ones I have - though I'm not actually sure where my one came from...
@@atomic14 I am afraid I misunderstood your comment about the breakout board. It is little more that a stereo socket but I thought it included some amplifiying chip. Thanks anyway!
@@alfem Sorry - yes - it just avoids you having to chop up your headphone cable. If you're looking for an analogue amplifier then there are a few good breakout boards available: www.adafruit.com/product/2130 though if you want an amplifier then I'd use the I2S output and a MAX98537 board.
Hello !
Thank you so much for this extremely detailed and useful video !
Would you please help me on this :
- for direct DAC output to headphone thru RC, what R value have you implemented ? EDIT : ok you answered 500-2kohm in the vid sorry ;) I've searched for DAC max output current, some say 12mA, other 40mA, would you know about that ? What's you experience on this ?
- for MAX98357 option, in order to use same stereo headphones, how should I connect both MAX N-output together ? Is it possible to connect them directly on jack ground ?(I suppose not...)
Thank you so much for all the content you're sharing, it is truly helpful!!
what is the rating of capacitors connected to headphone jack
Can mp3 be played to a bluetooth speaker?
i had the same question, if you find some clue, please tell me
It would be interesting to see the ESP32 receiving the sound data over WiFi. The bitrate for the audio is quite low so shouldn’t be a problem. Like a DIY audio chromecast!
exactly, I am looking for it now...any idea to achieve this on esp32
Sir can u suggest a adc borad
reminded of early sound cards
Good old 8-bit quality :)
does there exist an I2S interface that doesn't have an amplifier and only gives analog outputs ? I want to use dual TPA3110 amplifiers after the Max amplifier, but it shuts down for some reason.
Can we record the mp3 using esp32 ?
Nice. Thinks for your share. Love from china. Good luck for you.
Thank you very much!
hi so if i am using the max98357 audio amplifier, i do not need any resistors of capacitor to connect to my earpiece ?
Helpfull indeed, but not enough for me, that's anyway a good start, thx.
Would be great if there was the code side of this for the project to work, the wiring is really quite simple
In the description
I have wireless subwoofer
How connect only it with esp 32
Hey atomic14, im currently working a project that requires a model aircraft to have small leds and play a takeoff sound after a button is clicked. Do you think this method of playing audio would work on a esp32-s3? I don't need the internet so I'm looking to buy a smaller cheaper board. Thanks!
Hello, thank you for the tutorial. I am going to try minimp3 library but don't know if I should use all the code downloaded from GitHub or just if taking the minimp3.h header file would be enough as the whole library is not so light.
I am trying to play tts from Google what I get as base64 on an esp32 with the dac pin (25) but so far no luck. I tried mulaw but that got out distorted and it seems it is also not only 8 bit. I tried converting it but no luck so switched to mp3. Does someone has a small script that does this? I can’t find it.
do you have any tipe for how to port this over to arduino IDE? im having a nightmare trying to do it!
I’ve just fixed some compilation errors that was stopping it building with the latest esp-idf. That might help.
@@atomic14 oh wow thanks so much for the response! I will try again. this is via platform IO yes?
is the situation with the capacitor due to the signal on the DAC being offset AC? i.e. the pin is DC (never negative) so is it essentially chucking out 1.6V when silence is played meaning the speaker, if there is a speaker involved, would only ever move half way? Therefore, if you put a capacitor in you get a brief moment of noise while the cap charges to 1.6V and then Voltage is effectively zero. When the DAC output goes up, this is passed while the cap charges, and when it goes down, the Cap discharges. This way the speaker sees AC?
The speaker would move half way for silence and then oscillate around that half way point instead of oscillating around its "neutral" point - so it will still work, but it's not ideal. There's some good explanations here as to why that is bad: electronics.stackexchange.com/questions/233230/why-are-dc-signals-bad-for-loud-speakers
@@atomic14 thanks.. I think that's an affirmation that I was on the right track?
@@atomic14 Thanks for the link! Interesting read and indeed hadn't considered that you are pulling more current when applying an unchanging DC voltage to a speaker. That said. If you are outputting a square wave say that is default off at zero volts, doesn't seem to be too much issue with putting it to a speaker, just means you'll only get movement in one direction. Not ideal but not the end of the world either. In the case of the DAC though, I'm assuming the wave is oscilating about the 1.65V mark, in which case using a capacitor to get rid of that offset would be a good idea. Otherwise would be defaulting to having it stuck half way out in one direction and not moving.
I wish OPUS for music and voice was made ready for Bluetooth wireless earbuds.
I tried to compile project using Visual Studio Code and Platformio, but it failed. I got some error message related to compiler configuration rather than code itself. I prepared project to compile it u8sing Arduino IDE. To make it simple I put all libraries together with main code to the same catalog and modified #include paths accordingly. It compiled and uploaded, also uploaded mp3 file to spiffs. Set configuration to ESP32 DAC. It doesn't play - ports 25 and 26 shows arrount 0 vaoltage on the scope. Maybe my porting to Arduino IDE is not as it should be?? Could somebody who succeeded to compile and run it using Arduino IDE publish ported project?
Is it pissible to Copy Ur Code for this ?
Code is all on GitHub - feel free to use it for whatever you need.
@@atomic14 thank you for the fast reply :)
I am tired of getting the warning on ASK FM.
I like ONE OF THESE NIGHTS 1975.
Ei atômico, ou quem esteja vendo, sou brasileiro, use o google tradutor.
gostaria que alguém me ajuda. uso arduino ide, com codigos .ino.
mas seus arquivo no github não tem esta extensão, pergunta, como faço para gravar seu código no esp 32 por ide arduino?
Лайк за Napalm Death ;)
sounded better without my hearing aids. 😃
When I was making it, I was just thinking, I'll plug this into the line in, get a nice recording, it will sound great. So many computers in the house - not a single one has a line-in input!
@@atomic14 My desktop one still has, but it's getting a bit long in the tooth. Now it all moved over to USB. but then I still love the sound of records.
Hello
Excellent
I was trying to decode RTP stream using the same way but unfortunately not successfully
if you can support me with this I will be grateful to you
thank you.