max31865 + PT100

HI everybody!
I'd like to read a RTD value from a PT100 sensor on my arduino with a max31865 shield;
The shield is not an original but a chinese copy buy on amazon or ebay I don't remember exactly;
I try to test the example programme from adafruit and it doesn't work;
The modification on the shield to adapt it at the 3wires sensor was done!
The return value of the PT100 is always the same, always -242,02;
and sometimes, I've the error "Under/Over voltage"...
I try with different shield,sensor,cable and arduino board and it's always the same...

I don't know why

I've seen somewhere a knowing probleme on this copy shield about a capacitor on the supply line;
this capacitor maybe cause a drop down voltage and the guy remove it and replace it buy a bridge...
on the original board, it's a filtering systeme (with ferrite) in place of this componant;
but i don't know where is it on my chinese board...

so
I need to help
Thanks a lot

Hi,
Can you please post the code?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

Hi
The code is this one in example with the adafruit librairy...

/***************************************************
This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865

Designed specifically to work with the Adafruit RTD Sensor
----> Adafruit PT100 RTD Temperature Sensor Amplifier - MAX31865 : ID 3328 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits

This sensor uses SPI to communicate, 4 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/

#include <Adafruit_MAX31865.h>

// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13);
// 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 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!");

max.begin(MAX31865_3WIRE); // 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);
}

I'm looking for how to add a picture on the post...

Hi,

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html .
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Tom... :slight_smile:

the first one!!

IMG_1833[1].JPG

and for the second!!

for the sketch, I'll be better the next time!!
thanks for the tips!

do you find something wrong?

it doesn't work...
i test again

IMG_E1834[1].JPG

The Mega doesn't have the SPI pins on pins 11, 12 and 13 but on 51, 52 and 53!

ok!
I also test on an Arduino UNO and the result is the same
is it ok for the same wiring with the UNO?

Edit your post #2 and insert code tags! Then I will have a look at it.

like that it's better??

/*************************************************** 
  This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865

  Designed specifically to work with the Adafruit RTD Sensor
  ----> https://www.adafruit.com/products/3328

  This sensor uses SPI to communicate, 4 pins are required to  
  interface
  Adafruit invests time and resources providing this open source code, 
  please support Adafruit and open-source hardware by purchasing 
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.  
  BSD license, all text above must be included in any redistribution
 ****************************************************/

#include <Adafruit_MAX31865.h>

// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13);
// 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      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!");

  max.begin(MAX31865_3WIRE);  // 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);
}

Hi,
If whte is gnd and red is supply.
Have you tried using 3.3V on the Arduino and the 3.3V pin of the MAX?
Sorry, my bad, thats a 3.3V output from the MAX.

Tom... :slight_smile:

HI
The white is the ground => OK
The Red (down) is the 5V supply from the arduino
The 3V3 is not connected
=> for me, it's a aditionnel 3,3V supply genered by max31865; so I suppose it's more an output, not an input
The other Red wire (on the top) is connected to the CLK

Hi,
Have you measured the resistances across the wires from the RTD?
Brown, Blue and Black are not usually standard colours for RTD.
For 3 wire you should have two wires of the same colour and the other a different colour.

What measurements do you get?


Thanks.. Tom.. :slight_smile:

I've get arround 107 ohm between "Black and Blue" and the same with "Brown and BLUE"
and between Black and Brown I've nothing
I check before!!

1 Like

Hi,
The MAX is responding as though all 3 pins are shorted.
That is Blue is shorted to Brown or Black.

Can you remove the PT100 and with the Arduino power OFF.
Measure the resistance between the three terminals you are connecting the PT100 to?

Another thing to try is connect a short between the terminals that connect Black and Brown, and connect a 100R resistor between the Black and Blue.
See what reading you get?

Tom... :slight_smile:

1 Like

OK so I test as you recomande!

without the PT100, the resistance between the trhee terminals are "infini", well the pins or not short!

I also test with the 100ohm resistor and it's idem
it doesn't work!!

and i test with the second shield and it doesn't work to...

Hi,
Check that these two terminals ARE a short.


Tom... :slight_smile:

yes they are...

Not sure this would help....

When I first connect a new I2C device to an Arduino I always run the I2CScanner example found in the IDE menu "File/Examples". This program will tell you if there is something working on the I2C bus and what address it is.

Do you have a 2nd board that might still be connected as a 4 wire. If so I would use a 100 ohm resistor (or the 100 ohm leads from your RTD) and wire it so it acts as a 4 wire device.

If no extra board, is it difficult to revert the board to 4-wire? My thought is the conversion may not be the correct changes.

John