Play MP3 Files on ESP32 Without Codec Chip: Easy Guide

  Рет қаралды 87,385

atomic14

atomic14

Күн бұрын

Пікірлер: 83
@alanj5036
@alanj5036 2 жыл бұрын
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.
@mojo_jojo
@mojo_jojo 2 жыл бұрын
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
@atomic14
@atomic14 2 жыл бұрын
No problem - I didn't really understand it until I actually did that bit - the documentation is a bit all over the place.
@MudahnyaCoding
@MudahnyaCoding 2 жыл бұрын
I'm surprised a good channel like this only has a few subscribers, it should have more than 1 million subscribers
@BenCos2018
@BenCos2018 2 жыл бұрын
agreed 100%
@ihorivlev8479
@ihorivlev8479 Жыл бұрын
the noise might be caused by delays during data processing (stalls caused by buffer reallocation for example)
@black_winghd1429
@black_winghd1429 Жыл бұрын
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
@atomic14
@atomic14 11 ай бұрын
That’s great! I can’t claim any credit for the MP3 code. Someone much more clever than me made that.
@adamkoxxl
@adamkoxxl Жыл бұрын
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.
@theunderdog2205
@theunderdog2205 2 жыл бұрын
Another excellent video thank you once again.
@atomic14
@atomic14 2 жыл бұрын
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...
@SinanAkkoyun
@SinanAkkoyun 2 жыл бұрын
Loving your videos since day 0.
@noevandenbranden1229
@noevandenbranden1229 2 жыл бұрын
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!
@bestlowspecgamer7196
@bestlowspecgamer7196 Жыл бұрын
exactly, I am looking for it now...any idea to achieve this on esp32
@sharpbends
@sharpbends 2 жыл бұрын
Excellent explanation and demonstration :-)
@atomic14
@atomic14 2 жыл бұрын
Thanks!
@arduinoguru7233
@arduinoguru7233 Жыл бұрын
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.
@dimmoos757
@dimmoos757 2 жыл бұрын
Excellent and practical. Thank you so much!
@atomic14
@atomic14 2 жыл бұрын
Glad you liked it.
@marcozatarain9630
@marcozatarain9630 2 жыл бұрын
Nice, have you thought about adding AVS Alexa voice services to Marvin?
@peter.stimpel
@peter.stimpel 2 жыл бұрын
off-topic: nice reference :) thanks for bringing up memories from long time ago
@atomic14
@atomic14 2 жыл бұрын
:)
@gearscodeandfire
@gearscodeandfire Жыл бұрын
Found this from a search, subbed when i saw Napalm Death 7"
@jumadhaheri
@jumadhaheri 2 жыл бұрын
Fantastic gave me an idea of making a story teller for my kids
@atomic14
@atomic14 2 жыл бұрын
That’s a great idea - if you get a module with 16mb of flash then you can actually store quite a bit of audio.
@kickthejetengine
@kickthejetengine 2 жыл бұрын
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.
@TheDradge
@TheDradge Жыл бұрын
Where is the link to the stereo MAX98537 board? It says in the video you've linked to the design files. Thanks.
@raphanunu6912
@raphanunu6912 9 ай бұрын
Helpfull indeed, but not enough for me, that's anyway a good start, thx.
@LightGameFrameworks
@LightGameFrameworks Жыл бұрын
I'm so happy, my first esp32 is showing up in the mail today! That image of a microSD-card adapter strapped directly to the breadboard has me all kinds of excited. Can code be loaded then run from a micro-sd in this manner, or would it be data only? I suppose the biggest factor is the size of ram on the chip, but I would love a hot-pluggable library of programs...
@atomic14
@atomic14 Жыл бұрын
As far as I know it’s not possible to load code from the SD Card - sorry.
@agustinsida8877
@agustinsida8877 Жыл бұрын
"haha how silly, 1.3 sec song". Then I read the title.
@maureljulien
@maureljulien 2 жыл бұрын
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!!
@burhanbudak6041
@burhanbudak6041 2 жыл бұрын
I wish OPUS for music and voice was made ready for Bluetooth wireless earbuds.
@joshuaisaacs8970
@joshuaisaacs8970 Жыл бұрын
Would be great if there was the code side of this for the project to work, the wiring is really quite simple
@atomic14
@atomic14 Жыл бұрын
In the description
@timothycarson1771
@timothycarson1771 2 жыл бұрын
Excellent as always. for a future project could you add DSP processing?
@atomic14
@atomic14 2 жыл бұрын
That's a great idea!
@dukedougal16
@dukedougal16 2 жыл бұрын
Can mp3 be played using micropython?
@alexandresetto3808
@alexandresetto3808 Жыл бұрын
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.
@davidgardener1152
@davidgardener1152 Жыл бұрын
yes im getting these too. did u find a fix?
@steubens7
@steubens7 Жыл бұрын
at 6:55 it says there's a link to the video about that board, but there's only a link to a playlist
@embeddedjunction9204
@embeddedjunction9204 Жыл бұрын
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!
@therapeutist
@therapeutist 3 ай бұрын
did u find a solution
@CoolshrimpModz
@CoolshrimpModz 11 ай бұрын
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.
@heckus
@heckus 13 күн бұрын
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!
@Thenasrty
@Thenasrty 3 ай бұрын
I have wireless subwoofer How connect only it with esp 32
@dukedougal16
@dukedougal16 2 жыл бұрын
Can mp3 be played to a bluetooth speaker?
@orfrantjavierrivera
@orfrantjavierrivera 2 жыл бұрын
i had the same question, if you find some clue, please tell me
@poepflater
@poepflater 2 жыл бұрын
reminded of early sound cards
@atomic14
@atomic14 2 жыл бұрын
Good old 8-bit quality :)
@HEILZEUS
@HEILZEUS 6 ай бұрын
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.
@limweekian4146
@limweekian4146 17 күн бұрын
hi so if i am using the max98357 audio amplifier, i do not need any resistors of capacitor to connect to my earpiece ?
@migmelccs
@migmelccs 10 ай бұрын
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.
@devvratarya4985
@devvratarya4985 2 жыл бұрын
what is the rating of capacitors connected to headphone jack
@xianfengwuk1590
@xianfengwuk1590 Жыл бұрын
Nice. Thinks for your share. Love from china. Good luck for you.
@atomic14
@atomic14 Жыл бұрын
Thank you very much!
@muhammadarsalan3412
@muhammadarsalan3412 Ай бұрын
Can we record the mp3 using esp32 ?
@BBBA_
@BBBA_ 2 жыл бұрын
I am tired of getting the warning on ASK FM.
@thexht7927
@thexht7927 Жыл бұрын
But how do you upload the mp3 to esp32?
@aimeiz1
@aimeiz1 7 ай бұрын
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?
@alfem
@alfem 2 жыл бұрын
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?
@atomic14
@atomic14 2 жыл бұрын
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...
@alfem
@alfem 2 жыл бұрын
@@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!
@atomic14
@atomic14 2 жыл бұрын
@@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.
@WistrelChianti
@WistrelChianti 2 жыл бұрын
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?
@atomic14
@atomic14 2 жыл бұрын
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
@WistrelChianti
@WistrelChianti 2 жыл бұрын
@@atomic14 thanks.. I think that's an affirmation that I was on the right track?
@WistrelChianti
@WistrelChianti 2 жыл бұрын
@@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.
@villagerse
@villagerse 24 күн бұрын
Sir can u suggest a adc borad
@BBBA_
@BBBA_ 2 жыл бұрын
I like ONE OF THESE NIGHTS 1975.
@Gabrielpimgomes
@Gabrielpimgomes Жыл бұрын
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?
@davidgardener1152
@davidgardener1152 Жыл бұрын
do you have any tipe for how to port this over to arduino IDE? im having a nightmare trying to do it!
@atomic14
@atomic14 Жыл бұрын
I’ve just fixed some compilation errors that was stopping it building with the latest esp-idf. That might help.
@davidgardener1152
@davidgardener1152 Жыл бұрын
@@atomic14 oh wow thanks so much for the response! I will try again. this is via platform IO yes?
@anderesgooglekonto6869
@anderesgooglekonto6869 2 жыл бұрын
Is it pissible to Copy Ur Code for this ?
@atomic14
@atomic14 2 жыл бұрын
Code is all on GitHub - feel free to use it for whatever you need.
@anderesgooglekonto6869
@anderesgooglekonto6869 2 жыл бұрын
@@atomic14 thank you for the fast reply :)
@DaleDix
@DaleDix 9 ай бұрын
Hello
@envy7818
@envy7818 2 жыл бұрын
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.
@Morpheus.theDreamlord
@Morpheus.theDreamlord Жыл бұрын
Лайк за Napalm Death ;)
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 2 жыл бұрын
sounded better without my hearing aids. 😃
@atomic14
@atomic14 2 жыл бұрын
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!
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 2 жыл бұрын
@@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.
Building a Digital Music Player with I2S?! What is I2S! EB#45
10:24
#419 ESP32 Audio Tutorial with lots of examples
13:48
Andreas Spiess
Рет қаралды 250 М.
Worst flight ever
00:55
Adam W
Рет қаралды 39 МЛН
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 2,4 МЛН
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 7 МЛН
Крутой фокус + секрет! #shorts
00:10
Роман Magic
Рет қаралды 29 МЛН
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 622 М.
Using the ESP32 DAC - Voltages, Waveforms & Sounds
34:46
DroneBot Workshop
Рет қаралды 82 М.
Audio modules for electronics project
37:54
Playful Technology
Рет қаралды 53 М.
Coding a Sound Driver on the ESP32 ULP
6:46
bitluni
Рет қаралды 87 М.
I built the ultimate tabletop gaming gadget
15:19
abe's projects
Рет қаралды 317 М.
ESP32 Walkie-Talkie: DIY Audio Magic
8:50
atomic14
Рет қаралды 113 М.
MP3 Player using MakePython ESP32 LCD development board
14:25
Volos Projects
Рет қаралды 35 М.
Worst flight ever
00:55
Adam W
Рет қаралды 39 МЛН