Close
0%
0%

Windows System Performance Display

Graph your PC's CPU utilisation, temperature, RAM usage and GPU temperature in real-time on a compact external TFT screen.

Similar projects worth following
This project uses Windows performance counters or the Open Hardware Monitor libraries to collect vital system statistics, then transmits them to an STM32 to display a smooth scrolling graph. It provides realtime visibility of system performance with a tiny CPU and memory footprint.

This project consists of two components:

  1. A Windows utility to retrieve, process and send system statistics in a simple string of characters to a serial port.
  2. An STM32 connected to a TFT screen to receive the serial data and display a smooth scrolling line graph of the statistics over time.

A little known feature on the ILI9341 TFT controller is used to achieve the smooth scrolling: rather than attempting to redraw contents of the screen fast enough to achieve fluid motion, the hardware based vertical scrolling feature is used to shift a window of pixels to the left each time the main loop completes. The oldest vertical graph line is then erased and re-drawn with the new graph lines.

Use of the STM32 is probably overkill for this project, however they're often cheaper (and much more powerful) than a similar small Arduino style board.

The Windows utility can run in two modes: with and without administrator privileges. Both will launch the app in the background and will display an icon in the system tray.

When run as a standard user (i.e. not as administrator) the app will use the native Windows performance counters to collect CPU and RAM utilisation statistics. This mode uses a very small amount of CPU and memory to run and prevents the UAC prompt from being shown when the app is started, hence making it a convenient option for automatically launching the program at system startup.
More detailed statistics including system temperatures can be collected through the Open Hardware Monitor library when the app is launched as an administrator. This mode uses slightly more CPU and RAM. The STM32 will automatically detect the presence of the additional statistics and will start graphing them accordingly.

On the first launch, the app will try to determine the most appropriate serial port to send the data to. This can be customised in the app's main Window, along with the update interval and baud rate. Settings are saved in the registry and are persistent between launches of the application.

The hardware setup is very simple - the TFT screen is connected to the STM32 according to the pin assignment in the platformio.ini file. By default this is:

ILI9341 Pin
STM32 Pin
CSB7
ResetB8
D/CB9
MOSIA7
SCKA5
LED3V3
MISOA6

There are a few caveats to using the STM32 blue pill board, some of which may cause problems with serial communication. They're documented here: https://stm32duinoforum.com/forum/wiki_subdomain/index_title_Blue_Pill.html#Known_issues
I've not encountered any of these problems on the boards I've used, though it's worth noting.

The Windows app has an additional Output setting, along with a colour slider. Implementation of this feature will be completed in a future release, and will provide realtime ambient visualisation of resource utilisation or temperature using WS2812B LEDs.

Standard Tesselated Geometry - 270.20 kB - 05/01/2019 at 09:22

Download

Standard Tesselated Geometry - 684.00 bytes - 05/01/2019 at 09:22

Download

Graphics Interchange Format - 11.25 MB - 04/27/2019 at 05:24

Preview
Download

  • 2
    Open and compile the project in Platform.io, then upload to the blue pill using your ST-Link v2 adaptor

    All required configuration to complete the upload and configure the TFT is included in platformio.ini

    Additional build flags are included to enable the USB serial port on the STM32.

  • 3
    Connect the ILI9341 TFT display to the blue pill board

    Connections are below:

    ILI9341 Pin
    STM32 Pin
    CSB7
    ResetB8
    D/CB9
    MOSIA7
    SCKA5
    LED3V3
    MISOA6

View all 6 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates