Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch thermistor_21.h bug #2

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

Quas7
Copy link
Owner

@Quas7 Quas7 commented Sep 3, 2020

Description

I removed the 5V to 3.3V table #define OV_SCALE conversion. In essence, thermistor_21.h has now the same code content as thermistor_20.h.

The conversion is leading to an erronous temperature reading, as e.g. a 1°C reading at room temperature (see issues MarlinFirmware#16561 and MarlinFirmware#19234)

The table provides temperature reference points in terms of ADC-counts. As long as the ADC reference voltage (LPC, STM normally 3.3V) and the INA826 supply voltage (here as well 3.3V) are identical, there is no theoretical difference in ADC counts (besides noise, etc.).

The ADC is providing counts in relation to his reference voltage and the INA826 opamp does the very same in the analog domain referring to its supply voltage.

I validated with an additional PT100 measurement for 100°C and room temperature.

Note, that the quantization error of the table in combination with rounding of the temperature reading might lead to a few degrees (seen up to 3°C) of error around the center between datapoints, e.g. 25°C, 35°C, etc.

Benefits

Temp Probe Nr. 21 is usable for INA826 PT100 in 3V3 environments. Currently Nr. 21 is greatly underestimating the hotend temperature.

Configurations

in any Configuration.h with INA826-PT100 and 3V3 board setup:
#define TEMP_SENSOR_0 21

Related Issues

MarlinFirmware#19234
MarlinFirmware#16561

Removed 5V to 3.3V table conversion.
The conversion is leading to an erronous temperature reading, as for instance 1°C reading at room temperature.
The 5V table provided in _ADC-counts_ is valid as long as the ADC reference voltage and the INA826 supply voltage are identical.
The ADC is providing counts in relation to his reference voltage and the INA826 does the very same in the analog domain.
Validated with additional PT100 measurement for 100°C and room temperature.
Note, that the quantization error of the table in combination with rounding of the temperature reading might lead to a few degrees (seen up to 3°C) of error around the center between datapoints, e.g. 25°C, 35°C, etc.
@Quas7 Quas7 merged commit 83a01e8 into bugfix-2.0.x Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant