In a previous post I explained how I used the MAX31865 with a Wemos D1 Mini to read a PT100 sensor. This worked, but initial readings were erratic. Readings were also off by about 1 degree C.
Almost two weeks later, I have tested 3 different PT100 sensors. I now have an Arduino sketch running which comes out of deep sleep mode every 15 seconds, ensures that the WiFi module remains disabled until after readings and which takes 50 samples and averages the result.
Getting closer to reasonable reading had little to do with that code, unfortunately. Readings would be just as unstable after the adjustments to the sketch. The solution had to be found elsewhere.
My first potential culprit was simply the first sensor I tested. Perhaps it was just poor quality. The second PT100 is a 4-wire sensor as opposed to the 3-wire. Not only is this the best option available in terms of precision, it also saves you from making any changes to the MAX31865. No solder bridges or cutting traces. After receiving the sensor in the mail, I was optimistic results would be better based on initial indoor testing. Readings seemed stable enough. However, after placing it in the (ventilated) shield outside, results would quickly follow the same pattern as the first sensor. Temperature readings would jump up and down, and the average was also off significantly compared to my other sensors
Since both PT100s showed the same behavior, I guessed that the problem could have something to do with signal interference due to the specific setup at my weather station location. I excluded the possibility that it was related to noise from the power supply by running the setup on battery power only. It could still be due to other interference. After all, my weather station is basically a metal pole entwined in (power) cables emitting all kinds of signals.
I proceeded to test the sensor indoors inside some pipe insulation. This in order to create an environment with a relatively stable temperature. To my surprise, the second sensor was not only more stable, but readings would be stable to 1/100th of a degree! No erratic jumps whatsoever.
In order to further test the theory of the signal interference outdoors, I placed the sensor inside the insulation next to the location of the shield. Somewhat to my surprise, readings would be stable then too. Then, whenever I placed the sensor back into the shield, readings would start jumping up and down again in a completely unrealistic manner. This was also true during the night, which means solar radiation cannot be the explanation.
I had not yet completely excluded the possibility of interference, but it seemed increasingly unlikely that this could explain what had been happening.
The arrival of the third PT100 allowed for more testing. This sensor was connected to a wire with visible cable shielding. I cannot say if this has something to do with it, but unlike the first two sensors, the third was giving me much more acceptable results. Jumps from moment to moment were reduced from up to 1 full degree to 0.1 or 0.2 at best. Assuming that the PT100 is much more responsive to temperature changes, this does not seem like crazy behavior.
Still, the actual temperature was still off by a lot. For the cause of this, I’m looking at the MAX31865. I am unsure about the quality of the board I am using. For starters, it’s a cheaper board not actually made by Adafruit. The 430 ohm ‘reference resistor’ is supposed to be within 0.1% of that value. I am thinking that components like that one might be of poor quality and could easily account for big differences. I have not gotten around to test multiple MAX31865s of different make.
In order correct the offset, I did some calibration during the night against one of the SHT35 sensors. An adjustments of 0.88 degrees C should bring the PT100, at least for this specific MAX31865, in line with my other sensors. An interesting side note is that this process also clearly indicated to me that it takes the SHT35 readings a lot longer to settle than the PT100.
The graph for today comparing the PT100 (in black) and an SHT35 is shown below.
I am not unhappy about this graph. The PT100 tracks the primary SHT35 closely. Where readings deviate I can easily attribute this to better responsiveness of the PT100 vs. the SHT35. Also, since the PT100 is housed inside a ventilated shield against the passive Barani MeteoShield Pro, quicker response times make sense regardless of the sensor type.
The third and best performing sensor is actually the cheapest of the three I tried. It can be found here. Perhaps the other two sensors are not as bad as they seem, and in the future I will discover something I’m doing wrong or some other component that is causing the issue.
I am not done testing more PT100 sensors. I will definitely look into a MAX31865 by Adafruit in stead of other manufacturers. Besides that, transmitters which convert the PT100 signal into either a 4-20 mA or a 0-10 V signal are on the market.
They often seem to take a 24 V input. Luckily, I’ve got that available since I changed my power supply lately. If I can get my data logging to a point where I am confident I am doing the right thing, it’s possible I will consider the Barani MeteoPT100. For now I am going to at the behavior of my current PT100 sensor for a while.