Interfacing atomic absorption instruments to a PC for student

Presentation of a simple Basic language program to interface the PE-5000AA (Perkin-Elmer atomic absorption instruments) to a PC...
0 downloads 0 Views 2MB Size
negative first guess other than the exact solution w i l l lead to successive approximations moving away from the true solution (4). If eq 1is instead rewritten as

then MSA will work, but very slowly. With the first guess of 0.0162, MSA with eq 4 will take over 400 iterations to converge to the correct solution. Moreover, it is unlikely that most students would realize in advance that eq 4 is preferable to eq 3 when using MSA. The graphical approach is also useful with equations of the following form, which arises in monoprotic acid-base equilibrium problems.

One approach is to convert eq 6 to a quadratic equation, but this must be handled with care due to numerical precision considerations in the quadratic formula (5, 6). Another approach is to use MSA, stopping the iterations according to the "5% rule" (7,8) or an ionization ratio (9). If the graphical approach is used, there is no need to wony about numerical precision in the quadratic formula or rules for stopping the MSA iteration process. Another point to consider when solving mathematical equations is the possibility of multiple solutions, some of which may not be physically sensible. How does the student using MSA know-thereis only one physically sensible solution to the equation given? Agraphical representation of the equation will easily conv*e the skeptical student that only one such solution exists because the curve will cross the x axis only once over the range of physically sensible x values. Finally, we are not advocating the eradication of the quadratic formula or MSA as methods for equation solving. The MSAapproachis an important concept, useful for solving mmplex, multivariable problems beyond the scope of the graphical methods presented here. However, depending on the course and student background, the graphical approach provides a simple alternative or supplement to MSA.

Wave Functions for Hydrogen Atomic Orbitals Using Mathcad Dean E. Turner Murray State University Murray, KY 42071

Several notes have appeared recently in this Journal showing how Mathcad can be applied to problems in chemical education (10, 111, including one by Rioux that implemented a Taylor series expansion for radial wave functions for the hydrogen atom (12). A similar application using Theorist by Prescience on the Macintosh has also been described (13). Reading Rioux's paper, I was inspired to use Mathcad to derive exact wave functions for hydrogen and to prepare a doeument that plots them. The user need only enter the desired quantum numbers to see vari-

ous graphs describing orbitals up to 4p, making it useful for classroom demonstrations or students' exploration Times for recalculationand replotting vary from 1-2 min using a 33-MHz 80386-DX computer with no coprocessor. Most of this time is required to prepare a three-dimensional plot of electron density. (Much less time is needed if the radial function alone is desired.) The complete document appears in Figures 1and 2 on the following pages. I can offer my personal testimony to the power and ease of using Mathcad. Although I had not studied quantum mechanics since my undergraduate days about 15 years ago, I was able to develop this document in a single weekend while also taking care of young children. I believe that programs like Mathcad make it possible to reasonably ask a typical undergraduate to perform tasks like this that have heretofore been too difiicult. The program's symbolic processor does calculus and algebra, and its array and graphics tools perform calculations and display the results. Thus, students should be able to apply the principles they have learned even to mathematically complex pmblems.

Interfacing Atomic Absorption Instruments to a PC for Student Laboratories John M. ~okosa' and Keith M. Dery GMI Engineering and Management Institute Flint, MI 48504

Several models of Perkin-Elmer atomic absorption (AA) instruments were designed to be interfaced with the Perkin-Elmer 3600 data station, a computer used with PE instruments since the late 1970's. Because we wanted to use the PE-5000 (both airlacetylene flame and graphite furnace modes) for a new course in environmental chemistry, we also needed a suitable computer interface for the AA, in order to handle several laboratories of 20 plus students. An easy to use program incorporating data collection, analysis, and graphics was the basic need for the students. Unfortunately, the PE-3600 software and Perkin-Elmer's recently introduced Wata Management S o h a r e " for the PC (functionally identical to the 3600 software)were more demanding than required for student use.2 Experimental Examination of the microprocessor documentation lead to the realization that the PE-5000 communicates bidirectionally with an external computer usiw ASCII codes. allowing not only downloading if raw data, but also full Antrol of the instrument. We therefore decided to write a program for two-way communication with the instrument in Basic (Microsoft QuickBasic 4.5) computer lanrmaw. Basic was chosen because it is an easy m&hiie language to understand, program in, and change - by. anyone . familiar with a microcomputer.

- -

'~uthorto whom correspondence should be addressed. 2Availablefrom Pehin-Elmer Corporation, Norwalk, CT. (Continued on nertpage)

Volume 70 Number 7 July 1993

A185

the commuter bulletin boord program, compiled and run as an executable program, will r u n on a standard PCXT (interfaced to the serial port with a straightthrough cable), using two Laguerre polynomials (used to calculate radial component of Psi]: floppy drives and a CGA or q(n.1) :=n+l $1) :=24+I HGA interface. (Other graphics boards can also be 0 0 0 0 -1 used, with appropriate pm0 0 0 0 -4+2.p gram changes.) The data is stored i n ASCII format, 0 0 - I S + 18.p- 3.: 0 -6 L(P): which can be read on any 2 3 PC system and graphed by 144.p- 48.p + 4.p - 96 0 - % +249 0 0 various commercial pro0 - 6 0 $ + 6 ~ . p -1200 0 -120 0 grams. For those who would like to continue to L(P.~.S) :=UP)s_,,,-, use the 3600 data station, it is possible to transfer Legendre functions (used to calculate angular component of Psii: raw ASCII data to a PC through a serial modem cable. However, additional manipulation of the data in the PC environment would probably be necessary before it would be suitable for further use. An example of this is illustrated bv Chau et al. (14). Due to limitations of time, students in our environmental chemistry murse must quickly generate a standard curve. Then if they have prepared the solutions correctly and obtained a linear curve, they can obtain data on their unknown solutions. The proConstants used lo defineresolution of graphs: gram prompts the students to check their standards + 10.' N :=60 C C is center (used for 3-D graph, offset to prevent singularities) during data mllection if the 4 correlation factor is less x =o.. ! y :=0..! Coordinates for 3-D densw graph than 0.95. The "BasicAA" 2 2 program also includes commands for rejecting data Coordinatesfor 2-D radial function graphs. These are plotted as r:=O..N outliers and then graphing f(rR) so that 2-D and 3-D graphs have same visual distance scale. the data for the standards and unknowns. Thus, data I Matrices of polar coordinates resulting from electronic noise spikes or improper aspiration can be automatI ically removed if they deviate by more than 10%fmm Figure 1. Page 1 of Mathcad wave function document. tlle average absorbance during a collection, before averaging. The percent deviation While the commercial Perkin-Elmer DMS software has can be changed, depending on how noisy the data is, or the obvious advantages of an off-the-shelf package for ineliminated altogether, by rewriting the program. dustrial or research use, the Basic interface presented Because understanding the operation of the instrument here, which we have named "BasicAAS,has additional adimportant, the students set the parameters on the inis vantages for an academic application? First, the software strument manually with the PE-5000 and graphite furcosta little, except for the time spent pmgramming. Secnace keyboards. The data, stored on disk, is fed into a modond, the program can be modified to meet the needs of the students using the equipment. Unlike the original soft3A functional vers on of '-BasicAA'and a short users manual may be obtaned for a duplicauon and hwaling fee by writing the author. ware written for the PE-3600 data station, the "BasicAAn Complete wavefunctions for hydrogen-like atomic orbitals up to 4p. Values of quantum numbers are enter.& and graphs updated at bottom of document. Graphs are radial distribution (R). R-squared (electron density),Rr-squared (electron distribulion),and 3dimensional Psi-squared.

1

I

I

:=z

I

I

A186

Joumal of Chemical Education

ified version of the program located on a separate computer, during or after the laboratory period, to generate a caiibration curve for the laboratory re. port. This approach maximizes student throughput on t h e instrument. For smaller classes or for research, where time is not as tight, the graphical and raw data is printed out at the instrument PC. When it is not necessary to teach the operating principles of the instrument, the program could be rewritten to include o p erating condition recipes for each element and instrument methods libraries. Thus, a single command wuld be used to set up the instrument for analysis for a particular element. However, for our student applications, we have decided to keep the pmgram as simple as possible to avoid confusion and mistakes.

Constants used while calculalng wavefunction Z::l

s0::0.75

P:=-

2.z

ma0

a, k used to scale r-distance is in arbitraly unb

Radial component of wavefunction

Angular components of wavefunction

Complete wavefunction

Y :=(R(r)+!@))

W+) term omitted to improve calculation speed

ENTER QUANTUM NUMBERS HERE:

Conclusion We have presented a simple Basic language program to interface the PE5000 AA to a PC. With modification, the program can also be used to interface other Perkin-Elmer AA instruments that wntain internal A to D boards and communication cambilities, including ihe 4000. 3030. 3030B. 2380. and 1100 models. he "BasicAAn program can also be easily modified to increase its capabilities or to make its &ctions specific for a particular student laboratory. Literature Clted

L

1. Hauris. D.C. Bumlhtiw Chemuol Analysis, 3rd d.; Eteman: New YO&, 1991; p 77. 2. ~ m s i f c P. J.; ~ o r k oE. , R.J. c k m . Figure 2. Page 2 of Mathcad wave functiondocument. Ed- 1818.55.376-377. 3. Foley, G. D . The AMATYC &view 8. Zumdahl, S. Chemief~,2nd ed.: Heath: Ichgton, MA, 1989: Chapter 14. 19SO,JJ, -4. 9. Burneas, J. H. J. Chem Edve 1980.67,22&226. 4. Johnson, L. w.; uiees, R. D. Nvmenml A d y ~ i s Addim"-Wesley: ; Reading, MA, Z d r a u L o ~Z.~J. C h . E&c. 1881,68,A96. 10. 1977;~ 124. 11. Coleman, W. F. J. Chrm. mue lS90,67,A203. 6. Thompeon, H. B. J. Chem. Edue 1 S 8 1 , 6 4 , 1 ~ 1 0 1 0 . 12. Rioux, F. J. Chem. Edvc 1992,69,.4240. 6. NieuagelZ Y MdA k k k 1093.85.461465, 13. Bmneman, G. L; Parker, O.J. J. C h m Educ.i s m , @ 9 , ~ 4 . 7. Bmm, T I.; kMay Jr., H.E.; B-tan, B.E. Ckmiahy: The CIntmlSciem, 6th 14. Chau.F.T.;Leung, S.C.;Cheng, F.L.;?Se.K K;Yeung.C.H.;Mok, K W,Lo60m4.;RentkcHall: Englemcd CWk. NJ. 1991: Chapter 16. tory Micmmpukr 1988.8,4143.

Volume 70 Number 7 July 1993

A187