A value expressed in digits always has an abstract element that can lead to misinterpretation. However, there is something much more "natural" about watching a needle move from one end to the other. With that in mind, Lex from the channel "Computing: The Details" decided to buy several 5 mA ammeters and combine them with a good dose of Arduino to create a CPU monitor that reports the usage of each available core, RAM, and swap.
We have shared all kinds of hardware monitors in the past. Recently we talked about CPU Temp, which keeps a close eye on temperature, but it's also worth exploring solutions like Core Temp and HWiNFO.
Now, those are software solutions—a pile of digits and graphs on screen. The idea of using physical meters isn't exactly new (in fact, some case manufacturers included them in old designs, and I remember certain Cooler Master accessories), but Lex from the channel "Computing: The Details" decided to return to it with a DIY meter specially configured for his current setup.
Measuring CPU activity and memory usage with ammeters
An unusual detail (or should I say unexpected) is that Lex didn't publish the code for his meter. The reason has its logic: Lex believes his tool is very specific and only covers his needs. That could start a real spiral of GitHub reports, and I imagine he doesn't want headaches. However, the general description of his project is very useful and points us in the right direction.
The meters are simple low-cost ammeters with a maximum reading of 5 mA, and they connect to the PWM pins of an Arduino Mega using a 1 kΩ resistor. The ammeters received custom scales made in Inkscape, and an LED strip (also connected to the Arduino) adds color to the whole setup.
On the software side, Lex confirmed using Rust to write a small program that gets data from systemstat on Linux, transforms the data, and sends it to the Arduino via USB-serial. Apparently, the code has some bugs (the swap register is always at maximum, and all meters froze in Blender), but they are minor errors. Personally, I hope Lex changes his mind and shares the code for a simpler version with three ammeters that measure CPU overall, GPU, and RAM.