Skip to content

Add M109 Deadband - #120

Open
N3MI-DG wants to merge 3 commits into
viesturz:mainfrom
N3MI-DG:deadband
Open

Add M109 Deadband#120
N3MI-DG wants to merge 3 commits into
viesturz:mainfrom
N3MI-DG:deadband

Conversation

@N3MI-DG

@N3MI-DG N3MI-DG commented Aug 20, 2025

Copy link
Copy Markdown

Allows the user to specify a range that is acceptable for the print to progress whenever M109 is sent.

Can be set for all tools adding deadband to the toolchanger section, per tool by adding deadband to the tool section or per use of M109 by adding the D parameter to M109.

For example, M109 T1 S255 D10 will allow the printer to progress once the temp is within 5 degrees above or below 255.

This has the advantage of letting toolchanges progress if within a range the user deems acceptable and can help reduce oozing.

Another use case is if you like to preheat all tools to prime before a print you can run a loop with a high value deadband making sure the current draw of the hotend has reduced before the next tool starts heating.

For example, this would wait until the tools heater is within 100 degrees of its target temp before heating the next.

  {% for tool_nr in printer.toolchanger.tool_numbers %}
    {% set tooltemp_param = 'T' ~ tool_nr|string ~ '_TEMP' %}
    {% if tooltemp_param in params %}
      M109 T{tool_nr} S{params[tooltemp_param]} D200
    {% endif %}
  {% endfor %}

Based on jimmyjon711's deadband implementation.

Cheers.

Allows the user to specify a range that is acceptable for the print to progress whenever M109 is sent.
Based on jimmyjon711's deadband implementation.
Comment thread klipper/extras/toolchanger.py Outdated
@nic335

nic335 commented Sep 6, 2025

Copy link
Copy Markdown
Contributor

I also been running this with latest change and is working fantastic, Having deadband in print_start for me is a nice upgrade, Quicker heat up to get them primed while keeping a smaller power supply.
Then also at tool pickup having the option to give a default deadband per tool, reduce the time at the dock.

This is a great feature!

@pm0u

pm0u commented Sep 29, 2025

Copy link
Copy Markdown

I am going to attempt to try this out, I'm having an issue where I get a 2-3 second stall on tool changes as it waits for the tool to settle back to temp, but i think it wouldn't even matter if it was 100% settled as over all the movements and prime, it will settle regardless.

@anttix

anttix commented Oct 15, 2025

Copy link
Copy Markdown

I do not mean to question the effort here, but what is the key difference between a deadband setting and using Klipper's built-in TEMPERATURE_WAIT command with its MIN/MAX parameters ?
e.g.

TEMPERATURE_WAIT SENSOR={printer.toolhead.extruder} MINIMUM={printer[tool.extruder].target - 1} MAXIMUM={printer[tool.extruder].target + 1}

or even just accept a slight temperature variation due to overshoot and optimize for speed

TEMPERATURE_WAIT SENSOR={printer.toolhead.extruder} MINIMUM={printer[tool.extruder].target}

https://www.klipper3d.org/G-Codes.html#temperature_wait

@daTobi1

daTobi1 commented Feb 11, 2026

Copy link
Copy Markdown

That would be a really useful enhancement to speed up tool changes.
Please consider integrating this in the next update.

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.

6 participants