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] Nozzle crash on power loss recovery restore #22792

Closed
mikepthomas opened this issue Sep 17, 2021 · 7 comments
Closed

[BUG] Nozzle crash on power loss recovery restore #22792

mikepthomas opened this issue Sep 17, 2021 · 7 comments

Comments

@mikepthomas
Copy link

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

Yes, and the problem still exists.

Bug Description

Using BIGTREETECH SKR 1.4 Turbo control board. Experiencing problem when I resume printing during power loss recovery.
When POWER_LOSS_RECOVERY is enabled, BACKUP_POWER_SUPPLY is enabled and POWER_LOSS_RECOVER_ZHOME is disabled the following abnormal behaviour is observed:

The printer is equipped with bigtreetech ups 12v v2.0. When I switch off the power the printer pauses printing, raises its print head and saves configuration parameters on an SD Card.
When I switch on the power again and select the resume printing option, the printer does homing of XY axes, heats the head bed and heats the head. Then it moves to the XY position where it stopped printing at power off. At the next stage it is about to resume printing. It starts lowering down the nozzle but goes too far crashing into the heat bed.

Bug Timeline

Old issue as described in #20516

Expected behavior

When the printer powers on it is expected to: home XY axes; heat up the head bed and the head; move to the XY position where it stopped printing at power off; lower Z axes to the position when it stopped; resume printing.

Actual behavior

Instead of returning back to its previous Z position when it stopped printing, the printer keeps lowering the nozzle until it crashes into the heat bed.

Steps to Reproduce

  1. Switch off the power supply. Wait for printer to complete the power off procedure (raise nossle up, switch off)
  2. Switch power on.
  3. Select resume printing

Version of Marlin Firmware

https://github.com/mikepthomas/Marlin

Printer model

Anet A8

Electronics

Bigtreetech SKR 1.4 Turbo

Add-ons

Bigtreetech 12v UPS v2.0

Bed Leveling

UBL Bilinear mesh

Your Slicer

Cura

Host Software

SD Card (headless)

Additional information & file uploads

The firmware I am using is available on my GitHub repository

@moham96
Copy link
Contributor

moham96 commented Sep 19, 2021

You have to monitor the hotend after you switch off the PSU, does the hotend lower a bit due to the gantry weight ? if so then you need to enable the ZHOME option.
I have similar issues with this and found that this commit causes a lot of issues
could you checkout the commit before it 4a7f560

@mikepthomas
Copy link
Author

You have to monitor the hotend after you switch off the PSU, does the hotend lower a bit due to the gantry weight ? if so then you need to enable the ZHOME option.

The gantry does not visibly move down after the PSU switches off or after the Backup Battery depletes the only movement after the PSU switches off is the upwards movement to move the nozzle off the print after power loss.

Unfortunately I have been unable to test the ZHOME option as I have a BLTouch installed with safe Z homing enabled (I do not have a Z min switched installed on the machine and use the probe for z homing) see #22763

I have similar issues with this and found that this commit causes a lot of issues
could you checkout the commit before it 4a7f560

I have also tried my config branched off the commit you mention https://github.com/mikepthomas/Marlin/tree/power-loss-debug and I am still having the nozzle drive down through the print into the bed as described in my description above.
I will try this suggestion #20516 (comment) in the branch later today to see if I have any luck with that, however that code has changed in the latest bugfix so do not think that would work going forward

@mikepthomas
Copy link
Author

mikepthomas commented Sep 21, 2021

I will try this suggestion #20516 (comment) in the branch later today to see if I have any luck with that, however that code has changed in the latest bugfix so do not think that would work going forward

When trying this, the nozzle restores to completely the wrong place and then still crashes into the bed...
If I change this line https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/feature/powerloss.cpp#L537
to sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_raised, 1, 3, str_1));, the printer starts printing at the level the machine stopped when the power was lost as expected which makes me think info.zraise from https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/feature/powerloss.cpp#L369 is being calculated incorrectly on my machine. In the power outage function POWER_LOSS_ZRAISE is used instead https://github.com/MarlinFirmware/Marlin/blob/2.0.x/Marlin/src/feature/powerloss.cpp#L285 (I have changed this from the default 2mm to 10mm as decribed in the UPS user manual. I may try to change this when I get some time on the weekend.

@github-actions github-actions bot closed this as completed Dec 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
@thinkyhead thinkyhead reopened this Apr 21, 2022
@MarlinFirmware MarlinFirmware deleted a comment from github-actions bot Apr 21, 2022
@MarlinFirmware MarlinFirmware deleted a comment from github-actions bot Apr 21, 2022
@MarlinFirmware MarlinFirmware unlocked this conversation Apr 21, 2022
@thinkyhead thinkyhead added Bug: Potential ? Needs: More Data We need more data in order to proceed and removed stale-closing-soon labels Apr 21, 2022
@thinkyhead
Copy link
Member

Please test the bugfix-2.0.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

@mikepthomas
Copy link
Author

Just to update, I never did get to the bottom of the issue and only had 1 failed print due to a power outage since. I unfortunately cannot test the latest bug fix branch as I am currently replacing the SKR 1.4 with an SKR Pico which only works with Klipper as I need the 1.4 for another printer that I am building.

@thisiskeithb
Copy link
Member

Thanks for the follow-up!

If you ever switch back to Marlin and experience this problem again, feel free to open a new issue.

@github-actions github-actions bot removed the Needs: More Data We need more data in order to proceed label Apr 22, 2022
@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 Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants