A general purpose computer-based data acquisition system and

advertisement
Indian Journal of Engineering & Materials Sciences
Vol. 5, June 1998, pp. 117-120
A general purpose computer-based data acquisition system and
temperature controller
V Rajagopal Reddy", S Venkatramana
Reddl,
P N Reddl·
& B P N Reddy"
"Electronics Division, Department of Physics, Mangalore University, Mangalagangotri
'Department
of Physics, Sri Venkateswara
574199,
India
University, Tirupati 517 502, India
Received 24 April 1997; accepted 29 April 1998
The design and operational details of a general purpose computer based data acquisition system (DAS)
and temperature controller are given. The DAS consists of a 12-bit analog to digital converter (25 J.1S
convertion time), two l2-bit digital to analog converters having fast settling time (500 ns), control circuit
and Thermocouple Signal Conditioner (2B50). The software which is user friendly menu driven has been
developed in Turbo-Basic. The data acquired is stored in the hard disk and can also be displayed on the
monitor. The algorithms for data acquisition and temperature control are presented. The temperature in the
range 77-400 K can be controlled with an accuracy of ± 0.1 K. Because of its simplicity and versatality, the
system is best suited for upgrading the existing instrumentslike NMR spectrometers, EPR spectrometer, etc.
where data acquisition and temperature control are involved.
The advent of computers has brought revolution in
the measurement techniques and has marked effect
on experiments in almost all areas of Physics.
Basically a computer can handle only digital
information
and
hence,
to
carryout
any
measurement it is imperative that the signals from
an experiment be digitized so that data processing
can be accomplished.
Many data acquisition
systems and temperature control schemes have
been described in the literature'i".
Maintaining the temperature precisely at a given
value (set point) for a given length of time is of
utmost importance
in many experiments.
To
achieve this a controller which maintains the
temperature
at the required value is needed.
Automatic
control
of temperature
can be
accomplished
by different control schemes or
control algorithms
such as proportional
(P),
Proportional and Integral (Pl), Proportional and
Differential
(PD), Proportional,
Integral and
Differential (PID) algorithms.
To implement
a control
algorithm
that
accomplishes
the above functions in assembly'
language for microprocessor based system is too
involved. With the introduction of the personal
·For correspondence
computers (PC), complex control algorithms can
easily be implemented using high level language
such as Turbo Basic, 'C, etc. This paper describes
the design and constructional features of the DAS,
temperature controller and the associated software.
Data Acquisition System
Fig.1 shows the block diagram of the DAS and
temperature controller, which can be installed in
one of the expansion slots of the PC AT/386. The
data acquisition system (DAS) card contains
4-analog input channels, an AID converter (A DC)
with 12-bit resolution and fast conversion time (25
J-lS), D/A converter (DAC) with 12-bit resolution
and fast settling time (500 ns). Further, user
friendly software in high level language has been
developed. When this card is installed in a
computer (PC AT/386), it becomes a general
purpose multichanael (4-channel) data acquisition
system. The computer controls the functions (such
as initiation of AID conversion, sensing the end of
conversion, reading the 12-bit data from ADC
output, processing
the data, outputting
the
processed data to the DAC converters to generate
control signals to the temperature controller, etc.)
of the AID card, stores permanently the converted
data on floppy disk or hard disk as data file and
118
INDIAN J. ENG. MATER.
sct., JUNE
1998
.
,
•
A
OIP
F_
c~
~
'J
51
III
N
~
1:
;;l
m
?"
en
m
n
:r
+15V
•zz
~
en
~
m
5OOK'
5Kn
....
R,
..
0
B
z
Fig. 2--{:ircuit diagram of the thermocouple signal conditioner
Fig. I-Block
diagram of the DAS and temperature controller
also selects the user defined channels. The process
of data acquisition can be interrupted by the user at
any time by pressing <ESC> key.
Temperature Controller
A copper-constantan
thermocouple has been
used as the temperature sensor. The emf from the
thermocouple is amplified and filtered by the
thermocouple signal conditioner and the ADC
converter
digitizes
this analog
signal. The
computer compares this signal (corresponding to
sample temperature) against the set point signal
(desired temperature)
and generates a control
signal. This digital control signal is translated to
correction voltage via a 12-bit DAC, which is
amplified and used to control the heater current.
Thermocouple Signal Conditioner (2BSO)
The 2B50 is a high performance thermocouple
signal conditioner
featuring input protection,
isolation, common mode rejection, amplification,
filtering and cold junction compensation in a single
compact package. The 2B50 has been designed to
condition low-level analog signals such as those
produced by thermocouple in the presence of high
common
mode voltages.
The thermocouple
connection can be made via screw terminals and it
has internal reference junction temperature sensor.
In
thermocouple
temperature
measurement
applications, outstanding features such as low drift
and high noise rejection make the 2850 an ideal
choice for systems used in harsh industrial
environments. The circuit diagram of the signal
conditioner using 2850 is shown in Fig.2. A
voltage gain (G) of 2B50 can be set using the
equation", RG=200K/(G-I). In the present case, the
gain has been set to 500. 2850 has provisions for
adjusting input and output offset errors.
The input and output offset adjustments were
done as follows--the inputs 1 and 2 are shorted.
The jumper 'A' has been removed to isolate the
cold junction circuitry. The input offset voltage is
made zero by slowly varying the potentiometer Rl
keeping the gain at the desired value. Then the
output offset is made zero by adjusting the
potentiometer R2 with the desired gain.
Operation
The thermocouple
output is amplified and
filtered by the signal conditioner. The analog
output voltage corresponding to the prevailing
temperature at the sample is digitized by the ADC
and the software computes the required control
signal using the PID algorithm and outputs to
DAC 1220. The DAC translates the digital signal to
analog voltage and controls the current through the
heater in such a way that the sample temperature
remains constant.
Control algorithm
The control algorithm
digitally using the equation
eo (n) = Kp ( e, (nT)
can
be
implemented
nt
+ Ki
f
(n-l)T
e;{nT) dt + Kd (e;{nT) - e;{n -1)T)/T)
REDDY et al.: COMPUTER-BASED
where t is time; e(k1) is corrected output, elt) is
error signal (setpoint-existing value), T is sampling
period, Kp is proportional gain, Kd is derivative
gain, and Ki is the integral gain.
The derivative term Kd (e;{nT) - e,(n-I)T)/T) can
be approximated using the backword difference
nt
equation and the integral term Ki
J
e;{nT) dt by
(n-I)T
Simpson's
1/3 rulel6.
The control algorithm
consists of three different phases with successively
smaller gain. In order to attain the desired set
temperature,
in the initial phase the system
operates with maximum gain. When the sample
temperature
reaches sufficiently
close to the
desired set temperature, the system proceeds to the
next phase. Based on the heating rate of the
thermal load, the system gain can be decreased
smoothly as the set temperature is approached.
This facilitates minimizing the overshoot. When
the set temperature is reached, the system enters
the final phase with the smallest gain so that the
system will not oscillate around the equilibrium
point. The system's AID and 01A converters
resolutions
are.. one bit of 01A and AID
corresponds to approximately 0.10 C and 0.060 C,
respectively.
DATA ACQUISITION
SYSTEM
119
ware trigger, programmable trigger, and external
trigger pulse, (v) Data acquisition can be done
using either polling control, interrupt routine or
OMA transfer modes, (vi) 12-bit monolithic
multiplying 01A output channel, (vii) Copperconstatan thermocouple (J type) as temperature
sensor, (viii) Temperature range 77-400 K within ±
0.1 K, (ix) On line data acquisition, (x) User
friendly and menu driven, (xi) User selectable
channel and sampling intervals, (xii) Data storage
on floppy or harddisk, and (xii) Stored data output
on screen and printer
On invocation,
the main screen displays
graphically the mobile van logo as "PC BASED
DAS AND
TEMPERATURE
CONTROLLER".
Pressing any key on keyboard leads to menu driven
on the screen with the following options
*Oata acquisition
*Temperature Controller Parameters
*Graphical Display
*Exit
The user can select anyone
of the above
options.
Conclusions
This paper describes the implementation and the
design of hardware for a data acquisition system
Software
The software for the system is developed in
Turbo-Basic with MS DOS 6.2 as operating
system. To speed up the data acquisition process,
the data acquisition module is developed in
assembly language and linked to the programs
written in Turbo-Basic.
The software is developed to make the system as
general purpose OAS and temperature controller.
All parameters such as channel selection, number
of samples at each sampling interval, temperature
scan rate, sampling rate, data file names etc., can
be entered through the keyboard by the user. The
flow chart of the control algorithm is shown in
FigJ. The software initializes the screen to graphic
mode, reads set point and displays it on the screen.
Salient features
(i) User selectable 4-analog input channels,
(ii) 12-bit Resolution, (iii) Switch selectable analog
input ranges - Bipolar: ± 5 and ± 10 V & - Unipolar: 5 and 10 V, (iv) AID conversion by soft-
Fig. ~The
control
flow chart for data acquisition
and temperature
120
INDIAN J. ENG. MATER. SCI., JUNE 1998
and temperature controller using computer. The
computer has been used effectively for data
acquisition as well as control of temperature. The
DAS and temperature controller also include a
user-friendly menu driven software offering
flexibility not only in selection of various
parameters but also in selection of various
channels. to be monitored on-line.
References
1 Ramesh P & Mekaloui S, Meas Sci Technol, 1 (1990) 647.
2 Humbert F, Retournard A, Mischler E, Brondeau J & Cane1
D, Rev Sci Instrum, 63 (1989) 702.
3 Gingliarelli G, Tanchni P & Canistraro S, J Phys E, 22
(1989) 702.
4 Rajagopal Reddy V, Reddy P N & Reddy B P N, J Instrum
Soc India, 25(1&2) (1995) 27.
5 Warmer D W & Wells F V, Rev Sei lnstrum, 60 (1989)
2804.
6 Raugh W, kelbert K & Betterman H, Rev Sci Instrum, 59
(1989) 376.
7 Leung D K C & Tse R S, Comp Chem, 13 (1989)75.
8 Love M Blumenroeder S & Kutt P H, Comput Phys
Commun, 50 (1988) 367.
9 Amengual A, Meas Sci Techno/,3 (1992) 1043.
\0 Chance A B & Kohiler S J, J Magn Reson, 45 (1981) 352.
11 Dietrich W, Frohlich B &&rgman G, J Magn Reson, 40
(1980) 519,
12 Schule P J & Schmidt V H, Rev Sci lnstrum, 53 (1984)
1724.
13 Yoshida N, Kumano M and Ikenoue T, Rev Sci lnstrum, 52
(1982) 382.
14 Void R L & Void R R, J M~ Reson, 55 (1983) 78.
15 Analog Devices data book, 2 (1984) 41.
16 Kuo B C, "Automatic Control Systems" (Englewood Cliffs N
J Prentice Hall), 1982.
Download