ESP32 spectrum analyser VU meter using arduinoFFT and a FastLED matrix

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 382

  • @theREALdilAndou
    @theREALdilAndou 2 ปีที่แล้ว +19

    Hey Scott. Keep up the good work man. I'm sorry to see how disgracefully G6EJD handled the whole copyright thing. Rip out his code and switch to audio_reactive.h from WLED (MIT licence) and remove all his credit. It's the least the guy deserves.

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว +5

      Thank you, that's the plan. As soon as I'm able I will remove any references to his code and links to his channel. Andrew from sound reactive WLED also messaged me in suppport and I really appreciate it from both of you.

    • @mschwage
      @mschwage ปีที่แล้ว

      You could just grab an older version of his library which is licensed under the mit license. You can't retroactively apply a license change... That would be a social nightmare!

    • @TheDradge
      @TheDradge ปีที่แล้ว

      Only just reading your spat with G6EJD and don't see what his problem was. You gave credit albeit in an "unofficial" form. The irony is that on his YT channel he writes "A collection of predominantly technical videos with an aim of helping others to understand topics, to share knowledge and to give examples of what can be achieved." Keep up the good work Scott. You did nothing to deserve that kind of response.

  • @Jessyplaysz
    @Jessyplaysz 10 หลายเดือนก่อน +2

    Thanks for the video Scott. It told me just what I wanted to know.
    This post is for the benefit of anyone considering using an ESP32-S3. Its A/D is not as fast as the ESP32. I ran the Sample Test sketch on a LilyGO T-Display-S3 and got the following rates
    So I guess its good to around 8kHz audio which is the upper limit of what I need.
    Conversion time: 60.12 uS
    Max sampling frequency: 16633.61 Hz
    Conversion time: 60.12 uS
    Max sampling frequency: 16632.99 Hz
    I then thought I could be clever and reduced the A/D resolution from 12 to 9 bits to get a higher conversion speed but alas no luck in Arduino IDE. It was identical.

  • @mehmetaliertorer5819
    @mehmetaliertorer5819 ปีที่แล้ว +3

    I have never seen a complicated topic explained so intuitively and straightforward. Such an amazing video

  • @fragiggle
    @fragiggle 2 ปีที่แล้ว +3

    Hey Scott, thanks for this fantastic starting point for my project. I made this powered by a DeWalt battery, mounted to a pole and had to heavily modify the code and hardware to get it to work in any volume level environment. I can't say how much longer this would have taken without this starting point, but I can say it would have been a lot longer.
    I had the idea to do it 8 years ago and finally sat down to do it last January and found your project during the research phase. Finished it in August and took it to a music festival, people absolutely loved it.
    Thanks again for the great work!

  • @acquireelectricity1458
    @acquireelectricity1458 3 ปีที่แล้ว +5

    Hi. I built it! First I tried using my esp8266, but the latency was massive. Esp32 works amazing. Thank you Scott Marley for this tutorial.

  • @wclumiere5665
    @wclumiere5665 4 ปีที่แล้ว +5

    @Scott Marley thanks for sharing, have to say it, this is so far the best video tutorial on how to use the arduinoFFT library I have seen. Keep it up. Great Job!

  • @Hienix
    @Hienix 2 ปีที่แล้ว +2

    This is amazing. I've seen other videos and they aren't nearly as good as this explaning the math and logic behind.

  • @AnthonyHortin
    @AnthonyHortin 4 ปีที่แล้ว +3

    Love this! That is such a beautiful, clean and crisp Matrix that you've put together and looks fantastic with that spectrum analyser running on it. Well done! 👍

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Thank you, for your kind comment!

  • @javilarg
    @javilarg ปีที่แล้ว

    Hi, I was about to make a 7-band audio spectrum visualizer with an Arduino Nano and a MSEQG7 chip, but searching TH-cam I found this project, easier, more powerful and more impressive. Thank you.

  • @azfilmarchive
    @azfilmarchive ปีที่แล้ว +1

    Thanks for a wonderful tutorial. My build went right to work 1st time and the different modes were a delightful surprise. My larger project is to use an IR distance sensor to track trombone slide movements and encode MIDI signals. Besides recording parallel audio and MIDI signals, I can also light 64 individual WS2801 led's in a spiral piano array. Additionally, the MIDI signal operates a silent mono synth that in turn runs your spectrum analyzer. Part an art piece and part a scientific search for patterns in microtonal music. Thanks for adding another dimension to my quest. GCH

    • @ScottMarley
      @ScottMarley  ปีที่แล้ว

      That's a really creative idea, I hope it all works out for you!

  • @dasphantom0439
    @dasphantom0439 ปีที่แล้ว +1

    Hi, awesome work. I tried for so long to understand FFT and how to use it. You made it so clear. Thanks!

  • @OmarVeiga
    @OmarVeiga 3 หลายเดือนก่อน

    Thank you so much for this project. I manages to recreate it using an 8*32 led SPI matrix and a teensy 4.0. This is an amazingly well made and explained project which I had a lot of fun with. Keep up the good work and wish you the very best :)

  • @JohnSmith-iu8cj
    @JohnSmith-iu8cj ปีที่แล้ว

    We need more videos of this vu meter it’s the best thing by far! Nothing else comes near!

  • @Marc_Miller
    @Marc_Miller 4 ปีที่แล้ว +2

    Your videos are excellent Scott. Thank you for making and sharing.

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Thank for your support both on here and Reddit. I really appreciate it!

  • @rgbcrafts
    @rgbcrafts 3 ปีที่แล้ว +1

    ESP32 seems to be perfect for all kinds of pixelart. Your videos make me quite interested in making these projects myself.

    • @AmitRaj-zz9vp
      @AmitRaj-zz9vp 3 ปีที่แล้ว

      Hey brother can you please tell if this code runs in Arduino Uno??

  • @franklincoellofranklin6756
    @franklincoellofranklin6756 3 ปีที่แล้ว +1

    The best video I've ever seen related to FFT!

  • @Edmundajw
    @Edmundajw 3 ปีที่แล้ว +2

    Great video. I have just put together a matrix using a string of WS2815 leds, rearnaged into 10 * strips of 16. I've yet to put together the code, so I'll find this very helpful, as I had intended to do something almost identical to your output. I enjoyed your explanation of the FFT, very scuccint. :)

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      Thank you, best of luck getting everything working!

  • @manoharmanu1460
    @manoharmanu1460 3 ปีที่แล้ว +1

    Well explained Scott, for a complete noob like me this is a life saver of a project . I'll try it out and let you know , keep doing cool stuff

  • @JohnSmith-iu8cj
    @JohnSmith-iu8cj ปีที่แล้ว

    Yo you nailed it with this one I am going to try something Similar based on your code and I am super thankful for the code you provide! I was thinking about something like this for many years, even more so since studying fft and your video and the fft library are a big motivation to get going!

  • @mustafaattar7210
    @mustafaattar7210 ปีที่แล้ว

    Awesome video - been searching for a great use of FTT - well done!

  • @ClaytonDarwin
    @ClaytonDarwin 4 ปีที่แล้ว +2

    Thanks, Scott. Good info. I've been wanting to try this.

  • @Remowylliams
    @Remowylliams 3 ปีที่แล้ว

    Hi Scott, really liked your clear presentation on this. And your project works beautifully. Thank you for sharing.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      Great, really glad you got it to work!

  • @brianmiller6320
    @brianmiller6320 3 ปีที่แล้ว +1

    Thank you, a very good explanation of the FFT function, I understood it! so well done.

  • @cyberbyron
    @cyberbyron 4 หลายเดือนก่อน

    An example of a great video on the topic!

  • @jphdor
    @jphdor ปีที่แล้ว +1

    I just had a try on my esp32 with "Sample_test.ino" and I received very poor conversion time 84.96µS with a max sampling of 11000Hz, reading the comment I found that installing ESP32 1.0.4 version should solve this issue and this is the case I get now 9.23µS and 108332 Hz. I don't know the reason , surely related to clock divider but I can continue now with this amazing project. Thanks a lot.

  • @marinabraho3890
    @marinabraho3890 4 ปีที่แล้ว

    grazie scott per aver condiviso il tuo lavoro

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      No problem, I hope it's useful!

  • @yoted
    @yoted 3 ปีที่แล้ว +1

    Turns out you can also have the ADC sample for you at a provided sample rate, and have it do DMA into buffers which you can then use I2S to read (and avoid spending the CPU time doing the sampling). I’ve been using this on my led strip audio visualizer that I’ve been working on, and it seems to be working great so far.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      If you have an example of how to do that, that would be great. Sounds a little over my head tbh :)

    • @yoted
      @yoted 3 ปีที่แล้ว

      @@ScottMarley looks like youtube deleted my last comment that had links in it, so I'll instead give you a YT video ID of an I2S tutorial for the ESP32: ejyt-kWmys8
      Also, check out the "HiFreq_ADC" example in the I2S folder of the esp32-arduino github for how to configure the internal ADC to give you data with I2S. I increased the buffer size and count from the values in that example to avoid wasting time repeatedly calling i2s_read for only a few samples each time.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      @@yoted great, thank you!

    • @akthem84
      @akthem84 ปีที่แล้ว

      Hey, I was wondering if you can share an example of how to do that, this would be really helpful.

    • @ehoworka
      @ehoworka ปีที่แล้ว

      I would love to see an example of this, sounds GREAT! Thank you.

  • @CharlesLGoodwin
    @CharlesLGoodwin 3 ปีที่แล้ว +1

    Hi Scott,
    You might want to add the line:
    #define BRIGHTNESS 200
    to your ESP32_FFT_VU ino file just to give your fans a less bumpy ride :-)

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      Thanks for pointing that out! This was broken by a pull request that I merged, and don't spot this issue at the time. Should be fixed now, although I haven't tested the code. Cheers.

  • @jj74qformerlyjailbreak3
    @jj74qformerlyjailbreak3 ปีที่แล้ว

    You explained more by, not explaining, than most channels explaining FFT explanations.
    Btw, not-complaining. it’s complicated, in its own sorta-kinda way. Just saying kid, stick with the game, like transforming my brain to type words this way. Math can take numbers and form frequency in a colorful way, pleasing to the eyes displaying it that way. It’s gotta be fun too. Twisting up imagery with words in a vacuum, comment sections my tapestry, when I blow them back out backwards, autocorrect come after me like the woke mob planning for a catastrophe.
    Lol.
    Damn I’m slick.
    God Bless.

  • @Wellan_Qc
    @Wellan_Qc 4 หลายเดือนก่อน +3

    Hey Scott. I know this is a massive shot in the dark but I've been having issues recreating your project because my ESP32 can apparently only read the analog pin at 14kHz. Could you share the exact board you are using or if maybe your ArduinoIDE setup is different if possible? Kinda scared to get into possible solutions like I2c. Great video by the way, got me into making stuff at home and not waiting for school projects to start being interesting.

  • @nozynoz
    @nozynoz 3 ปีที่แล้ว

    Thank you for the fantastic video, very well explained and demonstrated.

  • @utkuserin9750
    @utkuserin9750 3 ปีที่แล้ว +1

    I had not even knew the arduino can take fft of input signal, until I watched this video

  • @MarkAHunter
    @MarkAHunter 2 ปีที่แล้ว

    Skecth ran slowly, but now it flies...
    I had previously commented that, despite following along exactly and trying different board library versions, as suggested in comments, my esp32 ran like a 3 legged dog with asthma, uphill, with a heavy back pack on! However I spotted something (or was that, I missed something) and that was the pin being used in the sketch, pin 35...
    When I checked my datasheet, this was not listed on my esp32 as an audio pin so I simply changed it to a pin that was and bingo...
    The sketch now runs sub 9uS. :-)
    Now whether or not that should have made a difference could be one for debate, but it did solve my problem.

  • @sunrising4931
    @sunrising4931 3 ปีที่แล้ว

    one of the greatest video best tutorial....sir keep going god bless you..i subscribed your channel 2 day before and saw it from recomendation ,know i am fan of yours.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      Thank you so much 😀

  • @danimal_1814
    @danimal_1814 ปีที่แล้ว

    Excellent video Scott. Thank You.

  • @juliocosta5818
    @juliocosta5818 10 หลายเดือนก่อน

    Arduino Nano (ATMega 328 processor):
    Conversion time: 112.00 uS
    Max. sampling frequency: 8928.56 Hz
    Thanks for a helpful video, Scott

  • @laflaf3d
    @laflaf3d 3 ปีที่แล้ว +1

    Great job ! Thanks for sharing !

  • @jstro-hobbytech
    @jstro-hobbytech ปีที่แล้ว

    I love how I understand fft math now haha. It's so cool how it was created un the 1800s was the it

    • @ScottMarley
      @ScottMarley  ปีที่แล้ว

      Gotta admit, I can't do it from scratch, but at least I know how to use it now! Glad it inspired you and I hope you can make something cool with it!

  • @logancoats
    @logancoats 2 ปีที่แล้ว

    So good, thank you for all the info!

  • @raulguevara1944
    @raulguevara1944 ปีที่แล้ว

    Hi Scott, your project is very very very cool.

  • @BrianLough
    @BrianLough 4 ปีที่แล้ว +1

    Love this Scott! I'm planning on making something similar and in was going to use the mseq7 but I think I'll use this instead!

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +1

      Great! It's far less circuitry and much more customisable to do it in software :)

    • @BrianLough
      @BrianLough 4 ปีที่แล้ว

      @@ScottMarley cheaper too 😅

    • @BrianLough
      @BrianLough 4 ปีที่แล้ว

      @@ScottMarley I had a play around with it this evening and I couldn't get it working properly. Does the audio source need to be amplified? Like would a cable from a phone headphone jack to the esp32 be what's expected?
      I wasn't displaying on anything really, I was just printing the value for the top of the line in serial monitor. If I tapped at the line in cable I could see some values, but never anything when playing music.
      Any suggestions?
      (Btw I was using a board that doesn't have pin 35 or whatever pin you were using , so I tried 32 and 33, both were the same, I update the pin in the code each time too)

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      No amplification was required for me, works straight from the headphone output of a phone. What values are you printing out, barHeight? And for each channel? Are you using the circuit for line in given on the GitHub page?You can also play with the AMPLITUDE parameter, lower values make it more sensitive (I think, can't quite remember now!). The input pin shouldn't matter, I'm not doing anything clever here ;)

  • @RixtronixLAB
    @RixtronixLAB ปีที่แล้ว

    Creative video shot, thank you for sharing it, keep it up :)

  • @kingruinous81
    @kingruinous81 2 ปีที่แล้ว

    Scott this product is amazing and your vu meter fft calculator looks better then any I seen online. Do you have a video on how u set up your Vu meter calculator on excel or file for calculator? I'm a beginner and your explanations are easy to follow even with no experience.

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว +1

      The excel file is in the github link in the description if you want to take a look.

  • @qzorn4440
    @qzorn4440 2 ปีที่แล้ว

    very nice and understandable 🤩 now to add some numbers to display values as in a simple spectrum analyzer for trouble shooting power harmonics 🤔 Mmm 🙄 thanks a lot 🥳🐬☕

  • @exlpt2234
    @exlpt2234 5 หลายเดือนก่อน +1

    How are you getting your ESP to sample that fast? Tested mine and the most I could get it up to is 11.36kHz. I read up about using the I2S peripheral and DMA but there's no mention of that here, and yet you can still get it up to >100kHz. Maybe it's the specific board you have?

  • @Enigma758
    @Enigma758 3 หลายเดือนก่อน

    Line/headphone input peak to peak voltage is around 2v, so aren't you losing some resolution with the 3.3v ADC?

  • @ifell3
    @ifell3 2 ปีที่แล้ว

    Awesome, you got another subscriber!!

  • @puddleraker2598
    @puddleraker2598 5 หลายเดือนก่อน

    Hi Scott, Yet another excellent video. Ive been attempting to use an MSGEQ7 to position a servo based on speech (anamatronic project) ; after looking at your work your ESP32 VU meter project, it would appear it might be a viable alternative to use ArduinoFFT. Im definitely in the 'novice' category when it comes to coding so would be grateful for some assistance. As Im only looking at male/female vocal frequencies, I don't require many bands. I also need to average these and map against the range of a servo. How easy is this to achieve?

  • @EnvoyOfFabulousness
    @EnvoyOfFabulousness 2 ปีที่แล้ว +3

    I'm curious which ESP32 you are using. The one I have is outputting an analog read time of 68uS and thus a max sampling frequency of around 14kHz.

    • @akthem84
      @akthem84 ปีที่แล้ว +1

      As per one of the comments and responses below, in the boards manager of arduino IDE uninstall the esp32 board version you are currently having and install the 1.0.4 version. I was having the same issue and this fixed the issue for me! Maybe Espressif have to pay attention for this when they release the 1.0.7 update!

  • @tobiahhowell
    @tobiahhowell 3 ปีที่แล้ว +1

    this is an amazing project and has inspired me to make a large 50x19 led matrix using this code. i cant seem to find the excel spread sheet you used to map out your bands to finish the code. did you make it your self or did you find it online somewhere? I don't think guessing would provide a good look for my bands. keep up the great work!

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +2

      Hi Tobiah, it's on github with the rest of the code. Its called FFT.xlsx

    • @tobiahhowell
      @tobiahhowell 3 ปีที่แล้ว

      @@ScottMarley okay thank you. I must not have seen it while looking through it. Thank you very much! Keep up the awesome work!

  • @PrabuKumarGP
    @PrabuKumarGP 5 หลายเดือนก่อน

    Hi Scott. Thanks for amazing video man. FFT on ESP32 wonderous. A quick question. I tried hooking up line in with a 3.5 audio socket, 2 10k res for mono, 100nf for DC filtering and 2 100k for DC biasing. But when I connect my iPod or phone output to this, I get no audio read in pin 35. I tried changing to 34 and 36 too. But there is nothing there.
    Do I need to use an analog amplifier when using with PC/Mobile/iPod headphone out?
    Thanks for the wonderful explanation about FFT and your code!

  • @fragiggle
    @fragiggle 2 ปีที่แล้ว +2

    I'm doing something extremely similar and your video has been an extremely helpful resource, I've added a few things like an amplitude balancer. I am running into one issue that I don't see how you overcame.
    My analog read function takes 49 microseconds, not 9.7 as documented in code or 10 as mentioned elsewhere. The whole loop takes 52 microseconds and that's a little long for wanting 25 microseconds. I'm struggling trying to find a solution. If you or anyone else knows of one or some hints, That'd be awesome

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว

      This might be not be the issue, but have you tried different pins? I think another commenter mentioned that they had a similar issue and using a different pin as input made it faster. I might be wrong though! The other thing to check is the clock speed. Is it set to 240MHz? Other than that I'm not sure, I'm not an expert on this stuff I just document what I make.

    • @jphdor
      @jphdor ปีที่แล้ว

      Install board support ESP32 1.0.4 version instead of the last one, I just had the same problem

    • @asaleminik
      @asaleminik ปีที่แล้ว

      @@jphdor This worked, thank you so much!

    • @akthem84
      @akthem84 ปีที่แล้ว

      @@jphdor This worked for me. I was having a conversion time of ~54 uS and now having ~9.96 uS. Thank you!

  • @getyerspn
    @getyerspn 4 ปีที่แล้ว +1

    That looks very very cool ..huge thanks for the hard work compiling this tutorial...and an excellent explanation of the sampling mechanism....i have tried fft with 8266 devices but when the WiFi is active it seems to make the ADC input 'noisy' ...have you tried this with WiFi running on the esp32 ..I'm now going to order a few Esp32 board's....on a side note have you seen any of Andrew Tuline's fft stuff ?? he's been doing sound reactive fft projects for a few years and has made some quite artistic lighting projects.

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว +3

      Thanks for your comments, it really was a few days work putting that together even though it might not seem like it! I don't have an 8266, but I know on the ESP32 there are two ADCs, and ADC2 is somehow used for the WiFi. So as the 8266 only has 1 ADC, maybe this has to be shared between the analog pin and the WiFi causing interference? Just guessing here though. Andrew is the chap who does the WLED sound reactive port right? I haven't looked at it yet as I wanted to figure out how to do things myself in the first instance, but I do have an idea for a project that WLED would be good for. Stay tuned!

    • @getyerspn
      @getyerspn 4 ปีที่แล้ว +1

      @@ScottMarley ah so that would explain why the esp32 works where the 8266 doesn't ..well i say doesn't I have had it working with an ADS1115 I2C ADC module but you have to jump through hoops to get the sample rate high enough ...you're version is much easier ....here's hoping you're channel grows...anyway bought some ESP32's .

  • @jaapdoornbos3369
    @jaapdoornbos3369 3 ปีที่แล้ว

    Hi Scott! Again great video! I really enjoy your content! The way you explain everything is super!
    One question. What do you think? Would it make sense to combine FFT with stereo vu meters? It sometimes seems the response time is slow with the mega and two 2813 strips containining 142 LEDS in stereo. Thanks!

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      Thank you! I wouldn't recommend using an Arduino for fft stuff, they're very very slow. Try a teensy or ESP32, the code is the same but they're much faster (16MHz Vs up to 240Mz!).

    • @jaapdoornbos3369
      @jaapdoornbos3369 3 ปีที่แล้ว

      @@ScottMarley Sorry, forgot to mention. I'm thinking about replacing the mega with a Teensy 4.0 or 4.1. I'm struggling a bit with how to make FFT work in stereo line in.

  • @FekadeselassieAshenafi
    @FekadeselassieAshenafi 18 วันที่ผ่านมา

    Thank you it was helpfull, but i had a question, can I use different band out put in to different GPio pin or output pins?
    by doing some adjustments on the code?

  • @randomvideos6944
    @randomvideos6944 2 ปีที่แล้ว

    Just used this code on a 25x15 ping pong ball display like @Bitluni made. One thing to note if you want more that 16 EQ bands you need to modify the array sizes of "peak[]", "oldBarHeights[]", and "bandValues[]" to match the band size (along with modifying the binning if statements)

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว

      Thanks for the advice to help others :)

  • @vtech8716
    @vtech8716 3 ปีที่แล้ว

    Hello Sir, and thanks for your great praject. I integrate a part of your project to my oun ws2812 matrix display, but I need to mirror the view horizontally, because bands goes from top in my case. Good luck

  • @Anger019
    @Anger019 3 ปีที่แล้ว +1

    Greetings. First, thanks for the video and for the device and the code for it! Thanks for the hard work! I repeated the device, but several questions appeared, with which I ask you to help. I do not understand well in such crafts so far .. 1) Your vu meter speed is faster than mine. I have a feeling that it slows down, it does not work so smoothly. Is there something wrong with the firmware? (although it may seem to me ..) 2) Everything works only when the ESP32 is connected to the computer via a usb wire. If you power it separately from the power supply, the entire image on the matrix hangs and does not react in any way to the sound / button. What could be the problem?

  • @ryzie2497
    @ryzie2497 2 ปีที่แล้ว

    This video awsome and your awsome for making it

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว

      Thank you and happy holidays whatever you celebrate :)

  • @marcinzawodnik6317
    @marcinzawodnik6317 3 ปีที่แล้ว

    Great video. 👍

  • @levinsommer371
    @levinsommer371 2 ปีที่แล้ว +1

    Hi Scott, i built my own version with 24 bands, sadly some of the frequency bands on the top part are always maxed out... any ideas what could cause that? (Seems to be affected by the brightness of the matrix, so maybe something corelating with the max amps flowing?) Thanks for the awesome walkthrough video, had alot of fun with this project!

    • @bendtherules0
      @bendtherules0 ปีที่แล้ว +1

      I have also faced that and here are some of the reasons/solutions -
      1. Top bands sum up many frequency bins - so small errors get summed up. Reducing the upper range of max band (264-380 instead of 264-512) helped. Adding a per-band noise level helped (500 for lower band, 1500 for highest band).
      2. Changed the amplitude sum to bar height mapping - made it logarithmic scale and used some y = a + bx + cx**2 formula. For ex. when your Tv/computer is at 50% volume, the amplitude is not half of max amplitude, it's probably around 1/4th.

  • @kamhinsee2595
    @kamhinsee2595 2 ปีที่แล้ว

    Hi Scott, your project is very cool.
    I am currently doing a school project with STM32F103 MINI V3 development board to make a Music LED Spectrum Analyser like yours. May I know which module would you use in the line-in setup for receiving an audio signal from a computer or phone?

  • @xiaotianzhang3038
    @xiaotianzhang3038 ปีที่แล้ว

    ! Thank you so much for the clear description of FFT as well as the library. I'd like to ask if it's possible to read the data from Bluetooth? I mean using the A2DP library to feed audio signal instead of line in. I've seen other people do this but none comes with an explanation of their code. Thanks in advance!

    • @ScottMarley
      @ScottMarley  ปีที่แล้ว

      That's a good question, I suppose it should be, but I've never played with the BT stuff on the ESP so I don't know for sure!

  • @band5680
    @band5680 3 ปีที่แล้ว

    Hi Scott,
    thanks a lot for the time you took in sharing your project!
    If you can, why don't you set the sampling frequency higher, to 100kHz for example? Wouldn't it also shrink the latency time? After sampling the audio pin in 9.7microseconds the program waits nearly 15microseconds, before the next sample. After 1024 samples the for-loop ends and the FFT starts, right? That adds up to an unnecessary delay of ~15milliseconds.
    This is my first arduino/esp32 project and I also haven't coded before, so please correct me if I'm wrong :D Thanks!
    Max

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      You could try that and see what happens, however I'm not sure what benefit it would bring. If you're using e.g. a MAX4466 based microphone, the 3dB point is at just 6kHz and by 20kHz its basically zero. A line-in would be better of course, but when I tested my hearing response, I could only get up to about 18kHz before I couldn't hear anything at all. Plus, extra time is required to do the FFT calculations, create the patterns and output the LED data to the matrix. However, do let me know if you do try it and of you get reasonable results.

  • @Mark-th1gn
    @Mark-th1gn 3 ปีที่แล้ว +2

    Hello, thanks for the amazing video. I already had a DOIT ESP32 unit so i decided do make this. I am already quite far. I only have one issue and that is that my ESP32 has a conversion time of 52.17 uS, so a max sampling freq of 19166.64 Hz
    . I am still reading into the documentation in order to improve this. Do you have any leads?

    • @tofek321
      @tofek321 3 ปีที่แล้ว +5

      Someone responded to similar problem down below: "If you install the 1.0.4 version of the ESP32 board via the Boards manager and re-run the sample code it does give a result of 9.73uS."

    • @Mark-th1gn
      @Mark-th1gn 3 ปีที่แล้ว +1

      @@tofek321 It actually did the trick. Thanks for the reply.

  • @TKleinschmidt
    @TKleinschmidt 2 ปีที่แล้ว +1

    My nodemcu esp32 board only manages 18khz, which is very confusing ... Shouldnt those boards all be the same open source hardware? I reduced the sampling freq to 18khz for now, but results should be worse, i fear. Could you link boards that worked out well for you?
    i also came across the problem, that my sensitivity usually is way off. any ideas on how to automatically adjust it?

  • @babaksalami3616
    @babaksalami3616 5 หลายเดือนก่อน

    Hello Scott, I used your code and made a spectrum analyzer and edited your code a little, which of course turned out to be very beautiful. I made this device in 24 bands and 18 pixels high. But the audio analysis speed is a little lower than your device... Is there a way to increase the speed? In addition, I tried a lot to create a peak pause, but unfortunately I haven't succeeded yet... Do you have a way to solve these issues? Thank you very much.. by the way I am new to coding!

  • @mamax73
    @mamax73 ปีที่แล้ว

    Great tutorial. I do not have this led breakout but I will try to adapt your code to work on an optimized and very fast oled library I wrote for SSD1331 and SSD1351 color oleds (96x64) and (128x128).
    I have a question for you... what ESP32 Arduino Core version do you used to make this ? I tried your code to get max sampling rate from ADC but using last 2.0.6 core I get about 11Khz max and a sampling time about 90us on Wemos D32.
    Instead using ADC over I2S DMA the max sampling rate from core examples sketch is 277 Khz.
    Probably something was changed in the core.
    Anyway, the library I wrote is hardware optimized and permits very high refresh rate, I can stream videos from microsd up 140 FPS with both ESP8266 and ESP32 so I think results shoud be good and fast. For ESP32 I just used single core, so probably It can be optimized more. But note that SSD1331 have a very small display, about 2.5x2 cm.
    Before to do it, I have to use FFT arduino library for a bit different project, I need to acquire audio from I2S microphone use FFT to get a frequency and convert it to midi. I have no problems for midi and others stuff but my problem is FFT library, I never used it. I found a couple of tutorials on how make a spectrum analyzer, but I do not need to get all bands to show, instead i need to just know an most precise possible the dominant frequency that is at higher level, the fundamental of a voice or whistle over a microphone.
    You think Great tutorial. I do not have this led beakout but I will try to convert your code to be working on an 96x64 optimized and very fast library I wrote for SSD1331 and SSD1351 color oled. This library is hardware optimized and permits very high refresh rate, I can stream videos from microsd up 140 FPS with both ESP8266 and ESP32. For last I just used single core, so probably It can be optimized more. Before to do it, I have to use FFT arduino library for a bit different project, I need to acquire audio from I2S microphone use FFT to get a frequency and convert it to midi. Please is that possible? I have no problem for midi and others stuff bu my problem is FFT library I never used it. I found a couple of tutorials on how make a spectrum analyzer, but I do not need to get all bands to show, instead i need to just know as most precise possible the dominant frequency that is at higher level, eg. the fundamental of a voice or whistle over a microphone.
    Please do you know is that is possible ? Should be realtime...
    Many thanks

  • @manueleschborn9371
    @manueleschborn9371 ปีที่แล้ว +1

    Hey Scott! I really like your Project and I'm trying to build a simliar one. I'm using an ESP-WROOM-32, but my max datarate is 10 times lower than yours. Do you have any idea why this might happen?

  • @glitch3154
    @glitch3154 2 ปีที่แล้ว

    Hey @Scott Marley , I know this is quite an old video, but I did have one quick question regarding one of the animations if you were still around?
    I have more or less completed this project (Awesome video, major thanks for making this), however, all of the light patterns work correctly apart from the purple and blue gradient one named "purpleBars" in the code. the bars function correctly, however, the purple part is placed randomly among the blue bars rather than at the top as an even gradient as you demonstrated, and seems to be glitch around as the bars shift. Any idea what might be causing this?
    Thank you for your time!

  • @krislivingston5848
    @krislivingston5848 ปีที่แล้ว

    Hi Scott, great video, very helpful! I made my own using a 64x32 LED matrix from Adafruit, and after a lot of tweaking of parameters, I got it to work. But there are some low-end bands that are blank due to the output of the spreadsheet. I used these inputs: sample rate: 28000, Lowest freq. band: 20, highest band: 14000, # of samples: 512, # bands: 32. The resulting code generated in the table includes many lines like this: if (i>1 && i 1 AND

  • @alexbraddock7670
    @alexbraddock7670 3 ปีที่แล้ว

    Great video. I don't know much about electronics, and I was wondering if the sound input could come from the left and right outputs from a Marantz receiver? Would the amplification be too much or is it the same as a 3.5mm output?

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      Don't connect this to the speaker outputs unless you know how. The maximum analog input for the ESP32 ADC is 3.3V. An amplifier can run at much higher voltages than that (10s to 100s of volts depending on the power) and will destroy the ESP. If you *must* do this, you will need to use a voltage divider before the ESP, but how you do this will depend entirely on the voltages that your amplifier provides. The amplifier surely has some kind of lineout you could use?

  • @thefrugalphotographer
    @thefrugalphotographer หลายเดือนก่อน

    Hi, I'm hoping you can help me. I have just started with Arduino and have been trying to make a spectrum analyzer using various codes for projects like these downloaded and run in my IDE. I have the latest "arduinoFFT" library 2.0.2 by Enrique Condes but every project I try returns the fault: error: 'arduinoFFT' does not name a type; did you mean 'ArduinoFFT'?
    arduinoFFT FFT = arduinoFFT(); I can see the difference between "arduinoFFT" and "ArduinoFFT" but the code obviously works for others so why do I get a fault for each project?

  • @sirkonotor7557
    @sirkonotor7557 2 ปีที่แล้ว +2

    So I bought my first esp32 for this project. Tested the sampling rate and the highest I can get is is ~12khz. Is there anything I can adjust or do I need to get a different board?

    • @jphdor
      @jphdor ปีที่แล้ว

      Install board support ESP32 1.0.4 version instead of the last one, I just had the same problem

    • @sirkonotor7557
      @sirkonotor7557 ปีที่แล้ว

      @@jphdor Thank you !!

  • @dhwroco
    @dhwroco 2 ปีที่แล้ว +1

    Is the excel sheet available online? How are the bands and their respective frequency being divvied up? Amazing video by the way I learnt allot! :)

    • @johncoops6897
      @johncoops6897 ปีที่แล้ว

      Why don't you pay attention to the video and read what the author published? That way, you won't need to ask silly questions.

    • @dhwroco
      @dhwroco ปีที่แล้ว

      @@johncoops6897 true!!! Man imagine trying to learn something quicker through experimentation and using prior knowledge. Couldnt be me :) I will literally never use FFT again and if im using it for a passion project Id rather keep it as that a passion project. If only I was as smart as you!!!!!

  • @yug__share
    @yug__share 2 ปีที่แล้ว

    Génial !

  • @XPS805
    @XPS805 ปีที่แล้ว

    Hello everyone. i got a question and hopefully someone can help me :)
    i wired up my ESP32 (Dev KitC V2 ESP32-WROOM-32) Line in version as you can see @10:48 and dont know what i got to set in the WLED app to make it respond to the sound

  • @ryandhowell07
    @ryandhowell07 3 ปีที่แล้ว

    First, great video and explanation of the science behind the FFT library. It inspired me to build my own LED matrix. I built it in exactly the same configuration that you did, with the copper tape running up the sides for the power and ground and the signal wiring connecting each strip on the back of the board. Lights work great. However, when I upload the code, with the 16-band configuration, my matrix shows a mirroring effect--meaning that when I run a frequency tone test, instead of the columns lighting up left to right like yours did as you increase the frequency, both the left AND right columns light up and meet in the middle and proceed to end on the opposite ends. Did you change the code to produce this effect or would this indicate that I have an issue with my wiring or circuit setup?

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      That's very weird! There were a couple of changes made to the code a while back but nothing that should have caused that to happen. I haven't looked at this in a long time, but if I'll check tomorrow to see if there is a bug somewhere.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      I just checked and it works fine for me, so it's possible that your matrix is wired end to end (all strips facing the same direction) rather than serpentine. I've updated the code on GitHub, download the new version and change #define SERPENTINE to false and see if that works for you.

    • @ryandhowell07
      @ryandhowell07 3 ปีที่แล้ว

      @@ScottMarley That's it! Problem solved, works great now! Thanks SOO much for helping out this noob with the updated code. I figured since you wired your LED's all in the same direction that the code would work with that configuration. So did you re-wire your LED's in a serpentine config? Thanks again, you saved me hours of headache.

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      @@ryandhowell07 Yes, at some point I rewired it to serpentine as it looks neater and it turned out that most examples assumed that layout. Sorry about that!

  • @dMaouSama2761-f6m
    @dMaouSama2761-f6m ปีที่แล้ว

    Hello, I would like some help with the following:
    I have a 7018b touch screen on which I made a boom box
    and I want to connect the audio output directly to the Arduino uno that will connect the lieds board
    8x32 led RGB panel to the rhythm of the music without using the Sound Sensor. Where can I find the schematic and code? I used sp107e box and it doesn't work properly because the leds go up and down even without music.

  • @danmyself5341
    @danmyself5341 ปีที่แล้ว

    Arduino: 1.8.19 (Windows 10), TD: 1.57, Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
    Marley_spectrum_analyser:46:28: fatal error: audio_reactive.h: No such file or directory
    compilation terminated.
    exit status 1
    audio_reactive.h: No such file or directory
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.
    This is the message I get, the library is not listed in my library, please help !

  • @muratborazan8337
    @muratborazan8337 ปีที่แล้ว

    hello, I couldn't find instructions for turning the leds vertically and horizontally in the arduino code, can you help?
    Since I connected the leds vertically, a horizontal image was formed. how can i rotate

  • @PavolFilek
    @PavolFilek ปีที่แล้ว

    Nice

  • @macieju-1974
    @macieju-1974 4 หลายเดือนก่อน

    Hi,
    Sorry but I regret to say that the code cannot be compiled in Arduino: displays error:
    “/home/macieju/Desktop/Arduino_ESP32_FFT/Arduino_ESP32_FFT.ino:136:3: error: 'FFT' was not declared in this scope
    FFT.dcRemoval();
    Compilation error: invalid use of template-name 'ArduinoFFT' without an argument list”

    • @dominikpi7778
      @dominikpi7778 4 หลายเดือนก่อน

      Use older version of library 1.6xxx

  • @harshapcb4734
    @harshapcb4734 ปีที่แล้ว

    how to do upload this code for esp 32 board ? . what is select board for arduino IDE ? Please help me. Thank you.

  • @javilarg
    @javilarg ปีที่แล้ว

    Hi Scott, I saw your 3D printed spectrum analyzer (amazing project) that uses a INMP441 digital mic and I’m trying to adapt that code to this first version, because I prefer a physical control rather than depending on a smartphone, but my experience with C is limited, and I’m not able to find the exact part that manages the audio input. Could you please help me? TIA.

  • @Smeatsbeats
    @Smeatsbeats ปีที่แล้ว

    Hello. Thank you for yet another fantastic video. I've used the suggested code to check the sampling rate of my ESP32 and I'm getting nowhere near what you are. Mine comes out closer to 11 kHz! I don't think I've made a typo in the code... I'm using pin 33 of my uPesy ESP32 Wroom DevKit board. Is there a faster pin, or is this a slow board? Any help would be much appreciated!

  • @medb2322
    @medb2322 2 ปีที่แล้ว

    Hi scott great video in my case im using esp8266 so i want to know this code will work fine on it and also I do not have a led matrix so how can I display the result on a serial plotter ??

  • @aGGreSSiv
    @aGGreSSiv 2 ปีที่แล้ว

    Hello. I need your help with something. I enter the 5V supply from the adapter to the matrix panel, it is also connected to the 5v input of the microprocessor. it's already a simple circuit, after all, there is nothing but a panel and a microphone. When I energize everything works great. After a while, random LEDs start to light up in the animation. Then smoke comes out of the ESP32. what am i missing? Is the panel somehow drawing current from the microprocessor? What should I do to prevent this?

  • @jozsefcsiza2760
    @jozsefcsiza2760 3 ปีที่แล้ว

    Nice tutorial.
    Try this for a faster result:
    void loop() {
    //Leave this loop empty!
    }
    void MyLoop(void *) {
    for (;;)
    {
    //Write here all the codes from the original loop void
    }
    vTaskDelete(NULL);
    }
    void setup() {
    //Your setup codes....
    xTaskCreatePinnedToCore(MyLoop, "MyLoop", 40000, NULL, 1, NULL, 0); //40000 is 40KB stack size. The 0 at the end is the first Core, if you use number 1 it will use the second Core.
    }
    Cheers.

  • @CharlesLGoodwin
    @CharlesLGoodwin 3 ปีที่แล้ว

    Hi Scott,
    Love what you have done here and can't wait to extend my latest project to include FFT
    One quick question - I have the microphone amplifier MAX4466 with adjustable gain but I don't know what I should set it to or how I should go about it.
    I've already reproduced Dave's (G6EJD) example but whist blindly meddling (as one does) the adjustable screw broke off!
    Is this something I can stay clear of for this project or is there a calibration exercise that you would recommend?

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      I just left it at the halfway point and then played about with the numbers in software until it looked about right. That adjustment pot is really fragile, I've broken them in the past too.

    • @CharlesLGoodwin
      @CharlesLGoodwin 3 ปีที่แล้ว

      @@ScottMarley Thanks Scott - Glad it's not just me :-)

  • @shajih7947
    @shajih7947 2 ปีที่แล้ว +1

    Are you selling this? if yes can you pls say the details of this vu meter, And where are you staying now, I’m from India,Kerala.
    I’m interested to buy this vu meter

    • @ScottMarley
      @ScottMarley  2 ปีที่แล้ว

      No, it's not for sale. You can make one yourself of you follow the instructions :)

  • @sheonbanks2389
    @sheonbanks2389 2 ปีที่แล้ว

    ...the reason I ask is it works yet I get several cycles of good data in the bands then it goes haywire fir a few cycles and then the good data comes back. This is constant. Is there some sort of interrupt in the code could be taking place or could it be timing? Any thoughts of what it could be? I am very new to this but I am a quick learner.

  • @phillipzx3754
    @phillipzx3754 2 ปีที่แล้ว

    " It can have any number of bands"
    Does the ESP32 have the muscle to support 31 bands? Not that it's needed (I have a 128 band RTA) but the eye-candy would be fantastic.

  • @luigimorelli6444
    @luigimorelli6444 3 ปีที่แล้ว

    Nice work!
    Did you take the line from the amplified signal, in parallel with the loudspeakers?
    No impedance change in the loudspeakers nor spurious interferences to the signal, giving distortions?

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      No, it takes a line-in. Be careful if you use the speaker cable. The maximum input voltage on an ESP is 3.3V, speakers are driven far higher than that usually so you would need a voltage divider etc.

    • @luigimorelli6444
      @luigimorelli6444 3 ปีที่แล้ว

      @@ScottMarley Thank you for the reply. I was afraid that the line-in level was too low and should be amplifieed..

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว +1

      @@luigimorelli6444 make sure you look at the circuit diagram on GitHub. It is very low level, but that's ok. I actually find it works best using a microphone instead.

  • @anakrantau1782
    @anakrantau1782 5 หลายเดือนก่อน

    Hi Scott, If I want to assemble it with 20x16 LEDs, what should I modify?

  • @mtjmassiv
    @mtjmassiv 3 ปีที่แล้ว

    Scott - this is so good! I built my own using your instructions and an 8 x 32 matrix. Looks great :) One thing I'm finding is that if I power both the ESP32 and lights from 5V 10A female adaptor, the ESP32 reboots if current is too high (this is qualitative based on observing my brightness setting/no. of LEDs on display). If I power ESP32 separately via computer's 2A USB, I don't see this problem. Any clue what might be going on? Happy to share code / diagram if you're up for it :)

    • @ScottMarley
      @ScottMarley  3 ปีที่แล้ว

      Sounds like exactly what you said, the LEDs are drawing too much power. At max load, your matrix could theoretically draw 8 X 32 X 60 mA = 15A. If your power supply is a cheap one (you know the eBay type) I wouldn't use it for more than half it's rated current (5A). Or just keep the brightness down, I don't use a birghtness of more than about 100 and that helps greatly.

    • @fabrizioalunnisolestizi434
      @fabrizioalunnisolestizi434 2 ปีที่แล้ว

      Ciao matt Jones, anche io ho una matrice 8 x 32 ma non riesco a farla funzionare nel verso corretto. Potresti inviarmi i tuoi codici? grazie

  • @shohjahonrazzoqov2125
    @shohjahonrazzoqov2125 ปีที่แล้ว

    hi scott, thanks for your great project, i'm trying it at the moment, but i'm having problems uploading code to esp32, it throws an error when compiling for esp32 dev module board. Can you help me please.

  • @JosephM101
    @JosephM101 11 หลายเดือนก่อน

    I would like to be able to use an FFT to decode AFSK on an ESP32 from a microphone, but the process is super sensitive to latency. Any suggestions?

  • @monapistauer3804
    @monapistauer3804 4 ปีที่แล้ว

    Really great and helpful:) But I was wondering if you could tell me how you calculated the frequency multiplier and the center bin, because I can't find any information about that in the video and I'm new to FFT so this really would be helpful. Thank you:)

    • @ScottMarley
      @ScottMarley  4 ปีที่แล้ว

      It's a bit difficult to explain in a comment here. Have a look at the Excel sheet on GitHub, and all the equations are in the appropriate cells. You can work backwards from whatever you're trying to figure out!

    • @monapistauer3804
      @monapistauer3804 3 ปีที่แล้ว

      @@ScottMarley oh, should have done that in the first place, kinda forgot. Thank you very much

  • @souravdas6530
    @souravdas6530 2 ปีที่แล้ว

    Hello sir please help
    How to add (EEPROM memory) for last pattern save option to the software. I don't know anything about coding it possible kindly help me please