How to : Build a PID temperature control

If you know how to do something, and how it should be done, tell us here.

How to : Build a PID temperature control

Postby BigYin » Sat Aug 09, 2014 16:06

This is a guide to how I built a temperature control box that controls the temperature of my boiler/HLT.

This guide has been refined and additional safety information added following feedback and suggestions from a lot of people - thank you all for taking the time to help :thumb: :drink:

DISCLAIMER: MAINS ELECTRICITY AND WATER ARE A DANGEROUS COMBINATION, IF YOU ARE NOT CONFIDENT WORKING WITH SUCH, GET A COMPETENT PERSON TO DO IT FOR YOU.


Safety First.

*Disclaimer* - I am NOT an electrician - follow this guide at your own risk, but beware, you are dealing with 240v electrics that have the capacity to deliver a lethal shock - unlikely if you are sensible, but still, BE CAREFUL!

Water and mains voltage electricity do NOT mix well. In use, raise the PID clear of the surface your boiler is on, and keep it reasonably clear so that slopped/spilt water, or over-boiling wort, won't land on the box and potentially cause fireworks!

If you have a fuse box rather than a 'power trip' (RCD) box, consider using a plug RCD unit this is to ensure if there is a short, that the power is cut in the fastest time possible, to reduce the risk of a serious electric shock :thumb:

Please also note, that running two elements off the same circuit can draw too much current and melt your socket!!

I have one element plugged into the downstairs mains socket ring, and the other plugged into a separate supply, that used to supply the immersion heater, but as that's no longer there I have a socket instead. Most people probably won't have anything quite so convenient, so you may have to use just one element - it will still work, only a bit slower - or run one of the elements off a separate circuit - maybe the upstairs socket ring?



If you are comfortable to continue, please do!

The basic concept is this - the heating elements in the boiler are switched on and off by the control box. You set the target temperature, and the box does the rest. As the boiler/HLT temperature gets close to the target temperature, the elements will be switched off and on, initially more on than off, moving gradually to more off than on, then off, until the temperature falls and the elements will start switching on and off again.

The main components are :

A PID temperature control (in my case an XMT7100) (try Virtual Village on ebay, and search for "PID Digital Temperature Controller"

Image

A PT100 temperature probe (again, try VirtualVillage on ebay and search for PT100 )

Image

One 40 amp SSR (solid state relay) for each heating element you wish to control - I used two

Image

Some way to cool the relay(s). More on this later.

A casing big enough to take all the kit. Ideally this should be a box rated to IP56 for electrical safety - have a look here

I have to admit I used a 3 litre snap close plastic box from Maplin that cost about a fiver :oops: . I think on reflection a slightly bigger box would be better - there's a lot to pack into this - and one a bit safer considering we are playing with lots of electricity here :roll:

Image

To allow me to easily plug in a different temperature probe I have the PID connected to a Euro Chassis Plug and the probe is wired to a Euro Line Socket - this also lets me completely unplug the PID setup from my boiler - making it a whole lot easier to move the boiler around, clean it etc.

I also didn't want to wire the elements in directly to the PID, again I want to unplug them when I need to. So, I used two 1 gang switched sockets with single back boxes
ImageImage

This also allows me to have everything plugged in, but switch off either element as I wish, or switch them both off and just have the PID monitoring the temperature.


For the internal connections some 5amp connector blocks are adequate for the connections between the PID and the relays, but for the other, mains connections, I used ones rated to 30A
Image

Lastly, some cable, capable of handling up to 30amp draw - ask at a suitable shop! - and three standard mains plugs.

You will also need a few crimp terminal connectors (for connecting to the back of the Euro socket)
Image


Useful tools are :
a dremel / drill
a cable stripper
screwdrivers
a multimeter (only needed to figure out the probe connections)


So, onto the build.

The first thing to do is to figure out the temperature probe to PID connections.

Although in the diagram below I have specifically shown where the three cables from the probe connect to, depending on your probe, you may need to wire it differently.

To work this out you need a multimeter.

Measure the resistance between each set of wires. In my case that was :
red - blue : 108.8
red - yellow : 108.8
blue - yellow : 1.1

Because blue to yellow is the lowest reading, they are the two that must go to the + and - terminals on the PID - terminals 6 & 7 on mine - while that leaves the red to go to the earth - terminal 8.
Image

The PID needs power, and the terminals are marked clearly enough -
1 - live - red (or brown)
2 - Neutral - black (or blue)
3 - earth

If you connect them up as a test you should see the temperature reading on the PID rather than just EEEE - error.

Now is also the time to get the instruction sheet for the PID and get the settings sorted.

Here's the settings I used :
inty - input type - PT100
outy - control output type - 2 ('one alarm relay output; SSR all the way non-contact level PID output')
HY - autotuning pV bias - 0.3 (default)
PSb - pV bias - 0.0 (default)
rd - control action type - 0 (heat)
CorF - unit selection - 0 - (Centigrade)

You probably don't need to worry about the alarm settings, as I didn't bother with either the settings, or attaching any kind of alarm!!

I didn't mess with the PID parameters, I just left them at their default values.


You will also have to tackle the business of how to fit the temperature probe to your boiler/HLT. I tried a few solutions and settled on using the 10mm nut on the 5mm to 10mm Reducing Coupler which fitted the screw thread on the probe. I drilled a hole in the boiler, between the two elements (to leave space for the hop filter) and used 2 'O' rings to seal it.


Relays

Note that the SSR relays have a metal backing plate. This is their heat transfer plate, and it gets HOT in use. This has 2 effects - firstly, the efficiency of the relay reduces as it gets hotter, reducing the amount of power delivered to the heating element. Secondly, the life of the SSR will be severely shortened, and it will fail, if it is repeatedly allowed to overheat - not to mention it could melt your case if it's mounted to close to the side. :nono:

There are several ways to tackle this issue. It's up to you how you decide to tackle it.
1. a heatsink
2. a cooling fan
3. both!

There are heatsinks sold specifically for SSRs. They must be fitted using the appropriate heat transfer paste - all over the contact surfaces to ensure complete heat transfer. Please think carefully when you buy your SSR and see what the manufacturer says about safe use, and see if they have appropriate heatsinks - even better, get one complete with heatsink!

Alternatively (or as well!) use a cooling fan - fit the SSR with a space between the metal backing of the SSR and the mounting surface surface (to achieve this I used bolts with a number of nuts as spacers to hold the relay away from the side of the box) and fit the cooling fan so that it will blow over the metal plates, carrying the heat away.

If you do decide to go without a heatsink, DO CHECK that your setup is carrying away enough heat. Put it on a test boil with a boiler full of water (well, we don't want to muck up a brew day, do we :thumb: ) and monitor the temperature of the SSR(s)

I opted for this second option, using the cooling fan from an old PC - it is driven by a 12v power adaptor, powered by the same power feed as the PID in the control box. I drilled plenty of vent holes to allow the free passage of air through the case. In use, the SSR plates stay so cool they don't even feel warm to the touch :thumb:

So, with the temperature probe connections figured out, the SSR cooling planned out, and the PID settings sorted, it's time to wire it all together..

Here's my wiring Diagram (note that the probe plug wiring isn't included here) :
Image

First, mark out where you want each component to go.

For the PID, the euro socket and the switched sockets I marked out the sizes and then cut the holes and tidied them up carefully.

For the relays I drilled holes to take the mounting bolts, and 3 larger holes to pass the power cables through. To prevent the cables pulling you need some way of securing them - simplest would be a knot in the cable, and secured with a cable tie. To prevent water entry at these points consider fitting cable glands.

For the relays I also drilled a whole series of holes on the side wall below where the relays were to go, and in the lid above them, to allow the heat from the relays to escape.

With the holes all done, it's time to get wiring.

The precise order is up to you.

1. The PID needs power and it's connection to the probe.

2. The switched output from the PID needs to go to each relay - note that the (+) terminal on the PID must be connected to the + terminal on the relay. Same for the (-) connection. I used connector blocks to take the switched output and split it between the two relays.

3. The 'power out' - i.e. the switched sockets - take power from the other two power cables, but the live wire is routed through the relay to provide the switched control.

4. Make sure all the connections are secure, and there is no exposed bare cable.


That should be it! After plenty of fiddling about, getting things tightened up and secure, it's time to test it out.

For the first run, the PID should have a 'learn mode' - check the instructions! - this is where it tries to intelligently learn the 'profile' of the kit it's been connected to. It doesn't know what volume of liquid it's heating. It doesn't know the power of the heating elements it's controlling. So it has to do a run or two to learn how often, and when, to switch the elements on and off to just hit the target temp, and no more.<


In day to day operation, you simply connect it all up, use the ^ and v buttons to set the temperature - just press them until the display shows the target temp, then leave it.

I fill my boiler with water, then set the PID to the strike temperature, switch both elements on, and I can then disappear off to measure out my grain, knowing the boiler will be at the right temp when I come back.

The PID will maintain the temp in the boiler (or HLT) during the sparge, BUT - make sure you turn the elements off BEFORE the liquor level gets too low!!

For the boil, I set my PID to 102, using both elements until the wort starts boiling, then switch one element off. I then like to alternate between the elements every 20 minutes or so.

At the end of the boil, I switch both elements off, but leave the PID on so it shows the temperature during the cool.

Here's mine, working towards a boil. - Note the PID is sitting up on an upturned washing up bowl - I was glad of this since in a moment of inattention I let the wort boil over - if it wasn't for the bowl, the PID would have been sitting in a small lake of hot, sugary wort :nono:

Image

Good luck!! :drink:

Last edited by BigYin on Thu Oct 27, 2016 22:21, edited 3 times in total.
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: How to : Build a PID temperature control

Postby krazypara3165 » Sat Aug 09, 2014 22:20

Superb write up!

Kegged:
Simecoe APA (HBF Donation)

Bottled:
Galaxy Pale Ale, Woodfordes Wherry, Bella Brew Pale Ale, Strawberry and vanilla Pale Ale, Mixed fruits cider, Elderflower and grapefruit fizz.

Maturing:
Rhubarb Wine, WOW rose', Elderberry wine, Mixed berries wine, Elderflower and grapefruit wine, Elderberry wine.

Next Up:
German Pilsner, Guinness Clone, Chateau De Roi selection kit, Strawberry and lime cider.
User avatar
krazypara3165
The Weakest Drink
 
Posts: 2480
Joined: Sun Apr 06, 2014 22:46
Location: Warrington, Cheshire

Re: How to : Build a PID temperature control

Postby BigYin » Thu Oct 27, 2016 22:21

Broken photo links fixed :electric:
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland

Re: How to : Build a PID temperature control

Postby DethApostle » Mon Oct 31, 2016 14:58

Awesome! This is (one of) my autumn projects so you're perfectly timed! I'm only going to run 1x 3kw element though so wiring wise is it much different or just a matter of cutting out the 2nd element socket and SSR?

Cheers
DA

Serving: AG37: Smoked Chipotle Porter, AG41: Maibock
Bottled: AG3: The GPSE, AG14: Plum Porter, AG 25: Russian Imperial Stout
Conditioning: AG42: Rye Saison
Fermenting: AG43: Banoffe Gose
Planning: AG44: tbc
--------------------------
Brewed in 2012: 200 pints
Brewed in 2013: 560 pints
Brewed in 2014: 360 pints
Brewed in 2015: 280 pints
Brewed in 2016: 320 pints
Brewed in 2017: 200 pints
User avatar
DethApostle
Brewer
 
Posts: 194
Joined: Fri Jul 18, 2014 13:20
Location: Chester

Re: How to : Build a PID temperature control

Postby BigYin » Tue Nov 01, 2016 20:27

Yep, all the wiring is fundamentally the same except for the power in, power out and SSR for that 2nd element :-)
User avatar
BigYin
Brewer
 
Posts: 86
Joined: Mon Apr 07, 2014 18:37
Location: Bonnie Scotland


Who is online

Users browsing this forum: No registered users and 2 guests