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

[BUG] Wrong MPC settings can cause thermal runaway #27253

Closed
1 task done
rondlh opened this issue Jul 9, 2024 · 9 comments · Fixed by #27274
Closed
1 task done

[BUG] Wrong MPC settings can cause thermal runaway #27253

rondlh opened this issue Jul 9, 2024 · 9 comments · Fixed by #27274

Comments

@rondlh
Copy link
Contributor

rondlh commented Jul 9, 2024

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I already reported this in #27236, but no response there and I think this issue needs attention.

Because of #27236 all my MPC settings were set to 0, which causes a thermal runaway of the hotend, the heater keeps heating 100% while the target temp is not changed (still set to 0). I use a ceramic heater which did not survive this, even though I have thermal protection enabled.

Bug Timeline

Introduction of MPC (I guess)

Expected behavior

MPC doesn't allow bad values, to prevent a thermal runaway.

Actual behavior

Hotend thermal runaway (broken ceramic heater)

Steps to Reproduce

  1. Set all MPC parameters to 0, and save them with M500
  2. Restart the printer and monitor the hotend temperature
  3. Switch the printer off asap when you see the heater start heating or unplug the hotend heater
    RECOVERY: Run M502, M500 and restart the printer

Version of Marlin Firmware

Latest bugfix July 2024

Printer model

Custom

Electronics

MKS Monster8 V1.0

LCD/Controller

BTT TFT35 V3.0

Other add-ons

BTT EBB42 V1.2

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

I suggest to set some limits to the MPC parameters where needed.
I guess all values should be positive, and MPC_HEATER_POWER should have a minimum value (10?).
Setting some values to 0 might cause a divide by 0 issue, causing unpredictable results.

Configuration_adv.zip

@thisiskeithb
Copy link
Member

@tombrazier Can you take a look at this?

@tombrazier
Copy link
Contributor

Protecting against dangerous bad config is a very good idea.

I am concerned that the values all ended up as zero in the first place, though. Did this happen with M306 T?

I think the following is needed:

  • The config that most needs protecting against obviously wrong values is the heater power and the block heat capacity.
  • Add sanity checks for compiled-in config.
  • Add checks in M306.cpp.
  • M306 T should not create unsafe config.

@ellensp
Copy link
Contributor

ellensp commented Jul 9, 2024

0's are a result of bug #27236 now fixed

@rondlh
Copy link
Contributor Author

rondlh commented Jul 10, 2024

Protecting against dangerous bad config is a very good idea.

I am concerned that the values all ended up as zero in the first place, though. Did this happen with M306 T?

No, there is an issue in the loading of the settings, I reported it here: #27236.

I think the following is needed:
* The config that most needs protecting against obviously wrong values is the heater power and the block heat capacity.
* Add sanity checks for compiled-in config.
* Add checks in M306.cpp.
* M306 T should not create unsafe config.

That makes perfect sense to me. There is a report that somebody got negative values, that seems quite odd: #27181 I see you are onto that one already. Also make sure no divide by zero can occure.

@thisiskeithb
Copy link
Member

thisiskeithb commented Jul 11, 2024

No, there is an issue in the loading of the settings, I reported it here: #27236.

was an issue. That's now patched 🙂

@rondlh
Copy link
Contributor Author

rondlh commented Jul 11, 2024

No, there is an issue in the loading of the settings, I reported it here: #27236.

was an issue. That's now patched 🙂

Right, tested it, works fine now, great job🙂

@thijstriemstra
Copy link

thijstriemstra commented Jul 11, 2024

Right, tested it, works fine now

guess it can be closed then.

@thisiskeithb
Copy link
Member

guess it can be closed then.

#27236 is already closed. We still need to install some guardrails around sane MPC settings, so this (#27253) bug report can remain open.

@thisiskeithb
Copy link
Member

Fixed in #27274

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants