Hello,
could you please help me? I spent 2 days trying and nothing
I made some arduino projects - so I am not completely newbie.
I have bought max31865 for my PT1000 - for the first time.
I use NodeMcu ESP8266.
I checked PT1000 resistance around 1080ohm at 25 celsius degrees.
For 2wire connection I have soldered together (see attached picture):
2/3 wire (top left)
2 wire (top right)
24 middle (just to make sure it is good connection) - 3 is cut
NodeMcu - I use D0, D1, D2, D3 for CS, DI, DO, CLK
Please see the picture and example code.
My result:
RTD value: 32767
Ratio = 0.99996948
Resistance = 4299.86877441
Temperature = 988.79
Fault 0x80
RTD High Threshold
#include <Adafruit_MAX31865.h>
// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(D0, D1, D2, D3);
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 max = Adafruit_MAX31865(10);
// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RREF 4300.0
// The 'nominal' 0-degrees-C resistance of the sensor
// 100.0 for PT100, 1000.0 for PT1000
#define RNOMINAL 1000.0
void setup() {
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT1000 Sensor Test!");
max.begin(MAX31865_2WIRE); // set to 2WIRE or 4WIRE as necessary
}
void loop() {
uint16_t rtd = max.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(max.temperature(RNOMINAL, RREF));
// Check and print any faults
uint8_t fault = max.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");
}
max.clearFault();
}
Serial.println();
delay(1000);
}
Thank you for help
Wawa
May 26, 2018, 12:09am
2
First thing I noticed is the 430 Ohm resistor on that clone board (for a PT100).
The Rref resistor should read '4301' for a PT1000.
Not 4300 or 431.
Also seems that you're powering the module with 3.3volt on the V-in pin.
If you want to power it with 3.3volt, then connect it to the 3.3volt pin.
If you want to power it with more than 3.3volt (3.5-5volt), then connect to the V-in pin.
Leo..
Hello Wawa,
thank you for hints.
I changed both and no success.
RTD value: 32767
Ratio = 0.99996948
Resistance = 4300.86874390
Temperature = 989.15
Fault 0x80
RTD High Threshold
Any other idea please?
1 Like
Wawa
May 26, 2018, 6:51am
4
Never used SPI on a NodeMCU, so I could be wrong.
Are you using the right pins?
Adafruit_MAX31865 max = Adafruit_MAX31865(D0, D1, D2, D3);
http://esp8266.github.io/Arduino/versions/2.0.0/doc/reference.html#digital-io
Leo..
ruzicka:
Hello Wawa,
thank you for hints.
I changed both and no success.
What exactly did you change?
Did you realise that WaWa was telling you that the wrong value resistor was fitted in the Rref position?
Your photograph shows a 430Ω resistor fitted.
This is the value required for a P100 RTD sensor.
For use with a PT1000, this resistor needs to be 4300Ω.
Did you unsolder the resistor from the board and solder a new resistor of the correct value in place?
I am sorry I was not clear.
I changed only source code to:
#define RREF 4301.0
I didn't understand that I have to change resistor somehow. I don't understand what to do.
I changed power input from VIN to 3,3.
This is what I bought - It should be for PT1000 too.
MAX31865 Converter Breakout Board Temperature Thermocouple Sensor Amplifier Module For Arduino PT100/PT1000 RTD To Digital
I appreciate help.
Wawa
May 26, 2018, 11:02am
7
ruzicka:
This is what I bought - It should be for PT1000 too.
No, it's not. That MAX31865 clone board is for a PT100 only.
If you want to use that board for a PT1000, then you have to change that Rref resistor.
For a PT1000 it needs a 4300 ohm 1% resistor, marked 4301.
Which means a 4 and a 3 and a 0 with 1 zero.
Leo..
I though that you probably wouldn't have changed that resistor.
You seemed to have done the operation too quickly. Most people don't have stocks of surface mount resistors available to hand.
Adafruit make their board in two different variants:
One is their PT100 version , the other is their PT 1000 version . The only difference is that resistor value.
It may be easier for you to procure another board of the other type, rather than change the resistor, especially if you are not confident in soldering surface mount components.
Thank you very much!
Although I am not happy, I know why.
I ordered this product "MAX31865 Converter Breakout Board Temperature Thermocouple Sensor Amplifier Module For Arduino PT100/PT1000 RTD To Digital" with no possibility to choose version.
So I thought it is for both sensors - that is why I have to solder something...
This is true "especially if you are not confident in soldering surface mount components"
Thank you!
Wawa
May 26, 2018, 9:48pm
10
4300ohm (or 4.3k or 4k3) 1% resistors are $1 per 100 on ebay.
Time to learn how to (de)solder SMD components.
Those small resistors can be easily swiped off (without force!!!) by heating up two sides at the same time.
Leo..
Hello Leo,
thank you - I was not sure how difficult it is.
I rather ask my friends.
I would order new one, but all on aliexpress are 430ref.
There are like 1-2 products for 20$ - I dont want to spent so much.
Peter
Hello,
I succeeded in receiving correct datas from an MAX31865 with an ESP8266 :
in the file Adafruit_MAX31865.cpp, located in the directory ../libraries/Adafruit_MAX31865_library/, changes :
//static SPISettings max31865_spisettings = SPISettings(500000, MSBFIRST, SPI_MODE1); in
static SPISettings max31865_spisettings = SPISettings(100000 , MSBFIRST, SPI_MODE1);
It reduces the SPI clock.
To prevent compilation error, in the example sketch, you need to change all max.xxx with maxY.xxx
It works now.
Regards.
Straw
Hi Straw - did you have to change the resistor to get it working?
... or did you only edit the Adafruit_MAX31865.cpp file?
Don