PID Temperature Controlled Boiler/HLT and Wireless Remote Dislay

During the beer brewing process (for a brief description, click here) the temperature of water for use in the mash must be within a few degrees Celcius to achieve a consistent flavour between batches.

My boiler/HLT consists of a large plastic container with two kettle elements screwed in.  Before creating the PID temperature controller, temperature of the water was controlled by manually reading the temperature with a thermometer and turning on and off each element at the mains socket.  Clearly, after a few brews, this becomes extremely tedious!  Hence I set about the created of the temperature controller.

The Specification

  • AVR microcontroller programmed in C++ using the Arduino libraries.
  • Digital DS1820 temperature sensor.
  • PID control scheme.
  • Solid State Relays for mains switching.
  • LCD display.
  • Wireless remote.

PID Control

PID control offers many advantages over a simple thermostat design (on-off control), i.e. ‘if the temperature is below 65°, turn the heaters on, else turn the heaters off’. Possibly the greatest problem with on-off control is overshoot – due to the time delay between switching the heaters on and measuring a change in temperature, an output such as is shown below would be expected.

PID control, on the other hand, allows the following output to be obtained in the ideal case:

Clearly this is more desirable.  Implementing PID control was also quite simple, due to the excellent PIDLibrary for Arduino by Brett Beauregard.  In fact, the availability of this Arduino library was the main reason the Arduino platform was chosen.

Solid State Relays (SSRs)

Some may well have already thought: “wait a minute… PID requires analogue output, but you’re using relays to switch the heaters?!”

Pulse Width Modulation is used to achieve a pseudo-analogue output.  A PWM period of 1.5 seconds is used. Switching a traditional relay this quickly would not only make a racket, but also wear the poor thing out; hence the choice of SSRs, which allow rapid switching.

During testing, it was found that switching both 1.5kW kettle elements on at exactly the same time caused the lights in the house to flicker(!).  This problem was alleviated by staggering the switching to ensure the elements never both come on at the same time.

The Wireless Remote

A wireless remote was created, which displays the temperature of the water remotely.  As I brew in a detached garage, the remote allows me to conveniently monitor the temperature from the house.

The remote.

The remote.

The remote uses an LCD screen salvaged from an old Nokia phone.  A PIC16F88 is used to receive serial data from the wireless module and print it to the screen.  Once I find the time, I’ll etch a PCB and stick it in a box…

A cause of great hassle were the cheap wireless modules purchased from Sure Electronics.  The main problem was the practically indecipherable datasheet which was apparently translated from Chinese to English using Google Translate.  If anyone reading this is struggling with these modules, take heed of this note hidden at the end of the data sheet:
‘Since the performance of voltage ascending slope that the radio frequency chip of this
module requires is too high when power supply is connected, something unwanted like PLL locking tolerance which causes communication failure may happen when some LDO chips of low adjustment rate are used or some bigger filter capacitors are exist in circuit.’

It then suggests a circuit to alleviate the problem. Don’t be lazy – use the circuit!

The Final Result

The rest of the design is all pretty straight forward.  Take a look at the gallery below to see the final result.