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] Massive temperature overrun when using filament load with MPCTEMP enabled #25480

Closed
1 task done
pit3k opened this issue Mar 8, 2023 · 3 comments
Closed
1 task done

Comments

@pit3k
Copy link
Contributor

pit3k commented Mar 8, 2023

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

Yes, and the problem still exists.

Bug Description

I'm using MPCTEMP on my bowden Ultimaker and it's working great, except when I use "filament load" functionality.

Filament load waits for hotend to reach preset temp (lets say 240C) and then does a looong extrude (length of the bowden, 600mm in my case) with really high speed (60mm/s in my case).

MPC does not realize that filament is not actualy yet extruded through the nozzle and applies its "filament_heat_capacity_permm" to compensate, and since the speed is so high it results in MAX power delivered to hotend for a long time (10s in my case).
In my case steady power is ~25%, and after 10s of MAX power it results in hotend jumping from preset 240C to 295C+ which nearly destroyed my hotend.

Here is a log from serial console simulating the issue by setting temp to 190 and then extruding (through bowden only) for 5 seconds:

Recv:  T:190.25 /190.00 B:28.10 /0.00 @:30 B@:0
Recv:  T:190.40 /190.00 B:28.04 /0.00 @:29 B@:0
Recv:  T:190.12 /190.00 B:28.04 /0.00 @:31 B@:0
Send: G1E250F3000
Recv: ok
Recv:  T:190.37 /190.00 B:27.98 /0.00 @:127 B@:0
Recv:  T:190.40 /190.00 B:28.01 /0.00 @:127 B@:0
Recv:  T:190.73 /190.00 B:27.93 /0.00 @:127 B@:0
Recv:  T:191.47 /190.00 B:27.93 /0.00 @:127 B@:0
Recv:  T:192.57 /190.00 B:27.98 /0.00 @:127 B@:0
Recv:  T:194.34 /190.00 B:27.95 /0.00 @:89 B@:0
Recv:  T:196.69 /190.00 B:27.95 /0.00 @:11 B@:0
Recv:  T:199.16 /190.00 B:28.01 /0.00 @:0 B@:0
Recv:  T:201.75 /190.00 B:27.93 /0.00 @:0 B@:0
Recv:  T:203.80 /190.00 B:28.01 /0.00 @:0 B@:0
Recv:  T:205.57 /190.00 B:28.04 /0.00 @:0 B@:0
Recv:  T:206.88 /190.00 B:27.95 /0.00 @:0 B@:0
Recv:  T:207.76 /190.00 B:28.04 /0.00 @:0 B@:0
Recv:  T:208.13 /190.00 B:27.95 /0.00 @:0 B@:0

I've made a fix in my branch to ignore extrude speeds that will never be used while really extruding through nozzle:

diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp
index b572690256..6b7d009914 100644
--- a/Marlin/src/module/temperature.cpp
+++ b/Marlin/src/module/temperature.cpp
@@ -1512,6 +1512,8 @@ void Temperature::mintemp_error(const heater_id_t heater_id) {
         // The position can appear to make big jumps when, e.g. homing
         if (fabs(e_speed) > planner.settings.max_feedrate_mm_s[E_AXIS])
           mpc_e_position = e_position;
+        else if (e_speed > 10.0f) // Ignore very fast E moves which do not actualy extrude (e.g. filament load)
+          mpc_e_position = e_position;
         else if (e_speed > 0.0f) {  // Ignore retract/recover moves
           ambient_xfer_coeff += e_speed * mpc.filament_heat_capacity_permm;
           mpc_e_position = e_position;

I can prepare a pull request, however I'm not sure it's the best general solution - I can make the speed configurable using separate config option in MPC or use already existing "FILAMENT_CHANGE_FAST_LOAD_FEEDRATE".
Alternative solutions worth considering:

  1. Let filament load module somehow communicate to MPC that it's doing its load cycle and it "knows" that filament is not really being extuded through nozzle.
  2. Detect that temperature is rising rapidly and disable filament_heat_capacity_permm compensation or simply cut the power to hotend temporarily until temp drops back to no more than say +10C over set temp.

Thoughts?

Configuration.zip

Bug Timeline

New issue

Expected behavior

Temperature is maintained when using filament load

Actual behavior

Temperature overshoots by 45C when using filament load

Steps to Reproduce

No response

Version of Marlin Firmware

FIRMWARE_NAME:Marlin bugfix-2.1.x (Mar 8 2023 12:13:29)

Printer model

No response

Electronics

No response

Add-ons

No response

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

No response

@pit3k
Copy link
Contributor Author

pit3k commented Mar 17, 2023

My original proposed solution did not work very well, so I went with a better alternative by disabling MPC compensation for the duration of filament load (see PR #25531). Tested it over the last couple of days and seems to work very well.

@pit3k
Copy link
Contributor Author

pit3k commented Mar 18, 2023

I've confirmed PR #25531 fixes the issue.

@pit3k pit3k closed this as completed Mar 18, 2023
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant