ESP32 spectrum analyser VU meter using arduinoFFT and a FastLED matrix

Поділитися
Вставка
  • Опубліковано 23 січ 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.

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

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

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

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

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

  • @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 UA-cam I found this project, easier, more powerful and more impressive. Thank you.

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

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

    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!

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

  • @JohnSmith-iu8cj
    @JohnSmith-iu8cj 2 роки тому

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

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

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

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

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

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

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

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

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

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

    Can we do this by using esp8266

  • @abhilashramachandran5921
    @abhilashramachandran5921 Місяць тому

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

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

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

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

  • @brianmiller6320
    @brianmiller6320 4 роки тому +1

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

  • @cyberbyron
    @cyberbyron 8 місяців тому

    An example of a great video on the topic!

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

  • @marinabraho3890
    @marinabraho3890 4 роки тому

    grazie scott per aver condiviso il tuo lavoro

    • @ScottMarley
      @ScottMarley  4 роки тому

      No problem, I hope it's useful!

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

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

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

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

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

    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?

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

    hi
    how i can use the inmp441 microphone?

  • @exlpt2234
    @exlpt2234 9 місяців тому +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 7 місяців тому

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

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

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

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

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

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

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

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

    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

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

    How do you calculate the band width? I need it to use 45 bands

  • @nozynoz
    @nozynoz 4 роки тому

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

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

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

  • @thefrugalphotographer
    @thefrugalphotographer 5 місяців тому

    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?

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

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

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

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

  • @achrafoujjaker4806
    @achrafoujjaker4806 4 роки тому

    Can you show me please how you get the Frequency multiplier per band and the low and the high bin that exist in the Excel

    • @ScottMarley
      @ScottMarley  4 роки тому +1

      You need to complete everything in the green box on the Excel sheet and everything else is populated automatically. To see how I calculated these, look at the equations in the Excel sheet.

  • @KOBROW
    @KOBROW 6 місяців тому

    hi,,?? code for wimos d1 mini... please

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

    Hi Scott, your project is very very very cool.

  • @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 8 місяців тому

      Use older version of library 1.6xxx

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

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

  • @rasheedelhanout599
    @rasheedelhanout599 4 роки тому

    Hello everyone,
    Can somebody tell me how i can change te XY function to a serpentine matrix starting left bottom, goining up, then down, then up, ... all the way to the right. My matrix is 14 leds wide and 20 leds high.
    This would help me a lot,
    Rasheed

    • @marcosanti2357
      @marcosanti2357 4 роки тому

      Had the same question. I want to align my LED strip vertically starting from bottom-left, going vertically up, then going down on the second band, going up on the third band ... and so on.
      I have the version with 144 LEDs/m where the vertical distances between LEDs are smaller than the horizontal distances. I'd rather get smaller distances vertically within each band and wide distances between the bands.
      Scott provided a solutuion in another comment pointing to pastebin.com/cBa3rSNX
      This works great for a setup with equal rows and columns - not for unequal ones (tested it).
      Not giving up I came across forum.arduiono.cc/index.php?topic438841.0
      This code does the trick for me.
      //works only for serpentine layout
      uint16_t XY( uint8_t x, uint8_t y) {
      uint16_t i;
      if(x & 0x1) { // is X odd
      i = x * kMatrixHeight + (kMatrixHeight -1 - y) ;
      } else { // x is even
      i = x * kMatrixHeight + y;
      }
      return i;
      }
      This is such a great project from Scott. ABSOLUTELY AWESOME Scott.

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

  • @SuperCombatarms
    @SuperCombatarms 3 роки тому

    Doing 1 million reads on my arduino uno takes forever, for some reason its extremely slow even though arduino is capable of much faster. What can i be doing wrong?

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

    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 !

  • @pavelkonjok7201
    @pavelkonjok7201 4 роки тому

    can make the bottom row always light up and change the color automatic?

    • @ScottMarley
      @ScottMarley  4 роки тому

      Of course, you can change the code to do whatever you want it to do!

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

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

  • @pcarbery
    @pcarbery 3 роки тому

    I wonder could this be integrated into a bluetooth speaker....i.e. send the music via bluetooth to the ESP32........play the music on battery powered speakers .......and display the spectrum on the same systems.....now that would be a nice project

    • @ScottMarley
      @ScottMarley  3 роки тому +1

      Yes you could, see github.com/pschatzmann/ESP32-A2DP for one way of implementing a BT audio receiver. You'd probably want an I2S DAC linked to the ESP, then an audio amplifier connected to that. You could use the DAC on the ESP, but I'm not sure how it would sound.

    • @pcarbery
      @pcarbery 3 роки тому

      ​@@ScottMarley I appreciate the reply Scott........I am now thinking of buying a Bluetooth enabled amplifier from Aliexpress and feeding the output into the ESP32 (and to the speakers)...............that way the ESP32 is doing only one thing........

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

  • @utkuserin9750
    @utkuserin9750 3 роки тому +1

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

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

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

  • @logancoats
    @logancoats 3 роки тому

    So good, thank you for all the info!

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

  • @laflaf3d
    @laflaf3d 4 роки тому +1

    Great job ! Thanks for sharing !

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

  • @androidtelefon
    @androidtelefon 4 роки тому

    Is it possible to use this application on Arduino nano? Tell me what pins to specify?

    • @ScottMarley
      @ScottMarley  4 роки тому +1

      You can't use this code on a nano, it's much too slow I'm afraid. If you really want to do it, check out the FHT library wiki.openmusiclabs.com/wiki/ArduinoFHT

    • @Escapeback
      @Escapeback 3 роки тому

      thx man
      Version 1.0.4
      board AZ delivery WROOM 32
      Arduino IDE ESP32 DEV Modue
      Conversion time: 9.71 uS
      Max sampling frequency: 102948.76 Hz

  • @pavelkonjok7201
    @pavelkonjok7201 4 роки тому

    when loading a sketch, writes- JC_Button.h-no such file or directory.
    How to fix this problem?

    • @ScottMarley
      @ScottMarley  4 роки тому

      Are you using old the old code? The latest version on GitHub doesn't use JC_Button

    • @pavelkonjok7201
      @pavelkonjok7201 4 роки тому

      @@ScottMarley cant to load a new code to-with new code writing-easy butto-invalid argument

    • @pavelkonjok7201
      @pavelkonjok7201 4 роки тому

      what the number of micro prog.version the esp 32?

    • @ScottMarley
      @ScottMarley  4 роки тому

      @@pavelkonjok7201 let me have a look when I get home from work, but I'm pretty sure it works for me.

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

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

  • @kurtwerbrouck5439
    @kurtwerbrouck5439 3 роки тому

    IS there a way to download your excell calculation sheet?

  • @aliailyari-us7lq
    @aliailyari-us7lq 19 днів тому

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

  • @TomasMazukna
    @TomasMazukna 3 роки тому

    Did you test out with microphone setup? How much worse it is compared to line input? looking to get 20-20KHz electret microphone with amp and gain control to make thing easier.

    • @ScottMarley
      @ScottMarley  3 роки тому

      No, too busy to go back an look unfortunately. I did make a whole new VU type thing using a digital INMP441 which you can find on my channel. It's a cool little gadget, but needs some tuning to make it a bit more accurate. Having used the digital mic, I definitely won't be going back to the old analogue ones now though, it's so much less noisy!

  • @Refthoom
    @Refthoom 4 роки тому

    If you would leave out the capacitor on the audio in, wouldn't the ADC just ignore the negative values? That way you'd get double sensitivity on the input and you wouldn't have to discard the negative samples.

    • @ScottMarley
      @ScottMarley  4 роки тому +1

      You don't want to stress the ADC with negative values, it probably won't hurt it at such low voltages but it's not designed for it. You wouldn't increase, the sensitivity by doing this anyway, in fact you would be losing half the information in your signal. When you say discarding the negative samples, are you talking about discarding half the vReal array? You would still have to do this. Once the FFT has been performed, the vReal array no longer contains the audio samples themselves, but the FFT results. These are two completely different things, and we are just reusing the vReal array for convenience. At first each element in vReal represents a 25uS slice of time, containing the audio level. After the FFT each element in vReal is a frequency bin containing the amplitude of that frequency.

    • @ScottMarley
      @ScottMarley  4 роки тому +1

      Just to add (as I went off on a tangent there!) The DC blocking cap is there to block the 1.65V from going back into your audio source (phone or whatever). It's not a good idea to inject DC into the output of an audio device like that :)

    • @Refthoom
      @Refthoom 4 роки тому

      @@ScottMarley thank you for clarifying :-)

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

  • @sheonbanks2389
    @sheonbanks2389 3 роки тому

    I love the esp32 but when I run the code, even though I have nothing attached to the ESP32, the middle bands are still being populated with data. Do you know what is going on?

    • @ScottMarley
      @ScottMarley  3 роки тому

      If there is nothing attached at all, the aanlog pin is probably picking up noise. Either that or you have a very noisy power supply perhaps?

  • @DarkBasiliskDB
    @DarkBasiliskDB 3 роки тому

    How many power consumpt this LED matrix?

  • @moar_nightsong
    @moar_nightsong 4 роки тому +1

    Amazing video sir! I just completed the entire circuit and it seems like it's reacting to music accurately, however my bars keep pulsing from right to left. I connected the input to matrix to bottom left, so my question is how can I turn it 90 degrees so it can pulse from bottom to top? Is it located here:
    // XY code for serpentine matrix with input in top left
    uint16_t XY( uint8_t x, uint8_t y) {
    uint16_t i;

    y = kMatrixHeight - 1 - y; // Adjust y coordinate so (0,0) is bottom left
    if(SERPENTINE) {
    if( y & 0x01) {
    // Odd rows run backwards
    uint8_t reverseX = (kMatrixWidth - 1) - x;
    i = (y * kMatrixWidth) + reverseX;
    } else {
    // Even rows run forwards
    i = (y * kMatrixWidth) + x;
    }
    }
    else {
    i = (y * kMatrixWidth) + x;
    }
    return i;
    }
    .
    If so what parameters do I have to change so it does what I want it to do? (BTW I wired my matrix in PROGRESSIVE configuration/all led strips are facing the same direction). Thank you in advance, I'm looking forward to the next project.

    • @marcosanti2357
      @marcosanti2357 4 роки тому +1

      maybe you find my answer to
      rasheed el hanout helpful (further down the comments)

    • @moar_nightsong
      @moar_nightsong 4 роки тому

      @@marcosanti2357 OMG that actually worked!!! Thx a bunch dude. I had to play around with the code a bit, but regardless it works perfectly. Here's how this section of the code looks now:
      // XY code for serpentine matrix with input in top left
      uint16_t XY( uint8_t x, uint8_t y) {

      // Rotation counterclockwise
      //uint8_t tmpX = x;
      //x = -y + kMatrixHeight - 1;
      //y = tmpX;

      //Rotation clockwise
      uint8_t tmpX = x;
      x = y;
      y = -tmpX + kMatrixWidth - 1;

      uint16_t i;

      y = kMatrixHeight - 1 - y; // Adjust y coordinate so (0,0) is bottom left

      // Even rows run forwards
      i = (y * kMatrixHeight) + x;
      return i;
      }

    • @ScottMarley
      @ScottMarley  3 роки тому +1

      Great, glad you've got it sorted!

  • @DungTran-nn9me
    @DungTran-nn9me 4 роки тому

    Pls add code matrix style.please send me the led schematic. I follow the faulty instructions shown. sorry for the bad english.thanks. horizon or zigzac

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

    Hi Scott,
    Can I use ws2811 led strip instead of ws2812 without changing the code ?
    thank you.

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

      Yes, don't see why not. You might need a level shifter between the data pin on the esp and the led Din, but it might work without.

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

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

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

  • @DarkBasiliskDB
    @DarkBasiliskDB 3 роки тому

    I read that maximum sampling rate of Esp32 ADCs is 6KHz. That is not truth?

    • @ScottMarley
      @ScottMarley  3 роки тому +1

      Download the code here and see what you get: github.com/s-marley/ESP32_FFT_VU/tree/master/Sample_test

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

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

    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!

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

    Any thoughts on switching this to use I2S vs the analog DAC?

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

      Yes, see my more recent videos!

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

    Is it possible to do something similar on arduino mega or is it limited to the ESP32ish things?

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

      I wanna create an LED Strip that reacts to low frequencies, bass and stuff. Its gonna be 16m long and this library seems to fit it the best.

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

    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  Рік тому

      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 Рік тому

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