This page is under construction and may not have complete or up-to-date information.

thinkyhead

Temperature - Bed

Heated bed temperature control settings

temperature, bed, pid, peltier

A heated bed keeps material from cooling and shrinking at the base so that it maintains adhesion, and is a necessity for almost all high-performance materials. Use the settings and tuning parameters that best maintain a stable bed temperature.

Quick Reference

Feature Flag Default Notes
Bed PWM limit MAX_BED_POWER 255 Use 255 only if you accept PWM on the bed.
PID control for bed PIDTEMPBED (bang‑bang) Enables PID loop; requires DEFAULT_BED_(KP|KI|KD).
Bed hysteresis BED_LIMIT_SWITCHING   Active only when PID is off.
Gradual cooling BED_ANNEALING_GCODE   Adds M190 R T.

#define MAX_BED_POWER int

Max duty cycle for the bed (0–255).

When below 255 a PWM divider is applied to the bed driver.
Use only if you are comfortable with PWM on your heater.

#define PIDTEMPBED

Enable PID control for the heated bed.

With PIDTEMPBED defined, a PID loop drives the bed at the same frequency as the extruder PWM.
When disabled, bang‑bang is used; BED_LIMIT_SWITCHING can be enabled to add hysteresis.

#define MIN_BED_POWER int

Minimum power to improve PID stability.

#define PID_BED_DEBUG

Print bed‑PID debug data to the serial port.

#define DEFAULT_BED_KP float

Proportional gain for the bed PID.

#define DEFAULT_BED_KI float

Integral gain for the bed PID.

#define DEFAULT_BED_KD float

Derivative gain for the bed PID.

#define BED_LIMIT_SWITCHING

Keep the bed temperature within BED_HYSTERESIS of the target.

Only relevant when PIDTEMPBED is not defined.
The switch creates a hysteresis band around the set‑point.

#define PELTIER_BED

Enable a Peltier device for the heated bed.

A Peltier module can both heat and cool.
The firmware assumes a simple bang‑bang loop (0/255).
A second GPIO pin controls the current direction (relay or H‑bridge).

#define PELTIER_DIR_PIN int

GPIO pin that drives the relay (or H‑bridge) for direction control.

#define PELTIER_DIR_HEAT_STATE enum

Pin state that activates heating.

#define BED_ANNEALING_GCODE

Add M190 R T to slow down bed cooling.

When defined, the firmware inserts a gradual‑cooling G‑code sequence after M190 R.
Useful for delicate materials that benefit from a slow temperature drop.