Arduino Mega2560, MAX31865 and PT100 -problem to get right t

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
Juki
 
Posts: 3
Joined: Tue Jan 26, 2021 6:47 am

Arduino Mega2560, MAX31865 and PT100 -problem to get right t

Post by Juki »

I have a problem with Arduino Mega2560, MAX31865 and PT100. When I start the system or start serial monitor the result looks like this:

RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02
Fault 0x40
RTD Low Threshold

And now when I unplug the MAX31865 5V power cord and then put it back then the result is like this:

RTD value: 8215
Ratio = 0.25070190
Resistance = 107.80181884
Temperature = 20.02

This is quite a right temperature in my room. I have tested this also by Arduino Uno and the result is same.
Could anybody help in this?

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by mikeysklar »

Hmm, sort of works.

So can you post photos of the MAX 31865. Are you using a 3-wire or 4-wire probe? Which traces did you cut?

User avatar
Juki
 
Posts: 3
Joined: Tue Jan 26, 2021 6:47 am

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by Juki »

This is pic shows how I have connected my Arduino Mega, MAX31865 and PT100

This is the code definitions:
#include <Adafruit_MAX31865.h>

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

// 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
Attachments
MAX31865.jpg
MAX31865.jpg (76.43 KiB) Viewed 330 times

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by mikeysklar »

Excellent diagram.

Can you post your full modified CODE in brackets and photos top and bottom of your board so I can confirm everything?

User avatar
Juki
 
Posts: 3
Joined: Tue Jan 26, 2021 6:47 am

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by Juki »

I am using that test code of Adafruit. If it works I can use the temperature values in my own code, that´s not the problem. I have tested it in Uno by using pins 10,11,12,13 and same pins in Mega too, I have tested both; hardware and software SPI. Result is always the same; I get right temperature values when I unplug and plug back the 5V cord of MAX31865 . Okay ...I will buy new parts and try again...

User avatar
dtmq
 
Posts: 1
Joined: Wed Jun 30, 2021 2:43 am

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by dtmq »

Hello,

Hope all is going well. Has there been any solution to this? I am having similar issues.

When unplugging and plugging back in immediately (or intermittent loss in power) the reading switches to -242.02. When unplugging and letting the Arduino rest for about 3-5 minutes and plugging back in the reading is back to the correct value.

I am using the example max31865 with pins 3, 51, 50, 52. Starts out with readings in the 20's which are correct and changes with temperature, then when unplugged and pugged back in it reads -242.02 and does not go back to the correct value. I believe my solder may not be the best quality, but it does work at first as I am getting the correct value. Only when it looses power I see this issue.

RTD value: 0
Ratio = 0.00000000
Resistance = 0.00000000
Temperature = -242.02

Please let me know if anyone else is able to reproduce the issue.
Thanks,

User avatar
mikeysklar
 
Posts: 14180
Joined: Mon Aug 01, 2016 8:10 pm

Re: Arduino Mega2560, MAX31865 and PT100 -problem to get rig

Post by mikeysklar »

@dtmq,

Let's start your own thread on this issue so we can understand more about your hardware, power supply and what you are unplugging.

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

Return to “Arduino”