Author Options:

Want advice on a brew temperature controller Answered

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.

I've written up some notes on my proposed design here.


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.


"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.


Thanks for the reply. :-)

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.

Its going to take many HOURS to respond, because the tanks are huge stores of energy, and the coupling to them is very indirect.

The other way is with a belt heater - think "electric blanket" wrapped on the tank.

Another pro-trick is to have a water jacket on the outside of the tanks, heated by external water flow, and also coolable.


OK. I'll think about it and talk to my friends.

Thanks for the advice.

Another way would be a coil of tube immersed in the tanks.

How big are the tanks ? Copper is compatible with the wort/yeast isn't it ?


I think you can use copper but I'm not sure. The vats are around 80 cm high by 60 wide I think (just from memory).

Some kind of circulating water system might be ok, but then you have the problem of it leaking.

I'm still considering the air bath method (using a chimney round the heater to improve air mixing and circulation), but bearing what you've said in mind as well.

What I'm thinking is that if the box is pre-heated to the right temperature, and they take care to cool the wort to the box temperature before adding the yeast, then it could work ok.

The box design I'm thinking of, if we do do it this way, is like the image below.


220 litres of water contains 0.9 MJ/K That's a LOT of energy to add and remove.

I think what I'll do is test it practically with a bucket in a fridge to see how well the heat transfers, then think about it.

(Obviously scaling the results by area over volume)

A good plan.
Don't forget fermentation is exothermic.....


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.

Use LM35s in stainless steel needle tubes. Ask Steveastrouk in Manchester very nicely. No real need to fill with much apart from epoxy.

An Arduino will widdle on 4 channels of temperature control - there is a PID library already - though you'll probably mainly need P and a teeny bit of I.


Thanks. My friend is away for a few weeks now, so I'll wait till I can talk to him again before deciding on a final design.

Another question - I was a bit worried that using that kind of pulsed switching would put too much strain on either the heater elements or the relay. Is this likely to be a problem?

In general, no, these won't be very high power heaters.

In case anyone is following this thread, here's where I'm at now.

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.

There are fuller notes on my wiki here.