Why Build an ESP32 Performance Monitor?
Constantly alt-tabbing into Task Manager during gaming, rendering, or streaming quickly becomes annoying and disruptive. A dedicated ESP32 performance monitor gives you system stats at a glance, without cluttering your main screen. By pairing an ESP32 development board with a 16x2 I2C LCD system stats display, you can see real-time CPU monitoring data, RAM usage, disk space, network throughput, battery level, and system uptime in a compact form factor. This DIY PC monitor build is a fully local solution that communicates over a single USB cable, with no Wi‑Fi, cloud, or complex configuration. It is ideal for tidy desk setups, gaming rigs, or even small home servers sitting under a shelf. Instead of buying a commercial gadget, you control the layout, behavior, and update rate, and you can easily tweak or extend the code later.
Hardware and Wiring: ESP32 and 16x2 I2C LCD
The hardware side of this project is intentionally simple. You need an ESP32 development board and a standard 16x2 LCD module with an I2C backpack. The I2C interface reduces wiring to just four connections: SDA, SCL, 5V (or 3.3V depending on your module), and GND. On most ESP32 boards, SDA is on GPIO21 and SCL on GPIO22, which you must also specify in the firmware using Wire.begin(21, 22). If your board maps I2C differently, adjust those pins in the sketch. The LCD address is commonly 0x27, but you may need to change it if your display uses another address. Once wired, the ESP32 will power the LCD and receive monitoring data from your PC over USB, making the whole device neat enough to sit beside a keyboard, under a monitor, or on top of a small server case.
Setting Up the ESP32 Firmware in Arduino IDE
To turn the ESP32 into a dedicated LCD system stats display, start with the Arduino IDE. Add the Espressif ESP32 boards URL in Preferences, then install the ESP32 package from the Boards Manager and select your board. Next, install the LiquidCrystal I2C library by Frank de Brabander to drive the display and ArduinoJson (version 6) to parse incoming JSON. The provided sketch initializes the LCD, shows a brief splash screen, then waits for serial data at 115200 baud. Incoming characters are buffered and tracked by counting opening and closing braces so that only complete JSON objects are parsed. Once parsed, values such as cpu_total, ram_perc, disk_perc, net_up, net_down, bat_perc, and uptime_h/m are stored in global variables. Several pages then format these metrics into concise 16x2 layouts and cycle automatically every few seconds, giving you continuous visibility into system health.
Collecting and Sending System Stats with Python
On the PC side, a small Python script supplies the data that powers your ESP32 performance monitor. Using Python 3, install pyserial and psutil with a simple pip command. The psutil library collects real-time CPU monitoring information, including total CPU load, per-core usage, and frequency, as well as RAM percentage and gigabytes used, disk utilization, network upload and download totals, battery percentage and charging state, and system uptime. The script samples these values regularly, packs them into a JSON object matching the keys expected by the ESP32 firmware, and sends the JSON string over the USB serial port. Because the entire communication is local, it is fast, private, and reliable. You can tune the update interval, choose which drive to track for disk stats, or add extra fields later if you decide to expand the information shown on your LCD.
Customizing Pages and Expanding Your DIY PC Monitor Build
Once the basic system is running, you can treat it as a starting point for your own DIY PC monitor build. The sketch already defines multiple pages: CPU and core usage, RAM summary, disk usage, network throughput, and a combined battery and uptime screen. You can customize the text, add symbols, or re-order pages to highlight what matters most for your workflow, such as keeping GPU or network stats front and center on a gaming desk. Since the data arrives as JSON, it is easy to add new fields in Python and map them to new pages on the ESP32. You might integrate fan speeds, temperatures, or custom alerts when CPU or RAM exceeds a threshold. Mounted neatly near your display, this simple ESP32 and 16x2 LCD system transforms into a flexible, hackable status panel for any workstation or server corner.
