-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
User-configurable Temperature Offsets #18687
User-configurable Temperature Offsets #18687
Conversation
Amplification errors are as likely as offset errors. Not knowing where in the chain from sensor, amplifier, reference/pullupresistor, ADC, evalueation formular/table the error is makes the position of the corrections application a bit random. Where to apply can only be deducted from the shape of the non linearity, from more than two reference measurements. But this thoughts open a can of worms. The user would have to know what he does. |
This is basically for those that think something is "wrong" if the sensors don't all show "reasonable" values at room temperature. For platinum RTDs I think a single point is enough. They are very linear. If I remember correctly thermistors curves can be caIculated if you have 3-5 observed points. I know there are some methods to do this but ... my experience has been that none of the methods produce results that are anymore believable than the current Marlin thermistor tables. Maybe the comment being added to Configuration.h should be changed to say that the offsets are only useful for PT100 and PT1000 based sensors. Maybe change the names from the current TEMP_SENSOR_xxx_OFFSET to RTD_TEMP_SENSOR_xxx_OFFSET. Strange - I thought I had an Excel spreadsheet that would calculate a new PT100 amplifier temp table based on actual vs. reported temperature. What I found doesn't seem to be working. Oh, well - something to work on if someone wants it. |
When Marlin does some of its thermal runaway protection, it looks at the raw temperatures and compares against the max raw value which is calculated in-place to decide if there is some overage. I believe this change will have some effect on where the runaway appears to be triggered because the calculated celsius values may be offset from the interpreted raw value. |
It will neiter change anything in detecting "Thermal runaway" nor "Heating failed" errors. These react only on temperature differences. |
Yeah, those are the routines I was thinking of. They could be tweaked to use these offsets, but AFAIK shorting or disconnecting the sensor will throw an error even without the change. |
As far as I'm concerned this was just a "nice to do" item. I definitely don't want to inadvertently affect any of the protection features. Time to kill this PR. |
This is in response to Feature Request #16561
This PR add the option for the user to configure offsets for each of the temperature sensors. This allows the user to make the sensors display properly at room temperature and/or make all the sensors display the same at room temperature.
CHANGES:
Configuration.h - add temperature offset defines
temperature.cpp:
The offsets for the following have been tested:
The offset for TEMP_SENSOR_1_AS_REDUNDANT has not been tested.