How to modify MAX31865 temperature readings?

Basic Information:

I’m using a Mosquito Magnum+® - 2.85 mm with 2 PT1000 sensors on an Octopus Pro v1.1 controller board.

One RTD is connected to the internal MAX31865, the other to an external MAX31865 board (Adafruit clone).

Issue:

The sensor connected to the external board shows a consistent averaged 5.4 % higher temperature than the one connected to the internal MAX31865:

If I could multiply the readings with a fixed value, the readings would be exactly the same.

How can I adjust the temperature readings from the second RTD by multiplying with a constant to match the output of the first RTD?

Hello @0scar !

Are the sensors at the exact same spot?

No, but the hotend is symmetrical and 2 identical heaters are used.

Nevertheless, this isn’t a problem for the question, the question is how can I edit the values of one RTD to match the other. My measurements already conclude there is a very good relation between both.

I’m not seeking an answer why they differ, I’m seeking an answer to make them the same. :slightly_smiling_face:

And how do you know what one is the correct one?

I have a separate PT100 to measure it, but again, this is not relevant to the question.

Temperatures are all irrelevant to be honest, it is what you schedule in the slicer what is your temperature, that doesn’t necessarily need to be the actual temperature, filaments have temperature ranges, it is you who tunes the hot end with a temperature tower to find the “temperature” the printer prints well with.

Please explain me how I can adjust the second one rather than delving into the difference or the correct sensor.

Are that sure?

The readings are not for observation, they are for setting the hotend to the proper temperature for the used material. A few degrees can decide if there is stringing or clogging. The reading should be quite precise. Not be ironed down to a proper view.

Simple: you cannot.
But as you said:

Here I agree, given you do not rely on any pre-defined values but dial in your filament yourself.

And on this hot-end, it is even more irrelevant, since the second RTD is intended as a redundant fail-safe, and this is something Klipper does not support anyway.

1 Like

@EddyMI3D
Thanks for linking that topic, I now understand that it is not possible (yet).

And yes I’m sure that temperatures are irrelevant.

@Sineos
It isn’t completely irrelevant that the sensor readings are off, I use the difference between the 2 to detect anomalies, indeed, the second is redundant, but it would be great if I can use it to detect it one of the two sensors fails, e.g.:

[gcode_macro M105]
rename_existing: M99105 #M105's behavior will be remapped to M99105
gcode: 
  #M99105
  {% set bed_temp = printer.heater_bed.temperature|round(1, 'floor') %}
  {% set bed_target_temp = printer.heater_bed.target|round(1, 'floor') %}
  {% set heater_1 = printer.extruder.temperature|round(1, 'floor') %}
  {% set extruder_target = printer.extruder.target|round(1, 'floor') %}
  {% set heater_2 = (printer["temperature_sensor Extruder_(spare)"].temperature|float|round(1, 'floor') / 1.054302556)|float|round(1, 'floor') %}
  {% if (heater_1 - heater_2)|abs > 15.0 and printer.extruder.target != 0.0 %}
    M118 Hotend temperature fluctuation between sensors exceeded 15 °C. Shutting down.
    M118 Sensor 1:{heater_1} Sensor 2:{heater_2}
    M112
  {% else %}
    M118 B:{bed_temp} /{bed_target_temp} T0: {heater_1} /{extruder_target} T0S:{heater_2}
  {% endif %}

Some thoughts on this:

  • According to my experience, such RTDs fail badly when they do fail, i.e., with extreme deviations from the proper value.
  • Klipper already has quite strict temperature checking and should catch such a failure quite reliably. I think only very little is gained from such a macro.
  • As a normative reference for the accuracy of RTDs, you may take a look at the IEC 60751:
    • Class A ± (0.15 + 0.002 * t) → At 250 °C: ±0.65 °C
    • Class B ± (0.3 + 0.005 * t) → At 250 °C: ±1.55 °C
    • Class C ± (0.6 + 0.01 * t) → At 250 °C: ±3.1 °C

The MAX31865 supports rtd_nominal_r and rtd_reference_r options (see Configuration reference - Klipper documentation ). It should be possible to alter these values from their defaults to alter the corresponding temperatures.

I’m not entirely sure, but I think you might be able to multiply the rtd_reference_r default (430.0) by some factor to effectively multiply the corresponding temperatures by that factor. See the MAX31865 code in klippy/extras/spi_temperature.py for details.

-Kevin

1 Like

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