ESP32 Sound - Working with I2S

Поділитися
Вставка
  • Опубліковано 9 січ 2025

КОМЕНТАРІ • 288

  • @Dronebotworkshop
    @Dronebotworkshop  2 роки тому +104

    WARNING - This video contains a very bright shirt and may be harmful to your eyes! I'll have to remember not to film wearing that one again, sorry, I didn't realize how intense the color was until UA-cam rendered the video.
    Otherwise, I hope you enjoy the video!
    Bill

    • @carelhaasbroek1575
      @carelhaasbroek1575 2 роки тому +28

      That shirt is brighter than my future.

    • @sinjhguddu4974
      @sinjhguddu4974 2 роки тому +12

      No! The color is great. It brightens up everything.

    • @billmckillip1561
      @billmckillip1561 2 роки тому +10

      My wife is in charge of fabric colours around here and says your shirt is good. So there you go.

    • @TheOleHermit
      @TheOleHermit 2 роки тому +7

      No problem, Bill. Didn't even notice.😎

    • @AndersJackson
      @AndersJackson 2 роки тому +5

      Did notice, but it doesn't change the contents. Which still is of excellent quality and pedagogic, as usual.

  • @usefulelectronics
    @usefulelectronics 2 роки тому +46

    I always wanted to learn about I2S and here is all in one theoretical / practical tutorial !!. Thank you for your awesome work.

  • @yuchoy1
    @yuchoy1 2 роки тому +12

    You are setting the standard for excellence in tutorial videos; on UA-cam and elsewhere! Well done! The content is very interesting and useful. Thank you so much!

  • @waltermartinez5907
    @waltermartinez5907 2 роки тому +12

    Your videos are so excellent! I tought stuff like this for 20years and was losing interest, but after seen the qualty and content of your videos and teaching methods I am back at experimenting. Love it! thanks!

  • @_marlene
    @_marlene 4 місяці тому +2

    Your videos are incredible. I've found them on multiple occasions by different search means. I don't know how to explain it but even beyond the usefulness of these incredibly high-quality tutorials your videos make me happy. I'm glad you're out there teaching people. Sending love
    PS, shouts out to the esp32. what an awesome piece of kit.

  • @D_isco_D_ancer
    @D_isco_D_ancer 2 роки тому +8

    This is an amazing channel. One of the few with thorough explanations for people like me with no background in electronics but eager to learn and hopefully complete some projects.

  • @DataJanitor
    @DataJanitor 2 роки тому +13

    Just a note: The wiring diagram for the INMP441 at 13:04 doesn't immediately match the code download on your page: Specifically, GPIO pins 32 and 33 are switched. Easy fix, thanks for the clear explanation.

    • @hatimy
      @hatimy 9 місяців тому

      Thankyou...I was disappointed it didn't work the first time but changed the pins and it works great!

  • @thomasseverino9351
    @thomasseverino9351 Рік тому +2

    Thanks! This is perfect! Your videos are so helpful!

  • @fathicoltd6774
    @fathicoltd6774 2 роки тому +3

    You are awesome sir, i am truely honored to find you. Thank u for all of your perfect tutorials. Love from Iran

  • @nobuohayashi9431
    @nobuohayashi9431 7 місяців тому

    ありがとうございます! こんなに分かりやすい解説に出会って、ラッキーです。

  • @user-qz6gf9bn3u
    @user-qz6gf9bn3u 2 роки тому +16

    There is a small mistake at 2:08, I2S works with PCM (pulse code modulation), not pulse width modulation.
    Love your videos! Thx for this great tutorial.

    • @Sound_Stable
      @Sound_Stable 2 роки тому +4

      I immediately went looking for this comment. lol

  • @marcdraco2189
    @marcdraco2189 2 роки тому +4

    Cool tutorial. Great to hear someone knowledgeable on this weird protocol.

  • @sinjhguddu4974
    @sinjhguddu4974 2 роки тому +2

    WOW! Sir, with this one you simply have over excelled yourself. I have been craving this tutorial. And it covers everything. Thank you and be blessed.

  • @ivovass195
    @ivovass195 2 роки тому +2

    Excellent explanation and demonstration on the I2S protocol with the esp32. I'm planning to make an Internet radio and this is exactly the detailed information I needed, thank you.

    • @90FF1
      @90FF1 2 роки тому

      Did you build the radio? I did works great. I'm stumped at the volume control. My 'no brand' 38 pin dev board has no pin GP39 nor can I find ADC03 on any of the ESP Vroom 32 pins. Any help here would be appreciated.

  • @rhandynastor4866
    @rhandynastor4866 Рік тому

    what I like about this channel is the very good explaination from theory to actual. Lot to learn from this channel

  • @TheUnofficialMaker
    @TheUnofficialMaker 2 роки тому +1

    I really like how you present your projects, I know it's alot of passionate work.

  • @rodneytapit5636
    @rodneytapit5636 7 місяців тому

    Outstanding tutorial, great section on I2S and common configurations. Describes everything I wanted to know THANK YOU!

  • @matthewbal1
    @matthewbal1 2 роки тому

    Thank you so much for this video, I just spent literally hours trying to navigate the world of I2S libraries to try and get a simple microphone + speaker to work. This video helped so much for the background knowledge and hopefully I'll be able to figure it out now 🙏

  • @Algardraug
    @Algardraug 2 роки тому

    You are very pedagogical and yet concise. Very good!

  • @Javad.Abasalizadeh
    @Javad.Abasalizadeh 2 роки тому +2

    Your channel is a treasure for me
    Thank you

  • @gabrielgaby5840
    @gabrielgaby5840 Рік тому +1

    Thanks!

  • @ernandofranco8448
    @ernandofranco8448 2 роки тому +3

    Thank you very much!!
    You are a good teacher.
    Thank you for sharing your time and knowledge with everyone!!!

  • @applepiede876
    @applepiede876 Рік тому +1

    Wonderful tutorial. Exactly what I needed. Thank you so much. The only thing I don't understand is the fact that you only seem to own one Micro SD card. 🙂

  • @tpobrienjr
    @tpobrienjr 2 роки тому +1

    Thanks for a nice compact tutorial on i2s and internet radio.

  • @AMatroskin
    @AMatroskin 2 роки тому

    Thank you too much! despite on my low level in English, i have understood nearly 100 percent, really useful video!

  • @your_utube
    @your_utube 2 роки тому +2

    Thanks for your dedication to sharing your expertise. Really inspiring!

  • @deslomeslager
    @deslomeslager 2 роки тому +1

    Thanks for letting me know about 0nradio.
    It was a very good project, thank you for making a decent video about it!

  • @ianbertenshaw4350
    @ianbertenshaw4350 2 роки тому

    Excellent video Bill!
    Didn’t notice the shirt until I read your comment !
    Copy write does make it difficult to show how well audio projects work , I see a lot of it with vintage radio channels and they don’t seem to have a problem as long as it is very brief - less than 2 seconds and usually they try to stick to stations that only play instrumental stuff like classical .

  • @inlywang8157
    @inlywang8157 2 роки тому +2

    Bill, thanks for your hard working and good sharing, so many details

  • @markvanhorne3276
    @markvanhorne3276 2 роки тому +1

    Looks like the Adafruit stereo board highlighted at 9:46 is discontinued. They have a "replacement" board, but it's not stereo.

  • @OsoPolarClone
    @OsoPolarClone 2 роки тому +1

    To me the Lear thing about copyright issues in your video is the intent. Your intent is NOT to play a copyrighted song. Your intent is to demonstrate the electronics and the operation of what you built. I would be VERY disappointed if an agency or UA-cam would be upset over an even slightly longer playing of copyrighted material for a channel like your. I enjoy you videos and learn a lot from them.

    • @Otakunopodcast
      @Otakunopodcast 2 роки тому +3

      Unfortunately UA-cam doesn't give a damn. They've flagged videos where for example people were recording an outdoor scene and someone just happened to drive by within earshot of the mic while blaring their car stereo.

    • @DaleDix
      @DaleDix Рік тому

      UA-cam has a whole library of music to use.

  • @zarigata
    @zarigata 2 роки тому +2

    Awesome idea! As always a super described tutorial and nice explanation

  • @eto38581
    @eto38581 Рік тому

    Now this is called quality content. Subscribed!

  • @home-lab
    @home-lab 2 роки тому

    What a clear en extended explanation of this subject. Thanks !

  • @TheAstronomyDude
    @TheAstronomyDude Рік тому

    It is absolutely maddening how little you discussed choosing the correct speaker.

  • @eldjmasterfreddy4366
    @eldjmasterfreddy4366 3 місяці тому

    Great Presentation as always 👍

  • @attyberecz
    @attyberecz 2 роки тому

    Very good tutorial, clear and extended explanation of this subject ! Respect !

    • @Podemosllegaralossubs-ty7bq
      @Podemosllegaralossubs-ty7bq 2 роки тому

      I'm using the Teensy 4.1 as a waveform synthesizer, outputting 5 discrete signals (X, Y, red, green, & blue) to a laser projector. There is a total of 17 waveforms being generated, including 4 * X/Y pairs for the basic image, 2 pairs for AM pulsing, 2 triples for RGB color modulation, and one for intensity modulation.

  • @jimbooth2010
    @jimbooth2010 2 роки тому +1

    Very very good video. Great job! Might try to build the internet audio for my grandson.

  • @garypaulson5202
    @garypaulson5202 2 роки тому +1

    Great video Bill! Going to try an internet radio

  • @tscann8
    @tscann8 2 роки тому +2

    Very good guide for I2S Thank you

  • @ivanz9324
    @ivanz9324 Рік тому

    Super video lesson. Thank you so much.
    So for the next step, would you please try to transfer sound (i2s protocol) by radio?
    4 different cases possible:
    1)Esp32 has built-in wifi/bt module, so its possible to make kind of walkie-talkie through standard protocol.
    2) esp-now
    3) external radiomodule (barely lora modules fit for streaming signal, but maybe a short audio messages?) otherwise nrf24l01 are good.
    4) through the internet server (existing or just a custom homemade server on orange-pi or etc)
    Would be very helpful. Thanks!

  • @sczygiel
    @sczygiel 2 роки тому +1

    Great video. It covered a lot of what I was looking for!
    Thank you!

  • @hoangleminh2424
    @hoangleminh2424 2 роки тому

    Thanks DroneBot Workshop for your tutorial

  • @P.A.T.
    @P.A.T. 2 роки тому

    You are fantastic! You just opened the door to many ideas for me! Thank you very much!

    • @TheOleHermit
      @TheOleHermit 2 роки тому

      Yes, same here. Bill; Andrew Spiess, the guy with the Swiss accent; Christopher Barnatt, from Explaining Computers; and others have had the same impact on myself.
      I'm currently building a laser show system for my living room.😎

  • @ronaldcollins9618
    @ronaldcollins9618 2 роки тому

    Watching a few months late. Outstanding tutorial as usual!

  • @CTCTraining1
    @CTCTraining1 2 роки тому +1

    Excellent bundle of projects - much appreciated, plus thx for the latest newsletter! 👍
    Also, testing internet radios is safer (from copyright hits) tuning into talk stations... but we trust you. 😀

  • @partouelectric2353
    @partouelectric2353 2 роки тому

    Hi Bill. Thanks for the great video. You teach better than most people. with all due respect to Andreas, your videos are more comprehensive than his. I think his work should not stop you from
    doing what you do better. I need to learn how to send audio streaming from one ESP to another through Bluetooth. or ESP now, Would you shed some light on this, please? Thanks

  • @andrzejpopowski7745
    @andrzejpopowski7745 2 роки тому +1

    You create great videos. Thanks.

  • @TheOleHermit
    @TheOleHermit 2 роки тому +1

    Great video, Bill! I'm one of those myriad of other I2S users/makers.
    But, I chose the Teensy 4.1 for my project, because of it's great Audio library, which was forked by Adafruit on github.
    Thanks to your great explanation, now I understand why the 2 libraries are incompatible, because of different DIN pin assignments.
    I'm using the Teensy 4.1 as a waveform synthesizer, outputting 5 discrete signals (X, Y, red, green, & blue) to a laser projector. There is a total of 17 waveforms being generated, including 4 * X/Y pairs for the basic image, 2 pairs for AM pulsing, 2 triples for RGB color modulation, and one for intensity modulation.
    The waveform generators are pushing the galvos to their 1kHz limits and can be mixed between sine, square, or variable sawtooth waveforms.
    Each of the image generators have envelopes with commonly controlled ADSR to avoid snapping the galvos while changing preset frequencies and/or waveforms.
    All of these + mixing gains are controllable via usbMIDI from an Akai APC40 MIDI desk, Cakewalk's DAW, and/or Pure Data's GUI on a 22" touchscreen monitor, for additional controls.
    Speaking as an old Laserium laserist, I can vouch that the Teensy 4.1's audio library is rivaling the capabilities of their show system, for only ~$100 + ~$850 RGB laser projector + ~$250 MIDI controller. IOW, I have a laser show in my living room for ~ the same price as my 5.2 Polk/Denon sound system. That blows away my previous expectations for any MCU.
    Can't praise PJRC enough for producing such a great range of products, with great documentation, a node red-like GUI audio design tool, and welcoming support forums.
    Okay, I'm finished with gushing my joy all over everyone. Only wanted to share my I2S experience. If anyone is interested in the details, our pal Dave, on Notes and Volts has great step by step DIY synth tutorials on YT for both the Teensy and Arduino MCUs.
    ua-cam.com/play/PL4_gPbvyebyHi4VRZEOG9RKOYq5Hre3a1.html
    😎

  • @anurasenarathna1703
    @anurasenarathna1703 2 роки тому

    My favorite area!. Thank you Bill.

  • @Sticks04
    @Sticks04 2 роки тому

    Thank you for more excellent content. I think this channel is amazing and you have quickly become my go to guy when researching my ideas. I'm currently trying to use both ESP32-CAM and Wrover boards to build CCTV cameras for my home and wondering how to record audio with the video. This tutorial though now has me thinking of how I can add some totally custom sound systems to both my bar and my camper van. Thank you so much.

  • @rohangupta8414
    @rohangupta8414 2 роки тому +1

    Thanks for posting on this topic sir....
    I was looking for it 😉😉

  • @TheDradge
    @TheDradge 2 роки тому

    My only complaint is your workshop is too neat and tidy and it puts mine to shame. Although, if mine was that tidy I'd never find anything! Keep up the good work.

  • @golammustafa662
    @golammustafa662 3 місяці тому

    Your video is really helpful. Thank you

  • @SantaDragon
    @SantaDragon 11 місяців тому

    43:29 How about using songs without copyright? Or UA-cams own files they are offering?

  • @lucienrapilly6407
    @lucienrapilly6407 2 роки тому

    Note that some SD card breakout boards do need to be powered with 5v, and have a built-in voltage regulator for 3.3v operation.

  • @alexxustube
    @alexxustube Рік тому

    Thank you, Bill! Very informative video, as always. 👍🙂

  • @bryansmith1303
    @bryansmith1303 Рік тому

    Great work! At 10:07 you say that the module accepts I2C, I think you meant I2S. First time for everything.

  • @Jean-LouisDJE
    @Jean-LouisDJE Рік тому

    I learned a lot trough this video, thanks so much... You're amazing

  • @dbjindian
    @dbjindian Рік тому

    Pls make complete videos on individual video on ,MP3 player with buttons and internet radio with tune option

  • @electronics.tinker
    @electronics.tinker 2 роки тому

    Thanks for this video. It was helpful. One thing to consider: the Adafruit SD breakout contains a voltage regular to convert 5V to 3.3. You connected the input of this regulator to 3.3V instead of 5V. This (usually?) works because the regulator has a very low voltage drop, but it still has a drop. You will be running the SD card at 3.2 or 3.1V rather than 3.3V. Maybe it is better to connect the SD breakout 5V pin to the ESP32 VIN (5V) rather than the ESP32 3.3V. The SD breakout uses a 4050 hex buffer that is powered from the 3.3V rail. So, it causes the signal outputs to be 3.3V. regardless of the voltage supplied to the SD breakout via its 5V input. This works for 5V systems (e.g. Arduino boards, not ESP32s) because 3.3 is more than 2.5V, and the 4050 tolerates 5V inputs.
    If for some reason one must drive the SD breakout with 3.3V, I think it would be OK to connect a 3.3 supply to the SD breakout's 3.3V pin. This bypasses the regulator.

    • @vp.3125
      @vp.3125 9 місяців тому

      excellent point! Thank you

  • @roycejacobs9682
    @roycejacobs9682 2 роки тому

    Love the esp 32 content!

  • @corkscrewify
    @corkscrewify 2 роки тому +2

    You could use VLC to stream DRM free music from your computer over the network. That'd provide a safe web radio for recording.

    • @TheOleHermit
      @TheOleHermit 2 роки тому

      Yes, great suggestion. I attempted building a poor man's SONOS multi room sound system, by streaming audio from VLC to RPi 'receivers', with audio HATs. Unfortunately, I was too stupid to figure out how to keep them all in sync.
      BTW, now I prefer VLC for recording video, but use Audacity for recording audio. Just discovered Animotica for video editing, but not convinced that it is the best free editor.
      BR😎

  • @joselu90
    @joselu90 2 роки тому

    Good video. I want to learn how to have an i2s source sending stereo sound to the esp32 and a decoder playing it back using DMA, at the same time.

  • @beewyka819
    @beewyka819 Рік тому

    At 16:53, how come you are dividing bytes by 8 to get the number of samples? If each sample is 16 bits (2 bytes), then shouldn't you be dividing by 2?

  • @ditomek
    @ditomek 2 роки тому +1

    Hi. Thanks for Your job.
    I'm thinking about building a simple music player with stereo output, 2x16 display, physical buttons and remote sensor.
    Can You tell, is it possible using ESP32 and this "Audio.h" library ?
    My goal is to see playing time, file and folder number. Skip between songs and change folder.
    Search through the file with sound will be probably impossible.
    Right now, I'm struggling with arduino libraries. I can't even compile original sketch provided with library.

  • @manikantaam5967
    @manikantaam5967 2 роки тому +1

    Hi, thank you so much for the excellent video.
    May you please help me by answering the question below.
    What are the most common real time examples in which SOC is used as Target ( i.e other peripheral is giving SCK and WS signals ).
    Would you also please mention the devices which can be used as master.
    Thank you

  • @Pazushh
    @Pazushh 2 роки тому

    ive been using UA-cam ever since
    this is the second channel i subscribe
    btw first was Andreas 😄

  • @SA-oj3bo
    @SA-oj3bo 2 роки тому +2

    Hi, I would like to use I2C MIC to capture the sound and forward it to the I2S DAC MAX98357A, I can not find any example how to do that. It should sample MIC and forward PCM data to the DAC. If possible I like to add volume control and have a led strip showing when someone speaks. Can you help? Thx.

  • @heldersantana9145
    @heldersantana9145 2 роки тому

    Awesome work, thanks for sharing!

  • @robertosonzogni
    @robertosonzogni Рік тому

    Hello, what about recording audio from microphone, and play it as a "sample"? That can be useful to build a musical instrument...

  • @the__Ultraviolet
    @the__Ultraviolet Рік тому

    I am somewhat sure that the size argument in i2s_read() function is the size in byte(how many bytes you wish to read) and as you are using 16bit samples the bufferLen should be multiplied by 2 or more correctly sizeof(sBuffer[0]). As you used only the bufferLen only half of sBuffer will be filled with samples.

  • @electronic7979
    @electronic7979 2 роки тому +1

    Very helpful video 👍

  • @flashcorp76
    @flashcorp76 2 роки тому

    Excellent,as usual 😁👍🏻

  • @tezzrexx
    @tezzrexx 11 місяців тому

    Super helpful for my project, thank you!

  • @profesormundial
    @profesormundial 4 місяці тому

    I have a mems microphone with16 bits digital output and -26 dbFS of sensibility.
    I need to make a db meter.
    How convert this digital output to spl db ?
    Thank you for your video

  • @BenjaminGSlade
    @BenjaminGSlade Рік тому

    Re: WS line determines (something) left from right and the "L/R" line which chooses left or right "channel"
    Why does a single microphone need to say whether it's left or right twice? Does "WS" left or right have to match "L/R" left or right? If two microphones are used, are WS and "L/R" both set to right for one and left for the other? What "left/right" thing is WS selecting that isn't covered by L/R? If you bring "L/R" high the output will be in the right channel? I only see one data line coming out of the microphone board

  • @dragonridertechnologies
    @dragonridertechnologies Рік тому

    I get that it's an older protocol now (ironic, given that it seems only the latest DIY devices support it), but why on Earth does it use an entire wire just to select the channel? You've got two high speed data lines, and then there's a third one that's operating at a much slower rate just to select the speaker. I wonder if it would have been too much work implement just having a specific data bit select the channel.

  • @mattlaptop5728
    @mattlaptop5728 20 годин тому

    Excellent tutorial - thank you. Just one comment - consider using old classical music for the demonstrations as it is not copyrighted and is in the public domain - Tom and Jerry cartoons do the same for the same reason.

  • @gabrielgaby5840
    @gabrielgaby5840 Рік тому

    Happy New Year Bil..❤ All the best with the Projects. Still on my Ard'o R4 Minima Data.
    Might like some advice on some old technology. Cheers..❤😂 🎄🐻🎄🛍️🔬

  • @jps99
    @jps99 2 роки тому

    Great tutorials, earned my Sub!

  • @e.s.2777
    @e.s.2777 11 місяців тому

    I appologize if I am wrong but the pins for Miso and CLK in Video and in the Code are reversed: Miso 18 in Video, 19 in the code, CLK 19 in video, 18 in the code.

  • @md.teacher9413
    @md.teacher9413 2 роки тому +1

    I love your work

  • @jijeshpv7347
    @jijeshpv7347 9 місяців тому

    Sir,
    Please give some examples of using max6644 microphone with esp32 and converting audio to text and store in sd card

  • @geethabharathi2019
    @geethabharathi2019 Рік тому

    Bill ur awsome .... very well presented....

  • @israelgiron9089
    @israelgiron9089 2 роки тому

    Thanks

  • @Really2950
    @Really2950 2 роки тому +1

    Great video, thanks

  • @FreeCircuitLab
    @FreeCircuitLab Рік тому +1

    Please gain your audio... It is harder to listen even in full volume in phone

  • @noweare1
    @noweare1 2 місяці тому

    Why divided by 8 ? int16_t samples_read = bytesIn / 8; Each data is 16 bits (2 bytes) and you have left and right channels so that would be 4 bytes per sample not 8. Please correct me if I got this incorrect, thanks.

  • @jj74qformerlyjailbreak3
    @jj74qformerlyjailbreak3 2 роки тому

    I think your SD card got a 5v shot.
    But thanks for teaching your know how’s about I2s.
    As always great Video.
    God Bless

  • @arniep740
    @arniep740 2 роки тому +1

    Thanks for this video. Very intriguing. Where do you get the URL's for the music sources?
    Thanks!

  • @gregorymccoy6797
    @gregorymccoy6797 2 роки тому

    Nice video. I have a bunch of things to try now... 😀

  • @destinobaracoa8363
    @destinobaracoa8363 Рік тому

    Hello from Cuba teacher.

  • @andrefbillette2774
    @andrefbillette2774 2 роки тому

    Hi I love your channel. CLK=>IO18 and DO=>IO19 at Timestamp 24:48 seem to be reversed. Is this an error?

  • @wklenk
    @wklenk 2 роки тому +1

    Is there a bug in the website? For Microphone Module Code, the diagram has different connections for SD/SCLOCK than the code. They are just interchanged.
    Did anyone get this up and running on a Adafruit Huzzah32? I am not quite inexperienced, but I struggle to get any input signal.

  • @PixPete
    @PixPete 7 місяців тому

    How could this be adjusted to output a line level signal for connecting to a real amplifier or mixer, instead of just connecting it directly to a speaker?

  • @EmreYasinAlbayrak
    @EmreYasinAlbayrak Рік тому

    nice shirt. great contents. I would also like to see a bluetooth speaker project.

  • @mroxidation4854
    @mroxidation4854 2 роки тому

    clear, concise, thank you!

  • @dexnug
    @dexnug 2 роки тому

    can we connected this I2s mic 11:28 to raspberry pico?do you have tutorial about it?

  • @csbluechip
    @csbluechip 9 місяців тому

    Another blinding video :) ...Mr. Teo Swee Ann (founder and CEO of Espressif) has clarified that the ESP chips must be powered by 3.3v, but the GPIO is both 5v tolerant, and indeed 1.8v responsive!