PROJECT FINAL REPORT COVER PAGE GROUP NUMBER R6 PROJECT TITLE Universal Indicators and Absorption Spectrophotometry to Determine the pH of Unknown Solutions DATE SUBMITTED May 7, 2001 ROLE ASSIGNMENTS ROLE GROUP MEMBER FACILITATOR………………………………………..Adam Furman TIME & TASK KEEPER…………………….……..…Arika Goel SCRIBE………………………………………………..Heather Lee PRESENTER………………………………….……….Howard Lopez BIOENGINEER……………………………………….Franklin Shen SUMMARY OF PROJECT The main objective of the experiment was to determine and program an algorithm that would generate the pH (within a range of 2 to 12) of an unknown solution containing Yamada or Bogens universal indicator, given a survey scan of such a solution. To obtain solutions of differing pH values, various amounts of HCl and NaOH were added to the universal buffer to modify the pH as needed. Survey scans were taken at pH increments of 0.5 (and 0.1increments were taken for pH values from 4 to 6). Three-dimensional graphs of absorbance vs. wavelength vs. pH for solutions containing either of the universal indicators showed that absorbance vs. wavelength graphs at various pH values had only one peak, with the appearance of another peak for survey scans of the middle pH values. Since graphs at most pHs had only one peak, an algorithm was constructed in Microsoft Excel to determine the pH by comparing the wavelength and absorbance at the max peak of an unknown sample solution’s survey scan with survey scans of known pH values. The pH value whose characteristics (max peak wavelength and absorption) differ least was declared to be the output pH. The uncertainty for the algorithm was found to be +/- 1.2 for the Yamada indicator and +/- 1.3 for the Bogens indicator. 1 OBJECTIVES To design an algorithm by which the user can input survey scan data of a solution containing either the Yamada or Bogens Universal Indicator and output a pH. Compare the sensitivity of the Yamada and Bogens Universal Indicators BACKGROUND Universal Indicators Indicators work as markers that indicate the endpoint of a titration by a change in color. They experience a distinct change in chemical structure (from the protonated to unprotonated form) when the pH of the solution that contains it is changed. The equivalence point (the point at which this structural change occurs) of an indicator is given by a value known as pKa—the pH value of the solution at the equivalence point. Thus, a universal indicator can be made by combining indicators with different pKa values. It can therefore, show color changes at different pH values. There are many practical reasons for using a universal indicator. For example, if you had a sample solution that was present only in volumes too small to be measured with the electrode of a pH meter, a universal indicator, which changes the color of the solution that it is put in based on the pH, would be useful(1). Two such universal indicators, Yamada and Bogens, are tested in this experiment. Universal Buffers A buffer is a chemical system that resists a pH change when an acid or base is added. The buffer is able to maintain a pH by establishing equilibrium between a weak acid (HA) and its conjugate base (A-) which adjusts accordingly as acid or base is added to the system. (2) In order to test the universal indicator in solutions of various pH values, it is important to use a buffered solution. This ensures that the pH will not change dramatically with the addition of universal indicator. A universal buffer can be made to produce solutions with pH values ranging from 2-12. A recipe for a universal buffer is found in Buffers for pH and Metal Ion Control by Perrin and Dempsey (3). The buffer is “universal” in the sense that by adding certain amounts of HCl or NaOH, various pH values can be easily and accurately attained. Absorption Spectrophotometry In absorption spectrophotometry, when a beam of light passes through a given material, it absorbs some of this light resulting in a decrease of the intensity of the initial light beam. The amount of attenuation of the incident beam depends on the range of wavelengths of radiation comprising the beam and the molecular composition of the material. The Spectronic Genesys 5 Spectrophotometer, if used in the survey scan mode, can measure the absorbance for every wavelength in a range from 200 to 800 nm. The absorption spectra, a plot of absorbance vs. wavelength, can be constructed from gathered data. Generally, there exists one optimum wavelength at which the solution absorbs the 2 most incident light (4). This fact will be useful in the development of an algorithm that calculates the value of a solution of unknown pH. APPARATUS AND MATERIALS Fisher Scientific Accument Model 625 pH meter Spectronic Genesys 5 Spectrophotometer Mettler PB 303 Electronic Balance 3L of 1M commercial NaOH and HCl Universal buffer ingredients: 1M Citric Acid• H2O Potassium Phosphate Sodium Tetraborate•10H2O Tris Potassium Chloride Yamada and Bogens Universal Indicator Deionized water 500 mL, 200 mL, 100 mL Beakers 100 mL, 50 mL volumetric flasks 2000 mL plastic containers Plastic 10mL pipettes Disposable droppers Kimwipes Cuvettes Magnetic stirrer 2 in. Stirring bars Plastic measuring trays Computer for recording scan data Cuvette holder Foam pad METHODS AND PROCEDURE Creating a Universal Buffer Using a universal buffer recipe obtained from the book, Buffers for pH and Metal Ion Control, solutions ranging from a pH 2 to 12 could be attained. The recipe is as follows (3): To make 1L of Universal Buffer: 0.1 M citric acid (21.01g/L) 0.1 M potassium phosphate (13.61g/L) 0.1 M sodium tetraborate (19.07g/L) 0.1 M Tris (12.11g/L) 0.1 M potassium chloride (7.46g/L) Since some of these ingredients were unavailable in lab, the recipe was slightly modified. Instead of using citric acid and sodium tetraborate, citric acidH2O and sodium tetraborate10H2O were used. With these substitutions, the modified recipe is as follows (1): To make 1L of Universal Buffer: 0.1 M citric acidH2O (22.81 g/L) 0.1 M potassium phosphate (13.61g/L) 0.1 M sodium tetraborate10H2O (28.07g/L) 0.1 M Tris (12.11g/L) 0.1 M potassium chloride (7.46g/L) 3 Each ingredient was measured with the Mettler PB303 Electronic Balance on a weighing tray to minimize error (+/- 0.001 g). These ingredients were added to 900 mL of deionized water and mixed with a magnetic stirrer and a 2-inch stirring bar. Once all the solute was dissolved, the solution’s volume was modified with the addition of deionized water until a solution volume of 1 L was reached. This process was repeated twice every lab session so that 2 L of buffer solution were produced each day. Preparing HCl, NaOH, and Universal Buffer Stock Solutions For each universal indicator, two universal buffer solutions, one to be used for NaOH additions, and one for HCl additions, were made in 500 or 250 mL glass beakers after being measured in volumetric flasks—totaling four separate buffer solutions. This was done because to achieve the pH range of 2-12 of the universal buffer, varying amounts of acid or base had to be added to the universal buffer stock solution. Universal indicator was added to each of the beakers in respective quantities as seen in Table 1 with the use of a disposable dropper. Table 1 - Amount of Reagent and Indicator Added This was done to ensure equal concentrations of indicator in all the stock solutions. Otherwise while adding NaOH or HCl to the universal buffer, the concentration of indicator in the buffer solution would change when NaOH or HCl was added, possibly affecting the data since the different survey scans would vary in color intensity. By using equal volumetric ratios for each indicator, as indicated in Table 1, this problem is avoided and only the color change due to pH is observed. Also the amount of Bogens indicator added was greater than the amount of Yamada indicator because the Yamada indicator was fainter in the buffer solution and needed more drops to make the color more visible. Alteration of pH of Stock Solutions To obtain the desired solutions, NaOH or HCl was added to the universal buffer solution that was constantly stirred. A foam pad was placed under the solution, but on top of the magnetic stirrer, to reduce any heat transfer into the beaker. To produce a higher pH, NaOH would be mixed into one stock solution, and HCl would be mixed in the other stock solution to achieve a lower pH. HCl or NaOH was added to the universal buffer stock solution with a 10mL pipette motorized with a pipette aid. In this experiment, pH increments of 0.5 were desired. To measure the pH of the solution, the electrode of the Fisher Scientific Accument Model 625 pH meter was placed in the solution. The HCl and NaOH, depending on the desired pH, were added incrementally to the universal buffer solution to obtain pH changes of approximately 0.5. In the pH range of 4 to 6, pH increments of 0.1 were used instead to gain finer data and to verify analytical methods performed later. At these incremental points, the actual pH 4 values were recorded with the pH meter with a manufacturer’s error of +/- 0.02 pH. After each pH reading, samples of approximately 2 mL were taken from the buffer solution by a disposable dropper and used for a survey scan. Survey Scan Procedure Using the Spectronic Genesys 5 Spectrophotometer, a survey scan was performed evaluating the absorbance of the sample at every wavelength from 200 to 800 nm using a type 3 scan. The readings were logged by the computer and saved for data analysis. RESULTS Three-Dimensional Graphs Three-dimensional graphs were produced by plotting absorbance vs. wavelength vs. pH for Yamada and Bogens indicators. These plots are shown in Figures 1 and 2. Figure 1: 3-D graph of absorbance vs. wavelength vs. pH for the Yamada indicator from pH 2-12 5 Figure 2: 3-D graph of absorbance vs. wavelength vs. pH for the Bogens indicator from pH 2-12 For most pH values, survey scans of the indicator solutions (both Yamada and Bogens) yielded graphs with one noticeable peak, as seen in Figure 3. Figure 3: Survey scan of absorbance vs. wavelength of Yamada and Bogens indicators at pH 3.5 6 However, in the pH range of approximately 6-8, there are two noticeable peaks, which correspond to the transition of peaks seen in the 3-D graphs for both Yamada and Bogens indicators (Figures 1 and 2). A sample Yamada scan showing the presence of two peaks at pH 7.3 is shown in Figure 4. Figure 4: Survey scan of absorbance vs. wavelength of Yamada indicator at pH 7.3 By taking into account the properties of the survey scans, an analytical method to obtain a pH from such a scan was determined in the following section. DISCUSSION AND ANALYSIS OF RESULTS Sensitivity of the Universal Indicators To find sensitivity, the data from the survey scans at every pH interval of 0.5 were compared. For every 0.5 interval, the absolute values of the differences between the two neighboring pH values were found. A larger difference signifies greater sensitivity to pH change. See figures 5 and 6 for graphical representations of sensitivity for both indicators. 7 Figure 5: Yamada Sensitivity Figure 6: Bogens Sensitivity Figures 5 and 6 show the Bogens universal indicator has a total greater difference in absorbance between adjacent pH readings in the range of pH 2 to 3 than the 8 Yamada universal indicator. Thus, the Bogens universal indicator has a greater sensitivity in the pH range of 2 to 3 while the Yamada universal indicator has greater sensitivity over the Bogens universal indicator for the remaining of the pH range (pH 312). Producing a pH Algorithm With Graphical Analysis After examining the survey scan data from 200 to 800 nm, it was decided that only the data from 380 to 750nm would be used in constructing the pH algorithm. Below 380nm, there was noise which may be attributed to ultraviolet light which was most likely absorbed by the plastic cuvettes. Using Excel, the data for all three days were averaged together. By doing this, the data is smoothed. The pH values of the experimentally gathered data increase by increments of 0.5. However to increase the ability for the algorithm to find pH, a weighted average calculated an approximate pH, increasing by 0.1. (See Figure A1 in the Appendix A for a graphical representation of this.) Microsoft Visual Basic® macros were written to automate the processing of data. A routine was written that calculated the peak wavelength and its absorbance for each pH value. It calculated the maximum absorption for each pH using the Max function of Excel, then ran a loop through the column of absorbencies to find what the corresponding wavelength was. This was accomplished using the For-Next loop structure seen in Appendix A. This prepared the database for access when searching for the pH of an unknown sample. A program was written in Excel to determine the pH of an unknown sample. First, two columns of data must be copied into this excel sheet, the first being wavelength, the second the corresponding absorbencies. This was done by the Autofill subroutine. Next, one of two check boxes must be chosen. When the code is started by clicking the "Calculate" button, the software checks the value of the two bullets and sets a string variable to either Yamada or Bogens-allowing the software to check against the correct database. Running a similar loop used when preparing the database, the program determines the peak wavelength and absorption of the unknown sample. These two values are subtracted from the entire list of wavelengths and absorbencies in the database. The lowest sum of the differences between the unknown and the database is the best curve match. Another for-next loop sifts through the column of sums, and finds the lowest value. It then relates this value to the corresponding pH value in an adjacent column. This is the pH reported by the program. Presence of Multiple Peaks in Survey Scan Data For the middle pH range of approximately 6-8, two distinguishable peaks appeared on the survey scans, as opposed to one peak which was present at the other pH values. This is most likely attributed to the fact that the universal indicator is composed of many different indicators. In general, the larger peak was easily distinguishable as it was much larger than the smaller peak. However, at pH 7.3 (see Figure 4), the two peaks had similar maximum absorbance values, which may have been similar enough to confuse the algorithm—this would increase the uncertainty of the output at this point. 9 Uncertainty of pH-determining algorithm For each indicator, survey scan data from all of the different pH value solutions measured were put into the algorithm; the output pH values were then compared with the actual pH values. To provide a conservative figure for the uncertainty, the greatest discrepancy between output pH and actual pH was taken to be the uncertainty value for the algorithm (with two different values for Bogens and Yamada). Note that some discrepancy between output pH and actual pH occurred at a middle pH value of approximately 7.3, where two similar absorbance peaks were observed in the survey scan of the solution. This is because the algorithm uses the wavelength of max absorption in its calculation of pH. If two peaks occur simultaneously at these middle pH values, the algorithm may match the unknown to the wrong curve. The uncertainty of the algorithm for both indicators is listed below. This uncertainty is mainly attributed to possible variations in concentrations of indicator in pH solutions in trials from different lab sessions. Uncertainty of algorithm: +/- 1.2 for Yamada indicator. +/- 1.3 for Bogens indicator. Uncertainty of Measurements Most of the uncertainty in the experiment is due to the limitations inherent in the lab equipment used: the Fisher Scientific Accument Model 625 pH meter and the Spectronic Genesys 5 Spectrophotometer. Other factors that add to uncertainty are the possibility of using scratched or not properly cleaned cuvettes. If the cuvettes were not properly dried, uncertainty could occur from dilution of the solution placed in the cuvette. Uncertainty could be improved by using brand new cuvettes for each run of the experiment. The amount of indicator was measured by the number of drops placed into a solution. These drops were possibly of varying volume, resulting in different concentrations of indicator in the solutions. This problem should have been circumvented by using a micropipette. In addition, the uncertainty in concentration could also have been improved by using better volumetric equipment to measure each reagent instead of volumetric flasks. Uncertainty of the volumetric equipment only affects the concentrations of the indicator in the stock solutions, and does not affect the measured pH of the buffered solutions since this is dependent solely on the pH meter. Practical Applications Allows one to find the pH of solutions in volumes too small to be measured with electrode of a pH meter. Using this algorithm would allow a user to find the pH of a solution without having to use a pH meter—an expensive piece of laboratory equipment. 10 CONCLUSIONS As a result of this experiment, an algorithm was created which enables users to find the pH of an unknown solution by adding either Bogens or Yamada universal indicators and taking a survey scan of the unknown sample. This algorithm outputs the pH of the unknown solution with an uncertainty of +/-1.2 for Yamada universal indicator and +/1.3 for Bogens universal indicator. It is also determined that the two indicators are better suited for different pH ranges as one is more sensitive than then other at varying pH values. The Bogens universal indicator is more sensitive than the Yamada universal indicator only for the range of pH 2 to 3. For the remaining pH values, 3 to 12, it would be better to use the Yamada universal indicator, as it is more sensitive than the Bogens universal indicator in this range. 11 REFERENCES 1. BE210 , pH Dependence of Indicator Dye Spectra, University of Pennsylvania,1999. 2. BE 210, Biological Buffer Systems, University of Pennsylvania, 1999. 3. Perrin, D.D., and Boyd Dempsey, Buffers for pH and Metal Ion Control, Chapman and Hall, London, 1974. 4. BE210, The Dependence of Methyl Red Molar Extinction Coefficient on the pH, University of Pennsylvania, 2000. 12 Appendix A Figure A1: Graphical Representation of Linear Approximation by Weighted Average of Survey Scans at 3.0 and 3.5 pH values. Figure A1 represents the linear approximation, which was found by weighted average calculations. The experimental data is shown in red while the extrapolated data is show in green, blue and purple. Primary program sheet code This is the code that runs when the calculate button is clicked. It calls upon functions and subroutines from module2 (a global access module). Lines in green preceded by an apostrophe are remarks and annotations giving explanation of the code’s function 13 ‘variable declarations and dimensions Dim indicator Dim maxab Dim maxwave Dim min_diff Dim pH Private Sub CommandButton1_Click() ‘determine which indicator based upon the two bullets If OptionButton1.Value = True Then assignindicator ("Yamada") If OptionButton1.Value = True Then indicator = "Yamada" If OptionButton2.Value = True Then assignindicator ("Bogens") If OptionButton2.Value = True Then indicator = "Bogens" 'call the autofill sub routine, will copy cells from program front to the active calculation page autofill Sheets(indicator).Activate 'find peak for unknown maxab = returnmax() 'find peak wavelength of unknown maxwave = findunknown(maxab) 're-calculate sheets—this is a built in re-calculate function in excel. Calculate ‘find minimum difference min_diff = mindiff 14 ‘find the pH by looking up through the column of numbers pH = findph(min_diff) ‘reactivate the program’s main sheet Sheets("The pH Calculator").Activate ‘Display the final pH Label3.Caption = pH Module2 Code: ‘variable declarations and dimensions Dim maxabs Dim indicator As String Dim rowcheck Dim maxwaverow Dim startwave Dim endwave Dim startwaverow Dim endwaverow Function returnmax() Sheets(indicator).Activate returnmax = WorksheetFunction.Max(Range(Cells(2, 2), Cells(150, 2))) End Function Function findmaxwave(a) findmaxwave = Cells(a, 1).Value End Function Function findunknown(maxabs) Sheets(indicator).Activate For rowcheck = 2 To 150 If Cells(rowcheck - 1, 2).Value <> maxabs And Cells(rowcheck, 2).Value = maxabs Then startwave = rowcheck If Cells(rowcheck + 1, 2).Value <> maxabs And Cells(rowcheck, 2).Value = maxabs Then endwave = rowcheck 15 Next rowcheck maxwaverow = (startwave + endwave) / 2 findunknown = Cells(maxwaverow, 1) Cells(4, 5).Value = Cells(maxwaverow, 1) Cells(3, 5).Value = maxabs End Function Function mindiff() Sheets(indicator).Activate mindiff = WorksheetFunction.Min(Range("P2:P102")) End Function Function findph(mindif) Sheets(indicator).Activate For rowcheck = 4 To 102 If Cells(rowcheck - 1, 16) <> mindif And Cells(rowcheck, 16) = mindif Then startwaverow = rowcheck If Cells(rowcheck + 1, 16) <> mindif And Cells(rowcheck, 16) = mindif Then endwaverow = rowcheck Next rowcheck maxwaverow = (startwaverow + endwaverow) / 2 findph = Cells(maxwaverow, 11) 'this is the pH End Function Sub autofill() Sheets(indicator).Activate Sheets(indicator).Select Range("A2").Select ActiveCell.FormulaR1C1 = "='The pH Calculator'!R[9]C" Range("A2").Select Selection.autofill Destination:=Range("A2:A300"), Type:=xlFillDefault Range("B2").Select ActiveCell.FormulaR1C1 = "='The pH Calculator'!R[4]C[-4]" 16 Range("B2").Select ActiveCell.FormulaR1C1 = "=ABS('The pH Calculator'!R[9]C)" Range("B2").Select Selection.autofill Destination:=Range("B2:B154"), Type:=xlFillDefault Range("B2:B300").Select End Sub Function assignindicator(indicator1) indicator = indicator1 End Function 17 Screen shot of the program’s main screen in Microsoft Excel®: 18