Hallo alle miteinander,
nachdem ich eine Baustelle abschließen konnte, ist nun die nächste dran.
Ich habe mir einen Temperaturmessumformer (Adafruit MAX31865) und einen PT100 Temperatursensor als 2-Leiter besorgt. Nachdem ich mir die Anleitung durchgelesen habe, dachte ich mir nur "hört sich ja ganz easy an".
Nun habe ich den Quellcode aus der Adafruit_Library eingesetzt und meine Pins entsprechend angepasst. Sonst war ja alles default_mäßig auf PT100 eingestellt. Ich kriege aber immer folgende Ausgabe:
RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02
RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02
RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02
Mein restliches Setup ist sonst noch der Arduino Mega 2560
Hier noch vorsichtshalber der Code
/***************************************************
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(48, 49, 50, 51); // Use software SPI: CS, DI, DO, CLK
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 max = Adafruit_MAX31865(48);
#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);
}
Was genau habe ich hier übersehen?
Vielen lieben Dank Freunde
Gruß
Flanell