Thermistor Sensor Board with Thermistor2 reversed polarity

I’ve got one of these Thermistor Sensor Boards as seen all over the cheap Chinese seller’s sites. It has both analog and digital outputs.

I’ve found the schematic and the thermistor onboard is an 10K NTC type. The issue I am having is VCC and ground are swapped. VCC goes to the resistor and ground connects to the thermistor.

The connection between the thermistor and resistor goes to the analog output pin. That is where I am connected to the Arduino on pin A0.

The code from the Thermistor2 page on the Playgroud seems to work but when raising the temperature on the thermistor shows a decrease in temp.

I’m not skilled enough in code to understand where I need to change the sketch in order to reverse this.

Help appreciated. Thank you.

Here’s the code I am attempting to use:

#include <math.h>

double Thermistor(int RawADC) {
 double Temp;
 Temp = log(10000.0*((1024.0/RawADC-1))); 
//         =log(10000.0/(1024.0/RawADC-1)) // for pull-up configuration
 Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
 Temp = Temp - 273.15;            // Convert Kelvin to Celcius
 Temp = (Temp * 9.0)/ 5.0 + 32.0; // Convert Celcius to Fahrenheit
 return Temp;

void setup() {

void loop() {
 Serial.println(int(Thermistor(analogRead(0))));  // display Fahrenheit

If the thermistor sensor board just consists of a resistor and a thermistor, it doesn't matter what you call "Vcc" and "GND".

Simply swap the two connections and the program should work..


adcResult = 1023 - adcResult;