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

fix mmu_eject and mmu_recovery command #414

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ntchris
Copy link
Contributor

@ntchris ntchris commented Sep 1, 2024

fix mmu_eject and mmu_recovery command make it work with tension sensor free move distance

add capability to check if filament is in extruder with tension sensor device

  1. added new function retract_from_extruder_until_mmu_can_freely_pull() to reliably pull filament out of extruder

  2. make _unload_sequence() work reliably with tension sensor setup

  3. added helper function with_tension_sensor_check_is_filament_in_extruder_by_weak_move() to test filament is in extruder by weak pull

  4. modified _test_filament_in_extruder_by_retracting() to make it work with tension sensor setup

5 can test and output a help message to suggest user adjust toolhead_extruder_to_nozzle value in parameter.cfg file like this had to unload extra 11.0mm to unload from extruder, suggest adjust toolhead_extruder_to_nozzle in config

6 added a sanity check if unload from extruder, the unloaded length must not be too far off from the bowden length, so to detect a true unload failure, so to avoid EREC servo cutter to cut in the middle of the filament while it's still loaded in extruder, what a disaster

Test:

  • load filament in extruder, can load
  • mmu_recover can detect correctly
  • load 50mm more filament into extruder, and run mmu_eject, can eject correctly
  • put filament in encoder only, unloaded from extruder, MMU_TEST_MOVE MOVE=50, mmu_recover can recovery correctly
  • set a obviously shorter value for toolhead_extruder_to_nozzle * in parameter.cfg file, filament still can be pulled up by MMU_EJECT command

add capability to check if filament is in extruder
1. added new function retract_from_extruder_until_mmu_can_freely_pull() to reliably pull filament out of extruder

2. make _unload_sequence() work reliably with tension sensor setup

3. added helper function with_tension_sensor_check_is_filament_in_extruder_by_weak_move() to test filament is in extruder by weak pull

4. modified _test_filament_in_extruder_by_retracting() to make it work with tension sensor setup

5 can test and output a help message to suggest user adjust toolhead_extruder_to_nozzle value in parameter.cfg file like this
had to unload extra 11.0mm to unload from extruder, suggest adjust toolhead_extruder_to_nozzle in config

Test:

* load filament in extruder, can load
* mmu_recover can detect correctly
* load 50mm more filament into extruder, and run  mmu_eject, can eject correctly
* put filament in encoder only,
 unloaded from extruder, MMU_TEST_MOVE MOVE=50, mmu_recover can recovery correctly
* set a obviously shorter value for toolhead_extruder_to_nozzle * in parameter.cfg file, filament still can be pulled up by MMU_EJECT command
@moggieuk
Copy link
Owner

moggieuk commented Sep 3, 2024

There is a lot of logic to parse here. Few things to be aware of:

  1. Has to work with python2 because Klipper still supports. It's really frustrating but necessary. I'd estimate about 10%+ of users
  2. Need to make sure this works with all sync_feedback sensors including those that don't have switches but are proportional feedback. May need a config option.
  3. In my "auto-calibration" branch I have logic to auto-tune bowden length and gear rotation_distance for none gate 0. This relies on a couple of pieces of telemetry data. including the excessive homing that was necessary and the mismatch of encoder and move through the bowden. Need to think through how this is effected by sync-feedback sensor.

Other thoughts. I haven't studied many devices in detail but they really need a spring that attempts to hold them at a fixed point until pressure becomes too great. This "natural home" would help with consistent move lengths.

@PaulMellor
Copy link

Just a questions regards "I haven't studied many devices in detail but they really need a spring that attempts to hold them at a fixed point until pressure becomes too great. This "natural home" would help with consistent move lengths."

As I have thought about that myself in regards to the belay and other compression/tension sensors as they do not have a neutral position only a compression and tension position. Is the coding already if a third position in the sensor to add as a neutral? Knowing full well it will add significant length to the sensor(I am currently using a Hall effect switch) so need that to provide a gap between the switchs. Not an expert but can certainly modify to test this out.
As I think the sensor is beneficial as have a 1200mm Bowden length, and certainly has improved prints as less strain on extruder.

@moggieuk
Copy link
Owner

moggieuk commented Jan 17, 2025

Just a questions regards "I haven't studied many devices in detail but they really need a spring that attempts to hold them at a fixed point until pressure becomes too great. This "natural home" would help with consistent move lengths."

As I have thought about that myself in regards to the belay and other compression/tension sensors as they do not have a neutral position only a compression and tension position. Is the coding already if a third position in the sensor to add as a neutral? Knowing full well it will add significant length to the sensor(I am currently using a Hall effect switch) so need that to provide a gap between the switchs. Not an expert but can certainly modify to test this out. As I think the sensor is beneficial as have a 1200mm Bowden length, and certainly has improved prints as less strain on extruder.

H! Indeed the first batch of devices like Belay had only a "filament tension" sensor and so the software (and Happy Hare) had to adjust rotation distance so that we keep bumping on and off the sensor ... not a perfect solution... Note that the switches really need to be slightly short of full travel of the sync-feedback device.

Some newer designs that switches at both ends. This type is supported by Happy Hare which will attempt to keep between the two sensors. Again it has to bounce from one to the other.. better but not perfect...

Happy Hare also supports a proportional feedback device that can provide a signal from -1.0 (filament under tension) to 1.0 (filament under compression). This could be implemented with a hall effect (gap detection), inductance in a compressed spring or linear potentiometer. To make this flexible it is necessary to send HH period klipper events with the single scaled from -1 to 1. This can also be done with hidden _MMU_TEST SYNC_EVENT=<value> command. This will allow happy hare to truly keep the tension between the MMU and extruder constant (and if implemented with a moving sensor, it pinned close to the center position).

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

Successfully merging this pull request may close these issues.

3 participants