MilikMilik

Build Your Own PC Dashboard With an ESP32 and LCD Display

Build Your Own PC Dashboard With an ESP32 and LCD Display
interest|PC Building DIY

Why Build an ESP32 PC Monitor?

Alt-tabbing into Task Manager just to check CPU or RAM usage quickly becomes frustrating, especially during gaming, rendering, or streaming. An ESP32 PC monitor turns those real-time system stats into a glanceable hardware dashboard on your desk. Using an ESP32 development board and a 16×2 I2C LCD display, you can show CPU load, RAM and disk usage, network traffic, battery level, and system uptime without adding software overlays or cluttering your main screen. Everything runs over a single USB connection, so there is no Wi-Fi setup, cloud account, or complex configuration. This DIY system monitoring project is ideal for PC builders who enjoy custom touches in their rigs and want a low-cost alternative to commercial LCD performance displays, while keeping the monitoring completely local and lightweight.

Hardware Setup: ESP32 and 16×2 I2C LCD

The hardware for this DIY system monitoring project is intentionally minimal. At the core is an ESP32 development board connected to a standard 16×2 I2C LCD display. I2C significantly simplifies wiring: you only need four connections between the ESP32 and the LCD—SDA, SCL, 5V (or 3.3V, depending on your module), and GND. On most ESP32 boards, the default I2C pins are GPIO21 for SDA and GPIO22 for SCL; if your board uses different pins, you simply adjust the Wire.begin(SDA, SCL) line in the firmware. The ESP32 is powered via the same USB cable used for data, keeping the setup tidy on your desk. Mount the LCD where it’s always visible—beside your keyboard or inside a PC case window—to create a permanent, dedicated LCD performance display for your build.

Software Tools and Libraries You Need

To bring the ESP32 PC monitor to life, you will configure both the microcontroller and your PC. On the ESP32 side, use the Arduino IDE and install the ESP32 board package via the Boards Manager. Add the LiquidCrystal I2C library by Frank de Brabander to drive the 16×2 display, and ArduinoJson (version 6) by Benoit Blanchon to parse incoming JSON data reliably. On your PC, install Python 3 and two key packages: pyserial to handle USB serial communication and psutil to gather CPU, memory, disk, network, battery, and uptime information in real time. You can install the Python dependencies with a single command: pip install pyserial psutil. Together, these tools turn your ESP32 into a smart, USB-connected client for your DIY system monitoring dashboard.

Programming the ESP32 Firmware

The ESP32 firmware continuously listens on the serial port for JSON messages sent from your PC. It builds each message character by character and tracks opening and closing braces to ensure it only parses complete JSON objects, avoiding issues with fragmented data. Once a full object is received, ArduinoJson deserializes it into fields such as cpu_total, cpu_freq, cores, ram_perc, disk_perc, net_up, net_down, bat_perc, and uptime values. These variables feed into a set of page functions (showPage0 through showPage4), each formatting a different set of stats for the 16×2 screen: CPU details, RAM usage, disk space, network throughput, and battery plus uptime. The firmware cycles pages every few seconds using a simple timer, clearing the display and refreshing the content so your real-time system stats are always up to date.

Running the Python Monitor Script on Your PC

On the PC side, a Python script acts as the data source for your ESP32 PC monitor. Using psutil, the script periodically reads CPU usage (total and per core), current CPU frequency, RAM and disk statistics, network upload and download totals, battery percentage and charging state, plus system uptime. It then packs these values into a JSON object and sends it over a USB serial port using pyserial. The update interval can be tuned to balance responsiveness and overhead, but even frequent updates impose negligible load compared to full-featured software monitors. Because everything communicates over a single local USB cable and does not rely on Wi-Fi or external services, this LCD performance display integrates cleanly with any desktop setup, providing continuous, unobtrusive insight into your system’s health.

Comments
Say Something...
No comments yet. Be the first to share your thoughts!