MAX31865 isn't reading correct temperature

Ive got a Node MCU V1.0, a MAX31865 and a PT100 sensor.

Code wise im using the Arduino example:

#include <Adafruit_MAX31865.h>

// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 thermo = Adafruit_MAX31865(D4,D1,D2,D3);
//Adafruit_MAX31865 thermo = Adafruit_MAX31865(D4);


#define RREF      430.0
#define RNOMINAL  100.0

void setup() {
  Serial.begin(9600);
  Serial.print("Adafruit MAX31865 PT100 Sensor Test!");
  thermo.begin(MAX31865_3WIRE);  // set to 2WIRE or 4WIRE as necessary
}


void loop() {
  uint16_t rtd = thermo.readRTD();
  Serial.print("RTD value: "); Serial.println(rtd);
  float ratio = rtd;
  ratio /= 32768;
  Serial.print("Ratio = "); Serial.println(ratio,8);
  Serial.print("Resistance = "); Serial.println(RREF*ratio,8);
  Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF));

  // Check and print any faults
  uint8_t fault = thermo.readFault();
  if (fault) {
    Serial.print("Fault 0x"); Serial.println(fault, HEX);
    if (fault & MAX31865_FAULT_HIGHTHRESH) {
      Serial.println("RTD High Threshold"); 
    }
    if (fault & MAX31865_FAULT_LOWTHRESH) {
      Serial.println("RTD Low Threshold"); 
    }
    if (fault & MAX31865_FAULT_REFINLOW) {
      Serial.println("REFIN- > 0.85 x Bias"); 
    }
    if (fault & MAX31865_FAULT_REFINHIGH) {
      Serial.println("REFIN- < 0.85 x Bias - FORCE- open"); 
    }
    if (fault & MAX31865_FAULT_RTDINLOW) {
      Serial.println("RTDIN- < 0.85 x Bias - FORCE- open"); 
    }
    if (fault & MAX31865_FAULT_OVUV) {
      Serial.println("Under/Over voltage"); 
    }
    thermo.clearFault();
  }
  Serial.println();
  delay(10000);
}

For my wiring, I've got the following MAX31865 -> NodeMCU:
Vin -> 3v3
CLK -> D3
SDO -> D2
SDI -> D1
CS -> D4

My loop is reading out

RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02

which is obviously incorrect.

The probe is a 3 pin probe, so ive put the 3 pin jumper on, and cut the 3 way jumper and soldered the 2 pads on the right for the 3 pin.

My probe has 2 red wires and 1 silver wire. The 2 red wires are in the F+ and RTD+ ports, with the silver wire in the RTD- port

Any ideas?

For my wiring, I've got the following MAX31865 -> NodeMCU:
Vin -> 3v3

As the MAX31865 doesn't have a Vin pin I guess you're using a breakout board instead of the chip directly. We need the schematics of that board as it might contain additional circuitry.

I'm assuming its this - or similar

Did you read this?

SPI Wiring

Since this is a SPI-capable sensor, we can use hardware or 'software' SPI. To make wiring identical on all Arduinos, we'll begin with 'software' SPI. The following pins should be used:

Connect Vin to the power supply, 3V or 5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
Connect GND to common power/data ground
Connect the CLK pin to Digital #13 but any pin can be used later
Connect the SDO pin to Digital #12 but any pin can be used later
Connect the SDI pin to Digital #11 but any pin can be used later
Connect the CS pin Digital #10 but any pin can be used later

Later on, once we get it working, we can adjust the library to use hardware SPI if you desire, or change the pins to other

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