- How to Turn Off the Heated Bed in Cura Before the Print Finishes
- What Is Cura?
- Why Turn Off the Heated Bed Early?
- Energy Savings
- Easier Print Removal
- Safety and Material Protection
- The G-code Command: M140 S0
- Using “Insert at Layer Change” in Cura
- What to Watch Out For (Common Pitfalls)
How to Turn Off the Heated Bed in Cura Before the Print Finishes
3D printing is already energy-intensive – so why not save power wherever possible?
A simple yet often overlooked trick is turning off the heated bed just before your print finishes. This small change brings two major benefits:
- You save energy.
- The print cools faster and becomes easier to remove from the build plate.
In this guide, I’ll show you step-by-step how to add a G-code command in Cura (example version 5.10.2) to automatically turn off the heated bed shortly before your print ends – and what you should watch out for.
What Is Cura?
UltiMaker Cura is one of the most popular open-source slicing software tools for FDM/FFF 3D printers. You load your 3D model, adjust parameters such as layer height, speed, and temperature, and Cura generates the G-code that your printer uses to execute the print.
With Cura’s extensions and post-processing scripts, you can also modify the generated G-code, insert custom commands, or automate certain actions – perfect for advanced customization or power-saving tweaks.
Why Turn Off the Heated Bed Early?
Energy Savings
The heated bed often stays on until the very end – even when only the top layers are printing. Turning it off during the last few layers can save a noticeable amount of power, especially for long prints.
Easier Print Removal
As the build plate cools down, adhesion decreases naturally. Letting it cool slightly before the print finishes makes removing the model much easier – particularly for large or strongly adhering prints.
Safety and Material Protection
For some materials (not PLA (*)), prolonged heating can lead to warping or surface stress. By switching off the heated bed earlier, you reduce unnecessary heat exposure and allow the model to cool more evenly and safely.
The G-code Command: M140 S0
To switch off the heated bed, use the following command:
M140 S0 ; Turn off heated bed
- M140 is the standard G-code command to set the bed temperature.
- S0 sets the target temperature to 0 °C – effectively turning it off.
If you insert this command a few layers before the print ends (for example, Layer -5), the bed will begin cooling before the last layers are complete.
Using “Insert at Layer Change” in Cura
Cura provides a built-in post-processing feature that allows you to modify your G-code automatically at specific layers:
- Go to Extensions → Post Processing → Modify G-Code
- Click Add a Script and select Insert at Layer Change
- Enable the script (check the box)
- Configure the following settings:
- How often to insert: One insertion only
- Layer # for Single Insertion: -5 (five layers before the end)
- G-code to insert:
M140 S0
Example:
If your print has 100 layers, Cura will insert the M140 S0 command at layer 95. The bed will start cooling before the final layers are printed.
What to Watch Out For (Common Pitfalls)
- Firmware compatibility:
Ensure your printer’s firmware supports the M140 S0 command. Most modern firmware like Marlin or Klipper do. - Avoid duplicate shutdowns:
If your printer’s end G-code already includes a bed-off command, inserting another one might be redundant. - Timing matters:
Don’t turn off the heated bed too early. With delicate materials or thin layer heights, premature cooling might lead to layer separation or adhesion issues in the final layers.
(*) Affiliate Links