Installation and Script

Hi All,
I am interested to measure and save a heating temperature and bought following Arduino parts. i did not find any info how to connect them and make it work, i appreciate for your help.

  1. Arduino MAX31865 PT100/1000 RTD

  2. USB Nano V3.0 ATMEGA328P CH340G 5V 16M Micro-Controller Board For Arduino C

  3. Blue IIC I2C TWI 1602 16x2 Serial LCD Module Display for Arduino

Regards
Asfaha

Hi Everybody,
i am quite new in this field but interested to measure and save heating element data. i bought and setup the following parts together and i am able to measure the temperature but not saving the data. after googling i found out that with the help of Micro SD Card Reader it is possible to save data and bought it. the following code is what i used to read the temperature, could some one help me in modifying the code? or if there is other possibilities?

#include <Adafruit_MAX31865.h>
#include <Wire.h>  
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

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

// 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() {
lcd.begin(16,2);   // iInit the LCD for 16 chars 2 lines
 lcd.backlight();   // Turn on the backligt (try lcd.noBaklight() to turn it off)
 lcd.setCursor(0,0); //First line
 lcd.print("Mehari 'Sensor");
 lcd.setCursor(0,1); //Second line
 lcd.print("Temperature v1.0");
 Serial.begin(115200);
 Serial.println("Adafruit MAX31865 PT100 Sensor Test!");

 max.begin(MAX31865_3WIRE);  // set to 2WIRE or 4WIRE as necessary
 delay(1000);
 lcd.clear();
 lcd.setCursor(0,0); //First line
 lcd.print("TempC = ");
 lcd.setCursor(0,1); //Second line
 lcd.print("TempK = ");
}


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);
 lcd.setCursor(7,0); //First line
 lcd.print(max.temperature(RNOMINAL, RREF));
 lcd.setCursor(7,1); //second line
 lcd.print(max.temperature(RNOMINAL, RREF)+273.15);
 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);
}

Regards
Mehari

@asfaha

TOPIC MERGED.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.