a data acquisition experiment for instrumental analysis

3
Sacramento, California 95819 I Russell R. Markman, Patricia L. Bean, Gail L. Heinrich, Stephen J. Freeland, ond Fredi Jakob California State University Perusal of current scientific literature reveals the tremen- dous impact of lahoratory computers. Publications in di- verse fields such as physics, psychology, biology, chemis- try, and engineering indicate a universal interest in the use of comnuters for data acauisition. data reduction, and A Data Acquisition Experiment for Instrumental Analysis for control of experimental devices. Complex instrumenta- tion svstems controlled bv a dedicated didtal computer " - are becoming increasingly common. Many scientists are of the oninion that within the next five to ten vears, all major analytical instruments will operate under computer control or have data outnut terminals that produce data which is computer compatible. Tedious and routine operations can he controlled by the untiring computer, freeing the scientist for more creative activities. There are, in addition, experiments and proce- dures that would not be feasible without the aid of com- puters. Examples of the latter include techniques such as Fourier Transform Spectroscopy (I, 2), sophisticated sig- nal averaeine (2. 3) and data acquisition systems used to measure rapihly changing electrochemical signals (4). We have long felt that our undergraduates should he in- troduced to modem experimental methods and apparatus. The importance and widespread use of computers has prompted us to incorporate computer concepts into sever- al of our courses. Freshman, enrolled in the honors course, are currently using an Olivetti-Underwood Programma 101, a programmable calculator to perform all of their laboratory computations. They are required to write fairly sophisticated programs for this machine, e.g., linear re- gression analysis and successive approximation solutions of polynomial equations. The Chemistry Department also offers a Fortran IV programming course that emphasizes the use of this high level language in solving problems in the physical sciences. The experiment described in this paper was developed for our senior level course in Chemical Instrumentation. It is in this course that the student is introduced to a wide varlet? oi analog and digital circuits, analog and digital computers. and their application to problems oi interest to experimental scientists. Our objective was to develop an experiment that illustrates the computer's ability to operate in an on-line mode. Students in the Chemical In- strumentation course receive 8-10 1-hr lectures on the use of minicomputers in the chemical lahoratory. The lectures cover computer organization, machine and assembly lan- guage programming and computer peripherals. A series of required programs, of increasing difficulty, written in machine language and in PAL 111, the assembly language for the PDP-8 family of computers, develops the student's abilities to the point where he is ready to pro- gram the data acquisition experiment described herein. These preliminary assignments are summarized in Table 1. First order svstems are common to manv scientific dis- ciplines. The current-time relationship in an RC circuit is analogous to the concentration-time relationship observed Table 1. Programming Assignments Assignment Language Purpose 1. Clear locations Machine Familiarization with ma- snnn. t" 4nnn. chine laneuaee instruc- .. . ." .. .. . ." tions andVen&ring of pro- grams via the swZch rpniqter . .".. . .. . 2. Telcrype output Asremblv Illwtrates how peripherals of students name (PAL 111, rommunwatr uithand on a dragvnal r g. arc cmtrulled by the computer - 3. Computational Assembly Studentswrite an integer Routines (PALIII) multiply subroutine which gives them addi- tional experience in pro gram preparation. . .~ 4. Subroutines Assembly Students incorporate a (PAL111) floating point package in a program they write to solve an algebraic equa- tion. with a first-order chemical reaction. The importance of first-order behavior, in addition to the ease with which this kind of svstem can be simulated, was a major factor in our choicevof conditions for this experiment.- he rate constant for a first-order svstem can he obtained by com- putation of the slope of the log (signal) versus time func- tion, a computational task eminently suitable for on-line solution with a minicomputer. Experimental A Digital Equipment Company PDP-81 computer equipped with an AX08 lahoratory peripheral was used for this experiment. Major components of the lahoratory pe- ripheral include a 9 bit analog to digital converter (AID), four channel multiplexer, Schmitt triggers, an RC and a crystal clock and digital to analog converters (D/A), that can drive the X and Y axis of an oscilliscope. Each of the peripherals is called into operation with appropriate PAL III instructions. An enable register, which also is part of the basic AX08 package, is used to set up conditions to "enahle" actions by the above-mentioned elements of the laboratory peripheral. Loading the enable register with a particular data word allows one to take experimental points at precisely known time intervals. Analog to digital conversions can he started, after a predetermined number of clock pulses or the conversion can he initiated after one of the clock flags, RC or crystal, is set. This decision is also implemented with the enable register. Figure 1 illus- trates how the components of the AX08 lahoratory periph- eral, which were used in this experiment, are intercon- nected to provide a flow of information from the experi- ment to the computer. The student must make only a sin- gle external connection between the first order simulator, Volume 50, Number 4, April 1973 / 295

Upload: fredi

Post on 16-Feb-2017

212 views

Category:

Documents


0 download

TRANSCRIPT

Sacramento, California 95819 I

Russell R. Markman, Patricia L. Bean, Gail L. Heinrich,

Stephen J. Freeland, ond Fredi Jakob

California State University

Perusal of current scientific literature reveals the tremen- dous impact of lahoratory computers. Publications in di- verse fields such as physics, psychology, biology, chemis- try, and engineering indicate a universal interest in the use of comnuters for data acauisition. data reduction, and

A Data Acquisition Experiment

for Instrumental Analysis

for control of experimental devices. Complex instrumenta- tion svstems controlled bv a dedicated didtal computer

~ " - are becoming increasingly common. Many scientists are of the oninion that within the next five to ten vears, all major analytical instruments will operate under computer control or have data outnut terminals that produce data which is computer compatible.

Tedious and routine operations can he controlled by the untiring computer, freeing the scientist for more creative activities. There are, in addition, experiments and proce- dures that would not be feasible without the aid of com- puters. Examples of the latter include techniques such as Fourier Transform Spectroscopy ( I , 2), sophisticated sig- nal averaeine (2. 3) and data acquisition systems used to measure rapihly changing electrochemical signals (4).

We have long felt that our undergraduates should he in- troduced to modem experimental methods and apparatus. The importance and widespread use of computers has prompted us to incorporate computer concepts into sever- al of our courses. Freshman, enrolled in the honors course, are currently using an Olivetti-Underwood Programma 101, a programmable calculator to perform all of their laboratory computations. They are required to write fairly sophisticated programs for this machine, e.g., linear re- gression analysis and successive approximation solutions of polynomial equations. The Chemistry Department also offers a Fortran IV programming course that emphasizes the use of this high level language in solving problems in the physical sciences.

The experiment described in this paper was developed for our senior level course in Chemical Instrumentation. It is in this course that the student is introduced to a wide varlet? oi analog and digital circuits, analog and digital computers. and their application to problems oi interest to experimental scientists. Our objective was to develop an experiment that illustrates the computer's ability to operate in an on-line mode. Students in the Chemical In- strumentation course receive 8-10 1-hr lectures on the use of minicomputers in the chemical lahoratory. The lectures cover computer organization, machine and assembly lan- guage programming and computer peripherals.

A series of required programs, of increasing difficulty, written in machine language and in PAL 111, the assembly language for the PDP-8 family of computers, develops the student's abilities to the point where he is ready to pro- gram the data acquisition experiment described herein. These preliminary assignments are summarized in Table 1.

First order svstems are common to manv scientific dis- ciplines. The current-time relationship in an RC circuit is analogous to the concentration-time relationship observed

Table 1. Programming Assignments

Assignment Language Purpose

1. Clear locations Machine Familiarization with ma- snnn. t" 4nnn. chine laneuaee instruc- .. . ." .. .. . ."

tions andVen&ring of pro- grams via the swZch rpniqter . .".. . .. .

2. Telcrype output Asremblv Illwtrates how peripherals of students name (PAL 111, rommunwatr uithand on a dragvnal r g. arc cmtrulled by the

computer

- 3. Computational Assembly Students write an integer

Routines (PALIII) multiply subroutine which gives them addi- tional experience in pro gram preparation. . .~

4. Subroutines Assembly Students incorporate a (PAL 111) floating point package in

a program they write to solve an algebraic equa- tion.

with a first-order chemical reaction. The importance of first-order behavior, in addition to the ease with which this kind of svstem can be simulated, was a major factor in our choicevof conditions for this experiment.- he rate constant for a first-order svstem can he obtained by com- putation of the slope of the log (signal) versus time func- tion, a computational task eminently suitable for on-line solution with a minicomputer.

Experimental

A Digital Equipment Company PDP-81 computer equipped with an AX08 lahoratory peripheral was used for this experiment. Major components of the lahoratory pe- ripheral include a 9 bit analog to digital converter (AID), four channel multiplexer, Schmitt triggers, an RC and a crystal clock and digital to analog converters (D/A), that can drive the X and Y axis of an oscilliscope. Each of the peripherals is called into operation with appropriate PAL III instructions. An enable register, which also is part of the basic AX08 package, is used to set up conditions to "enahle" actions by the above-mentioned elements of the laboratory peripheral. Loading the enable register with a particular data word allows one to take experimental points at precisely known time intervals. Analog to digital conversions can he started, after a predetermined number of clock pulses or the conversion can he initiated after one of the clock flags, RC or crystal, is set. This decision is also implemented with the enable register. Figure 1 illus- trates how the components of the AX08 lahoratory periph- eral, which were used in this experiment, are intercon- nected to provide a flow of information from the experi- ment to the computer. The student must make only a sin- gle external connection between the first order simulator,

Volume 50, Number 4, April 1973 / 295

Figure 1. AX08 Operational flow diagram.

described below, and channel zero of the multiplexer. Ad- ditional operational details for the laboratory peripheral are given in literature supplied by the Digital Equipment corporation (5).

A first order voltage signal, e.g., one that obeys the equa- tion

where V is the voltage a t time t, V' is the initial value of the voltage, e is the base of natural logarithms, and h is the first-order rate constant is available from several types of chemical transducers. For example a spectrophotometer cuvet could contain a reactant that is undergoing a first-order reaction. If only the reactant absorbs radiation a t the selected wavelength, then the transmitted radiation intensity is related to the concentration of this reactant. Suitahle intradomain modifiers (6) can be used to trans- form the initial electrical signal, one that is proportional . to the transmission of radiation through the sample, to a loearithmic simal. The amplitude of this logarithmic sig- n; is, accordTng to ~eer 'LLaw, directly p;oportional to the concentration of the absorbing species. A plot of this logarithmic signal versus time would obey eqn. (1).

We elected not to use a chemical system because of the extra time and effort required for sample preparation and the necessity of designing or purchasing a suitable loga- rithmic amplifier to convert the transmittance to an ah- sorbance signal. Since we also wanted to vary the rate constant over a large range of values we would require a great number of reactants, each adhering to the previously described conditions, if we were to attempt to evaluate our programs with "real" chemical systems. Simulation was selected as the best approach and has proven to be very satisfactory. A conventional operational amplifier cir- cuit, shown in Figure 2, was employed to generate volt- ages that obey eqn. (1).

Those readers familiar with analog computation meth- ods will recognize this circuit as the one employed for the solution of the differential equation that describes a first- order system (7-9).

Figure 2. First-order simulator. All amplifiers are Philbrick model number PSSAU.

where V is the voltage at time t, and k is the first-order rate constant. Equation (1) is the integrated form of eqn. (2). Component values for the analog circuit were selected so that h could be varied over a range of 0-10.0. The curves generated with the simulator were equal in quality to those obtainable on an analog computer (9).

The initial condition on the integrator is set at -2.0 V. The output of the first-order simulator is fed to a sum- ming amplifier that also has a fixed +1 V input. The output of the summing amplifier goes from +1 V to -1 V when the simulator voltage goes from -2 to 0 V. This was done to take advantage of the full range of the AID converter which is +1.020 to -1.024 V. The resolution of the input signal is increased by a factor of two by this scaling proce- dure.

Program Description

Figure 3 illustrates the program in flow chart form. A more complete description of the program follows.

The program is capable of evaluating the rate constant for first-order systems. The initial monologue gives the programs capabilities, available input and output formats, and other user options. Experimental parameters which

Description Of Program Capabilities And Formats

For lnput And Output

T ime Interval rpired? ,

Make And Average Two A To D Conversions

Compute Andoutput Rate Constant

List Data

NO

Figure 3. Computer flow chart for the data acquisition program

296 / Journal of Chemical Education

include the time interval between data acquisitions and the number of data points to be acquired are entered via the teletvne. in floatine noint notation. The floatine uoint number ;;presenting autime interval from 1 X 10-4-to 400 sec is multinlied bv 10.MX). converted into a double nreci- sion octal number, negated, incremented by minus one and saved.

The time is multiplied by 10,000 because the crystal clock flag is set 10,000 times per second. The floating point number representing the number of data points to be acquired, from 1 to 200, is converted into a single pre- cision octal number, negated and saved. These conver- s i o x to binary notation are made to simplify further arithmetic operations.

The computer determines the time interval by counting the crystal clock. The negated double precision time in- terval is incremented before each crystal clock flag. When the contents of this word reaches zero the computer will com~lete a nine bit AID conversion of the voltaae au-

at channel zerp'of the multiplexer. A seconh A ~ D conversion will be initiated immediatelv thereafter. These two values are averaged and stored as a single data point. The crystal clock flag counter is then reset and the data acquisition procedure is repeated until the desired num- ber of experimental points have been acquired.

The rate constant, k , is calculated by evaluating the slope of a plot of the linear natural log (voltage) versus time function. A standard linear regression analysis proce- dure is used to compute the rate constant.

Although floating point notation for inputs simplifies the use of the program by the operator it does complicate the program in that a floating point to double precision interchaneer is required. Therefore, the promam could be simp~ifiedat the expense of user c&venien& by requiring octal format for inputs.

A double preci&on-floating point interchanger subrou- tine has been developed and can be obtained bv reauest- ing Decus 8-379 from Digital Equipment company, users Society, 146 Main Street, Maynard, Mass. 01754.

After the output of k observed has been completed the computer, depending on the configuration of the switch register, will halt, return to start, or dump the data via the teletype. The data dump outputs each point in four columns; octal, scaled decimal, natural log, and the asso- ciated time interval. After completion of the data dump the computer will halt or return to start. A listing of the program is available from the authors.

Results

The program was executed with four different rate con- stants covering the range of -0.045 to -0.944, set on the first order simulator. Several repetitive runs were made with each selected rate constant. The results of these ex- periments are summarized in Table 2. A data dump rou- tine is included in the program; the data can be output by a teletypewriter under computer control.

Future Work

The data acquisition program we have reported meets all of our current pedagogical objectives. Students that successfully complete the required set of programs are ca-

Table 2. Computer Calculated First-Order Rate Constants

Rate Constant Computer Set on Number of Data Point Calculated

Simulator Data Points Intewal (sec) Rate Constant

-0.045 200 0.1 -0.0451 -0.368 20 0.5 -0.368 -0.545 50 0.1 -0.545 -0.944 100 0.04 -0.943

pable of preparing software for a variety of computer con- trolled experiments.

There are still many improvements that we can and will make in the future. We are building a more sophisticated interface between the experiment and the computer. One function of the interface is to start the exponential decay, aenerated on the simulator. under comnuter control. At present, the operator must start the simulator and then initiate the data acauisition routine. Fortunatelv. the cal- culated rate constants are independent of the bortion of the exponential curve that is used for the rate constant computation. Manual starting, however, limits the range of rate constants that can be examined. With large rate constants the exponential decay would be essentially com- plete before the operator hit the program start button. An alternative to improved hardware is a change in the soft- ware. The computer could be started before the simulator and initial non-changing signals could be rejected. We will also investigate this latter alternative.

Data acquisition intervals are selected by the operator and input, via teletypewriter, to the computer at the start of the experiment. These time intervals could be too short or too long depending on the particular rate constant that is selected. For example, if a small rate constant is set on the simulator and the required number of data points is obtained rapidly then because of the limited resolution of the A/D converter it is not possible to compute an accu- rate rate constant. Pardue and James have developed software that overcomes this difficulty (10). A few initial points are obtained a t a fixed time interval and are used to calculate the optimum data acquisition rate. Similar features could be incorporated into our current software.

The data dump feature provides us with a tabulation of voltages, from the simulator, at fixed time intervals. Since the Ax-08 option includes D/A converters interfaced to an oscilloscope i t is relatively easy to display the stored data. We are in the process of preparing a display subroutine which will he made available for mcorporation in the stu- dents' programs.

Literature Cited

(1) Fidyard. J. N. A.. Colloq. Inl. CentreNofionalRecm. Sci. IGI. 62119671 IEng.). (21 N i t t row. C . A.. "Mndrrn Signal Processing Techniques for Overcoming Noise."

Technical Notes T-2M. Princeton Applied Research. 1968. (31 B i m . F. J .Ana1. Chsm., 42,537 11970). (4) Booman. G. L..Anol. Chem.. 39. 1141 (19661. (51 Digital Equipment Company. "AX08 Laboratory Peripheral Instruction Manual."

DEC. Maynard. Mars.. 1968. 161 Barnartt. S.. andJohnsan. C. A.,Anol. Chem., 43,69A(l97L). (71 Electronic Associates. Inc.. "Hendbaok of Analog Computation.'' EAI. West Long

Branch. N . J.. 1956. (81 Jsekron. A. S.. "Analog Computafian." McGrsw Hill Book Co.. Ine.. New York.

1960. I91 Tabbutt. F.D.. J.CHEM. EOUC..44.M(19671.

1101 James .G .E . . andPsdue . H.L. .Anol . Chem..41.1618119691.

Volume 50, Number 4, April 1973 / 297