ESP32 spectrum analyser VU meter using arduinoFFT and a FastLED matrix

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

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

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

    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 ปีที่แล้ว +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 2 ปีที่แล้ว +4

    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!

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

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

  • @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!

  • @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.

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

    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 :)

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

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

  • @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!

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

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

  • @azfilmarchive
    @azfilmarchive 2 ปีที่แล้ว +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  2 ปีที่แล้ว

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

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

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

  • @rgbcrafts
    @rgbcrafts 4 ปีที่แล้ว +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??

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

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

  • @Edmundajw
    @Edmundajw 4 ปีที่แล้ว +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  4 ปีที่แล้ว +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

  • @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!

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

    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!

  • @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!

  • @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 2 ปีที่แล้ว

      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.

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

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

  • @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 ;)

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

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

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

    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  4 ปีที่แล้ว

      Thank you so much 😀

  • @Wellan_Qc
    @Wellan_Qc 8 หลายเดือนก่อน +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.

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

    An example of a great video on the topic!

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

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

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

    grazie scott per aver condiviso il tuo lavoro

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

      No problem, I hope it's useful!

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

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

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

    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?

  • @exlpt2234
    @exlpt2234 10 หลายเดือนก่อน +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?

  • @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.

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

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

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

    Hi Scott, your project is very very very cool.

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

    Hello, excellent video very informative and easy to follow. I have been wanting to build a software spectrum analyser for a while, there is a place that you have shared your FFT calculator?

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

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

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

    i keep on getting error arduinoFFT' does not name a type; did you mean 'ArduinoFFT, while compiling. please help

  • @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

  • @EnvoyOfFabulousness
    @EnvoyOfFabulousness 3 ปีที่แล้ว +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 2 ปีที่แล้ว +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!

  • @fragiggle
    @fragiggle 3 ปีที่แล้ว +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  3 ปีที่แล้ว

      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 2 ปีที่แล้ว

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

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

      @@jphdor This worked, thank you so much!

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

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

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

    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.

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

    Hello. i just bought an ESP32 module, when i try to run your test i got:
    14:50:59.321 -> Conversion time: 53.85 uS
    14:50:59.321 -> Max sampling frequency: 18570.64 Hz
    so under 20KHz... that shouldn't be that low right?

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

      They seem to vary a lot. Not sure why as I'm not an expert on these things! You could build it anyway, it will still look pretty just won't be as accurate. The microphone won't pickuo up to 20kHz anyway

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

      Hey Stefano, I had the same experience with every ESP32 I tried (I think 3 or 4 different in total) being much, much slower than what I saw in videos I watched.
      Try running yours with a sampling frequency of 30,000 Hz and 256 Sample Size. From what I tried with mine that seemed to provide decent performance. 40 KHz and 1024 Samples always produces a slideshow for me.

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

      @@EnvoyOfFabulousness i tryed 8kHz and 32 sample, still not working

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

      From other replies, change the version of your esp32 firmware in the arduino IDE boards manager to 1.0.4 as 1.0.5 and 1.0.6 return the slower sampling rates you are experiencing.

  • @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?

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

    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

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

    Can we do this by using esp8266

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

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

  • @aliailyari-us7lq
    @aliailyari-us7lq หลายเดือนก่อน

    Hello, I wish you would also include a tutorial on transferring codes for beginners like me.😢

  • @jphdor
    @jphdor 2 ปีที่แล้ว +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.

  • @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.

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

    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.

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

    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

  • @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.

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

    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!

  • @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 .

  • @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?

  • @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 2 ปีที่แล้ว

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

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

      @@jphdor Thank you !!

  • @tobiahhowell
    @tobiahhowell 4 ปีที่แล้ว +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  4 ปีที่แล้ว +2

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

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

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

  • @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.

  • @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?

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

    I have complied on ESP32 then the result like those. Can you help me. Thanks
    Conversion time: 42.34 uS
    Max sampling frequency: 23620.24 Hz

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

    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?

  • @CharlesLGoodwin
    @CharlesLGoodwin 4 ปีที่แล้ว +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  4 ปีที่แล้ว

      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.

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

    Hello. I am making a system similar to this but I need to invert the matrix horizontally and vertically. What path can I follow? my matrix horizontal 6 vertical 20

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

      Look up the adafruit instructions for neomatrix. That explains the things you need to change in the code to rotate the matrix

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

      @@ScottMarley Do you know a link about it?

  • @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?

  • @VuLe-jn8ku
    @VuLe-jn8ku 3 ปีที่แล้ว +1

    I use Board ESP32- Devkit V1. But Max sampling frequency is 16khz. No 100khz. Please help me.

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

      Make sure the clock frequency is set to its maximum, but other than that I have no idea, sorry!

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

      At the boards manager in arduino ide install a previous version of the esp32, the latest 1.0.5 is not as good as an older version.

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

      Did you could solve your problem? my ESP32 clone is showing: Conversion time: 52.93 uS
      Max sampling frequency: 18893.39 Hz

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

      I just find: #include "esp32-hal-cpu.h" and
      in the setup: setCpuFrequencyMhz(240);
      and to read:
      Serial.print("CPU Frequency is: ");
      Serial.print(getCpuFrequencyMhz()); //Get CPU clock
      Serial.print(" Mhz");
      Serial.println();

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

      @@jozsefcsiza2760 Thank you very much, it worked for me installing the 1.0.4 version. Conversion time: 9.74 uS
      Max sampling frequency: 102671.92 Hz

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

    ...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.

  • @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

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

    Hi scot, can you please help me to make your code to run on Nextion Display.... each band data will map to run progress bar property ... eight or 16 progress bar in vertical position of Nextion display. Thank you.

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

      I will use arduino NANO

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

    Good job.
    Is it possible to change the code to use a led strip ws2812b instead of the matrix?
    I would like to cut the led strip in 8 parts with 30 led and create 8 channels, the first being starting at led 0 to 30 for "center bin 2", from led 31 to 60 for "center bin 4", led 61 to 90 for "center bin 9" .....
    It's possible?
    sorry for my English.

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

      Yes, that will work fine. Just wire the strips up from one to the next and edit the xy code for however yours is wired up. Mine is simply 16 strips of 16 LEDs wired from one to the next. You will need to understand how the xy code works to make the changes yourself.

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

      @@ScottMarley
      For me it is impossible to change the code, I did not understand the code.
      Scott Marley could you send me the changes?
      thank you.

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

      I'm afraid not, I don't have the time. Spend some time learning how this all works and you'll be able to create your own amazing things!

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

    I tried writing fft on my own.But It is not efficient enough.complex calculations makes the problem lot harder.Is there an efficient way to implement complex numbers.I used a 2d matrix (2 columns) to do my claculations and I think it makes the program lot slower.And is a buffer with 1024 samples enough to implement ?

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

      The Arduino fft functions have been written to be very efficient, using special techniques to save CPU cycles and RAM. Is there any reason why you want to write your own version? It's not trivial, and you would have to have a good knowledge of both mathematics and C++

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

      @@ScottMarley just for fun actually.I know the mathematics behind it to some extent but im not very much good at c++ and optimization.

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

      @@SLguitarGuy for fun is a good reason! There is info on the Arduino library implementation here wiki.openmusiclabs.com/wiki/ArduinoFFT and it details some of the optimisations that have been made.

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

      @@ScottMarley thank you very much.really appreciate it

  • @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

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

    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 🥳🐬☕

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

    ! 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  2 ปีที่แล้ว

      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!

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

    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?

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

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

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

    hi
    how i can use the inmp441 microphone?

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

    So good, thank you for all the info!

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

    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?

  • @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.

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

    Hello Scott Marley,
    I have a problem regarding the Max sampling frequency of my ESP32's, running the test shows that the conversion time is 53 µs and therefore the max freq. is only 18kHz which translates to 9kHz Audio.
    My ESP's are way slower than yours, do you have a clue?

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

      Hi Yiruma. As mentioned below by Marek Bohumsky 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. I had the same issue and changed the code for the lower sample rate. Now that I have also found the answer (from below) I will try it with the corrected code. Just passing it on, hope this helps.

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

      @@andrewmcwhir8973 Thank you very much, I'll try that! :)

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

      @@andrewmcwhir8973 It works fine, thank you!

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

      @@andrewmcwhir8973 Thanks, that worked for me aswell.

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

    Hi i have a ESP32 as well, but it isnt nearly as fast as yours, only 10000Hz... eventough the cpu runs on 240mhz, can you help me please?

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

      I get ~18400Hz. Any idea why is the differing results?

  • @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!

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

    Great job ! Thanks for sharing !

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

    I know this is a really old video, but would you mind posting your spreadsheet, or the maths that go into it? I'm having a little trouble recreating it, and it would be a MASSIVE help for writing a more generic binning function. Thanks!

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

      It's in the github page

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

    Hi. Would it work if i make a matrix 8 bands/strips and 20 leds/band with ws2812b strips? Thx in advance

  • @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?

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

    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!

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

    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  2 ปีที่แล้ว

      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!

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

    Can you also use a MAX9814? I'm thinking the auto gain could be nice for adapting to volume? I'm making a similar project, it'll actually be a sound reactive infinity cube inspired by one of your other videos. Hopefully it turns out.

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

      Yeah, I dont see why not. I think I've used that before for something. These days I tend to just use digital mics like the INMP441. Much more complicated to set up, bit much better audio quality.

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

      @@ScottMarley Cool, thanks! Can't believe how fast you responded too!

  • @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.

  • @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 :)

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

    Awesome, you got another subscriber!!

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

    Amazing!

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

    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 9 หลายเดือนก่อน

      Use older version of library 1.6xxx

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

    " 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.

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

    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

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

    so i've tried this and it works so far. I also tried to split the line in so that I can plug in my headphone but then it stopped working for some reasons. Could it be the voltage drop after splitting?

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

      This seems to work with some inputs and not others. I believe it is to do with the impedence of the things that are plugged into it, causing a voltage drop as you say. The 'proper' way to do this would be to use an opamp as a buffer between the connected devices (as they have very high input impedance), but was a bit complicated to show in this video.

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

      Adding on to this, if I slap a buffer/voltage follower with an ne5532 right before the esp32 input pin, that should work a treat for this problem right?

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

    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 ??