Plotting potentiometric titration data using an Apple II - Journal of

Plotting potentiometric titration data using an Apple II. Vinay Kumar, John I. McAndrews, and Jon W. Mauch. J. Chem. Educ. , 1982, 59 (6), p 519. DOI:...
0 downloads 0 Views 3MB Size
Table 2. Execution Tlme for Elgenvalue-Eigenvector Calculationa

Ploning PotentiometricTitration Data Using an Apple II

NO.

Vinay Kumar and John I. McAndrews Northern Kentucky University. Highland Heights, KY 41076

orbitals

HA HAH (nonlinear)

A0 HA0 (linear) ABC (linear) ABC (nonlinear)

5 6 8 9 12 12

15 35 50 60 170 210

A and Bare any of the elemen13 He through Ar.

Apple 11-plus computer system.

After callina u p the promam, the user inputs the chemical symbols, when prompted;for the two or three atoms in the molecule. Interatomic distances obtained from an internal table of atomic radii are offered to the user, who may either accept or modify the values. Input of the bond angle, if a triatomic molecule is being donelthen concludes the required data specification. The first outout obtained is the atomic orbital overlap integral matrix, which can be examined as part of a discussion of molecular symmetry or recorded for later use with molecular orbital coefficients if a charge density or bond order population analysis is to he done as a separate exercise. The molecular orbital energies and coefficients are then produced, sorted hv enerev. At the user's convenience the orbital enerw diagram-is di&layed. Connections are drawn between each molecular orhital energy level and the energy levels of constituent atomic orbitals for which the molecular orbital coefficient exceeds a chosen minimum value. This may he repeated with different choices for the minimum. The enerw and wf'ficients for a n y molecular orbital may hL. redirplayed, along with the correlation diagram, to permit special discussion or comment on orbital symmetry and the relative importance of different atomic orbitals in a particular molecular orhital. A choice is then made to stop or to reload the program and try another molecule or another geometry for the same molecule. The program was written in floating point BASIC (Applesoft) for use with an Apple 11-plus computer and consists of the main Droeram and subroutine senments for overlap integral calcuiat~ons,the calculation of the U-I transformation matrix, and the Jacobi eiaenvector-eigenvalue routine. The of the main program sets up the arrays used as last starting and ending points of the lines drawn in the graphics display. The whole program system consists of 480 BASIC numbered statements, not counting comments, and dimensioned variable arrays totalling 601 words. The BASIC program statements require 10.5 K bytes and the variables rem i r e 3.8 K bvtes of storaee. The Apple hizh-resolution graphics call do& wipe out t h i part of thhprogr& containing the subroutines after their use has heen completed: hence the program is reloaded after each complete molecular calculation. The program is also readily segmented t o save space, if necessary variables and arrays are saved. The graphics usage assumes the availability of a four-line text window and a point-toypoint straight line plot command in BASIC, and should be readily adaptable to other microcomputer systems. A Pascal cornoiled version is olanned. A program &ing, documeniation, including text giving axis conventions, and a master diskette with the Applesoft BASIC program file produced using Apple DOS version 3.3,16-sector format, is available for $15.00 to cover costs. The disc includes one copy of the program with program comments and an otherwise identical copy with comments. Documentation with program listing is available for $5.00 without the program disc. Send a check for the amount payahle to John Chesick, Haverford College, Haverford, PA 19041.

Jon W. Mauch Maderia High School, Maderia, OH 45243 For n great many years, porenriometric firrations involving acid-hare andlm redox reactions have been one of the traditional experiments for chemistry students in the quantitative analysis laboratory courses. Whereas the experimental procedure for doing a potentiometric titration is easy, enjoyable, and consumes relatively little time, the accompanying calculations for obtaining the first and second derivative plots take up a lot of the students' time. In order to save that valuable time and to show the students how a microcomouter can he used to obtain the titration plots, we have developed a program called PLOTTER. It is written in Ao~lesoftBASIC i n d h a s been successfully used by our studenis on an Apple I1 microcomputer. The program has the capability of handling both pH and millivolt (mv) data. In addition, it is versatile enough to do the following: display dl entered data inn n TV monitur screen and allow the srudmt to make corrections (11) rolrulare and display pvintwiit ,,nlues of che first and second derivatives (c) d a w the student to see the following three plots in color graphics on the screen: (i) pH (or mv) versus mL of titrant (ii) first derivative versus mL of titrant (Fig. 4) (iii) second derivative versus mL of titrant (Fig. 5) (d) indicate the volume needed to reach the equivalence point. In)

screen

Figure 5. Display of

second

derivative versus mL of titrant plot

on the TV

screen.

Volume 59

Number 6 June 1982

519

An expanded version of PLOTTER enables the student to obtain a permanent copy of the data, the calculated values, and the graphs on a suitable on-line printer. The expanded program, named PLOTTER(REV. JM), was written for use with one disk drive and an IDS-440 nrinter. The Paper Tiger" (Integral Data Systems, Inc.) with graphics option, interfaced to the Apple I1 microcomputer through an Apple A2B0002 parallel printer firmware card. When only alphanumeric data are to be printed, PLOTTER(REV. JM) works by itself. I t requires only a suitable printer and interfacing. When graphs are to be printed, PLOTTER(REV. JM) loads a companion program named HRD from the disk. After printing a descriptive heading, PLOTTER(REV. JM) gives control of the micronrocessor to HRD which then causes the last-displaced graph' to be printed. (White or colored dots on the screen are printed as black dots on the paper.) HRD is written in binary and requires 36K bytes of RAM, one disk drive.. a ~ r eraohics .r i n t ewith " . caoabilitv and sufficient baud rate, and parallel data transfer. I t is slot dependent. The readers may request free single copies of the listing of the original or the expanded version of the program. Requests for obtainina the oroaram on a diskette should be accomoanied by $10 fmone; or2er or cashier's check in the name of i o n W. Mauch to cover the cost, postage, and handling. The authors express their appreciation to Joe Ruh for taking the photographs. ~

~~~~~~

~

where P is the pressure of the gas, R is the gas constant, T is the absolute temperature, V is the molar volume of the gas, a is the attractive forces constant, and b is the molar excluded volume constant. The voltage values are scaled so the readings on the potentiometer knobs represent the values in the usual units of T = Kelvin, a = 12 atm/mole2, and b = l/mole. The volume is allowed to take on 512 values, and the corresponding values of pressure are calculated. The corresponding points for the pressure given by the ideal gas equation are also calculated. The total time for reading the potentiometers and doing the calculations is less than two seconds. The calculated points are converted to analog voltages which are sent to the oscilloscope giving curves of the type shown in the photographs in Figures 6-8. Each curve, along with axes and tick marks, is plotted 64 times in order to give a continuous appearing display for three seconds. The potentiometers are then

Microcomputer Simulation Curves on an Oscilloscope Robert G. Ford Memphis State University, Memphis, TN 38152

Simulation programs are one of the most widely used types of computer-aided instruction (21). A useful type of simulation program evaluates a particular function of chemical interest and produces a table of values or a graph of these values. For examole. . . one mieht use the comkuter to calculate the concentration of a reactant as a function of time for a first order reaction. The o u t ~ uoft the Droeram could he in tabular . form or a plot of the familiar exponential decay curve. Numerous programs of this type have been described by Barrow

-

Figure 6. Van der Waals and ideal gas curves for water at 600°C. a = 5.46 L2 ahn/moi2, b = 0.0305 Llmoi. The tick marks on the vertical axis are at 100atm intervals. The tick marks on the horizontal axis are at 0.1 Llmol intervals.

122) \--,-

For programs of this sort, we have found it advantageous to use a local microcomputer that obtains input parameters by reading voltages from potentiometers and plots curves on an ordinary low-frequency oscilloscope. The components of the system used for this purpose a t Memphis State are listed in Tahle.3. Similar results could he obtained on any microcomputer system that is capable of analog to digital and digital to analog conversion. A program that utilizes this system produces plots of the ideal gas equation. The calculations are done using a FORTRAN program, which calls assembly language subroutines for acquiring input data from the potentiometers and sending the output data to the oscilloscope. The program first reads three voltages from potentiometers to represent the temperature and the a and b constants in the van der Waals equation of state: P

Table 3.

= RTI(V - b ) - aIV2

Comoonents of Simulatlon-Dlsolav Svslem

b a t h H I 1 micrmomputer 40K bytes memory Date1 Systems SineTrac A/DD/A plug-in board for H I 1 Digital Equipment Corporation DecWriter 11 Heath H27 Dual Floppy Disk Drive Power SYDD~V wilh 3 Dotentiometers

520

Figwe 7. Same as Figure 6 except T = 647'C which is the crtt~caitemperature of water

Journal of Chemical Education

Figure 8. Same as Figure 6 except T = 700°C