For my project at university i use your product. Now I have a technical problem.
I want to use a PT100 temperature sensor (2 wires) with Arduino Uno. To get the signal I have checked out, that I need an amplifier and I found the matching one in the internet. I use the MAX31865. The inernet told me how to associate the Arduino with it. I also found the finished programmcode for the Arduino. I installed the Adafruit_Max31865 Library and included it to my programm as the following:
#include <Adafruit_MAX31865.h>.
But the right temperatures aren´t given ou in the Serial Monitor. The RTD value is always 0, the Resistance also and as temperature it aways give 998 or 272 out.
Where is the problem or mistake? Can you help me, please? I also have controlled the REF resistance on the board, there is a 430 Ohm resistance what I also have specified in my programm, as well as the 2 wire Sensor system.
It would be very nice if you can help me! Thank you. The picture shows my construction.
VIN 5V Arduino
GND GND Arduino
3V3 -
CLK Pin10
SDO Pin11
SDI Pin12
CS Pin13
ROY -
My programmcode is the following:
Code: Select all
#include <Adafruit_MAX31865.h>
// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 max = Adafruit_MAX31865(10, 11, 12, 13); // Use software SPI: CS, DI, DO, CLK
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 max = Adafruit_MAX31865(10);
#define RREF 430.0 // The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
#define RNOMINAL 100.0 // 100.0 for PT100, 1000.0 for PT1000
void setup() {
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT100 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; // Wert durch verhältniss von Rreal und Rref
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);
}