MAX31865 PT100 and ARDUINO MEGA2560

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
naj_tom
 
Posts: 2
Joined: Thu Nov 23, 2017 11:42 am

MAX31865 PT100 and ARDUINO MEGA2560

Post by naj_tom »

Hello,
can you help me? I don't know what I did wrong? Here are the values that are displayed:
RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02
Fault 0x40
RTD Low Threshold


I used code from sketchbook:

Code: Select all

#include <Adafruit_MAX31865.h>

// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(53, 51, 50, 52);
// use hardware SPI, just pass in the CS pin
// Adafruit_MAX31865 max = Adafruit_MAX31865(53);

// The value of the Rref resistor. Use 430.0!
#define RREF 430.0


void setup() {
  Serial.begin(9600);
  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(100, 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(5000);
}
Best regards!
Attachments
Capture.JPG
Capture.JPG (192.34 KiB) Viewed 2923 times

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by Franklin97355 »

For three wire probes you need to cut the trace between the 2/4 pad and the center pad Check out the tutorial.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by adafruit_support_carter »

Looks like you also need to cut the small trace on the jumper circled below:
cut_trace.png
cut_trace.png (188.37 KiB) Viewed 2911 times
More info:
https://learn.adafruit.com/adafruit-max ... re-sensors

User avatar
naj_tom
 
Posts: 2
Joined: Thu Nov 23, 2017 11:42 am

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by naj_tom »

Hi, thank you to solve my mistake now it's working!

I have one problem how can I connect another one max31865 PT100, and how the code looks like for two temperature sensors (T1 and T2)?

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by adafruit_support_carter »

I have one problem how can I connect another one max31865 PT100, and how the code looks like for two temperature sensors (T1 and T2)?
Connect to hardware SPI and then use two different chip select pins for the two boards.

Code: Select all

// use hardware SPI, just pass in the CS pin
Adafruit_MAX31865 max1 = Adafruit_MAX31865(WHATEVER_CS_PIN_FOR_1ST_BOARD);
Adafruit_MAX31865 max2 = Adafruit_MAX31865(WHATEVER_CS_PIN_FOR_2ND_BOARD);

User avatar
gzmarisa
 
Posts: 11
Joined: Sat Jan 20, 2018 10:25 am

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by gzmarisa »

franklin97355 wrote:For three wire probes you need to cut the trace between the 2/4 pad and the center pad Check out the tutorial.
I have been having the same errors but I am not sure what you mean by the center pad. Can you further explain?

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: MAX31865 PT100 and ARDUINO MEGA2560

Post by Franklin97355 »

This jumper.
Attachments
2018-02-10_09h58_08.png
2018-02-10_09h58_08.png (697.77 KiB) Viewed 2683 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”