# PID Autotuning not working – large initial overshoot, no oscillations

Using the following code to autotune the PID:

M303 E0 S200 C10


Which is setting my tuning temperature to 200 °C using 10 cycles (though this is irrelevant in this scenario).

The temperature overshoots to 250 °C then decreases until room temperature.

The following error is returned:

PID Autotune failed! Temperature too high


As a test I reset all PID values to zero.

M301 P00.00 I00.00 D00.00

M500


Then set the printer to reach 200 °C

M104 S200


This produced the following graph, where oscillations can be seen.

I could attempt to manual tune the PID from here but I'd rather use the autotune command if possible. Any ideas how to fix this?

• No sure what exactly went wrong here, but increasing the PID_FUNCTIONAL_RANGE may help. The overshoot may also have triggered overtemp protections (HEATER_0_MAXTEMP) – towe Mar 5 '20 at 14:46
• @towe I am receiving the message "PID Autotune failed! Temperature too high" so it looks like you are correct about the overtemp protections. However, I am unsure about how to/what to adjust PID_FUNCTIONAL_RANGE and HEATER_0_MAXTEMP to? – FEA42 Mar 5 '20 at 17:48
• We'd need to know what printer (/ hotend) model you're using to say for sure what HEATER_0_MAXTEMP would be safe. PID_FUNCTIONAL_RANGE is just a way of ensure fast heat up times. By default, Marlin heats at 100% power until it's at (Target temperature) - (PID_FUNCTIONAL_RANGE) and only then starts to modulate heating power with PWM. I'm not sure whether that applies to PID tuning though. How long does the hot end take to heat up to the target temperature (with PID = 0)? – towe Mar 6 '20 at 7:13
• @towe The printer I'm using is a Creality Ender 3, the hotend setup is the stock 20W heater cartridge and thermistor, with the Ender 3 having an output power of 24W. The heater block I am using is not stock however, it is a custom one I made myself. With PID=0, the heat up time from room temp to 200°C is approx. 40s – FEA42 Mar 6 '20 at 13:47