Friends, I describe the following problem. In a company I am wanting to optimize the temperature control of the processes. All controls are done with 3-wire PT100 sensors with 4-20ma RTD and PLC. My idea is to use a Nodemcu ESP8266 and a MAX31865 interface to read the PT100 values, since before I used a resistor interpolating values in the code but I did not have such exact measurements. I want to outline here everything I am doing and the values it gives me to help me since I think I am not making it work correctly.
In principle I have the board soldered in the following way:
2/3 WIRE SOLDERED
2 WIRE UNJOINED
24 3 JOINED FROM THE MIDDLE TO THE 3
Then I make the connections like the example code:
CS β D0
DI β D1
DO β D2
CLK β D3
VIN β VIN
GND β GND
RDY β NO CONNECT
Searching the forum and the internet I am trying with the example code of the library
#include <Adafruit_MAX31865.h>
// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 thermo = Adafruit_MAX31865(D0, D1, D2, D3);
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 thermo = Adafruit_MAX31865(10);
// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF 430.0
// The 'nominal' 0-degrees-C resistance of the sensor
// 100.0 for PT100, 1000.0 for PT1000
#define RNOMINAL 100.0
void setup() {
Serial.begin(115200);
Serial.println("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(1000);
}
Lastly and with the least knowledge but searching on the web I found that to connect a 3-wire RTD sensor, I must identify the two wires that are directly connected using a multimeter and connect them to the blocks labeled F+ and RTD+. The third wire, which is connected to the RTD, goes to the left, in the blocks marked F- or RTD-.
The values with this connection are:
RTD VALUE = 0
Ratio = 0.00000000
Resistence = 0.00000000
Temperature = -242.02
Now if I donβt connect the PT100 to the MAX31865 the values are the same.
Getting back to it⦠I just checked the soldering, the GND was poorly soldered on the MAX31865, now when I connect everything it gives me these values, but without connecting the PT100:
RTD VALUE = 14563
RATIO = 0.444442749
RESISTENCE = 191.10382080
TEMPERATURE = 241.77
Fault 0x18
REFIN- < 0.85 X BIAS β FORCE - OPEN
RTDIN- < 0.85 X BIAS β FORCE β OPEN
What am I doing wrong?
The Esp8266 doesnβt work well with the MAX31865? Should I use the ESP32?
I look forward to your suggestions, thanks.