Erroneous RTD Amplifier temperatures during Amplifier initialization when SAVE_CONFIG

When you use an RTD Amplifier such as the MAX31865 on the BTT EBB36 you will get erroneous temperature readout during that chips initialization when you SAVE_CONFIG.
Fluidd wanted moonraker to implement a fix.

moonraker wants klipper to impement a fix

Looks like simply ignoring the first second or less of data from the RTD during initialization would fix this issue.

Site says “Sorry, an error has occurred.” when I try to upload klippy.log so here is a gist.

Did you try to increase tc_averaging_count parameter ?
possible values for MAX31856 are: 1, 2, 4, 8, 16

It only happens when doing SAVE_CONFIG. Not boot, FIRMWARE_RESTART, etc. Also happens on every different printer I have and everybody I know that uses RTD amplifiers. Not a config issue. Wrong temperature only happens for less than a second then quickly returns to normal.

Though I am not entirely sure how this is happening, I do wonder if the problem is confined to the combination of the BTT EBB36 with a MAX31865 amplifier.

Having said that, any temperature below absolute zero (-273.15C) is obviously wrong, so anything below that should just be counted as an error and discarded.

It is seemingly random. Sometimes it will spike to hotter than the surface of the sun and other times it will be in the negatives.

Personally all my MAX31856 chips are on EBB36 boards and they all do this but when I first got this board like 2 years ago or something I had this issue and asked about it in the Voron Discord and was told the MAX31856 chip just does weird things when it initializes.

Looking through Marlin FW source code does seem to confirm this!

Marlin code for the MAX31856 seems to use some sort of hacks to fix misbehavior of the chip… Having said that, I personally have no idea what would be required to fix it on Klipper side as I use (or even have) no such chips myself.

1 Like

To add another (random?) data point to this discussion, I’ve used MAX31865 / PT1000 hot end temperature sensing ever since I commissioned my Voron 2.4 S/N 2.4894. I was also somewhat involved in encouraging improved fault tolerance for the MAX series temperature sensors. The installation has been totally “bulletproof” overall.

I have, however, seen these spikes during MCU resets in the past, but I have to admit that it has been quite a while since I have seen them. This is largely anecdotal though, because I have not been printing as much recently as I have been in the past and therefore I’ve had fewer opportunities to see them. But I always wondered what was causing the extreme reading values at initialization.

In addition to initialization, some of the MAX series chips have additional diagnostic capabilities that are not currently used by Klipper, for example see here: Improve error handling of thermocouple code #5780. I still feel that using some of these capabilities would be beneficial, but it would introduce additional code complexities.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.