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?