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

Ignore intermittent errors in the MAX31855K (and MAX6675) thermocouple sensor. #18039

Merged
merged 2 commits into from
May 20, 2020

Conversation

mobilinkd
Copy link
Contributor

Description

Ignore intermittent errors in the MAX31855K (and MAX6675) thermocouple sensor. This replicates behavior in Sailfish firmware for handling thermocouple sensors on the Makerbot Replicator & numerous clones.

Require a number of errors from a thermocouple sensor in series before triggering a fault. The default is set to 15 as this is the default in Sailfish firmware.

Benefits

Current behaviour of Marlin is that a single error event in a thermocouple sensor will cause the printer to halt with a MAXTEMP error. This change ignores intermittent errors from a thermocouple sensor due to noise. Marlin will no longer halt with an MAXTEMP error due to a spurious error report.

Safety is still maintained. The error is reported within 3 seconds when a failure resulting in a persistent error condition occurs.

Related Issues

See #18025

I have tested this code by shorting the thermocouples to GND and to VCC. I verified that the error condition is reported and that max_temp_error() is still called.

mobilinkd added 2 commits May 18, 2020 19:21
…5K. Require a set number of errors in series before triggering a fault. The default is set to 15 as this is the default in Sailfish firmware.
@Grogyan
Copy link
Contributor

Grogyan commented May 19, 2020

// Set this value to 0 to fail on the first error to occur.
#define THERMOCOUPLE_MAX_ERRORS 15
Line #408

Should be in conditionals_post.h so that it isn't called for all temperature settings.

@Grogyan
Copy link
Contributor

Grogyan commented May 19, 2020

Tested this PR on the SKR1.3 and, it causes immediate MIN_TEMP

@mobilinkd
Copy link
Contributor Author

Tested this PR on the SKR1.3 and, it causes immediate MIN_TEMP

What thermocouple amplifier are you using? The SKR1.3 does not have a thermocouple amplifier built into it.

What happens when you use the same configuration without the patch?

@Grogyan
Copy link
Contributor

Grogyan commented May 19, 2020

I use the Max31855 breakout board from Adafruit.
Prior to this change, thermal settings work as expected
With this change, MIN Temp is called.
Reverting to 2.0.5.3 bugfix 19-5-2020, works as expected again

@mobilinkd
Copy link
Contributor Author

Can you attach your config settings?

Also, can you try with

#define THERMOCOUPLE_MAX_ERRORS 0

and let me know if you still have the same problem?

@Grogyan
Copy link
Contributor

Grogyan commented May 19, 2020

I cannot right now

@Grogyan
Copy link
Contributor

Grogyan commented May 19, 2020

Currently at work.
I will go through this tomorrow.

@thinkyhead thinkyhead merged commit 60bed34 into MarlinFirmware:bugfix-2.0.x May 20, 2020
@thinkyhead
Copy link
Member

Thanks for the update, @Grogyan. Now merged.

vgadreau pushed a commit to vgadreau/Marlin that referenced this pull request May 29, 2020
jmp0x0000 pushed a commit to jmp0x0000/Marlin that referenced this pull request Aug 7, 2020
HairingX pushed a commit to HairingX/Marlin that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants