A microcomputer- controlled thermostat

Introduction Careful temperature control is essential for a wide variety of chemical measurements. High-precision potentiometry, for instance, requires thermostatting, since the slope of the straight line E vs log a is highly temperature dependent (E is the measured emf, log a is the logarithm of the activity of species i). The equation describing the relationship between the measured quantity and the activity of species is:


Introduction
Careful temperature control is essential for a wide variety of chemical measurements. High-precision potentiometry, for instance, requires thermostatting, since the slope of the straight line E vs log a is highly temperature dependent (E is the measured emf, log a is the logarithm of the activity of species i). The equation describing the relationship between the measured quantity and the activity of species is: E E k + RTln 10/(nF)log a where E k includes the normal potential as well as the medium effects, n is the number of electrons transferred in the redox process (or the charge of species in the case of a membrane electrode), F is Faraday's constant and T is the absolute temperature. Differentiation of this equation with respect to the absolute temperature gives * Present address: Astra AB, S-151 85 S6"dert#l]e, Sweden ** Present address: Supra AB, Storgatan 24, Fack, S-261 Landskrona, Sweden (dE/dT) (dEk/dT) + Rlnl 0/(nF) log a + RTlnl 0/(nF)(d log ai/dT) Separation of the three terms contributing to temperature dependence is difficult in practice, but it is generally considered that the first two terms are dominant and in the order of mV IC [2]. Accordingly, the temperature in a potentiometric measurement where a voltmeter with a resolution of 0.01 mV is used should preferably not vary more than 0.01 K in order to make full use of the resolution.
Usually thermostats consist of a large oil or water bath which is equipped with a heater and a cooler and controlled by a contact or resistance thermometer. The relatively large volume of water or oil (typically 5-30 l) results in a substantial heat capacity, and as a consequence, such a system is not very sensitive to perturbations. However, what is advantageous with respect to the stability of the system, becomes a disadvantage as soon as change of temperature is required. In such cases, oil or water bath systems are sluggish.
The time necessary to achieve stable temperature after a change of temperature of 20C is often in the order of 24 SDK 85  Journal of Automatic Chemistry hours. In addition, when cooling is required to maintain the temperature close to 0C, large compressor coolers must be used and the time necessary to attain stable temperature could be a matter of days.
A quite different approach to the thermostatting problem is to use commercially available Peltier elements, which essentially work as electronic heat pumps, moving heat from one side of the element to the other. Such elements can be attached directly to the vessel to be thermostatted, thus making the thermostat bath superfluous. As a result, substantial changes of temperature can be performed very rapidly, in the order of ten minutes for a titration vessel containing 100 ml of aqueous solution. Since requirements for the thermostat system are that changes of temperature + between +5C and 40 C should be performed quickly and easily, this latter approach was chosen for the construction of the system. Description of the system hardware Thermometer A temperature sensitive integrated circuit was used (National Semiconductor NS LX5700), designed to give a change of output of 10 mV 1( -1 The sensor, which has a diameter of ca 5 mm, was mounted inside a plexiglass tube, at the extreme bottom end. A piece of plexiglass was glued on to seal the tube. Near the sensor, the plexiglass was ca 0.5 mm thick. The temperature sensor was connected to a digital panel meter with a resolution of +0.1 mV (Newport 2000A-2) and calibrated against a certified thermometer. Temperature control system An Intel SDK-85 microcomputer kit comprising an 8085A CPU, expanded with kbyte RAM was used. Since the drive capability of the output port of the SDK-85 was too small, the system was also equipped with buffer circuits between the SDK-85 and the D/A-converter.
Power source A 12-bit digital-analog current source delivering a maximum of + 10 A at 12 V to the heater-cooler circuits was used. aluminium) in order to obtain good heat conductivity and designed to contain 160 ml of solution. The system is shown in Figure 1.

Description of the system software
The control program, about 300 instructions, was written in assembly language. When transferred into machine code, it occupied 600 bytes of memory. The program works according to the following general outline.
The observed temperature, T, is read from the panel meter and a proper output current, I, is calculated and output to the heater-cooler circuits via the D/A-converter. This procedure is repeated ten times per second.
The output current, I, is calculated from: I0+ AI where I is a value for the current corresponding approximately to the desired temperature T0 and AI depends on the deviation from the desired temperature, AT-T-T0. Values of AT and corresponding values of AI are stored in a matrix, which is systematically searched until the first value of AT which is smaller than the observed difference is found. The matrix holding AT and AI is shown in Table 1. The desired temperature, TO, and the corresponding value for the current output, I0, are given as inputs at the beginning of program execution. However, the best value of I0 is generally not known, since the system is not isolated and heat transfer between the thermostat and the surroundings changes with room and coolant (tap water) temperature. Also, in the application to titration systems, the heat content of the titration vessel is affected by the addition of titrant, which sometimes deviates substantially in temperature from 25 MI Figure 3. Temperature response for a sample of 1 O0 ml.
the titration vessel. Consequently, the input value of It is, at best, a fairly good guess, and the system must be adaptive. where I(mean) is the arithmetic mean of the last 100 output current values. The factor 0.2 is a damping factor, preventing large oscillations. If the damping factor is set equal to 1, the system starts to oscillate as much as -+ K around TO. As the damping factor is decreased, the response becomes slower. Empirical tests revealed that a value of 0.2 gave a sufficiently fast response and acceptably small oscillations for our purpose. It should be mentioned, however, that the optimum value might be slightly different.
From the above description it is clear that this control system responds to the difference between actual and desired temperature as well as adapts to changes by adjusting the output current. Thus it works in a way similar to a proportional-integral control system.
A flow-chart of the program is shown in Figure 2.
Nomogramm I Ternlr T W der Warmst, Figure 4. Nomogram showing the relations between the cold side temperature, the warm side temperature, the current through the Peltier element and the heat-pump effect, tChen three o[ these parameters are known, the fourth can be obtained from the nomogram. (Taken from Nortron data sheet).
The system described satisfies to the following requirements: 1. Deviation from desired temperature is +-0.01 K.
2. Rapid attainment of desired temperature. When working at low temperatures at least a factor of 100 faster than conventional thermostats.
3. Temperature programming is easily performed. 4. Does not introduce noise into the measuring system.
The time necessary to reach the desired temperature within +0.01 K depends on the magnitude of the change of temperature. A change of 10 K requires ten minutes, while a larger change, eg 20 K, can be performed within 15 to 20 minutes. An example is shown in Figure 3.
According to the specification of the Peltier circuits, the maximum temperature difference that can be obtained between the two sides of the circuit is approximately 60 K, ie the temperature of the thermostat can vary within +60 K from the temperature of the coolant medium. The reason is that at 60 K the normal heat transfer through the Peltier elements due to the temperature difference is equal to the heat transfer produced by the Peltier effect (see Figure 4). Thus the net heat pump effect is zero when the temperature difference between the hot and cold sides is 60 K. To put it more generally, the maximum temperature difference that can be obtained depends on how well isolated the system is.
It should be pointed out that the upper limit is set by the fact that the circuits are not designed to resist temperatures higher than +70C (90C for short periods). Since this system uses tap water of 15-20C as coolant, and since it is not well isolated, the temperature range is roughly -30 to +70C.
Most conventional thermostats use alternating current and generally they are controlled in such a way that all of the heating current is switched on and off. Such a system is a possible source of noise, which might disturb the measuring system. In the case of potentiometric titrations where high impedence electrodes are used, care must be taken to shield the measuring system from .the noise generated by the thermostat. With the approach described here, this source of noise is eliminated. The system is driven by direct current, and when the desired temperature is attained, only very small changes of current are needed to maintain the temperature constant.
Computer aided chemistry, specifically related to chromatography and spectro-