Electronic – Yogurt on a PID controller

pid controller

How do you change the tuning of a PID controller to deal with changing thermal properties?

The project: I am making yogurt. It cultures at 110 deg F for about half a day; you put in milk and a little starter culture and get yogurt. Save a little for a starter for the next batch and eat the rest. Easy and delicious.

The setup: I am taking a food safe container (pan with lid) placing it over a heater, adding a type k thermocouple, SSR and PID controller all wired pretty much per the reference implementation of any PID controller you care to name. This works well if I am using a crockpot (225W, approximately 3/4 gal) as both my pan and heating element, but I want to do larger batches (1 gal).

The problem: With a larger heater to thermal mass ratio (1000W hot plate and stainless steel pan instead of ceramic). There is increased instability during the later part of the cycle. The PID controller is tuned with water (milk is a little more expensive) and holds temperature within 2 deg F for the first couple hours, but as the yogurt cultures I am noticing pronounced temperature swings, and unlike using the crockpot I am seeing whey separation (presumably either due to over temp or increased condensation on the lid due to the same). I am fairly sure that the larger thermal mass was dampening the noise of the change of the thermal conductivity during the culture, but I am unsure how to proceed to more precisely control the temperature during the later stages without excessively compromising temperature regulation at the beginning.

Best Answer

The real problem seems to be your mechanical setup, not the PID control detail. PID control may not even be what you want at all.

I'd start by putting the container of yogurt culture inside a water bath, then attempt to regulate the water bath temperature. The extra thermal mass of the water will lengthen the dominant time constant, and won't depend on what is going on inside the container much.

With a longer time constant, simple thermostat on/off temperature control should work well enough. You want the heater power to be low enough so that the water bath only changes a little, like maybe 2-4 degrees, within one time constant. Simple threshold-detecting on/off control will then work very well.

Instead of adding hysteresis to prevent rapid oscillations at the setpoint, just hold the output fixed for a short time, like 1/50 of the time constant or so.

A long time ago, I made a temperature controlled water bath for photographic film processing. The mechanical setup was one of those plastic "Rubbermade" style tubs, a fish tank pump to keep the water circulating, and a 300 W off the shelf immersion heater meant for a coffee cup. Two thermistors in series placed on opposite sides of the tub provided the temperature feedback. This was before the age of microcontrollers, so a flip-flop sampled and held the on/off signal every 64 line cycles. That controlled a relay, which switched the immersion heater on and off. It worked really well. Once it got to regulation, the temperature stayed fixed to a fraction of a degree F.

You are over-thinking this with a PID controller.

Related Topic