Close
0%
0%

Gnat-Stats, Tiny OLED PC Performance Monitor

Arduino OLED PC Performance Monitor with Client software

Similar projects worth following
Gnat-Stats, Tiny OLED PC Performance Monitor.

After a recent purchase of a Nvidia GTX1080 graphics card, 4k monitor, plus Doom(2016), I thought it would be great to see some external telemetry..

I then Stumbled upon Psyrax's Hackaday.IO project.

Armed with an Arduino ProMicro and a 128x64 pixel OLED display, I compiled the source code.

The GnatStats Hardware Serial Monitor Visual Studio application is based around Psyrax's "SerialSender" Application , yet heavily modified by Colin Conway.

(Auto Reconnect, CPU/GPU Hardware Name ID's, Frequencies, Serial activity display timeout)

GnatStats_TFT_ProMicro_STM32_CFG_V1.5.zip

TFT Version 1.5. : STM32 BluePill & ProMicro Suppport : 128x160 ST7735 & 240x320 ILI9341 TFT Support : Add PWM Output for Back Light : Separate "Configuration_Settings.h" to make setting up easier

x-zip-compressed - 23.54 kB - 09/12/2020 at 16:06

Download

HardwareSerialMonitor_v1.1a.zip

Gnats Stats PC serial Monitor Program Compiled with .Net 4.6.2 to make use of LibreHardwareMonitor's updated DLL (Fork of OpenHardwareMonitor)

x-zip-compressed - 5.51 MB - 06/04/2020 at 20:01

Download

GnatStats_ProMicro_STM32_OLED_V1.41_CFG.zip

Add separate "Configuration_Settings.h" to make setting up easier

x-zip-compressed - 17.00 kB - 03/21/2019 at 22:44

Download

GnatStats_ProMicro_STM32_OLED_V1.4.zip

Version 1.4 : STM32 BluePill Support : Remove PowerPin Support

x-zip-compressed - 16.67 kB - 03/17/2019 at 18:00

Download

GnatStats_Release_V1.31.zip

Version 1.31: MOVE CONFLICTING!!! NEOPIXEL PIN TO 10, Option to trigger an event at a given CPU or GPU threshold eg: LED indicator at 100% CPU Load. Top Config option to disable all pre-selected power/gnd pins on Arduino pins D4 and D5 when not powering OLED from ProMicro Top Config option to disable/enable "activitychecker" (Enable blank screen on serial timeout eg: PC powered down, Disable to retain last sampled info eg: PC crash or overclocking diagnostics)

x-zip-compressed - 15.80 kB - 01/25/2019 at 17:42

Download

View all 8 files

  • 1 × Arduino ProMicro
  • 1 × SSD1306 or SH1106 OLED Display

  • Run on Startup Win10

    Rupert Hirst06/15/2020 at 22:21 0 comments

    Due to the Windows 10 not allowing programs to run on startup as admin, here is a workaround script.
    -----------------------------------------------------------------------------------------------------------------------

    1) Right-click on the HardwareSerialMonitor.exe , go to properties, then compatibility and check "Run as Administrator"

    2) Create the VBScript using a text editor (I used Notepad)

    Script:
    ------------------------------------------------------------------------------------------------------------------

      Set WshShell = CreateObject("WScript.Shell" ) 
      WshShell.Run chr(34) & "C:\Program Files (x86)\HardwareSerialMonitor\HardwareSerialMonitor.exe" & Chr(34), 0 
      Set WshShell = Nothing
      
     ------------------------------------------------------------------------------------------------------------------

    (The above path is an example, edit this to where your HardwareSerialMonitor.exe path is located)

    Save the script as "HardwareSerialMonitor.vbs" (no quotes)

    Note: Make sure to save it as a .vbs not .txt
          

    3) Now place the HardwareSerialMonitor.vbs in the HardwareSerialMonitor folder:

    4) Goto the Windows startup folder

    %AppData%\Microsoft\Windows\Start Menu\Programs\Startup, alternatively access it by Win+R ⇒ shell:startup ⇒ Enter

    Create a shortcut to the .vbs script above by right clicking then "New" ⇒ "Shortcut" ⇒ "Browse" for the "HardwareSerialMonitor.vbs" Script and select it.

    HardwareSerialMonitor Should now run on startup
    -----------------------------------------------------------------------------------------------------------------------

  • GitHub Links

    Rupert Hirst06/12/2020 at 16:08 0 comments
  • Gnat-Stats TFT Version 1.5

    Rupert Hirst03/21/2019 at 18:49 0 comments

    TFT Version 1.5 

    : STM32 BluePill & ProMicro Suppport
    : 128x160 ST7735 & 240x320 ILI9341 TFT Support
    : Add PWM Output for Back Light
    : Separate "Configuration_Settings.h" to make settings easier

    2.8" ILI9341 240x320  Running on a BluePill STM32.  A bit large maybe to be called Gnat-Stats :)

  • Gnat-Stats OLED Version 1.4

    Rupert Hirst03/17/2019 at 18:06 0 comments

    Gnat-Stats OLED v1.4  

    : STM32 BluePill Support
    : Remove PowerPin Support


    Gnat-Stats small TFT versions coming soon.

  • Hardware Serial Moniitor v1.1

    Rupert Hirst10/16/2018 at 11:29 0 comments

    Hardware Serial Moniitor updated to v1.1

    Compiled with  .Net 4.6.2  to make use of LibreHardwareMonitor's updated  DLL (Fork of OpenHardwareMonitor) 

  • Gnats-Stats Updates

    Rupert Hirst10/16/2018 at 11:26 1 comment

    Version 1.3: 

    Top Config option to disable all pre-selected power/gnd pins on Arduino pins D4 and D5 when not powering OLED from ProMicro 

    Top Config option to disable/enable "activitychecker" (Enable blank screen on serial timeout eg: PC powered down, Disable to retain last sampled info eg: PC crash or overclocking diagnostics) 

    Option to trigger an event at a given CPU or GPU threshold eg: LED indicator at 100% CPU Load. 

    NeoPixel Ring CPU/GPU Bargraph example:

    Gnat-Tacho

    Custom overlay

View all 6 project logs

  • 1
    Step 1

    Gnatstats Tiny OLED PC performance monitor

    by Rupert Hirst and Colin Conway

    The HardwareSerialMonitor application uses the open source OpenHardwareMonitorLib.dll to sniff the sensors of most modern PC graphics, CPU and motherboards whilst, also pooling windows hardware stats.


    Part of Psyrax's original arduino sketch, is a "anti screen burn" feature. This feature, inverts the screen background (black - white), after a preset time, to give even wear to the OLED display. This feature has been extended to totally turn off the OLED screen when no serial data is available, such as PC power down.

    I wanted to keep the overall footprint as small as possible. The i2C pins on the ProMicro reside on D2(SDA) and D3(SCL). The displays i2c pins lined up but, obviously the power pins would be a problem.

    After measuring a current of 18.6mA on a fully lit OLED display, I decided to pull pin D5 High(5v) and D4 Low(to ground) on the ProMicro to providing the necessary VCC / GND for the display.

    ----------------------------------------------------------------------------

    OLED Pins: VCC GND SCL SDA

    ProMicro Pins: D5(HIGH) D4(LOW) D3 D2

    -----------------------------------------------------------------------------

    18mA is within the Atmel 32u4 maximum pin current limit of 20mA. This allowed the display to be simply soldered straight to the header of the ProMicro.

    The HardwareSerialMonitor application is based of Psyrax's original source code and heavily modified by Colin Conway to include additional hardware stats.

View all instructions

Enjoy this project?

Share

Discussions

Pogz wrote 10/21/2020 at 09:31 point

Anyone got pin connection with a TFT_ILI9341? Do I need a Logic Level Converter for it? I just get a white screen wiring it directly. 

This is the only one I cant get to work.

  Are you sure? yes | no

ragook wrote 10/21/2020 at 13:59 point

If your MCU is 5v you need a 1.5k resistor  on each of the CS/RST/DC/MOSI/SCLK connections

  Are you sure? yes | no

kyouko wrote 09/22/2020 at 18:18 point

Hi sorry if this question is a bit stupid but i'm new with using arduino's.

I bouth a STM32 (https://nl.aliexpress.com/item/32326304541.html?spm=a2g0s.9042311.0.0.2b354c4dfkrhiu)

and an SSD1306 (https://nl.aliexpress.com/item/32896205376.html?spm=a2g0s.9042311.0.0.2b354c4dfkrhiu)

my question is what pins do i need to connect because i couldn't really find documentation about these 2 together and they should work.

  Are you sure? yes | no

Pogz wrote 10/21/2020 at 09:29 point

Make sure you have the file GnatStats_ProMicro_STM32_OLED_V1.41_CFG

1.) Check Configuration_Settings.h

2.) Comment out #define ProMicro and uncomment //#define STM32_BluePill

3.) This is  your pinouts: 

- SDA connect to PB7 (B7) 

- SCL(SCK) connect to PB6 (PB7) 

- Ground and VCC pins on its corresponding pins. 

  Are you sure? yes | no

levan wrote 09/21/2020 at 13:06 point

Hello. how can i rotate display? i can not find this line in code? i have ST7735 1.8 inch display.

  Are you sure? yes | no

Pogz wrote 10/21/2020 at 09:18 point

/* Display screen rotation  0, 1, 2 or 3 = (0, 90, 180 or 270 degrees)*/

int ASPECT = 2;

on file Configuration_Settings.h

  Are you sure? yes | no

Tomas wrote 09/20/2020 at 06:32 point

Using HardwareSerialMonitor 1.1 the RAM String is not showing up any value. its R(BLANK)G

  Are you sure? yes | no

Pogz wrote 09/12/2020 at 08:34 point

Can anyone give me a working pin connection with a TFT_ILI9341? I got the TFT_ST7735 but not this bigger TFT_ILI9341? 

My current connection is (following the writeup) 

TFT_ILI9341 - Adruino Pro Micro
VCC - VCC
GND - GND
CS - 10
RES - RES (set to 0 on source)
DC - 9 
SDI (MOSI) - 16
SCK - 15
LED - 6
SDO (MISO) - 14

but all i get is just a white screen. any tips

  Are you sure? yes | no

ragook wrote 09/12/2020 at 15:58 point

Why do you need a working list when you dont have a ILI9341?

ProMicro SPi= CS:10 RST:0 DC:9 SCLK:15 MOSI:16    MISO isnt needed

Backlight pin is 6

  Are you sure? yes | no

Pogz wrote 09/19/2020 at 07:50 point

i have the ILI9341 .. and im trying to get it to work for it (i have already made it work for ST7735 (as i previously posted) so i dont know what you meant by " you dont have a ILI9341" 

  Are you sure? yes | no

Pogz wrote 09/19/2020 at 08:23 point

FYI, I did follow the pinouts as recommended. But again im just getting a white screen https://imgur.com/a/WL3P06W

  Are you sure? yes | no

Pogz wrote 08/30/2020 at 10:23 point

Any solution for the addtional white lines on the display? 

https://i.imgur.com/tXETp7U.jpg

Looks like adding an offset should fix? 

  Are you sure? yes | no

RolandoooR1 wrote 09/19/2020 at 20:45 point

I had the same problem. In the Setup ST7735 setup code, comment out the INITR_BLACKTAB and add the INITR_GREENTAB as shown below. This will correct it. 

  /* ST7735 SETUP */
#ifdef TFT_ST7735
  delay(100); // Give the micro time to initiate the SPi bus
  // Use this initializer if you're using a 1.8" TFT
  //tft.initR(INITR_BLACKTAB);   // initialize a ST7735S chip, black tab
  tft.initR(INITR_GREENTAB);
  tft.setRotation(ASPECT);// Rotate the display at the start:  0, 1, 2 or 3 = (0, 90, 180 or 270 degrees)
  tft.fillScreen(ST7735_BLACK);
#endif

  Are you sure? yes | no

Pogz wrote 08/24/2020 at 12:39 point

Hi, im an absolute Arduino beginner (but I have experiences with the Pi and basic electronic knowledge) and I cant seem to make this work. Below is the board that I used and the OLED I used.

Board https://shopee.ph/product/226548939/5019942450
OLED https://shopee.ph/product/226548939/4219824365

I think I wired it correctly (the OLED had the GND on the 1st pin and the VCC on the 2nd thats why I had to use a wire first to test). SCL and SDA seems to be wired correctly. 

https://imgur.com/a/79kfrrT?

On the Arduino side i've done the following: 

1.) Made sure that the Arduino is selected and the correct COM port is selected
2.) Installed the following libraries: Adafruit GFX, Adafruit NeoPixel, Adafruit ST7735
3.) Double clicked on the GnatStats_TFT_ProMicro_STM32_CFG_V1.5.ino and compiled/test. All good. Then uploaded it to the Arduino. No problem.
4.) Ran HardwareSerialMonitor.exe as administrator

But as you see from the photo, I dont get any output. Am I missing something or did I do something wrong? I've also tried directly wiring VCC to the VCC pin of the Arduino and the GND to ground to make sure that its getting enough power but still no dice.

  Are you sure? yes | no

Pogz wrote 08/25/2020 at 10:54 point

ok I was stupid. i was using the TFT version. i though that 1.5 is the latest thus i got that instead. now working with the OLED sketch. 

just a question though, how did you guys power the screen? from the instructions: " D5 High(5v) and D4 Low(to ground) " but its not powering my display. do i need to modify something in the code?

hooking it up to regular vcc and ground line works tho. 

  Are you sure? yes | no

Fizzgig84 wrote 08/31/2020 at 20:42 point

Hey buddy, Im running the exact same everything but still the same issue of nothing showing up. You're running "GnatStats_ProMicro_STM32_OLED_V1.41_CFG.zip" ? I feel like I'm missing something.

  Are you sure? yes | no

Pogz wrote 09/02/2020 at 12:34 point

@Fizzgig84 took some wrangling and re-reading due to my inexperience in working with arduino. 

the versioning seems to add to the confusion as people tend to always get the one with the latest version.. 

if you're using something like mine, you need the OLED version (v1.41). 

If you're using the 4 pin OLED, you need to connect (OLED <- > Pro Micro)

SDA - Pin 2
SCK - Pin 3
VCC - VCC 5V rail 
GND - Ground

I was not able to get pins 4 and 5 to word as described in the instruction. I dont get any display light. 

I was able to get the TFT_ST7735 to work too.. but im having trouble on making TFT_ILI9341 work. 

I would probably write a better documentation for those without prior knowledge on Arduino.

  Are you sure? yes | no

Poiaman wrote 07/23/2020 at 12:33 point

Tnks for sharing, i have made the project and its amazing! Now i´m tryng to customize and i need help to understand how can i get the index list of Monitor Serial. For exemple, i would like to make a % for ram use, so i´ll need more information, how the total of memory. Could you help me to understand this part? 

  Are you sure? yes | no

ImmodderNation wrote 06/14/2020 at 23:01 point

How do I add int and strings to the code for voltage and fan speed?

  Are you sure? yes | no

taitelcoms wrote 06/13/2020 at 07:24 point

hello there! I am using ryzen 2700X  but no data for temp and clock speed. CPU Usage working fine. Could you update? I try lastest dll from OpenHardWareMonitor but not working.

  Are you sure? yes | no

Rupert Hirst wrote 06/15/2020 at 22:06 point

are you running the program as admin? that is the usual reason for no CPU frequency or temp. 

HardwareSerialMonitor has always had issues with Ryzen as has openharwaremonitor in the past

  Are you sure? yes | no

taitelcoms wrote 06/16/2020 at 02:08 point

I tried as admin but nothing has changed. Now I commented out frequency and clock then keep waiting if there is any changed ... Thanks. 

  Are you sure? yes | no

Juanillo62gm wrote 05/06/2020 at 03:22 point

Could you compile the code with new OpenHardWareMonitor.dll ? I can't get data from my i9-9900k and RX5700 XT. I'm running OLED_SSD1306 with GnatStats v1.44

  Are you sure? yes | no

Rupert Hirst wrote 06/15/2020 at 22:02 point

I don't  know why its not reading your 9900K , my 9600k works fine 

  Are you sure? yes | no

Psyrax wrote 12/26/2019 at 19:28 point

OMG didn't knew it was forked!!! I'm blushing.

  Are you sure? yes | no

Lautaro wrote 09/06/2019 at 17:37 point

Hi, does anybody have the same problem as I ?

I try to run the compiler and i always get the same error. The error is called ERROR STATUS 1.

Im tring to run the code with an ARDUINO MEGA 2560

Any help please ?

  Are you sure? yes | no

Rupert Hirst wrote 06/15/2020 at 15:20 point

Don't use a MEGA

  Are you sure? yes | no

deemmkka wrote 08/19/2019 at 06:33 point

Help please, does not display CPU temperature i5-8400, although in the program of all shows. Tell me how to fix it?

  Are you sure? yes | no

Ivan wrote 08/06/2019 at 15:18 point

I'm new to Arduino :( someone can explain to me, if it is enough to move the files I find here

https://github.com/psyrax/SerialMonitor or I have to do something else

Thank you in advance guys

  Are you sure? yes | no

adamnemeth0 wrote 07/23/2019 at 07:44 point

Hi, does anybody have the same problem as I ?

I am running this on a ryzen cpu and I got no temps. When I modified the hwmonitor 1.0 to look for different name for temps it was working.

But the hwmonitor 1.0 using openhardware monitor lib which is not showing correct cpu speeds. So I would like to use the Hwmonitor 1.1 with the librehardware lib. But I have the same issue that I have no temp readings, and the source code is password protected so I can't make the same modification as it was on the hwmonitor 1.0

Could anybody tell me how to make the Hwmonitor 1.0 using librehardware lib. Or send me the source for the Hw 1.1. ?

  Are you sure? yes | no

estebangmn wrote 07/06/2019 at 14:23 point

guys i need help,im trying to make it works the version 1.4 with CFG on arduino uno and one oled 0'96" screen.in this version i have a problem,when turn it on part of the GPU and sysram data appers and disapear for seconds,i dont have the microPro and i tweak part of the code to make it work in a simple arduino uno directly to the oled screen,i tried everything but i dont know what happend,part of the info appear and disapear for seconds,when it run works well and show all the info for 2 seconds and then disappear everything on the display type 1,someone can help me?

FIXED MYSELF,the problem was the amount of Pixels,when you put more than 20 pixels on the arduino sketch the info of the display works very bad or dont even works,if you choose NUMPIXELS 10 all works perfect,the fucking skect is glitched with the number of pixels

  Are you sure? yes | no

Rupert Hirst wrote 07/07/2019 at 21:25 point

The sketch is not glitchy it runs fine on a ProMicro with more than 10 pixels, It clearly states use a 32u4. yet people still fight it and try to use a 328P .

  Are you sure? yes | no

estebangmn wrote 07/07/2019 at 21:35 point

ok thank you rupert and thanks for the proyect,i just made a video on youtube talking about this proyect and my problems during this last days

  Are you sure? yes | no

openmy wrote 06/21/2019 at 13:46 point

HardwareSerialMonitor_v1.1.zip 
gnant.src gplv3 license open source is password protect ??? Do not open this zip file. ??? it is still open source

  Are you sure? yes | no

adamnemeth0 wrote 07/22/2019 at 08:41 point

Hi, did you managed to get the password? I have asked him for it, but no reply yet.

  Are you sure? yes | no

Don wrote 06/16/2019 at 04:43 point

I have built a portable version of Gnat Stats V1.31 for my laptop and a Gnat Stats TFT 1.5 that is mounted in the window of my PC case. On the PC, everything works fine except the GPU shader section which shows 0MHz. My GPU is an RTX 2060 (nvidia driver ver 430.86), Windows 10 Pro, and using Hardware Serial Monitor v1.1.

I'm not sure if this issue has/is been popping up, but I'm guessing that it might be due to the RTX cards config with the Turing gpu.

  Are you sure? yes | no

Rupert Hirst wrote 07/07/2019 at 21:26 point

I'm not sure if Libre hardware monitor supports RTX series yet

  Are you sure? yes | no

Don wrote 07/07/2019 at 23:14 point

Thank you for the reply.

On a separate note, I updated my build of the TFT version with two 8-count WS2812 pixel sticks. They are the same width as the 2.8 TFT, so the CPU meter is on top and the GPU meter is on bottom.

Your code works perfectly with them, I just had to change the NeoPin to P4 on the ProMicro. P5 does work (tested with a different sketch), but the pixels wouldn't light.

If you'd like a photo of the build, let me know.

  Are you sure? yes | no

gitxmax wrote 04/06/2019 at 15:33 point

Hello, received a  blue pill and ILI9341  screen Today and now checking all the connections and pin assignments. I presume, the 3.3v regulator of the blue pill is too weak to supply all the power for the screen? Since the screen itself is 5v tolerant, will it be ok, to supply 5v, from the usb power, directly to the screen's vcc pin, while the logic power will be provided by blue pill's 3.3v regulator? Or better to replace the regulator with a more powerful one ( I have a few 1117 3.3v)

Also, bit confused by your picture, the part where the A12 pin is connected to 3.3v pin, through a resistor. Could not find any information on that...

Thanks!

  Are you sure? yes | no

Rupert Hirst wrote 04/06/2019 at 15:42 point

I powered the screen inc blacklight off the 3.3v on the BluePill. If the VCC on the screen is 5v tolerant then use the 5v on the bluepill its tied to the USB input .

The resistor is for the reason below

https://www.onetransistor.eu/2017/11/stm32-bluepill-arduino-ide.html

I didn't have any issue without out the resistor on my PC

  Are you sure? yes | no

gitxmax wrote 04/06/2019 at 15:50 point

Thanks!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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