prusa3d / Prusa-Firmware-MMU

Other
32 stars 15 forks source link

🚧 Make sure pulley is disabled before disengaging idler #227

Closed gudnimg closed 1 year ago

gudnimg commented 1 year ago

Fixes an issue where filament get ejected when fsensor is triggered when loading filament to nozzle

In the code diff, we are basically just disabling the pulley a little bit sooner. We don't wait for the idler to finish disengaging, but we disable the pulley before starting the disengaging.

gudnimg commented 1 year ago

Two points for thought:

  1. I think this change is better regardless of my 2nd point below. Having the pulley motor disabled when disengaging the idler should improve voltage stability on the 5V rail? 🤔
  2. When GoToErrDisengagingIdler() is entered, hell even ErrDisengagingIdler()... all pulley moves should have already been aborted. So the next step is to explain WHY is the pulley moving at all in the main branch. I need to verify the solution I have right now is not just a sticking plaster / bandage ontop of the real issue.
leptun commented 1 year ago

I think this change is better regardless of my 2nd point below. Having the pulley motor disabled when disengaging the idler should improve voltage stability on the 5V rail?

Not really sure about that. I don't think the drivers use much 5V when running vs when idle. The 5V is used for the tmc driver core, IO and for the charge pump, but. But even with all of these, the driver uses at most 50mA