Interfacing an Old UV-VIS Spectrophotometer to a PC Computer

Apr 4, 1995 - Page 1 ... Industriales. Univemidad Politecnica de Valencia. ' 0. Box 22012 ... ried out to a Spectronic-20, whose goal was to measure t...
0 downloads 0 Views 2MB Size
Interfacing an Old UV-VIS Spectrophotometer to a PC Computer J. L. Guiiron, J. Garcia-Jareiio, J. Garcia-Anton, and V. Perez-Herranz Dept. lngenieria Quimica y Nuclear. E.T.S.I. Industriales. Univemidad Politecnica de Valencia 0.Box 22012 46071 Valencia, Spain

'

5

=

Figure 4. Full duplex operation of the interface and cyclic voltammogram of 0.01M CdC12 in 1M KC1 with a sweep rate of 400mVIs.

The general strategy in establishing interfaces between serial instruments and computers and the teaching computing interfacing i n chemical instrumentation has heen described already in this Journal (1,Z). Typical examples are the interfacing atomic absorption spectrophotometer (3),NMR spectrometer (4),and infrared spectrophotometer (5).Interfacing of UV-VIS instruments has been carried out to a Spectronic-20, whose goal was to measure the intensity of electromagnetic radiation a s a function of time (6). I t also has been adapted to some W-VIS spectrophotometers provided with internal microprocessor IBM 9420 (7) and Perkin-Elmer Lambda 4B (81, whose interfacing was achieved by means of a n RS232 serial port for communication. However, the aim of these papers-spectral research and kinetic experiments-and the way of interfacing were different from those presented here. Hardware and Software Considerations In our particular case, an UV-VIS Varian 6349 spectrophotometer with a n automatic scanning speed (10,25,50,

Volume 72 Number 4 April 1995

A81

the computer bulletin boord

program traasfer only.

Set analagog input range.

the AD high byte register.

5 W o r m data to a potential

Figure 1. Flow chart of the AD conversion sequence

and 100 nmlmin) was used. This instrument works within a range 190-900 nm and can be used in single beam mode. The AD converter, ADC, a PCL812PG 12 bit of PC LabCard, with typical conversion time of 25 microseconds was used. The PCL812PG can use the INTEL 8253 programmable interval timerlcounter, but in this application, as a high speed AiJJ transmission is not necessary, time is controlled by means of the internal the computer clock. The recorder output from the spectrophotometer is interfaced with a PC computer (PCIAT 286, 2Mb RAM, and VGA graphics card). This can be accomplished by connecting the recorder output to the analog input terminals of an universal screw board PCLD780 PCLabCard with 40 terminal points for two 20pin flat cables. The latter, in turn, is connected to an AD converter, ADC, a PCL812PG 12 bit (of PCLabCard) and, finally, to the computer. However, our interfacing program and AD converter could be used with any scanning UV-VIS spectmphotometer with an analog output signal. The only modification in the C source code necessary would be a change in the function that converts the value of the output signal (V)to the absorbance or transmittance variables. The program was written in C (Turbo C 2.0) and compiled in the medium memory model. C language was chosen because it is an easy, quick, and powerful machine language and, furthermore, it can be used many other applications. The program was prepared to be used by any user and no specific computer knowledge was needed. The program works in two ways, the data acquisition system and the further data treatment. A schematic diagram of data acquisition routines is shown in Figure l. In the first step, the program initializes variables and prepares the ADC for the data acquisition. Then, the input channel and the analog input range are selected. Data acquisition routines control the time, sending a trigger to the ADC when it is necessary to take an item from the channel previously specified.Each measurement

0.0 670

540

wavelenglh (nm) Figure 2. The relative intensity of the hydrogen atom emission lines. A82

Journal of Chemical Education

the computer bulletin board is made twice to obtain more reliable data. The variables, absorbances, or transmittances, are plotted and displayed . . in real time on the computer screen. After their collection, data automatically are saved in a disk file. Once the data are on disk, it is a quick and easy process to import the ASCII file into a spreadsheet. However, several specific options are available in the main program, for example, to obtain any point coordinates by simply pointing with the mouse, to superimpose several plots on the screen, or to select a n area on the plot to be magnified. Once the spectrum suitably is displayed, it can be printed to a dot matrix printer or saved into a disk. A typical example of the capability of the interfacing is shown in Figure 2. We can observe the 656,486, and 434 nm lines in the Balmer series of the spectrum of atomic hydrogen (9, 10).

ment, signal processing, and pattern recognition (14).The number of papers and book published in this new discipline increases markedly in recent years ( 2 4 ) . The growing interest in using computer for experimental design and data manipulation has led to the introduction of chemometrics to undermaduate teachinas in chemistrv. ". chemical engineering, aA related fields (5y Because extensive mathematical treatment are involved, commercially available statistics (2)or chemometrics (6, 7) s o h a r e packages can assist students in studying this new discipline. However, these programs are expensive and mainly developed for those users with experiences in relevant mathematical techniques. It is not easy for students to master them. Hence, in this work, a soRware CHEMETRIC was developed and implemented in the Matlab (student version) environment to carry out selected chemometrics calculations. Matlab was adopted because it is good in matrix manipulation for data manipulation, easy to learn, and its cost is cheap (US $60 for the student edition with an user manual provided). Ih addition, each vector or matrix can handle up to 1024elements (or 32-by-32 elements for two-dimensional matrix). CHEMETRIC consists of four packages for

Conclusion A low-cost interfacing of old W-VIS s~ectroohotometers to a PC-compatible~omputeris descriged. ~ 6 project e had a com~letecost of $1200 USA. including a PC computer and'the PCL812PG card. The software here described could be adapted easily to any other UV-VIS spectrophotometer or, in general, to any laboratory instrument with an analog output. In the case that the user has some knowledge of C language, the program can be adapted easily to any specific application so that the same ADC system could be connected to any existing analog laboratory equipment to perfonn data acquisition andlor simultaneously to control other instruments, by using its other 15 input channels. Copies of the program listing and demonstration disk of the experiments, including examples of absorption spectrum, relative intensity spectrum of atomic hydrogen and the slit widths of the monochromator system are available on 3112 in. disk from the authors on request. Please ~ t $100 e check payable to Universidad Politknica de Valencia. Literature Cited 1. Thomas.R. N.: Kuo. J. E. J. C k m . Educ. 1989.66.

t-test and F-test (PackageA), t-test andF-test for computer-assisted-learning(PackageB), estimation of the main effects and interactive effects (Packam . C), and finding out the mathematical relation between a factor and the corresponding response using the first-orderand secondorder models (Package D). These topics were chosen because they a r e basic in chemometrics studies. The aim in developing these packages is to allow students in our BSc Course in Chemical Technology in testing hypotheses about data, designing experiments, and modeling linear and nonlinear relationship in learning chemistry or engineering subjects effectively. An instruction m a n u a l also was written for students to execute and apply these programs to chemical or engineering problems. A brief description about the functions of the four packages are given below.

947

Package A Al. Program TRUI3.M-Compare the known true value with a set of data using the t-test. . Program M E A N S . M - C ~ ~mrnns ~ ~ ~ from ~ two dlffw-

6. Nagel, E. H. J. Cham. Ed=. 199(L,67,A74. 7. Jencen, D . A.; Hardy, J . K J Chem. Edue. 1889.63, 1075. 8. Spraque, E. D.;Ridway, T. H. J. Ckem Educ 1993, 70, A78. 9. Douglas,J.: von NamFelsobuki, E . 1. J. Chem Educ 1987,M. 552. lo. G&h, J.L. J. Ch&. Edue 1989.66. 790.

em methods or initrumenti uthaing !-test. A3 Promam FTEST.M-Cornohre the orrciz~ons ot'lwu d~f.

Using Matlab to Assist Undergraduates in Learning Chemometrics F. T. ~ h a u and ' W. H. Chung

Department of Applied Biology and Chemical Technology Hong Kong Polytechnic Hung Hom, Hong Kong The advent of intelligent instruments and laboratory automation has changed profoundly the role of chemist, especially analytical chemist. The term chemometrics was mathecoined in 1971 (1)to describe the erowine use of ~- ---~ ~ - matical, statisti'cal, and other logicbised methods in the field of chemistrv and in oarticular in analvtical chemistrv. ~~The application of chemometrics has found considerable success in data calibration,validation, and extraction, experimental design, optimization of chemical measure-

~~

~

~

~

-

'To whom all correspondence should be addressed. A84

Journal of Chemical Education

-

ferect methods using F-test: Package B B1. Program EDTRUI3.M-Allow students to learn how to perform t-test in comparing the known true value with a given set of data. B2. Program EDME4NS.M-Allow students to learn haw to compare means from two different methods or instruments using t-test. B3. Program EDFTESTM-Allow students ta learn how to compare the precisions oftwo differentmethods using F-test. Package C C1. Program TW0.M-Calculate magnitudes of the main and interactive effects of the two-factor system. CZ. Program THREE.M-Calculate magnitudes of the main and interactive effects of the threefactor system. C3. Program F0UR.M-Calculate magnitudes of the main and interactive effects of the four-factor system. Package D Dl. Program SFF0.M-Find out the mathematical relationship between the responses and the levels of factor using the first-ordermodel.