This ESP32-Powered Sign Displays YouTube Subscribers and Reacts to Sound in Real-Time
As a way to monitor his YouTube channel's growth more closely, Mark Donners built this highly interactive subscriber counter.
The concept
Owned and run by element14 Presents host Mark Donners, "The Electronic Engineer" YouTube channel features a variety of electronics projects that mostly center around spectrum analyzers. Taking inspiration from other subscriber count displays, he wanted to build a version that featured a prominent logo, digital counter, plenty of RGB lighting, and of course, a spectrum analyzer.
Circuit and PCB design
Because audio processing on its own can be quite memory and computationally intensive, Donners needed a microcontroller that had enough power to run the FFT algorithm. Additionally, this project would require plenty of I/O for the microphone and LEDs, as well as Wi-Fi connectivity for getting the latest subscriber count, thus leading him to pick the ESP32 DOIT development kit. The circuit features an I2S microphone and amplifier for increased audio fidelity along with a potentiometer for volume control. On the display side, the PCB has headers for attaching a strip of WS2812B LEDs, a six-digit, seven-segment module, and a MAX7219 dot-matrix panel. Lastly, power is delivered via a 12V barrel plug, which is then regulated to a stable 5V source for the LEDs and other components.
Sign construction
With the sign being such a large point-of-focus in his shop, Donners made sure to create it with prominent letters and a stand-out logo. The majority of the sign was cut from a sheet of clear acrylic using a laser before the channel's logo got adhered to the top. From here, the seven-segment display module and panel of 8x8 LED matrices were attached in their respective locations while a box containing several rows of RGB LEDs was placed behind the lettering. Once secured, the now-populated PCB was connected to both power and each external module.
Firmware
The sketch responsible for running the sign begins by initializing an array of libraries, including I2S audio, the dot-matrix array, Wi-Fi, and the RGB LED strip. Then in a loop, the microphone is constantly polled for its latest readings, and once the buffer has collected enough samples, the FFT algorithm is run to create the spectrum analyzer. Every five seconds, the ESP32 gets the latest subscriber count from the YouTube API, and if a new subscriber has been added, a sound will play from the attached speaker.
To see the display in action or learn how Donners built such an interactive, connected sign, you can watch his video here on the element14 Presents YouTube Channel.