0

I'm not sure about this and if it is possible. I need to read CPU (normal computer) into an Arduino. This could be possible (at least I think) by connecting some kind of sensor that can be placed between the heatsink and the CPU, where the thermal paste is placed. Or, the second option is to read values from the system somehow, or from the motherboard. I hope I'm not talking about stupid things. I need some advice about this.

  • 7
    Your CPU almost certainly already has a temperature sensor built-in. You only have to find out how your OS makes this information available (and that is not an Arduino-related question). Adding an extra temperature sensor between the CPU and the heatsink is bound to degrade the efficiency of the heatsink. – Edgar Bonet Apr 17 '17 at 9:02
  • 1
    As @EdgarBonet said, to place a sensor will affect your performance and still will not give you trustful readings. I believe the best way to monitor this parameter using Arduino is to access the temperature by running a script in your computer and pass it to Arduino via serial. Temperature reading is a BIOS feature and usually computers have it, but you may not have it also. You can take a look at this link to get some information about how to read temperature from your processor – rvbarreto Apr 17 '17 at 12:30
  • 1
    you can safely place a sensor on the heatsink, as close to the contact area as practical. – dandavis Apr 18 '17 at 5:09
1

Here is a simple way to send CPU temperature reading data via serial port, under Windows.

As answered in the question Batch-file get CPU temperature in °C and set as variable, it is possible to build batch file (*.BAT) to get the readings and output to console. I took following option and built the BAT file.

wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature

Now, to redirect the console to serial port, use > symbol. Try following and receive it in your Arduino or use serial port monitor to check (in my case it works):

mybatfile.bat > COM1

Alternatively, you can use

wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature > COM1

inside your BAT file.

Next, we have to specify the serial configuration, make it EXE file so it can run under Administrative account. I used Advanced BAT to EXE converter. In the tool, specify the commands:

@echo off
mode COM1 BAUD=38400 PARITY=n DATA=8
wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature > COM1

Convert it to EXE using File->Build EXE...

enter image description here

And finally, you can create Scheduled Task to run your newly built EXE application periodically.

BTW, WMI is a powerful interface, it is possible to retrieve many other metrics and configuration data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.