OPEN External Hardware Monitor

Introduction: OPEN External Hardware Monitor

Hi guys! Today I will show you how create an external hardware monitor with any Arduino board(in my case a pro micro board), a Nokia 5110 LCD and some VB programming! Let's get started!
ps. Sorry for my bad english

Step 1: What Is the Aim?

The aim of this project is for monitoring pc hardware while you're in game. There are other many system to do that, like afterburner ingame overlay, but for me is too cumbersome (this covers always the GUI in every videogame). So i decided to create my own external system for HW monitoring!

Step 2: Materials

-Arduino board

-Nokia 5110 LCD

-Some wires

-A breadboard

Step 3: Wiring the LCD to Arduino!

Here are my connections:

VCC -> Arduino 3.3V

LIGHT -> Arduino GND (I am going to be using it on)

GND -> Arduino GND

CLK (SCLK) -> Arduino pin 7

DIN (MOSI) -> Arduino pin 6

DC -> Arduino pin 5

CE or CS -> Arduino pin 4

RST (RESET) -> Arduino pin 3

Remember that! The LCD runs on 3.3V ! With 5V, it has worked but gave some weird effects, so I suggest connecting to the 3.3V output of the arduino.

Step 4: Some Arduino Codes and Libraries!

For the LCD, we use Adafruits Libraries:

Adafruit_PCD8544: Here

Adafruit_GFX: Here

The code: For this code i decided to monitor Temperature, Load,Fan Usage, Clock and Memory Clock of my GPU. For these "parameters" i have created a few variables for serial reading and for casting to string(so we can display the values on the LCD)

You don't know how works parseInt()? ->Solution!

Finally the code:

#include #include

Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

byte temp; String temps;

int clk; String clks;

int mem; String mems;

byte load; String loads;

byte cont; String conts;

void setup() { Serial.begin(9600); display.begin(); display.setContrast(50); display.clearDisplay(); display.setTextSize(1); }

void loop() {

if (Serial.available()) { clk = Serial.parseInt(); mem= Serial.parseInt(); temp = Serial.parseInt(); load = Serial.parseInt(); cont = Serial.parseInt(); } clks=String(clk); mems=String(mem); temps=String(temp); loads=String(load); conts=String(cont); display.setTextColor(BLACK); display.setCursor(0,0);display.println("GPU CLCK");display.setCursor(50,0);display.println(clks+"M"); display.setCursor(0,10);display.println("GPU MEMO");display.setCursor(50,10);display.println(mems+"M"); display.setCursor(0,20);display.println("GPU TEMP");if(temp<100){display.setCursor(50,20);display.println(temps+" C");}else{display.setCursor(50,20);display.println("ALERT");} display.setCursor(0,30);display.println("GPU LOAD");display.setCursor(50,30);display.println(loads+" %"); display.setCursor(0,40);display.println("GPU FANS");display.setCursor(50,40);display.println(conts+" %"); display.display(); display.clearDisplay(); }

Step 5: Now VB :D

First of ALL upload the sketch to your arduino board, open the serial monitor and write "100,1500,60,100,100"

Now this appear on the LCD:







Now we can create our program for sending values to arduino!

  1. Open Visual Studio and create a new windows application in VB
  2. Import in our program OpenHardwareMonitorLib(you can find DLL here)
  3. Create labels according to your parameters you want to send (in this case 5)
  4. 2 button for start and stop serial comunication
  5. A timer
  6. A background worker
  7. A serial port
  8. A textbox for COM name

Now code:

Imports OpenHardwareMonitor.Collections<br>Imports OpenHardwareMonitor.Hardware
Imports System.IO
Imports System.IO.Ports
Imports System.Threading
Imports System.ComponentModel

Public Class Form1
    Dim flag As Boolean
	Dim cp As New Computer()
    Public Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
        cp.GPUEnabled = True
        cp.CPUEnabled = True
    End Sub
    Public Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick

 For Each hw In cp.Hardware

If hw.HardwareType = HardwareType.GpuAti Then 'If you have a NvidiaGPU write".GpuNvidia"
                For Each sensor In hw.Sensors
                    If sensor.SensorType = SensorType.Temperature Then
                        GTEMP.Text = sensor.Value
                    End If
                    If sensor.SensorType = SensorType.Load Then
                        GLOAD.Text = sensor.Value
                    End If
                    If sensor.SensorType = SensorType.Control Then
                        GFAN.Text = sensor.Value
                    End If
                    If sensor.SensorType = SensorType.Clock Then
                        If sensor.Name.Contains("Core") Then
                            GCCLK.Text = Convert.ToInt64(sensor.Value)
                        End If
                    End If
                    If sensor.SensorType = SensorType.Clock Then
                        If sensor.Name.Contains("Memory") Then
                            GMCLK.Text = sensor.Value
                        End If
                    End If
            End If
    End Sub

Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork
        Do While flag = True
            SerialPort1.Write(GCCLK.Text + "," + GMCLK.Text + "," + (GTEMP.Text) + "," + (GLOAD.Text) + "," + (GFAN.Text))'this send the values to arduino
            delay(1500)'we need this delay(1.5s) because this is the refresh rate of the LCD, if you modify it lower than 1.5 the lcd doesn't refresh!
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        SerialPort1.PortName = TextBox1.Text
        SerialPort1.BaudRate = 9600
        SerialPort1.DataBits = 8
        SerialPort1.Parity = Parity.None
        SerialPort1.StopBits = StopBits.One
        SerialPort1.Handshake = Handshake.None
        SerialPort1.Encoding = System.Text.Encoding.Default
        flag = True
    End Sub</p><p>    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click</p><p>        flag = False
    End Sub

'delay function
    Private Declare Function timeGetTime Lib "winmm.dll" () As Long
    Public lngStartTime As Long
    Public Sub delay(msdelay As Long)
        lngStartTime = timeGetTime()
        Do Until (timeGetTime() - lngStartTime) > msdelay
    End Sub
    'End delay function</p><p>End Class

Step 6: The End and Considerations!

Now test your program and check if it works!
(If there are problems, post comments and I help you)

Congratultion! You made it :D

Now YOU CAN upgrade this project, ex. add rgb led,add a buzzer; update the arduino and VB code

Post your version in the comments! :D

Maker Olympics Contest 2016

Participated in the
Maker Olympics Contest 2016

Be the First to Share


    • Fruits and Veggies Speed Challenge

      Fruits and Veggies Speed Challenge
    • Colors of the Rainbow Contest

      Colors of the Rainbow Contest
    • Remote Control Contest

      Remote Control Contest



    Question 5 months ago

    I got as far as getting all of the Arduino side of things all set up, but the VB part of this tutorial is missing a lot of information, and the code will not compile.

    When I try to compile the code, there are a ton of declaration warnings, as if part of the code or an include is missing. Again, the tutorial skirts over proper setup and I've never touched VB or Visual Studio at all, so I'm at a loss on what to do next.


    1 year ago

    Can you leave us a final program with VB? Please!


    Question 1 year ago

    I copied the VB code into a new project - how do I put the *.dll from the OpenHWMonitor into the project? Also the code-editor shows a great bunch of errors like missing "end-statements" and other stuff. Can I just ignore that?


    1 year ago

    Hi, if one day you open back your article, please can you provide us the soft, OpenHardwareMonitor, if possible to its last version already modded to be able to send data to a serial port, so we can be able to get info to an arduino connected to a screen.


    1 year ago

    Can you give compiled program? I don't know how to compile it.


    Reply 1 year ago

    Yes it would be great, if it could happen! It mean the last version of OHM with already modded DDL, cause it is not easy for all to mod or recompile.
    Thx for the project.


    Question 3 years ago

    sorry u but i think the "open hardware monitor" not show a true performance of the PC can u check again ???


    Answer 1 year ago

    Hi. it may have been a long time since your comment, but the OHM Monitor has seen some updates.

    Just download the latest version and copy the Openhardwaremonitor.DLL to your project and it should see a higher accuracy than before with current generation hardware.

    Vincenzopaolo Esposito
    Vincenzopaolo Esposito

    Answer 2 years ago

    Yeah, I know. That because open hardware monitor's .dll is pretty BAD with the new modern pc hardware components. In fact now for monitoring my system(without this project) I use HWInfo64. This guide needs to be update in future. Maybe using USB instead of Serial interface. But the firs problem is to find a new way to get hardware specs in VB or C#...


    5 years ago

    Hi, tell me how I could read the CPU CPU temperature and its load? I'm already running this program, your work is great! Thank you