How to Create a 4-Zone Temperature Control System

 
 
 

In this guide we shall see how to use a PC and a WASP control board to provide a 4-zone, closed loop temperature control system.
    Using a PC to control temperature may seem like a bit of an overkill, but the principles outlined here lead the way to the ability to create more elaborate control systems that use temperature, or any other analogue signal source in a closed loop control environment. We have not specified exactly what we are controlling the temperature of, since the principle can be applied to many different applications. Room temperature is probably the one that springs to mind first, but it could easily be applied to other applications such as home brewing or wine making where accurate, consistent temperature control plays an important part in the quality of the final product. This guide is divided into four distinct parts: These are… “The Sensor Inputs”, “The Controlled Outputs”, “Connecting the Hardware” and “Configuring the Software”.

The Sensor Inputs
Traditionally measuring temperature (in an economical way) involved the use of thermistors and some associated circuitry to make the voltage produced useable by an analogue to digital conversion device. These devices suffered from poor accuracy and severe non-linearity requiring compensating circuitry or software. Modern components provide a linearised voltage proportional to the temperature without any additional effort. The device we will use is the AD22100. This simply requires a stable 5v supply and delivers 22.5mv per degree C throughout its entire range of 0 to 100 degrees.( AD22100 data sheet )

The Controlled Outputs
 standard plug in relay for automation and control systems   Although the WASP has 7 high voltage switching outputs capable of switching up to 50v at 500mA , we feel that, in this application we need to allow for much higher currents in the controlled output heaters. This led to the choice of relays on the outputs. Relays are a perfect companion to WASP switching outputs since, even large relays, can be driven by those outputs. The inductive load of a relay leads to a requirement for transient suppression, but, fortunately, the WASP switching outputs also have transient suppression facilities “built-in” so there is no need for external suppression components.
    Obviously, if these relays were used to switch Mains voltage devices then great care would have to be taken to ensure all electrical safety concerns are met. If in any doubt, then you should consult a qualified electrician.


Connecting the Hardware
    Connecting the WASP to the PC is the simplest of tasks using a standard USB lead. There are no drivers to be installed since they are already a part of Windows. (WinXP or later). Connecting the temperature sensors to the WASP analogue inputs requires only 5 connections. One for each of the analogue inputs plus one ground. Connecting the relays also requires one connection per relay plus one ground. The connection details are shown below.

circuit diagram showing how to connect temperature sensors and relays for a multi zone control system

It should be noted that the relays require an external voltage source to energise their coils. It is shown in the circuit above as a 12volts DC source, which could simply be a battery or a DC mains adaptor. The WASP switching outputs use this supply when switching the relays on and off. If you are using different relays (eg 24v DC) then you should obviously use an external supply to match. Note that the WASP should only be used to switch DC loads up to 50v.

Configuring the Software
screen image of analogue signal measurements using a wasp usb adaptor board on a PC    Assuming you have followed the instructions on the installation CD and now have WaspWare installed on the PC, we now need to configure this to give us our control system. The first step is to check the analogue inputs.
Click the “Run” button and observe the 4 analogue slider controls. They should move in response to changes in the temperature of the four sensors. If these are verified okay then we need to configure the outputs in terms of how they will respond to the varying inputs.
    Each analogue slider control has three vertical slider elements. The one in the middle moves up and down automatically in response to the changes in temperature of its corresponding sensor.
    The sliders on either side correspond to limits (thresholds) that can be used to determine when to switch outputs. These limits should be set at the points where you want the external heater to be switched on and off respectively, i.e. when the temperature falls below a minimum (set by limit A) a heater can be switched on and when it then rises above a maximum (set by limit B) it is switched off. The reason for making the on and off positions different is to prevent continuous switching on and off around the optimum temperature (i.e. using hysterisis).
    Although the vertical scale cannot be immediately read in terms of degrees, the limits can be set empirically by noting the position of the middle slider at the desired switching points. Once you have the limits set to their desired positions, you need to configure the switching logic to use them. In our example we will use output 1 to control the relay connected to heater 1 and output 2 for heater 2 etc…..
    The logic by which output 1 then operates can be stated in word terms as…
“when analogue input 1 is less than limit A then turn on output 1 and when it is greater than limit B turn output 1 off”. To configure WaspWare to do this we use the logic section on the right of the screen.

control system logic for multi zone temperature control

As you can see from the image above this involves configuring two parts of the logic equations for input 1.

This process should then be repeated for the remaining 3 inputs.

When the logic equations are complete they should be saved to disk using the save facilities which are self-explanatory.
Automatic operation can then begin by clicking on the “Run” button.

You now have a 4-zone temperature control system with configurable hysteresis.
 

   
         
         
                   
                   
                   
   

 

   
                   
 

.        .

 
 

© Copyright pc-control.co.uk 2008