Want advice on a brew temperature controller

Some friends of mine have asked me to make them a brew temperature controller for their microbrewery. I have a rough idea about how I'm thinking of doing it, but would like to check out whether I am on the right track.

What they want is something that will maintain a constant temperature inside an insulated box they are building (about 3x1x1m), which the vats will go in to brew.

My idea is to use an arduino controller to switch a Solid State Relay and turn the heater on and off to maintain a set temperature. I want to try using low frequency PWM (at about 5Hz) and a proper PI control loop to get really accurate control, rather than just using a standard thermostat action.

I'm thinking that given that the relay should switch on every half-cycle (100Hz), this will give me at least 20 levels of control. (Probably more because as the PWM frequency drifts against the mains frequency, the number of on cycles will jump up and down by 1 around an average value.) I decided on this method rather than using a phase angle controller because they are costly and need external components (e.g. a line filter) to work properly.

As far as I can see, this switching method should give me pretty good control over the temperature, but it would be good to know if anyone can see any problems with it - I'm designing this more from theory than experience.

One thing I'm not sure about is how to measure the temperature. I'm thinking of using an SPI chip rather than try to calibrate a thermistor, but these cost about 4 pounds, so I'm wondering if I could save a bit of money by using a simpler method.

Another question is about safety - any advice on things I should do to ensure it's safe would be welcome. I've never done a mains powered project before, so I want to be really careful.

Did you make this instructable?

Yes, the cycle burst system you are proposing is a better choice than phase control.

Most SSRs trigger on zero volt crossing anyway. What matters is the integration time of the process - clearly a room of 3 cubic metres isn't materially affected by a single cycle of mains. You can go to a maximum cycle time of many seconds in a big system.

BUT

"Air bath" temperature control is extremely not easy, especially in a big room, and the control of the temperature of large vessels full of water is going to be very poor. Your friends would be much better using liquid control, like everyone else. The microbrewery systems I've worked with use immersion heaters.

The problem is massive lags caused by a.) air coupling, b.) Water tanks heat capacity and c.) Lack of control authority.

Could you explain why an air bath isn't going to work? I was thinking that if we put the vats on some kind of pallet base so there's circulation all around, then the temperature of the brew will come to the air temperature before too long anyway, just because that's the only thing they have to take their temperature from.

There will obviously be a lag when you first put the brew in the box, but I don't see why it won't keep the right temperature after that.

I could design a system with four independent heaters, and food grade temperature probes (the box is built to take four vats), but this would be more complicated and expensive so I don't want to do it unless it's really necessary.

Imagine a brick, sitting on a perfectly friction free surface, and try to imagine pushing it with a feather, so it stops at a particular spot on the surface.

Now imagine a feather 20 feet long, and the same brick, and you have an analogy for the control situation - the feather is the heater, the position, the temperature, the frction free surface is the air in the room, and the spot is the final temperature...

I get that bit, but isn't it more like having a really really long, nearly frictionless, conveyor belt? If you set the belt running at a certain speed, then the brick must eventually reach that speed because of the natural feedback in the system. It might take a long time, but the brick must eventually reach the same speed as the belt.

I know an air bath isn't the way you'd ideally choose to do it according to control theory, but my friends are trying to do this as cheaply as possible (I want to keep the total cost for heater and controls to under 100 pounds). It would also save some hassle taking the heater and probe out of the tank and cleaning them.

Another point is if I use an air bath, it's easy to add a cooling system later so they can do lagers.

What seems important to me is how long it's going to take for the tanks to respond to changes in air temperature. If this is less than an hour or two, I don't see there's too much problem, given that they will be brewing for weeks not days. I could have a go at testing this with a bucket of warm water in the fridge and then scale the results by surface area over volume.

I can see there could be some problem if the air temperature varies between different points in the box, but this could be kept to a minimum by insulating it well and being careful about heater placement.

The other way we could do it if the air box is obviously not going to work, is to use heat mats under each vat, and temperature probes hanging near the top of each vati.

The thing that was putting me off this is the cost of 4 probes and SSRs, but I reckon we could make our own probes by putting a cheap sensor in a short length of thin stainless tube, then filling it with a thermally conductive plastic, and plugging the ends with some kind of food grade plastic.

I think we could also save on SSRs by ganging the heat mats together, and averaging the temperature probes.

I've tested the thermal response of a plastic bucket full of warm water (with the top sealed to prevent evaporation), and found out that the temperature has a decay half-life to room temperature of around 4 hours. This translates into more like 12 hours for the size of vats we are using.

I've also found out that the temperature rise above ambient can sometimes be as much as 8F (about 5C), for smaller 5.5 US gallon home brew vats, which might translate into more like 10-12C for the vats we are using.

Both of these together mean that the air box most likely won't give good temperature control. The brew temperature might just about stay within the yeast's growing range, but really we want better control than that.

The ideal solution would be water heating/cooling, which lets you both add and remove heat directly, but this would be too expensive and complicated for a first system.

The solution I'm thinking of is to heat the vats individually with heat mats under each vat, and find a way to put removable insulation jackets or collars round the vats so we can adjust the amount of insulation depending on the conditions. For example you would need more insulation in winter when the temperature difference is greater.

The idea would be to adjust the insulation so that the heater uses as little power as possible while still having some headroom above fully off to give some control over the temperature.