Recover a Print After a Power Cut

Recover a Print After a Power Cut

I recently did my largest print ever which was expected to take 26 hours!

But after about 16 hours there was a power cut and the printer stopped and lost all of its progress.

In this post I will got through how I managed to recover the print and allow it continue.

The power went during the night so I found the printer after about 4 hours of being off.

The first problem was that the nozzle was stuck to the piece so I heated it so that it would separate easily.

Next I needed to home the printer without hitting the piece, luckily there was space behind the print to do this.

You can home the X/Y and Z axes separately, I raised the print head above the print so that it wouldn’t hit the print during X/Y homing.

Then I homed the X/Y axis.

Now I moved the print head as far as I could behind the print and noted the Y position.

Then I homed the Z axis.

Now I could use the print head to determine where the print failed. I moved the head over a flat part of the print and gradually moved the head down until it touched the print. Using this I determined that the print failed at 66.4mm.

Next I opened the gcode file that was generated by my slicer for the print and I searched for Z66.4. The gcode file contains all the instructions that the printer will use to print your file. If you want to learn what the commands mean RepRap have an excellent reference PDF here.

So we can see it failed at layer 331, now I need to delete everything before the layer comment “;LAYER 331” up to the comment for the first layer “;LAYER 0”.

Now we have layer 331 as the first layer, I also updated the layer count for statistics purposes (I’m not sure if this will actually affect anything though).

Now we need to edit the initial setup commands at the start of the print so that we can home the printer without hitting the piece.

We can ignore the comments at the start that have a semicolon (;) in front of them.

The first 3 commands that are run G21 (set to metric), G90 (Set absolute positioning, this means tell it exactly where to go rather than relative), and M107 (Turn off fan) and the last five commands M140/M104/M190/M109 (temperature settings) and M117 (Set Screen Message) can stay the same but we need to edit the commands in between these. Lines 16 to 19 setup the extruder and these can also be kept the same.

The changed setup excerpt can be seen below.

G0 is rapid move, G1 is precise movement and G28 is home.

The homing sequence now raises the print head to where it thinks 80mm is (G0 Z80), it then homes the X/Y axes (G28 X0 Y0). 80mm was above the model so it wouldn’t hit the model during X/Y homing.

Then it moves the print head behind the model (G0 Y192) and homes the Z Axis (G28 Z0).

Finally it moves the print head above the model and sets the filament feed rate (G1 Z90.0 F3600) which means that the print head will come down onto the model and not hit the model.

This method results in some of the affected layer being printed twice so the print may be a small bit out in some places but it is better than losing a large print.

This method worked for me and the print finished successfully.


As always if you have any questions please don’t hesitate to ask,



The idea for this fix was based on a hackaday post.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: