Hello everyone :)
In particular, lovers of lights, illuminophonics, etc.
The presented device displays the acoustic spectrum in the form of 20 bars, 16 points each. It's hard to call them a spectrum analyzer. I associate the analyzer more with a measuring device, although the frequency display is quite accurate here, which cannot be said about the level scaling, which changes anyway. But more on that below.
Similar structures can be found on the Internet. However, most of them are unfinished in my opinion. Flashing LED strips glued to "something". And so the idea was born to build a nicer display referring in style to classic factory constructions, but in enlarged dimensions.
The matrix is made of a 640 LED WS2812B strip. Due to the size of a single "pixel" 30 x 11mm, it is backlit with two diodes, which gives 320 light points.
The heart of the control system is the ESP32. This is actually my first project on this MCU and I'm just getting to know it. As for the program code, there are a lot of ready-made sources for building similar devices. I decided that there is no point in breaking open the door and I chose a ready-made one. https://github.com/s-marley/ESP32_FFT_VU
Unfortunately, the code only works with version 1.0.4 of the ESP32 Arduino board. With higher versions there are problems with ADC sampling above 20 kHz.
However, I made some modifications and fixes:
- Changed ADC sampling from blocking loop to timer interrupt, which significantly accelerated program execution.
As of today, I got about 20 FPS refreshing the matrix with the size of 16x40 LED and 29 FPS with the 8x8 matrix, and probably not more
you have to, because the pillars will become "nervous".
- Automatic audio level setting, but on the side of the FFT band values. Something like "ARW". The sound level differences between different music albums are significant and the sound input level had to be adjusted. The aforementioned "ARW" handles it quite well.
The device is operated with an IR remote control. The learning IR receiver is based on Atmega8 or Atmega88. It is able to handle the most popular formats of remote control commands (Nec, Nec16, Nec42, Samsung32, sony(SIRCS) Denon, Sharp).
There are 6 commands to use.
1 - Switching on and off
2 - Panel brightness +
3 - Panel Brightness -
4 - effects switching +
5 - effects switching -
6 - enabling or disabling "peaks"
Only the IR receiver module is active during standby. After receiving the command to turn on the device from the remote control, the ATmega unlocks the ESP32 and turns on the power to the LED strip.
Almost the entire structure is printed on a budget home printer from PLA, with a filling of 20%, in places densified to 90% for screws. The exception is the rear wall (HDF 3mm) and base (MDF 10mm).
They need to be painted white on the inside to diffuse the light better.
Trial assembly of partitions and masking
Due to the limited size of the print, the casing frame is printed in pieces and then glued together.
Housing frame glued to tinted glass.
Now the grille
On the grille there are screens made of white PVC 160um. Obtained from the covers of office folders. So in pieces...
It's time for partitions with glued and soldered LED strips. The partitions are not glued together to better adhere to the grille and the glass.
Installation of elements pressing the partitions to the glass with the mask. These elements also center the partitions vertically.
The whole is closed with an HDF board with screws.
Installation of vertical supports with base and electronics housing
Another electronic board
The whole is powered by a 5V 22A power supply.
Panel dimensions 710 x 256 x 28 mm.
Dimensions with base 710 x 280 mm.
Source codes - Arduino IDE.
Diagram. I hope there are no errors on it..
A short action video. It still doesn't show the live effect.
Sorry for the quality of the photos. These blacks are hard to photograph...
I am attaching the ESP32 source codes. Prototype code. it will probably be modified. And the source of the IR receiver
And that's all in a nutshell...
Cool? Ranking DIY