In the Laboratory
Teaching Physical Chemistry Experiments with a Computer Simulation by LabVIEW
W
A. Belletti, R. Borromei,* and G. Ingletto Dipartimento di Chimica Generale ed Inorganica, Chimica Analitica e Chimica Fisica, Parco Area delle Scienze 17/A, 43100, Parma, Italy; *
[email protected] A computerized laboratory experiment is an efficient tool to aid understanding of topics developed in the classroom and in the laboratory (1, 2). Clearly, the real experiment is the only one that allows both teachers and students to reach desired goals. However, a virtual experiment could be useful both for better understanding of the theoretical laws that govern the phenomenon and for better attention to the techniques used to perform the measurements. With a virtual simulation, the student can repeat the experiment as many times as he or she wants and it is also possible to simulate an incorrect use of the instrument, introducing different kinds of systematic mistakes (i.e., vacuum loss, dissolved air in the liquid, etc.). Moreover, it is possible to organize virtual experiments that cannot usually be done in the laboratory (i.e., with harmful or dangerous chemicals) and the simulation of experiments that would require too many hours or expensive instruments. Finally, disabled students can be integrated into a virtual laboratory. To these aims, a project called Physchem Virtual Lab has been set up to develop virtual programs in physical chemistry experiments. In this article we describe the results from a simulation of vapor pressure measurements of a pure liquid as a function of temperature, VAPSIM. The software has been developed using the National Instruments LabVIEW software. The potential of this software has been reported in this Journal (3–9) in particular for the management of laboratory instruments and the relative collection of data. The program was chosen because it provides a vast library of graphic symbols that allows simulation of the lab instrument and the techniques usually used to acquire the data. The program also supplies a large mathematical–scientific library, with which it is possible to quickly realize modular and easily modifiable programs and mathematically and graphically elaborate the data simulating a real laboratory experiment. Furthermore, to better emphasize the similarity between the virtual and the real experiment, we report a system man-
Figure 1. The work panel of the VAPSIM program.
www.JCE.DivCHED.org
•
aged by LabVIEW that acquires data by means of a data acquisition card (DAQ) and a signal conditioning accessory connected to two transducers, one for temperature and one for pressure. In this way the student better understands how a data collection system works. This system underlines the functionality of each component, including the signal conditioning accessory that converts temperature or pressure into an analog signal, which an analog-to-digital converter (ADC) can measure. Description of the Virtual Experiment The work-panel of the VAPSIM program, developed with the LabVIEW package, is shown in Figure 1. This program allows the students to simulate the vapor pressure measurements of a pure liquid with an isoteniscope apparatus. The method is similar to both that described in physical chemistry laboratory books (10, 11) and in this Journal (12, 13). The vapor pressure measurements can be simulated in two ways: • Different temperatures are chosen; at every temperature the student brings the system to equilibrium condition and then measures the pressures. • The system is heated at the external pressure until ebullition, and the equilibrium pressures are measured during the liquid cooling.
The latter method is identical to the one utilized by Gary Bertrand in his WEB online simulation (14). The Antoine equation ln P = A −
B T ( + C)
(1)
was used in the program, where P is the vapor pressure (bar) and T is the temperature (K). The A, B, C parameter values of different substances are saved in a file, which is automatically read. The data were taken from the online NIST Chemistry WebBook site (15). The VAPSIM work-panel shows a thermostatic water bath that contains the isoteniscope, half-filled with the liquid to analyze, whose name appears on the SUBSTANCE menu. Furthermore, the screen shows a TEMPERATURE REGULATOR that permits the user to set the temperature of the thermostatic bath, a stirrer, and a thermometer represented in both classical and digital form. When the operator heats or cools the system, it gradually reaches the chosen temperature by the TEMPERATURE REGULATOR, so as to simulate the time necessary for heating (or cooling) and the subsequent thermal equilibrium. It is possible to simulate a temperature reading with a Hg thermometer and with a temperature transducer (a ther-
Vol. 83 No. 9 September 2006
•
Journal of Chemical Education
1353
In the Laboratory
cel. Moreover, at the right side of the window DATA, there is a screen (called GRAPHICS) that shows, in real time, two graphs of ln P versus 1兾T. They report both the experimental data and the data obtained using the Antoine equation. In this way, by comparing the two graphs, the student can understand the influence of the possible systematic mistakes due to incorrect use of the instrument and operate in real time to correct them. The program has been developed to consider the following errors: • Reading taken when the liquid levels in the U tube of the isoteniscope were not identical • Dissolved residual air in the liquid as the air valve was opened too early to reach equilibrium • Possible air loss in the vacuum line that did not allow equilibrium maintenance and distorted the measurements • Liquid in the isoteniscope that completely evaporated owing to excessive use of the aspirator without introducing air to reach equilibrium Figure 2. The experimental measurement of the vapor pressure of a pure liquid.
mistor) at a resolution of 0.1 ⬚C. The temperature range of the Hg thermometer (and its resolution) can be modified working with the right button of the mouse. A Hg manometer is drawn on the right of the screen. Its resolution is only 2 cm Hg, owing to the limited screen size. A better resolution (0.1 cm Hg) can be obtained with the lateral digital display, which simulates a pressure reading by a differential pressure transducer, placed between the two arms of the Hg manometer. When the system is in equilibrium, the partial vapor pressure is obtained by subtracting the value of the average of the two values (cm Hg) read on the two arms of the manometer or the value read on the digital display from the external pressure, set with the EXTERNAL PRESSURE selector. The buttons POWER and STIRRER, on the left side of the screen, allow the instrument to be switched on and the stirrer to start. When the buttons are pressed, their colors change from red to green and their labels change from OFF to ON. The switch A and the two valves AIR and PUMP SPEED are present on the right side of the thermostatic bath. The switch A allows the isoteniscope to connect with the water aspirator. The valve AIR simulates a valve that permits the flow of a small quantity of air into the isoteniscope to obtain the best equilibrium conditions. At the MIN position the air valve is completely closed. The PUMP SPEED valve controls the speed with which the vacuum is achieved or it allows air to enter until system equilibrium. At the MIN position the valve is completely closed. The regulation of the valves is extremely sensitive and it is difficult to reach equilibrium similar to that which happens in a real laboratory. Therefore the students get used to maintaining the system in equilibrium, when they carry out a “real experiment” in the laboratory. The button ACQUIRE, in the central lower part of the screen, allows the user to acquire temperature ( ⬚C) and pressure (cm Hg) values when the system is in optimal equilibrium conditions. These values are reported in the window called DATA (left side of the screen) and memorized in a data file, that may be processed, for example, with Microsoft Ex1354
Journal of Chemical Education
•
• Too much air introduced and all the liquid pushed inside the bulb of the isoteniscope • Too much air introduced to equalize the levels in the two arms
Thanks to the instruments available on LabVIEW and particularly the possibility to plan object-oriented programs, it has been possible to structure VAPSIM in modules delegated to develop a precise task. In this way it is simpler to correct the possible mistakes and to update the program later on to add new functions. The Supplemental MaterialW also contains a program version in EXE format, called VAPSIM.EXE and the detailed instructions for use, so both students and teachers can utilize the simulation in their courses. Description of the Real Experience A drawing of the instrument that the students use in the physical chemistry laboratory to measure the vapor pressure of a pure liquid as a function of T is shown in Figure 2. The Hg thermometer and the manometer can be replaced by two transducers. The thermostatic water bath contains: the isoteniscope, half-filled with the liquid to analyze; a Hg thermometer, and a temperature transducer made of a NTCtype thermistor, enclosed within glass and calibrated; a stirrer; and a heater. The water aspirator removes the air from the isoteniscope to be sure that the pressure under the liquid is due only to the liquid vapor. A manometer and a piezoelectric differential transducer are connected to the isoteniscope by a vacuum line. They give the value of the pressure to subtract from the external pressure, so that the liquid can boil. Valve A connects the isoteniscope to the water aspirator to remove air and valve B lets air enter into the system again, to obtain the best equilibrium conditions between liquid and vapor. A drawing of the DAQ system used to collect the signals from the two transducers is shown in Figure 3. The components are a signal conditioning system (National SC2345) and a DAQ card (National DAQPad-6020E) connected to the computer through the USB serial port. It is therefore possible to collect data with any computer (including notebooks) and to have a DAQ portable system available.
Vol. 83 No. 9 September 2006
•
www.JCE.DivCHED.org
In the Laboratory
Figure 3. The data acquisition card system.
At times, the signals coming out of the sensors are not homogeneous for electricity parameters (current, voltage, resistance, etc.), level, and type (continuous, alternate, pulsed voltage). Therefore it could be difficult to set up a common interface between sensors and conversion units. It is therefore necessary to insert a signal conditioning system between the sensors and the DAQ card, which includes all the electronic circuits. In this case, the conditioning system has been set up by entering two different modules. The first one is able to amplify and filter the signal coming from the thermistor, after the thermistor has been current excited. The second one is able to convert the current coming from the pressure transducer to a voltage output, after the pressure transducer has been fed with constant voltage. Figure 4 shows the view of the program, DAQVAP, developed with LabVIEW, that allows the student to run the pressure and the temperature readings, once the system is retained in equilibrium. This state is reached rotating valve B (Figure 2), so that the liquid levels inside the isoteniscope U tube are identical. The program (EXE version) and instructions for its use have been included as Supplemental Material.W The program permits the user to obtain better experimental values by recording pressure values repeatedly at a fixed temperature and by averaging the data, whose graph shows the dependence of ln P on 1兾T in real time. It is therefore possible to verify when the data do not satisfy the Clausius–Clapeyron equation. A rectilinear behavior of ln P versus 1兾T is usually achieved when the measures are carried out in a 20–30 ⬚C temperature range. Otherwise, the system is not in equilibrium or air is present inside the isoteniscope. Hazards In this experiment the usual chemical-related and electrical hazards are present. The chemical hazards concern the pure liquids, which are volatile and can be flammable and chemical poisons. For these reasons they must be handled accordingly and never ingested. Students should read all labels carefully and, in the case of particularly hazardous reagents, consult the MSDS index. Electrical hazards include outlets for the following instruments: heater, stirrer, and power supply to the signal-conditioning system and to the DAQ card. Moreover, it is necessary to control the electrical circuit periodically for possible breaks in the insulation and abrasions, www.JCE.DivCHED.org
•
Figure 4. The work panel of the DAQVAP program.
because these can cause electrical shock and shorts, especially in the presence of water and aqueous solutions. W
Supplemental Material
The EXE version of the program and instructions are available in this issue of JCE Online. Literature Cited 1. Martinez–Jimenez, P.; Pontes–Pedrajas, A.; Polo, J.; Climent– Bellido, M. S. J. Chem. Educ. 2003, 80, 346–352. 2. Ruiz, I. L.; Espinosa, E. L.; Garcia, G. C.; Gomez–Nieto, A. J. Chem. Inf. Comput. Sci. 2001, 41, 1075–1082. 3. Gostowski, Rudy. J. Chem. Educ. 1996, 73, 1103–1107. 4. Drew, Steven M. J. Chem. Educ. 1996, 73, 1107–1111. 5. Muyskens, Mark A.; Glass, Samuel V.; Wietsma, Thomas W.; Gray, Terry M. J. Chem. Educ. 1996, 73, 1112–1114. 6. Ogren, Paul J.; Jones, Thomas P. J. Chem. Educ. 1996, 73, 1115–1116. 7. Bailey, Ronald A.; Desai, Sudhen B.; Hepfinger, Norbert F.; Hollinger, Henry B.; Locke, Peter S.; Miller, Kenneth J.; Deacutis, James J.; VanSteele, Donald R. J. Chem. Educ. 1997, 74, 732–733. 8. Jensen, Mark B. J. Chem. Educ. 2002, 79, 345–348. 9. Spanoghe, P.; Cocquyt, J.; Van der Meeren, P. J. Chem. Educ. 2001, 78, 338–342. 10. Shoemaker, David P.; Garland, Carl W.; Nibler, Joseph W. Experiments in Physical Chemistry, 6th ed.; McGraw–Hill: New York, 1996; pp 199–207. 11. Halpern, Arthur M. Experimental Physical Chemistry, 2nd ed.; Prentice Hall: New Jersey, 1997; pp 205–213. 12. Burness, James H. J. Chem. Educ. 1996, 73, 967–970. 13. Van Hecke, Gerald R. J. Chem. Educ. 1992, 69, 681–683. 14. Bertrand, G. http://web.umr.edu/~gbert/pvap/APvap.html (accessed Jun 2006). 15. NIST Chemistry WebBook. http:webbook.nist.gov (accessed Jun 2006).
Vol. 83 No. 9 September 2006
•
Journal of Chemical Education
1355