logo elektroda
logo elektroda
X
logo elektroda

Audio spectrum display (ESP32, WS2812B)

efi222 15294 63
ADVERTISEMENT
This content has been translated flag-pl » flag-en View the original version here
  • #61 20564484
    michal_rybka
    Level 35  
    and foils from a broken LCD TV as a screen? there are several layers of different foils and one with 4mm plexiglass and everything is the size of the matrix, i.e. large sheets, and a broken TV can be found in a dumpster or probably in any normal RTV service you can probably get such foils for free :) I have a lot of it, because I leave plexiglass from broken matrices and I give foils to my daughter and she paints on it with markers ;)
  • ADVERTISEMENT
  • #62 20564740
    efi222
    Level 19  
    I made a preliminary inspection of the laptop display elements. That white sheet absorbs too much light, but that bottom silver one is interesting. You have to do trials :D
    Audio spectrum display (ESP32, WS2812B)
  • ADVERTISEMENT
  • #63 20884984
    ArturAVS
    Moderator
    Well, actually, I`ll ask. I`m struggling with a certain VFD display, with a lot of cooperation with AI (I`m a rather poor programmer). Your the FFT implementation using the Arduino library is very cool. For me, even with the help of AI, it displays nonsense. Do you have an idea for a function using ArduinoFFT to return data as an array (f, a), where f is the frequency of the "bar" and f is the amplitude?
    Because for now it shows nonsense.
  • #64 21376516
    efi222
    Level 19  
    At the beginning of the article @KJ mentioned that there is a lack of fluidity in the movement of the posts. Rightly so, by the way. I took the plunge and decided to rework the whole unit.
    First of all, I doubled the vertical resolution of the bar from 16 to 32 LEDs in two columns, which increased the number from 32 to 64 LEDs per bar. As a result, the total number of LEDs has increased from 640 to 896 (40%). The typical LED strips were no longer suitable. I had to make a PCB for the LEDs. And, of course, new fenders and hoods.

    Comparison of new and old versions of LED panels with PCB. .

    Upgraded LED panel with 64 LEDs per bar, showing 14 bars in two columns.

    The original version only pulled 20 FPS. After adding the LED, it was already a disaster and not FPS.
    We had to get on with writing new software for the ESP32.
    The result was an acceleration to 37 FPS. Practically the frames were limited by the amount of WS2812B. For such a quantity, faster is not possible.
    FPS = 1000/quantity_WS * 0.03.
    For 896 LEDs, FPS = 37.
    It could stay, because the smoothness has improved considerably. But.... I decided to go further :D .
    The final panel is controlled from two ESP32s. ( At the cost of the whole panel, 12PLN makes no difference). Each operates half of the panel. Both cores and a timer are harnessed in each.
    The number of frames now is 72. I have also introduced audio sample averaging and a small delay in the descent of the bars. Scaling, as suggested by commenters, is now logarithmic.
    As a reminder, the initial version.


    .
    New version. In the video, 'average' audio sampling and bar descent settings. Can be sped up or slowed down.


    .

Topic summary

The discussion centers on a DIY audio spectrum display project using an ESP32 microcontroller and WS2812B LED strips arranged in a 20-bar, 16-pixel high matrix, later expanded to 32 pixels per bar, totaling 896 LEDs. The device visualizes audio frequency spectrum from 20 Hz to 20 kHz using FFT processing on the ESP32. The original design used a 640-LED WS2812B strip with a pixel size of 30x11 mm, backlit by dual LEDs per pixel, and a custom enclosure with tinted glass, white PVC diffuser, and a black grille to enhance contrast and pixel definition. The project evolved from analog filters and ATmega microcontrollers to digital FFT on ESP32 for better performance. Challenges discussed include LED refresh rate limitations, linear versus logarithmic scaling of bar levels, and programming environment choices (Arduino IDE favored for accessibility despite some criticism). The author confirmed Atmega8 and CD4050 components are not essential for operation. The display’s brightness and diffusion were optimized with antisol black 4mm glass and thin white PVC sheets. The software was reworked to improve fluidity, doubling vertical resolution and increasing frame rate from 20 FPS to 37 FPS, limited by LED quantity. The project is open source, with shared code and design files, and the author offers support for replication. Cost and time investment were acknowledged as significant due to prototyping and iterative design. Alternative approaches using LCD or OLED displays were discussed but dismissed due to image quality and size constraints. The community suggested enhancements like color-coded level bars and additional interactive features. The project demonstrates a balance between hobbyist accessibility and technical sophistication in audio visualization hardware.
Summary generated by the language model.
ADVERTISEMENT