the computer bulletin board Table 1.
address 1900-
opcode AD90 CO
disassembly LDA $Cog0
Table 3. Examples of Conversion between Binarycoded Decimeal Format and the Decimal Format
comments load accumulator form address $GO90
1903-
AD 91 CO
LDA $GO91
load accumulator form address
1906-
4C0019
JMP $1900
jump to $1900
line# ln
define A = data from address $GO90 (49296, decimal) define B = data from address $GO91 (49297, decimal) define C = high nibble (4 bits) of data at $Cog0 defineD = low nibble of data at
A =
$GO91 and reoeat
Table 2. ASSEMBLY Language Routine that Continuously Reads the Meter and Prints the Results to the Screen.
address 1900-
opcode AD 91 CO
disassembly LDA $Cog1
1903-
29 01
AND #$01
1905-
20 E3 FD
JSR $FDE3
1908-
AD 90 CO
LDA 5C090
1906-
20 DA FD
JSR $FDDA
190E-
AD 91 CO
LDA 5C091
$Cog0
define E = high nibble of data at $GO91
comments load accumulator from address
60
$GO91
strip off the lowest bit (the pH output 10) subroutine $FDE3 prints a hexadecimal digit load accumulator from address
define F = low nibble of data at
70
F = B-(E' 16) IF F/2 < > INT(Fl2) then G=lO
80
IF G = 10 then F=F-1
strip offthe lowest bit if set
90
PH = G + ( F ' 0.016) + (E' 0.16) + (D' 1.6)+(C'16)
calculate the
$GO90
print a hexadecimal byte load accumulator from address $GO91
1911-
20 DA FD
JSR $FDDA
1914-
20 48 F9
JSR $F948
1917-
C O O 19
JMP $1900
print a hexadecimal byte print three blank spaces reDeai
sage through a 7404 inverter chip. Then we apply both inverted lines to the input of a 7408 AND gate. The inverted and DECODER output will both be high when active, and they will produce a high output f m c the AND gate. All other combinations of the inverted DS and DECODER outputs yield low outputs from the AND gate. Finally, the outputs from the 7408 AND gates are "ANDmedwith the FVW (readhrite) line on the Apple bus. This is to prevent writing any data to the pH meter instead of reading data from it. The final AND gate results are inverted because the 74373 flip-flops are activated by a low signal. The Output
With the interface card in slot no. 1, reading address 5C090 transfers the binary-coded decimal (BCD) equivalents (0.1,0.2,0.4,0.8,1,2,4, and 8)ofthe pH reading onto the data bus. The BCD's are available from a 30-pin printed circuit tab a t the rear of the Orion meter. Reading $Cog1 captures the pH pinouts: 10, 0.002, 0.004, 0.008, 0.02,0.04, and 0.08. The seventeenth piece of information, the 0.001 pinout, is discarded, so that the collected pH readings will be accurate within 0.002 pH units. Of course, additional 74373's driven by address lines other than A0 could be added to gather the last available bit of data or to interface additional instruments. A158
Journal of Chemical Education
comments
BASIC
statement
100
$GO91
define G = 10 if F is odd, pH 10
PH
PRINT PH
With a dual-channel oscilloscope the students can compare the outputs of the various inverters and gates in the .circuit with the level on the DSJne. Each read of a n appropriate slot address forces the DS line low for the duration of the system clock ($1 only. The HOLD pin of the pH meter is tied to the inverted DS line to halt A/D conversion in the meter and to hold the last converted pH during the time the slot is activated by a read. The students practice addressing 5C090 and 5C091 alternately while observing the scope traces. This exercise must be performed with ASSEMBLY language routines instead of BASIC. In Table 1is a continuous routine we used for this purpose. Table 2 contains an ASSEMBLY language routine that continuously reads the meter and prints the results to screen. A BASIC routine for reading the pH meter requires conversion between the binary-coded decimal format and the decimal format. Examples are given in Table 3.
An Inexpensive Cornputer-Based Autotitrator Edwin F. Meyer DePaul University Chicago, lL 60614
Several descriptions of computer-assisted titrations have appeared in this Journal in recent years (1&12). The novelty of the procedure presented here is the use of time as the primary independent variable, with simultaneous collection of the data required to transform it into volume, so that conventional plots of emf vs. volume and
* Avolume
vs. volume
may be constructed using spreadsheet software. The only equipment required beyond that used in a wnventional potentiometric titration is an interfaced wmputer. Automatic Titration An automatic titration rewires monitoring two variables simultaneously: volumeor mass of titrani, as the independent variable; and some property ofthe solution that undergoes a drastic change a t the equivalence point, as the dependent variable. A wnvenient example of the latter is the outnut of a elass electrode in a oH titration or the emf of a metal wire whose potential is Lffected by the composition of the solution being analyzed. Using the Computer
If a computer is used to collect the (volume, emf) data, the course of the titration can be followed by displaying the points graphically in real time on the monitor. More importantly, the student can then use spreadsheet software (13)to work up simple approximations to the first and second derivatives of the titration curve to assist in identifying the equivalence point. Furthermore. bv taking advantage of available mathematical-model&gsoftwar~,the unk;lown initial concentration can be determined as one of the parameters of a fit of the Nernst equation to the data. In the experiment described below, the data can be used for more than just determining the initial concentration of the unknown ion, which is the usual-but too modest-goal of such a titration. The same data can also be used t o obtain appmximations to the standard ernl'of the silver/saturawd calomel cell and the K,, of silver chloride. Cornouter interfaces. which allow the ooerator to connect a'dc voltage directly to the compute< are becoming increasinelv available (14). Thev ~rovidefor the readv collection o f x e dependent variabie'data. An obvious means of automaticallv monitoring the inde~endentvariable is the use of a "stepping moto? to dispense accurately measured amounts of titrant under the control of the computer. A New Approach Time as the Independent Variable
Since computers generally have an internal clock to which the operator has access, we decided to try a different, simpler approach to monitoring the independent variahlr. The rate offlow of liquld through a narrow tube varies directlv with the square root of the height of'that liquid. In other words, the volume delivered is a quadratic hnction of time. By drawing down the tip of the buret to an annrooriate size. the buret mav be fullv ooened a t time z& allow ' ~ r e kflow' of titra2, after Ghihich the independent variable. volume delivered.. mav bv time. " be re~laced In order to establish the required relationship between time and volume delivered, the operator is instructed to push one of the computer keys (e.g., "C" for "calibrate") exactly as the level in the buret passes predetermined marks on the buret during the course of the actual titration. For example, "C" might be pushed every time the level passes an even number on the buret. 'Available from Flexible Software, 805 Highland Ave., Northfield, M N 55057
For a titration that requires 20 mL, we would have about 10 pairs of (time, volume) data which provide constants for the equation ~olume=~t~+~t+~. using a quadratic least-squares program. The latter is most conveniently included in the software that collects and saves the data. Alternativelv. it mav be oerformed as part ofthe data workup by the spreadshket (e.g., the Data Regression option in LOTUS 1-2-31, In addition to requiring no extra time for calibration, the orocedure has the advantaee that current results are not affected by any chungr in calibration from one day to the next or bv the use of liuuids with different densities or viscosities. An immediate measure of the precision of the volume data can be gotten from the average deviation between the "observed" volumes, which are intervals of exactly 2 mL in this case, and the "calculated" volumes, from the calibrating equation using the times at which the student pushed the "C" key. A"spin-off' of this approach is a friendly rivalry that develops when students strive for the lowest average deviation in the class. The results can be amazingly precise: Some students achieved an average volume deviation as low as 8 x lo3 mL using a wmmon 50-mL buret and 12 calibration points. Another advantage of the procedure is that results cannot be "dry-labbed". A printout of all data, calibration, analysis, and subsequent workup is a requirement that does not represent a hardship for the student.
-
pH Titration The autotitrator can obviously be used for pH titrations as well, and we have done so using student pH meters (Markson).We used the followine eeneral ~rocedure.Each student has his or her own %enitrhkmput&dir;kan part of a lab "notebook". Althouah we use ATAKI 80OXL umDuters to collect and save tlhe data todisk, we want to take advantage of soreadsheet software. Thus, the first thing we do aRer completing the experiment is tkansfer the data to the students' Zenith computer disks using a n appropriate interface and communication software. Then students "import" their data into a spreadsheet file a t their leisure, and produce plots of both emfvs. volume of titrant and (AemfIAvol)vs. volume of titrant. For many students, this represents the first time that they have seen a physical example of a function and its derivative plotted on the same graph. Thus, this work serves a pedagogical purpose that extends beyond chemistry. Fitting the Nernst Equation Ifthc Nernst equatlon is not fitted to the data (see below, toest~matcthe standard emfof'thecell and K..in addition. a good estimate of the equivalence point maybe obtained simply by inspecting t h e (AemVAvol) column i n the spreadsheet, taking the volume associated with its maximum entry. Our sofhvare reads the emf a t 20-s intervals unless the value of (AemVAvol) exceeds some value, a t which time the interval is temporarily reduced to 4 s. At the flow rates we use, Avolis about 0.06 mL near the equivalence point. This represents the maximum error in this simple way of estimating the volume of titrant delivered a t that point. A more desirable approach involves using mathematicalmodeling soRware to fit the Nernst equation to (volume, emf) data. The software contained in the FLEXFIT package' is a very powerful and inexpensive answer. It is a simple matter to convert the original data file into one that (Continued on page A160) Volume 69 Number5 May 1992 A159
the computer bulletin board can be read by this software. Asubroutine may be designed that follows a sample program provided with the FLEXFIT disk to the svstem in ouestion and ~ ~so -that ~ it- isso& ~& takes activity coiffihents into accokt. Typical results of this approach are ~~
~
~
and
EO = 0.5463 f 0.0018V compared with literature values 1.76 x 10-1° and 0.5581 V, respectively. The absolute differences between the observed and literature values may be explained by the inadequacy of the Davies equation used in the fitting procedure to estimate activity coefficients, and perhaps also by a junction potential associated with the saturated calomel electrode used a s reference. Average differences i n observed and calculated emf values for the approximately 50 points surrounding the equivalence point vary from about 1to 2 m V Conclusion An automatic titrator has been described that is based on the mathematically reproducible rate of the flow of titrant from a buret. There is a n obvious advantage with this approach to titration over the traditional approach
A160
Journal of Chemical Education
that uses a n indicator: I t becomes impossible to overshoot the end point. However, there are also the following advantages. real-time devclopmenr ofthe rirrntion curve on rhr moniror *automatic collretion of d n u in a form rhat can he rcad~ly used in spreadsheet and mathematical-modelingprograms immediate assessment of the precision with which the volume data have been measured developing an appreciation of the notion of "slope" in anoncalculus settine a n impreiswe example of extrautmg u d u l p h y w ~ puraml ewrs from n E C ofdam ~ usmg mathemmcal modelmg Literature Cited 1. Acsmlw, P P. S w i n g Mofors:A Gu& Peter PereHnus: London, 1934.
lo Modern
Tkory and P a t h , 2nd ed.:
2. Thompson, B. G.: Kuekes. A. F IBM~PCinLha Labomfov; Cambridge:Cambridge, 1989. 3. Vitz E. W. J Chem. Educ 198463,803-801. 4. Chau, F.T.: Chan, K.D.: Tam, KY.Lob. Miemmmpuler 16+1,10,8-13. 5. chau.F T compvr~rs chem. 1990, 14.69-73. 6. Putman. B. W. RS-232 Simolifkd: Rentice-Hall: Eneleaiood Cliffs. 1987
E.; Veening. H.1985.62.688-690,
11. Mehta,M.A.;DaUinger,R. F J. C h e m E d u e 1987,M. 1019-1020. 12. Fox. J.N.:Shaner R.A.J Chrm.Edue. 1990.67.163-164:Lwh. . . .. .J.A.:Narramore. . J.D.1990.67.5'33535.
13. W a n a n t . D. M. J. Chrm Educ:Sofimore Vol 118, Number 1,1989. 14. Amend, J. R.:Furstenau,R. P.;Tucker K J Ckam Educ 1990,67,593495;Meyer,
E. F 1990,67,696599.