Sorry: equations didn't turn out. LATEX broken. Type the code in the text box on this
https://www.codecogs.com/eqnedit.php website to see the resulting equation.
the initial response was good but then varying the set points to different values quickly the PID was slow to react.
This is what would happen if you didn't clamp the integrated term. Recovery would be very long.
Remember this [Latex]\int \frac{\mathrm{de} }{\mathrm{d} t}
[/latex] term. The integral of the error.
The LATEX code is: \int \frac{\mathrm{de} }{\mathrm{d} t}
With the error large the integral of the error can grow unbounded. There is absolutely NO REASON for it to be greater than 100%. No point at all. You have to clamp it at 100%.. Better yet, you can clamp the integral term at 100%-(proportional term).
This is the same as the power supply limits of an analog controller.
Think of the integral term going to 1,000,000. How much time would it take to get it back to a reasonable level. Lots.
Does this make ANY sense?
Fixing that, ought to make your controller behave, Adding graphing, would verify that it is behaving.
Two other variables are worth adding:
P0 = the initial output
[latex]\frac{\mathrm{dp} }{\mathrm{d} t}[/latex] is also useful.
The LATEX code is: \frac{\mathrm{dp} }{\mathrm{d} t}
The 2560 is kinda close to the Due. Same shield anyway.
I suppose your in the uk (time and 240 vac) but not sure. Can you locate a thermister that can read from say 25 to 200C and a 500 W lamp and base? Don't buy anything yet?
Can you locate your PID Sketch?