How it works
The tool reads every move line with a Z value (G0/G1 … Z). When the nozzle reaches a new section it inserts M104 S<temp> just before that move, so the temperature changes at the right layer:
section = floor((Z − first Z) ÷ section height)
temperature = start + section × change
Use M104 (set and continue) for towers — the hotend adjusts within a few seconds. M109 waits for the temperature but can leave blobs. The model's sections must match your section height; most popular towers use 10 mm sections with a ~1 mm base.
Suggested ranges
| Material | Start → end |
|---|---|
| PLA | 220 → 190 °C |
| PETG | 250 → 220 °C |
| ABS / ASA | 260 → 230 °C |
| TPU | 235 → 210 °C |
Pick the coolest section with good layer bonding and bridges — usually 5–10 °C above where stringing stops being the main problem. Then check your filament is dry if stringing persists everywhere.
Worked example
Worked example
A PETG tower, 7 sections, 10 mm each
| Start temperature | 230 °C at Z = 0.2 mm |
| Change | −5 °C every 10 mm |
| Section at Z = 10.2 mm | floor(10 ÷ 10) = 1 → 225 °C |
| Final section | 230 − 6 × 5 = 200 °C |
| Total height | 70 mm |
Order the sections hottest at the bottom, so the first layers bond well and the cooler, more stringy end is easy to judge at the top.
Typical ranges to test
| Material | Tower range | Typical sweet spot |
|---|---|---|
| PLA | 220 → 190 °C | 200–215 °C |
| PETG | 250 → 220 °C | 230–245 °C |
| ABS / ASA | 260 → 230 °C | 240–255 °C |
| TPU 95A | 235 → 205 °C | 215–230 °C |
| Silk PLA | 230 → 200 °C | 210–225 °C |
Ranges consistent with manufacturer print-temperature guidance; your filament’s label and TDS take precedence.
How to read the tower
Go section by section: look for stringing between pillars (too hot), rough or droopy overhangs and bridges (too hot or not enough cooling), and gaps or weak layers that snap when you flex the tower (too cold). The best temperature is usually the coolest one that still bonds well, and you can snap a section with pliers to compare strength.
Common mistakes
- Model section height not matching. The tower model and the G-code steps must use the same section height, or temperatures land mid-section.
- Starting at the cold end. A cold first layer can fail before the test starts.
- Changing other settings between towers. Keep speed, fan and retraction fixed when testing temperature.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Temperature never changes | Slicer start G-code overrides, or file uses relative Z | Check the generated file contains M104 lines at the right Z |
| Changes happen at wrong heights | First-layer height differs | Set First layer Z to match your slicer |
| Blobs or a seam at each change | Nozzle still settling to the new temperature | Normal; the tool inserts non-blocking M104, so the first few millimetres of each section are in transition |
How to use the generator
- Download or design a temperature tower model with equal sections (10 mm is common).
- Slice it at a single temperature with your normal settings and save the G-code.
- Load the G-code here, set start temperature, change per section, section height and first layer Z.
- Download the modified file, check the preview list of changes, and print while watching the first change.
FAQ
How do I make a temperature tower?
Download any temperature tower STL, slice it at a single temperature, then load the G-code here, set the start temperature, change per section and section height, and download the modified file.
Does this work with Bambu Studio, PrusaSlicer, Cura and OrcaSlicer?
Yes — it edits plain G-code, so it works with any slicer that outputs standard G0/G1 moves. For Bambu .3mf print files, export plain G-code first.
Should temperatures go up or down the tower?
Start hot at the bottom and go cooler, because the bottom is printed first and hotter layers stick best to the bed.
Can I use this for a retraction test?
This version changes temperature. For retraction, change one retraction setting per print or use your slicer's built-in calibration.
Recommended gear
- Filament dryer — Dries while you print. Check max temperature (≥70 °C) if you print nylon.
- Overture High Speed PLA, 1 kg (1.75 mm) — Our default PLA pick: tight ±0.02 mm diameter tolerance and fast-print friendly.
Some links are affiliate links. MeshMath earns a commission on purchases made through Overture and Anycubic (via Awin) links, at no extra cost to you. Picks are chosen for usefulness, not paid placement.
Related tools
STL weight & filament calculator
Drop an STL to get grams, metres of filament and cost for PLA, PETG, ABS and more.
3D print cost calculator
Filament, electricity, printer wear, labour, failure rate and markup — what to charge.
3D print time estimator
Drop an STL and estimate print time and energy use from layer height and speed.
Online STL viewer & measure
View any STL in 3D, get exact dimensions and check it fits your printer bed.
STL scale & unit fixer
Find the exact scale % to hit a target size, or fix inch/cm exports.
Filament length ↔ weight converter
Convert metres of filament to grams and back for any material and diameter.