Hello Everyone,
I succeeded in reading temperature of 1 PT100 sensor with 1 amplifier MAX31865 connecting to 1 arduino UNO.
Now I want to read temperature of two PT100 sensors with 2 amplifiers MAX31865 connecting to 1 arduino UNO.
Is it possible ?
Where is it possible to get the arduino sketch corresponding ?
Best regards
Michael
2 AMPLIFIERS max31865 and 1 Arduino UNO
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: 2 AMPLIFIERS max31865 and 1 Arduino UNO
That device has an SPI interface, so multiple boards can share the DI, DO and CLK pins. You will need a separate CS pin for each board. This is specified in your code when you declare an instance of the board:
Code: Select all
// use hardware SPI, just pass in the CS pin
Adafruit_MAX31865 max_A = Adafruit_MAX31865(9); // board A using pin 9 for CS
Adafruit_MAX31865 max_B = Adafruit_MAX31865(10); // board B using pin 10 for CS
- acay46
- Posts: 3
- Joined: Fri Dec 14, 2018 9:21 am
Re: 2 AMPLIFIERS max31865 and 1 Arduino UNO
Hi,
I want to use 3 MAX31865, and I have identified 3 MAX31865.
But how do I distinguish fault codes?
Example:
What is this MAX31865_FAULT_HIGHTHRESH ??
I want to use 3 MAX31865, and I have identified 3 MAX31865.
But how do I distinguish fault codes?
Example:
Code: Select all
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");
}
}
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: 2 AMPLIFIERS max31865 and 1 Arduino UNO
That is the high-temperature threshold fault for temperature readings. See page 13 of the datasheet for a detailed explanation:
https://datasheets.maximintegrated.com/ ... X31856.pdf
https://datasheets.maximintegrated.com/ ... X31856.pdf
- acay46
- Posts: 3
- Joined: Fri Dec 14, 2018 9:21 am
Re: 2 AMPLIFIERS max31865 and 1 Arduino UNO
that's not what i mean
Adafruit_MAX31865 max_1 = Adafruit_MAX31865(10, 11, 12, 13);
Adafruit_MAX31865 max_2 = Adafruit_MAX31865(10, 11, 12, 13);
uint8_t fault_1 = max_1.readFault();
uint8_t fault_2 = max_2.readFault();
if (fault_1)
{
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault_1 & MAX31865_FAULT_HIGHTHRESH)
{
Serial.println("RTD High Threshold");
}
}
how do i distinguish it: AX31865_FAULT_HIGHTHRESH
Adafruit_MAX31865 max_1 = Adafruit_MAX31865(10, 11, 12, 13);
Adafruit_MAX31865 max_2 = Adafruit_MAX31865(10, 11, 12, 13);
uint8_t fault_1 = max_1.readFault();
uint8_t fault_2 = max_2.readFault();
if (fault_1)
{
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault_1 & MAX31865_FAULT_HIGHTHRESH)
{
Serial.println("RTD High Threshold");
}
}
how do i distinguish it: AX31865_FAULT_HIGHTHRESH
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: 2 AMPLIFIERS max31865 and 1 Arduino UNO
You can't with the code above for 2 reasons:
1) You have defined both instances of the sensor to use exactly the same pins. So you will always be reading the one with the CS pin connected to 10.
2) Your code is only looking at fault_1. If you want to check the fault on max_2, you need to replicate that code for fault_2.
1) You have defined both instances of the sensor to use exactly the same pins. So you will always be reading the one with the CS pin connected to 10.
Code: Select all
Adafruit_MAX31865 max_1 = Adafruit_MAX31865(10, 11, 12, 13);
Adafruit_MAX31865 max_2 = Adafruit_MAX31865(10, 11, 12, 13);
Code: Select all
if (fault_1)
{
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault_1 & MAX31865_FAULT_HIGHTHRESH)
{
Serial.println("RTD High Threshold");
}
}
Please be positive and constructive with your questions and comments.