DS18B20 smoothing and PID tuning

I really meant do something like changing the temp scale to something like 50 to 70 so it would be easier to see the waveform, but that is probably good enough.

Don’t worry about the noise on the power that is of no consequence. It is inevitable when you have a sensor that goes in increments of the size of a DS18B20. It can become an issue when derivative is being used as that amplifies the noise. The Smoothing Factor in the PID algorithm helps with this but it only applies to derivative so doesn’t make any difference if the Derivative Time is zero.

It seems from your graph that in fact the process is not stable, you can see it cycling with a period of a couple of hours. I think this is likely due to an imbalance between the heating and cooling. It may well be stable when just heating but unstable in cooling. It could be that this is why, earlier, you thought you had a stable system with Integral set to 5 mins then suddenly it went completely unstable. It may be that it went unstable when cooling was called for and this pushed it into a completely unstable situation. Tuning heat/cool loops can be particularly tricky.

Can you tell me a bit more about the mechanics of the system? If I understand correctly it is a bucket in a freezer box. So the cooling is presumably just via the walls of the box radiating and conducting into the bucket. Is it a compressor type freezer with a motor? What is the heating arrangement? Is it an electrical heating element in the liquid or on the outside of the bucket or what? Is it a metal bucket? I have some suggestions that might make the loop easier to control, but need to know more detail first.