ESP32 Analog VU Meter – Smooth Needle, Real Audio Response (DIY Build)
In this project, I built a fully functional analog-style VU meter using an CrowPanel 3.5"-HMI ESP32 display, and LVGL.

Specifically, in this project I use two CrowPanel 3.5"-HMI ESP32 Displays 480x320 which, together with the precisely made acrylic housings, cost about $15 for each display. For this low price we get a module with impressive features:
- a powerful HMI touch screen with a 480*320 resolution
- ESP32-WROOM-32 module as the main control processor
- integrated WiFi and Bluetooth-compatible wireless functions
- TF card slot,
- multiple peripheral interfaces,
- USB interface,
- speaker interface,
- battery interface, etc.
In this project I will use only a small part of these possibilities.
As for the several passive components dedicated to the ADC input of the module, the explanation is as follows. The code is designed to process a pure AC input audio signal. To measure this signal, we need to raise the ADC input to some reference voltage level. We achieve this with the two 100K resistors. Now the signal moves above and below this reference point. The capacitor blocks any DC component, and the 1K series resistor serves to protect the input from a too strong signal. The modules are powered directly from a 3.7V lithium battery or via the USB Type-C connector.

A few words about the code, it is designed in a way that can be very easily modified, allowing us to set custom behavior of the arrows and pick LEDs according to personal preferences. Let me mention that when creating the graphic part I used LVGL and Squareline Studio, which means that by changing the UI files you can very easily create VU meters with different "faces".

And these two commands define the arrow's forward and backward movement speeds separately, so that the visual impression can be adjusted according to desire.
It's nice to see how the device behaves in real conditions with different input signals.

IMPORTANT UPDATE: During the final development of the project, I encountered a problem. Namely, after uploading the code, the GPIO25 and GPIO32 pins, which are located directly on the GPIO_D connector, were constantly at a high level (3V3). These pins were probably used by one of the libraries, so for me the easiest way was to use other free pins. For this purpose, I made leads (soldered wires) directly on the microcontroller to the GPIO21 (peak LED) and GPIO35 (Input) pins. These pins are marked in the pictures below.



Discussion (0 comments)