ESP32 I2S Internet Radio. Full Tutorial & explanation of I2S. For PCM5102 & MAX98357A I2S Decoders.

  Рет қаралды 41,240

XTronical

XTronical

Күн бұрын

Пікірлер: 94
@chronobot2001
@chronobot2001 7 күн бұрын
Very clear, concise and thorough explanation. 100%. A+ I will be watching this video again and subscribing.
@90FF1
@90FF1 2 жыл бұрын
Been looking for a minimalist, mono, single station, ESP32 iRadio. Others I've tried or looked into have too many bells and whistles. Results were mixed. I've ordered a Max 98357 breakout board and will give your design a try. "Everything should be made as simple as possible, but not simpler." - A Einstein. Good instructional video. Thank you.
@jaredgray7872
@jaredgray7872 4 жыл бұрын
Thanks for this video! I've done a fair amount of searching on i2s and this is definitely one of the most detailed and informative on KZbin. Appreciate you taking the time to put this together
@XTronical
@XTronical 4 жыл бұрын
Thank you for the feedback
@paulcastelyns8367
@paulcastelyns8367 3 жыл бұрын
This internet radio guide is just great. I built it and it worked from the 1st time. Congratulations to the installer. It is a pity that there is no electronic scheme. I have extracted the connections from the video material. Thanks and keep up the good work.
@XTronical
@XTronical 3 жыл бұрын
Thanks for the feedback
@EasyOne
@EasyOne 3 жыл бұрын
Very well explained
@iiilllii140
@iiilllii140 Жыл бұрын
This is excellent. You've earned this sub. This is so good. 👍
@XTronical
@XTronical Жыл бұрын
Thank you
@miketony2069
@miketony2069 4 жыл бұрын
Thumbs up only because I feel like I'm learning from Liam Neeson! Joking...well done sir.
@XTronical
@XTronical 4 жыл бұрын
Thanks, wish I had his money!
@melamrao
@melamrao 4 жыл бұрын
Hello man, it's great. I have been working with Spafunk's standard library for 3 days without success. Now I can finally implement the web radio library in my application. Thanks a lot
@XTronical
@XTronical 4 жыл бұрын
Brilliant glad it helped
@melamrao
@melamrao 4 жыл бұрын
@@XTronical Hi, i have a Question. can you tell me plz, if it´s possible to have other Loop like a LCD-Loop to detected her Touchscreen or Blynk loop for the Connection to the Blynk Server with the Audio.loop() . !?
@michaelhartrey8937
@michaelhartrey8937 3 жыл бұрын
Great video. I used the PCM5102A and combined it with ILI9431 touch screen. One thing I did notice was that I had to ground the FLT, DMP and SCL pins of the PCM5102A otherwise there was a lot of noise (but perfect when grounded). Not sure if anyone else has experienced this?
@MrBobWareham
@MrBobWareham 2 жыл бұрын
Well done it sounds like it was hard work to get it all working, so top marks for sharing your hard works, thanks'
@Mystical-TEDDY_
@Mystical-TEDDY_ 2 жыл бұрын
Heyy this video has helped me SO much in understand I2S with the ESP32 in such a simple manner as well, without being 30 mins long and wasting my time and attention. Thank you I would like to know tho could you go into further detail about why the capacitor is there. The ESP32 I have looks exactly like that one and i'm not sure if I should use it or not when I try this for myself
@XTronical
@XTronical 2 жыл бұрын
It's not needed for i2s, it's because this esp32 board has an upload fault and this solves it. It's a common issue on some types of cheap boards.
@Mystical-TEDDY_
@Mystical-TEDDY_ 2 жыл бұрын
@@XTronical I don’t think I have this issue but idk for sure will anything bad happen if it try it without the capacitor first? Or if I do try it and don’t need it?
@XTronical
@XTronical 2 жыл бұрын
Nothing bad happens, just fails to upload your code. You can test with just your board. Try uploading some code if you've not already. It'll just time out if it has this issue. Some people on some boards can get away with just pressing the en button whilst uploading (I think) but that didn't work for me. I so need this hack
@Mystical-TEDDY_
@Mystical-TEDDY_ 2 жыл бұрын
@@XTronical okay thanks for the explanation
@billglass5160
@billglass5160 Жыл бұрын
Some experience with the pcm5102. Had terrible noise (on a breadboard) until adding the additional connections to GND besides what you already mentioned: FLT, DMP, SCL. Perfect sound now.
@XTronical
@XTronical Жыл бұрын
Ahh, interesting. I didn't have any issues (well none that detected with my tone deaf ears!) but worth bearing in mind if I have issues in the future.
@avieleliyahu6199
@avieleliyahu6199 4 жыл бұрын
Thanks for the video! You're explaining everything clearly :)
@XTronical
@XTronical 4 жыл бұрын
Thanks
@ogoranumbor2777
@ogoranumbor2777 4 жыл бұрын
Very nice tutorial! 'enjoyed it all thru!
@XTronical
@XTronical 4 жыл бұрын
Thanks for the feedback
@Kaka-zs4cp
@Kaka-zs4cp 4 жыл бұрын
Great video!
@XTronical
@XTronical 4 жыл бұрын
Thank you
@x-rockfm92hd81
@x-rockfm92hd81 2 жыл бұрын
THANKS XTronical i SUBSCRIBED ON OTHER ACCT
@XTronical
@XTronical 2 жыл бұрын
Thank you
@F5VMJ
@F5VMJ 4 жыл бұрын
Very nice vids mate...And straight to the point with no faffing. Do you know of a solution or workaround to eliminate the pops/clicks when playing an mp3 file from SPIFFS?? I'm getting this using the PCM5102 module, at start and end of play. I think it might be the Zero Data Detect function switching it on and off rather clunckily.
@XTronical
@XTronical 4 жыл бұрын
Thanks for the kind words. I don't know a fix off hand but I'm working through i2s stuff at the moment and will be adding mp3 support to my own library as part of that, so at that point I'll sort. Just a quick question, does this only happen using spiffs. Your discription sounds correct, seems like it's not bringing the speaker back to rest slowly at the end end of play or something like that.
@F5VMJ
@F5VMJ 4 жыл бұрын
@@XTronical Ahhhh ..Just tested... yes, only happens when I read a SPIFFF file. When 'tuning' around different wifi radio stations it's sweet as a nut... no snap, crackle or pop. So, maybe a library issue? (I also notice that it cuts the the very end of off an mp3 SPIFFF file. Just a few tenths of secs but noticible. I just work around that by Audiacitizing and adding a silence period at the end.
@XTronical
@XTronical 4 жыл бұрын
Interesting it's just spiffs, I might not have checked that, so thanks.
@bignadialna1374
@bignadialna1374 2 жыл бұрын
very nice !
@geeuk
@geeuk 3 жыл бұрын
Thanks for the video, I tested this on a pcm5102a and it worked first time. Boot time is 2 seconds which is awesome! I was wondering if i get a cat 1 lte module will it handle the stream and data receive or is it an overkill for cpu power?
@XTronical
@XTronical 3 жыл бұрын
I'm embarrassed to say I was unfamiliar with what you were talking about. I quick Google gave me some clues but I'm still not entirely sure how they would work together I'm afraid so I cannot answer your question.
@geeuk
@geeuk 3 жыл бұрын
@@XTronical Thanks for your reply. I am sorry that i couldn't explain it better. Basically I can use your script to play radio streams using wifi, what I want to do is add an 4g lte module to the esp32 at the same time so it will have mobile lte connection and also incorporate the pcm5102a to play audio over the mobile network instead of wifi.
@XTronical
@XTronical 3 жыл бұрын
Ahh, sounds interesting and perhaps tricky? Let me know how you get on
@IndianTinker
@IndianTinker 4 жыл бұрын
I love this channel :D
@XTronical
@XTronical 4 жыл бұрын
Thank you very much
@nepen_
@nepen_ Жыл бұрын
Great tutorials and delivered with the right level of humour to keep it interesting but not taking over the point of the videos. Helped me sift through the vast array of possible hardware to something that I should be able to pull off with my limited electronics knowledge. Only, I've hit a problem almost straight away... Not able to get the SD card to successfully initialise. I have a version of the card reader with the voltage regulator, but since I want to power everything off a 5v PSU, I presumed this would work fine. And I'm using different pins on the ESP32... That shouldn't matter though, right? Do you have any tips on debugging the circuit??
@XTronical
@XTronical Жыл бұрын
Thanks for the feedback. Try this video I did a while back, it explains what you might need to do kzbin.info/www/bejne/kJ6whaVugaqUZ6M
@nepen_
@nepen_ Жыл бұрын
@@XTronical Thanks for the pointer. I actually meant to comment on the "Quickie: Playing MP3's (and other types) on your ESP32 from an SD Card" video. My bad. Anyway, I've tried the voltage regulator bypass trick on the SD card breakout board, and I'm still having no joy.
@XTronical
@XTronical Жыл бұрын
I can't remember but I think I will be connecting to 3.3v on ESP32, did you change to that from your 5V. Other thing to check is that the library only supports 32Gb or less cards (could by 16Gb actually) so ensure not using too big a card. If not any of them then I'd try buying another card in case you've got a duffer
@nepen_
@nepen_ Жыл бұрын
@@XTronical In case it helps anyone else in a similar situation (i.e. being an ESP32 / microcontroller noob) - if you want to use SPI (which is the bus protocol that the SD card uses) then you MUST use the SPI pins on the ESP32. Not all pins are created equally, and some of the pins have very specific functions. I now have it working on 5v with an unmangled SD board (I'm glad I bought two).
@JerryEricsson
@JerryEricsson 4 жыл бұрын
Very cool indeed I have built both of these now, as well as some with the VS1053B chips. I find the VS chips very succeptable to over voltage damage as well as static electricity. I have a pile of six of the blasted little DAC'S laying in a pile on my desk, most the result of my own stupidity hooking up to much voltage to the wrong pin. I guess I come by it honestly, I am still in the state of shock having lost my loving wife, the true love of my life to cancer some 4 days following our 51st wedding anniversary. It was quite a hit, sure we knew it was coming, she was diagnosed with incurable cancer only 4 months before her death, we took every chance fighting it but it was not to be. She died in my arms in hospital and my heart is still broken. So I have an excuse I guess.
@XTronical
@XTronical 4 жыл бұрын
Of course you do.
@rifqizainnugroho3955
@rifqizainnugroho3955 10 ай бұрын
i tried to play audio with esp32 and max98357a but the audio is too quietly, how to make the audio loud?
@jayvadgama3703
@jayvadgama3703 2 жыл бұрын
Great video I made web radio using Esp32 my oled display working fine but my i2s dac (purple coloured board one) is not working I used Esp32 and uploaded Karadio32 code. Any idea what problem did it have?
@XTronical
@XTronical 2 жыл бұрын
Not sure, I would double check the connections for that board are correct. Some have pins that need to go to ground or Vcc to get the correct gain or configure them in certain ways.
@prob17
@prob17 4 жыл бұрын
Clearly explained
@JerryEricsson
@JerryEricsson 4 жыл бұрын
Cool, I have built a few other wifi radios they all have different features, this one is a bit basic as you have to recompile to change stations. My first attempts were with the VS1053 board and I do enjoy the ability to change stations with a rottery encoder or via PC or cellphone using a browser, but this little guy can be very compact so I guess I could select one station and use it for, say a pocket radio and run it via earphones. To bad a fellow can't activate the Bluetooth on the ESP and use that to listen to the radio stations over bluetooth enabled earphones, or in my case hearing aides. Perhaps that could be done, I shall have to look into that. Just noticed the station I have on now is in German. I have studied that language a bit as my maternal grandfather came from Germany just before WWI he well sort of took an unauthorized leave from the Kisar's army and came to America, to have transportation from the East Coast to his cousin's place in Dakota, he took his favorite horse from the Kisar's stables and rode it all the way from NYC to the Dakota's. Ah the stories he used to tell, God I do miss him, we lost him in 1959.
@XTronical
@XTronical 4 жыл бұрын
You could alter the code to support selecting different stations, perhaps even put a display on it if your feeling adventurous 😊
@JerryEricsson
@JerryEricsson 4 жыл бұрын
@@XTronical Going to have to look into that. I am in a most stressful situation right now, as my wonderful wife of 51 years (tomorrow) is in hospital, not expected to live after cancer has invaded and pretty much disabled her liver. Doctor tells me to spend time with my hobby when not with her in her room to occupy my mind, it does seem to help take my mind off things, and for this I am ever grateful. I have a station playing on the device right now, I built this one up on a strip board I had forgotten to ground the FMT pin and was having a heck of a time, well I had it wired but to the wrong pin. I noticed it last night before I went to bed but didn't wish to heat up my soldering iron and leave it to cool while preparing for bed, so I left it for this morning. a storm woke me at 4:00 AM so I have had plenty of time to fix it. Fix it, I did.
@XTronical
@XTronical 4 жыл бұрын
Take care and look after yourself, it must be stressful
@felanino2081
@felanino2081 2 жыл бұрын
Hi, may i know what spec of the speaker to get the loudest audio output when use max98357?
@XTronical
@XTronical 2 жыл бұрын
Any 8ohm is generally OK. You can get away with quite large speakers without much of a problem. I used an approx 15cm one from an old hifi and had no problems.
@pqnoicarusbr
@pqnoicarusbr 4 жыл бұрын
excelent video! how do I set my uC as slave through class audio? audio.setDatamode ???
@blikje_in_de_water
@blikje_in_de_water 3 жыл бұрын
Just a question... Why would you add 5V to the output of a voltage regulator?
@XTronical
@XTronical 3 жыл бұрын
Not sure exactly what you mean. However I have seen your previous post before you deleted it and I think what you've done is connected the 5V output from the ESP32 board to the power rail of the breadboard. If you look at the video (during wiring parts) it's the 3.3v output of the ESP32 that connects to this power rail. Which if you've done this explains the smoke you had the other day.
@blikje_in_de_water
@blikje_in_de_water 3 жыл бұрын
the pcm5102 has a input voltage of 5v to 10v with that it makes 3.3V (output of the voltage regulator is routed to the 3.3v pin on the pcm5102 module aswell as the pcm5102 itself) so you are adding 3.3v to an 3.3v output? I really dont see the logic of that... (no offense or what ever, I like your work a lot but i'm just wondering ..)
@XTronical
@XTronical 3 жыл бұрын
Sorry, my bad. Got confused with the 98357A which is also covered in that video. Not sure then why yours broke.
@grennereis8977
@grennereis8977 3 жыл бұрын
Hi, do you have a tutorial to transmit digital áudio between two esp32, one receiving áudio from source transmit to the other one and this conect to a speaker.
@XTronical
@XTronical 3 жыл бұрын
Sorry, I've not done that yet.
@aderaba
@aderaba 2 жыл бұрын
I built a radio based on the information from this video, it works well but the audio output from MAX98357A is weak not strong enough cannot cover clearly a small room, I tried two versions of the board and got the same results, my question is if that's how supposed to be a 3 Watts audio output or anything is wrong with my circuit, or if is there to get an I2S board with stronger output more than 3 watt, I'm estimating that to hear the sound in a medium room an amplifier of 10 to 15 Watts is needed. I'll appreciate if someone can answer my question. Thanks
@XTronical
@XTronical 2 жыл бұрын
Have you tried altering the gain with the gain pin? Also try a bigger (but same resistance) speaker. I hooked up some Sony ones that worked well. Although someone did comment how they might cause issues with the amp but I've had none. So in summary try increasing gain and try some quality speakers (if your not using some)
@aderaba
@aderaba 2 жыл бұрын
@@XTronical Thanks very much for your answer, I ordered all ready today a better quality 4 Ohm 3 watt speakers, by the way I like very much your videos I've got a lot of knowledge from them, just another question, could your explain how to work with the gain pin on the MAX98357A ? I found somewhere else to ground it with a 100K resistor to gain more volume but I'm not sure, Keep your good work Thanks.
@XTronical
@XTronical 2 жыл бұрын
There are various gains depending on how you connect this pin, from 3 to 15. Connecting to ground via 100k gives maximum gain so your already there with that. Must be a speaker issue perhaps. I've had decent volume out of mine. Have you set the volume level in the software /library too?
@aderaba
@aderaba 2 жыл бұрын
@@XTronical I set the volume in the software to 20 it's closed to maximum, the 100K resistor on the gain I didn't do yet, tomorrow I supposed to get the better speakers that I ordered, so I'll let you know the results, thank you very much.
@gw33b
@gw33b 4 жыл бұрын
So far i have only beeen able to connect to http servers and unable to connect to secrure https servers. has anyone else had any more luck or is this a limitation of the software library?
@XTronical
@XTronical 4 жыл бұрын
I've not tried, but I bet it's a limitation, the security would need extra coding.
@a2311585
@a2311585 3 жыл бұрын
make sure you use wificlientsecure
@reinaldohurtado3514
@reinaldohurtado3514 4 жыл бұрын
im getting, intermittent sound, sometime. neither that playing from the sd card. i though maybe my router is the cause, and low buffer memory on esp32
@XTronical
@XTronical 4 жыл бұрын
I've not had any intermittent problems, although I'm not clear, is this from sd or Web radio?
@reinaldohurtado3514
@reinaldohurtado3514 4 жыл бұрын
@@XTronical , its from wed radio, mp3 sounds perfect, i am trying to add lcd and navigation button, but i dont know how program works, the code execution is not lineal apparently, how is audio_eof_mp3 call it?
@XTronical
@XTronical 4 жыл бұрын
Once you add the audio_eof_mp3 function to your code the library will call it automatically when the end of the MP3 is reached. If you don't add this function to your code nothing happens.
@cptcrogge
@cptcrogge 4 жыл бұрын
Is there any better "out of the box" stereo solution?
@XTronical
@XTronical 4 жыл бұрын
If you mean all on one chip with an amp? If so, I'm not sure, but haven't looked that hard.
@cptcrogge
@cptcrogge 4 жыл бұрын
@@XTronical I will keep my eyes open. I really enjoy those ESP32 cam modules, its very convenient.
@gartmorn
@gartmorn 3 жыл бұрын
How easy would it be to add channel selection?
@XTronical
@XTronical 3 жыл бұрын
Yes, in the example you can see the commented out channels. Store these in an array and set the channel setting to whichever you want.
@gartmorn
@gartmorn 3 жыл бұрын
@@XTronical thanks for the reply it's much appreciated! I'm not great at coding so having the code already there is a real bonus. Just need to get a DAC module!
@XTronical
@XTronical 3 жыл бұрын
I may do a skeleton example in near future, as it's not a big task. That should give you a good starting point
@gartmorn
@gartmorn 3 жыл бұрын
@@XTronical brilliant, that would be great.
@rogenogueira
@rogenogueira Жыл бұрын
thanks for share, very nice project. I builded an internet radio using the VS1053 decoder, it works well. However, I want to use my ESP32 TTGO T-Display v1.1 but the VS1053 and the TFT uses the same SPI communication, I thought it could be better to use an I2S device instead of VS1053. Do you know if is it possible to build your project with PCM5102 and ESP32 TTGO T-Display? Another question, can PMC5102 play streams in aac? thank you very much. My radio: kzbin.info/www/bejne/gHLVh2aairyHfqc
@XTronical
@XTronical Жыл бұрын
5102 should work OK, just check how it's supposed to be wired. I think I@ve done a video on it (was it in this one?). Don't see why the TTGO shouldn't work unless it's missing the output (I've not got one). Not sure about the AAC, i've never looked at it.
From Start to Finish: ESP32 Internet Radio with a Roberts RM20
42:44
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 27 МЛН
Perfect Pitch Challenge? Easy! 🎤😎| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 56 МЛН
Motorbike Smashes Into Porsche! 😱
00:15
Caters Clips
Рет қаралды 17 МЛН
ESP32 Sound - Working with I2S
46:04
DroneBot Workshop
Рет қаралды 343 М.
How to make Simplest and Cheapest compact Internet Radio   Yoradio
18:35
SPDIF, TOSlink, AES/EBU or I²S, what’s the best?
19:09
The Hans Beekhuyzen Channel
Рет қаралды 79 М.
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 661 М.
AM Radio Transmitter on ESP32
6:20
bitluni
Рет қаралды 176 М.
Audio modules for electronics project
37:54
Playful Technology
Рет қаралды 60 М.
#419 ESP32 Audio Tutorial with lots of examples
13:48
Andreas Spiess
Рет қаралды 255 М.
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 27 МЛН