โ† Open Viewer
GCodex โ€บ G-Code Guide โ€บ M106
M106

M106 G-Code: Part Cooling Fan Control

M106 turns on the part cooling fan at the specified PWM speed (0โ€“255). M107 turns it off. Part cooling is critical for bridges, overhangs, and fine details in FDM printing.

Syntax

M106 [S] [P]
M107 [P]

Parameters

ParameterDescription
SFan speed 0โ€“255 (0=off, 128=50%, 255=full speed)
PFan index for multi-fan setups (default 0)

Examples

M106 S255
โ†‘ Part cooling fan full speed
M106 S128
โ†‘ Fan at 50% speed โ€” useful for PETG to reduce warping
M107
โ†‘ Fan completely off โ€” use for ABS/ASA to prevent warping
M106 S255 P1
โ†‘ Second fan (index 1) at full speed

Important Notes

  • PLA: full fan (S255) from layer 2 onward for best overhang performance.
  • PETG: 20โ€“50% fan to prevent layer delamination and warping.
  • ABS/ASA: fan OFF completely โ€” cooling causes severe warping and cracking.
  • TPU/Flexible: low fan or off โ€” cooling makes flexible filaments brittle.
  • Slicers set fan speed automatically per layer โ€” M106 in start scripts sets initial fan state.

Common Mistakes

  • โŒ Running ABS with full fan โ€” causes warping, delamination, and failed prints.
  • โŒ Not turning off fan with M107 in end script โ€” fan runs indefinitely after print ends.

Frequently Asked Questions

Q: When should part cooling fan be off?
For ABS, ASA, PC, and nylon โ€” keep the fan off to prevent warping and delamination. These materials need slow, even cooling. For PLA, PETG, and TPU, use partial or full fan cooling. PLA benefits most from full cooling.
Q: Why does fan speed affect bridging quality?
Good bridging requires rapid cooling to solidify each segment before gravity pulls it down. Full part cooling (M106 S255) is essential for bridges longer than 30mm. Without cooling, bridges sag. This is why slicers set 100% fan specifically on bridge layers.