TempReader library not working on supported board

I am trying to control a PWM fan on a Arduino Nano. I haven't attched the fan or the control code yet, as I'm testing the method of reading chip temperature first

I have just tried the TempReader test code, however it is reading -23C and 1C when it is 30C ambient temperature.

Not really sure why, the Nano is supposed to be supported by the library.

Here is the example code:

/*
*   An example code to demonstrate the use of TempReader library.
*   This program prints the chip temperature to the serial monitor at every 0.5sec interval.
*/

// Import TempReader
#include <TempReader.h>

// Create an object of TempReader
TempReader t;

void setup() {
  // Initialise Serial Communication
  Serial.begin(9600);
}

void loop() {
  // Read the temperature value in degree celsius
  int temp = t.ReadTempinC();

  // Display the value in the serial monitor
  Serial.print("Chip temperature is ");
  Serial.print(temp);
  Serial.println(" degrees Celsius");

  delay(500);
}

What thermometer? Show a wiring diagram. You know the procedure. "-23" looks like a max negative value, like it is not providing an output.

Bare board - the TempReader library (supposedly) measures the internal chip temperature.

https://docs.arduino.cc/libraries/tempreader/

Of a nano?

I read your link. I did not know.

1 Like

According to the official documentation on the Arduino website, yes!

Is your board legit or knockoff?

1 Like

A knockoff but I did confirm, it is a ATMEL ATMEGA328P.

On an original Uno, it is also incorrect, reading 16C. I find it doubtful the chip is cooler than the ambient temperature by THAT much

It seems the internet has this code for calibrating the reading:

The library does not use the "delay()" for voltage stabilization:

Interesting. How would I be able to do an automatic calibration rather than basically guessing till I get it right?

Very good question. I will be searching.

I am also curious how it is done with the LM35/LM36 and DHT. I assume (but not sure) it is factory calibrated and creates voktage changes per partial unit of temperature.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.