-
Notifications
You must be signed in to change notification settings - Fork 338
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
Use Stallguard to detect the filament hitting the extruder #150
base: no_toolhead_sensor
Are you sure you want to change the base?
Conversation
this could be something to put on the pile of options, because of potential 'sticky' buffers |
I want this too. I will definitely give it a try! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in a good idea.
This is a "code" review i never run the changes! (may i do a functional test later)
See remarks for requested changes.
Intresting is that the self.toolhead.wait_moves() is called every time before the measurment is taken from the decoder (except once). I suspect that this code isn't working w/o this call.
It looks like we identified the measurment problem in paralell, see #151 🥇
c1ec109
to
60bd4ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now i cant find any issues.
Again this is a pure code review, will do a function test soon.
would like to confirm the physical setup to enable this with easy brd - i have tried with the jumper set to aux (PA7) and diag pin hardwired but cant see any evidence the "self.gear_stepper.do_homing_move(max_length, 5, self.gear_stepper_accel, True, True)" attempts to move the gear selector to home to the bmg gear. If i shorten the reference calibration length to pull up short, the motor fails to move the filament and the load will error reporting no progress detected by the encoder |
@nigelpjames I'm honestly not 100% sure about easy brd - I'm using fysetc/fysetc-erb on my ERCF. The way I did the calibration was:
The value for Frankly, I'm not super happy with this, and I have stopped using it on my setup - mostly because my filament buffer solution is super shitty. once I have that optimised, I'll revisit this. For now, as I can't very well test it, it's mostly a POC. |
Thanks for the guidence. I had an issue with a crimp on my diag -> aux connector patch cable i made up for the easy brd and have it working now. Works really well with my setup and will keep testing and provide feedback. Less stress on the ercf and build up of filiment grinds in the carts |
Seeing more frequent load and prints abort with "!! No trigger on manual_stepper gear_stepper after full movement when loading to extruder"....will keep playing around and tweaking stall guard threshold and cart adjustment & tophats to tune. had no issues with standard sensor-less logic branch with this setup...WIP |
These "!! No trigger on manual_stepper gear_stepper after full movement" are a pain as they instantaneously abort the print...guess its not a problem when homing x&y but a major when 150 changes into a print and a filament change doesnt go to plan. Unsure how to over come this at this stage and have reverted to normal sensorless mode for the time being |
After further research it appears the "!! No trigger on manual_stepper..." may have been due to my system still running with gear stepper microsteps set to 8 vs 16 to work around an earlier issue with serverless code & too many interrupts on Easy Brd's....and probably an overly cautious stall guard sensitivity. Now running with 16 microsteps & 65 stall guard threshold and havent had a repeat issue for 200+ swaps. I also noticed loads would occasionally fail after built up filament tension against the BMG gears was released abruptly causing the filament to back out of the gears and not grab. I'm currently testing with a 2mm extruder pre move added to _load_to_nozzle prior to releasing the servo and continuing the _load_to_nozzle process (theres plenty of slack in the 2.5mm ID ERCF bowden to the extruder). So far so good and have observed a drastic improvement in swap reliability. Stall guard appears to be the way to go as its much less brutal on filament and carts (possibly ok with harder TPU options as well). With the other sensor-less approach, depending on filament it would often end up grinding chunks before the encoder detected no filament movement. |
ok, net-net with stall guard enabled, any fault feeding filament through to the gearset that causes klipper to exceed the max homing distance will result in a "!! No trigger on manual_stepper..." error and your print to abort. the homing safe guard is deliberately brutal and experienced occasional faults I havent been able to tune out such as a bad spear/tip or a filament grind that prevented it from advancing and exceeding the limit. |
This is working phenomenally for me, no more filament grinding. Just one small issue, when the 50mm Stallguard-home-to-extruder movement runs, it reaches the extruder, stops as expected but stays paused for some seconds. Looks to me like does not matter if it reaches the extruder in 5mm or 45mm, it adds a wait after stopping and ends up with the time that would take to move the full 50mm requested. |
The TMC2209 has stallguard which can be used for sensorless homing of steppers. Rather than just ramming the filament into the extruder and watching for skipping, instead, use the stallguard feature to be a little more delicate.
* ercf_hardware.cfg * reorder [manual_stepper gear_stepper] and [tmc2209 manual_stepper gear_stepper] sections, otherwise klipper blows up * add commented `diag_pin` and `driver_SGTHRS` * ercf_parameters.cfg * add new setting `toolhead_use_stallguard`, defaulting to False
60bd4ab
to
449f8b2
Compare
@miguelangel-nubla I've noticed this too. I'm not 100% sure exactly where the delay is coming from. I wonder if there's some internal 'clear the stallguard flag' routine going on here, which causes the delay, maybe. Happy to take suggestions from anyone who knows more about this! |
For
if you call this with
edit: |
Rather than just ramming the filament into the extruder gears, allow people to use stallguard to detect the extruder a little more gently.
This will need documentation in the PDF, as tuning the stallguard threshold is important.