Manuscript #2003-0446 “Teaching Data Acquisition. An Undergraduate Experiment in an Advanced Analytical Chemistry Laboratory” by Margaret Antler, Eric Salin and Grazyna Wilczek-Vera.
Supplemental Material
Interfacing I Materials per student (can be re-used): 1 Power supply ( Powerace 103 or 203 AP Products) 1 Solderless breadboard 1 Digital Multimeter (Fluke 12) “741 compatible” op-amp (at least 2) AD570 Analog to Digital Converter 10 kΩ Potentiometer (at least 2) 1 screw driver Resistors: 4.7 kΩ, 10 kΩ, 22 kΩ, 47 kΩ, 100 kΩ (at least 2 each) LEDs (8) Phototransistors (at least 2) Capacitors: 10µF, 100µF Color coded wires (black, red, blue, green, white) Wire strippers
Interfacing II Materials per student (can be re-used): 1 PC 2 ICL8038 Precision Waveform Generators / Voltage Controlled Oscillators PCI-DAS08 A/D data acquisition board (ComputerBoards Inc.) 1 Power supply ( Powerace 103 or 203 AP Products) 1 Solderless breadboard 1 Digital Multimeter (Fluke 12) “741 compatible” op-amp (at least 2) 10 kΩ Potentiometer (at least 2) Capacitors: 10µF, 100µF 1 screw driver Resistors: 4.7 kΩ, 10 kΩ, 22 kΩ, 47 kΩ, 100 kΩ (at least 2 each) Color coded wires (black, red, blue, green, white) Wire strippers Software package Matlab 6.1 Release 12.1 with the Data Acquisition Toolbox, Version 2.0
Interfacing III Materials per group (can be re-used): 1 PC PCI-DAS08 A/D data acquisition board (ComputerBoards Inc.) 1 Power supply ( Powerace 103 or 203 AP Products) 2 Solderless breadboards 1 Digital Multimeter (Fluke 12)
2
“741 compatible” op-amp (at least 4) 10 kΩ Potentiometer (at least 2) Capacitors: 10µF, 100µF 1 screw driver Resistors: 4.7 kΩ, 10 kΩ, 22 kΩ, 47 kΩ, 100 kΩ (at least 2 each) Color coded wires (black, red, blue, green, white) Wire strippers Software package Matlab 6.1 Release 12.1 with the Data Acquisition Toolbox, Version 2.0 1 UV/Vis spectrometer (Spectronic 20, Milton Roy Company) 1 peristaltic pump 1 injection loop (Alitea FIA system) 1 strip chart recorder O.4% bromothymol blue solution (CAS #34722-90-2) in 0.01M borax (Na2B4O7) solution. Pipettes, volumetric flasks.
3
Instructor/TA Notes for Interfacing Parts I, II and III The interfacing experiments run over three weeks. Week “1” consists of building simple op-amp circuits; week “2” is dedicated to writing a basic data acquisition computer program, and during week “3” students build a circuit and use the software to interface a real flow injection analysis system (UV/Vis spectrometer) to a computer. The Interfacing 3 experiment constitutes a test of students’ knowledge and ability – 50% of the mark comes from the actual experiment (performed in a group), and the other 50% comes from a written test. The goal of these three experiments is to take students out of “the magical black box” attitude about electronics, computers and interfacing, and show that the A/D conversion is not so complicated after all. Interfacing 1 In this lab, students build some basic Op-Amp circuits. The experiment is not conceptually difficult, but the frustration level tends to run high. The TA’s role for this experiment is mainly to help debugging students’ circuits. At the beginning, you should explain/show how the voltmeter, breadboard, and Powerace circuit work. Pre-lab should be done at the very beginning to make sure that they know the necessary concepts and equations. The students should be checking their own work as they go along (calculating what the circuit should give, and checking the output of their circuit). They should not “just do all the calculations at the end.” Safety: Students should have the Powerace OFF while constructing the circuit, and then turn it ON to test the circuit. Otherwise, they can burn the power supply and their fingers, too. If they do not put the op-amp over the middle groove of the breadboard, and then try to hook up the circuit, it is possible for the op-amp to fly out of the breadboard. Safety goggles are necessary at all times.
4
Practical hints: If the circuit doesn’t work, check that students have the Powerace ON (duh). Students with long fingernails will really have a lot of trouble with the experiment because they won’t be able to manipulate the wires very well. Be patient. Don’t do it for them. Encourage them to cut their nails (unlikely to happen, but still). Don’t help debug their circuit unless they follow the correct colour codes for the wires. The op-amps shouldn’t get hot or smell like burning. If this happens, they have probably hooked up the +15 V and the –15 V lines backwards, or don’t have the op-amp over the middle groove of the breadboard. We are using cheap components. So, if the circuit doesn’t work, replace the op-amp, since it could be burnt out. Sometimes you will need to replace it 2 or 3 times before you find a good one. Please, throw out those op-amps that do not work. Students tend to put back them to the same compartment where the good op-amps are. The students are reluctant to cut their own wires, and often insist on using old, pre-cut wires. Sometimes, the exposed, stripped end is really long, and can touch other parts of the circuit underneath the breadboard, which can cause problems. If it is not the op-amp, or the power, check all the wires with long ends, and trim them where appropriate (don’t forget to turn OFF the power). The students should (eventually) notice that subsequent circuits in the manual tend to build on the previous ones. Therefore, it is better if they don’t destroy each circuit after they are finished with it, so they can use it to build the next one. In the last part of the experiment, students should use a pre-wired an 8-bit A/D circuit available from the lab supervisor. You should show to students how it is built and how it works. Please cover also the basics of the binary to decimal (and decimal to binary) conversions. The questions in the text of the lab manual don’t have to be answered in the lab, but students will be responsible for them for the Interfacing 3 test. Check the students’ results before they leave, and sign the form in their lab manual. Interfacing 2 Safety goggles are necessary at all times in the experiment, especially when building the circuits. The pre-lab for this experiment is to write a simple data acquisition program as outlined in the manual. The students should be somewhat familiar with Matlab from their previous courses, and should at least have a basic knowledge of programming. Most students are ok, but there are usually a few who have no idea how to program. These students will need lots of help.
The basic A/D program is available to students on WebCT and is also printed in the manual. They should be able to modify the program, so that they can acquire the required number of experimental points, save their data and perform a Fourier Transform. If they are really lost in programming, you should help them to figure out how to 5
write/modify/add to the program throughout the course of the experiment. Even if they can’t program, they should at least be able to figure out a logical sequence of instructions, and you can help them with the syntax of the functions. The A/D board is a 12-bit board, and has an input range from –5V to +5V. The maximum data acquisition frequency is 500 Hz. The minimum data acquisition frequency is around 67 Hz. Matlab will give you an error if you try to go slower than that. In Matlab, show the students how to use the help command, so that they can try it and figure this stuff out on their own. Part 1 The students will hook up a basic voltage follower circuit, and use it to calibrate the A/D board with the digital multimeter (DMM). The values won’t be exact, but should be close. They only need to acquire 1 point at a time with the computer, check the circuit output with the DMM, write both values down, and adjust the circuit to output another voltage, and repeat the whole sequence 5 or 6 times. Have them input a voltage outside of the –5V to +5V range (e.g. +6V, and they will see that the value on the computer is +5V because it is out of range). The students should use the polyfit function in Matlab to calibrate the computer results with the DMM. Part 2 The students will use the trim pot in their circuit to generate a fake chromatographic peak. They will need to acquire around 20 seconds worth of data, so at a frequency of 100 Hz, they need around 2000 points. They start the acquisition, turn up the pot for around 5 seconds, turn it back down for around 5 seconds, and then plot their results. Note: Have them label their axes on the plot with proper units and scale. Part 3 The students will use the provided function generator circuit to test how the data acquisition frequency affects the shape of the curve. In the first part, they hook up a sine wave generator, acquire several hundred points, and plot the data. When they plot the data, if they have too many points, it will look like a giant blob. Have them plot the first 100 or 200 points instead, so that they can see the wave (e.g., plot(data(1:100))). The amplitude of the sine wave should be on-scale (the amplitude of the wave is around 3.5 V). The frequency of the sine wave is around 6 or 7 Hz. When the students do the FT, they should be able to see what the frequency of the sine wave is. Alternatively, they can simply acquire 1 second worth of data, and count the peaks. Make sure that they adjust the x-axis (time) scale on their plots, so that the values are correct. Point out to students that the point number 500 was not acquired after 500 seconds. The more points students acquire the better/smoother the FT will look. You can talk about Nyquist theory here. Students will repeat the same procedure for the square wave. However, the amplitude of the square wave is off scale. Point this out to them – you can tell that the signal is out of 6
range, because all of their values will be identical, there is absolutely no noise. Ask how they would fix this problem (thinking all the way back to Interfacing 1). They should be able to figure out they need an inverting amplifier circuit with a gain less than one. You can tell them to try a gain of one-half, and test that out. The frequency of the square wave is around 47 Hz, and the amplitude is around 7 V. Have them play around with the data acquisition frequency. Once it gets too slow, the square will look triangular. Have them do the FT as they play around with the frequency. Note: The function generator circuits all have buffers, so that if anything blows in the circuit because a student hooked it up wrong, all you should do is to replace the op/amp in the buffer circuit. Part 4 This is my personal favourite part of the experiment. The students build a summing amplifier (they know how from Interfacing 1) to add the sine wave and the square wave together. They should acquire several hundred points (so that the FT is ok). Ask them to plot the first 100 or 200 points. Then have them plot the abs(FFT). They should be able to see the frequencies coming from both sources: the sine wave and the square wave.
The results of parts 3 and 4 of Interfacing 2. The FTs are sloppy because I didn’t acquire very many points when I did the experiment.
7
Interfacing 3 The first thing you should do is to have the students turn ON the lamp for the UV/Vis instrument, so that it can warm up while they are building their circuit. The students do this in a group, and how they perform the experiment counts for 50% of their mark. Try to let them figure things out as much as possible for this experiment. It is a test, after all. You can assign different marks to different students in the group if they aren’t contributing equally. Students should arrive at in the lab with a schematic of the circuit that they are going to build. The output of the UV/Vis instrument is in the range 0-1V (if they are really on the ball, they should be able to figure this out from the manual, where the strip chart recorder settings are listed). Their circuit should amplify and offset the signal to use the full range of the A/D board (10 V range). They should come up with a circuit that uses 3 op-amps – the first is a voltage follower, the second is an inverting amplifier with a gain of 10 (so now the output will be between 0 and 10 V), finally a summing amplifier to offset the signal by –5V (so the signal “going in” to the computer is –5V to +5V, the range of the board). It doesn’t really matter what order the amplifier and summer are in, but this sequence is outlined in the lab manual, so this is what most of them should have. They should be able to figure out how big the gain should be, and pick their resistors accordingly. Also, they should be able to explain why they are adjusting the signal. The circuit building is the most time consuming part of the experiment. They should be able to troubleshoot it themselves. It is much more efficient if they build and test each component of the circuit individually (i.e., build the follower, and test it with a trim pot as the input. Then, build the amplifier and test it the same way. Connect the two, and test etc.) The final circuit should be neat and colour coded (and operational). They should then use their computer program from Interfacing 2 to acquire and plot the data, as they inject the dye solution into the UV/Vis flow injection cell, at the same time using the strip chart recorder. The data from the strip chart recorder will be a lot smoother than the computer data. Ask how they would modify their circuit to make it look like the strip chart recorder (add a capacitor to the feedback loop of the inverting amplifier circuit). Also ask what it means about the electronics of the strip chart recorder (there must be a capacitor somewhere). Their print out of their computer data should have properly labeled axes, and a title etc. Note that just writing “Time” on their x-axis does not make it, so check that they are actually plotting the right variable, not just the number of points. At the end of the experiment, each student writes a short test (individually, not in a group, and on paper). You can choose which questions you want to give from the examiner’s booklet (1 from each section), as outlined in the booklet.
Interfacing 3 Test We do not wish to publish the exam material, as it would then be available to our own students. If you would like to obtain a copy of the exam questions, please contact Dr. Grazyna Wilczek-Vera at
[email protected] .
8
INT1 Interfacing Part I Operational Amplifier Circuits
Name
____________________________________________
Date of Experiment
____________________________________________
Date of Report
____________________________________________
Complete and attach to report.
Demonstrator
____________________________________________
Mark
______________
9
INTEFACING PART I OPERATIONAL AMPLIFIER CIRCUITS
A high-gain, multistage, DC amplifier containing many individual transistors and resistors can be considered as a single, active, circuit component called an operational amplifier (op-amp for short). Such a circuit is usually miniaturized and fabricated on a single chip of silicon in what is called an integral circuit (IC). Integrated circuits contain hundreds of individual components, and when mass produced, are comparable in size and cost to a single transistor. The op amp is such a useful device that it has become the basic building block of analog electronics and has revolutionized the way in which complicated electronics is designed and constructed. The figure below (Figure 1a) shows a schematic diagram of a typical, low-cost, general-purpose, operational amplifier that will be used in the laboratory. Figure 1b is a simplified version of an operational amplifier. It is not necessary to understand its operation in detail but it is necessary to understand its use in practical circuit designs. The op amp is basically a four-terminal device, with two inputs, one output, and a common terminal, which is usually (but not always) connected to ground. In addition, a plus and a minus DC voltage must be supplied, and extra terminals are often provided to compensate for certain non ideal properties of the device. In this experiment, several simple op amp circuits will be constructed to demonstrate the utility of operational amplifiers and to enhance the understanding of the basic components of any interfacing .
READ THE MANUAL BEFORE THE EXPERIMENT
10
Figure 1 a) Circuit design of a typical operational amplifier, b) Symbols for operational amplifiers. POWER SUPPLY The power supply used in this experiment is a POWERACE. The front panel has outlets for +/- 15 volts needed to drive operational amplifiers and
11
+5 volts (logic 1) and ground (logic 0) for transistor-transistor logic (TTL) devices (do not need to know this for the lab). -There are two switches, S1 and S2, which supply +5 volts when on (the "1" position). -There are two momentary contact switches, S3 and S4. When the switch is in Q-bar position (normally up) the Q and Q-bar outputs provide 0.0 and 5.0 volts, respectively. When the switch is depressed (normally down) the outputs are reversed, i.e., Q=5.0 V and Q-bar=0.0 V. -Two light emitting diodes (LED), L1 and L2, will light when +5 volts is supplied at the corresponding inputs. NOTE: DO NOT APPLY +/- 15 VOLTS TO THE LEDS, THIS WILL BLOW THE LEDS.
DIGITAL MULTI-METER (DMM) A Fluke digital multimeter is used for voltage readings instead of the meter on the POWERACE. This is a 3 1/2 digit meter, 0.000 to 1.999 units. A series of push buttons along the left hand side controls the DMM. Depress the button once to lock it; depress it a second time to release it. NOTE: Do not pull on a button, otherwise it may remain engaged although it appears to be out. If the measured quantity (voltage-current-resistance) is greater than the selected range, a "1" will appear in the liquid crystal display (LCD). NOTE: Do not use the DMM to measure current. This usually blows a fuse.
BREADBOARD A breadboard is often used to build a prototype of a circuit. It provides a simple means of temporarily connecting components. The breadboard has hundreds of sockets arranged on a 0.1" by 0.1" (see Fig.2) grid. This is the standard spacing of pins on integrated circuits (IC'S) such as op-amps and digital logic devices. Several sockets in either a row or column are connected together to form a bus. The voltage reading along the bus line is always the
12
same. The rear view of the breadboard (Fig 2) illustrates the connections. The four long horizontal busses are conventionally used as power rails and are connected to the +15 V DC, -15V DC, +5V DC, -5V DC, and GROUND (GND) terminals of the power supply. Shorter lengths of wire are used to connect devices on the breadboard to the power rails. Notice that there are breaks in the busses; remember to place a "jumper" (a U shaped piece of wire) across the breaks to extend the power rails. Devices on the breadboard are connected by short pieces of "hook-up" wire. Use the wire strippers to remove a small piece of insulation from the ends of the wire and insert the ends into the breadboard sockets. A neat breadboard circuit will greatly simplify building and debugging the circuits. It is therefore strongly recommended that you color code the wires as follows: black=GROUND red =+5 volts blue =+15 volts green=-15 volts white= other connections on the circuits
13
Use the minimum length of wire in the connections.
Figure 2. Breadboard Front and rear view of a standard breadboard. Typical positioning of resistors, potentiometers and operational amplifiers on the breadboard. FIGURE 3 Color Code for resistors
(CRC Handbook of Chemistry and Physics, 56th ed., 1975-1976. CRC Press)
14
SERIES AND PARALLEL RESISTANCE CIRCUITS To familiarize yourself with the test equipment, complete Table 1. All simple circuits revolve around one basic law, Ohm's Law:
V=I*R
(1)
This equation states that the voltage (V) is equal to the product of the current (I) and the resistance (R). The analysis of an electrical circuit normally consists of determining the current and/or voltage at a particular place. This is usually done by simplifying the circuit and then solving for a simple case.
15
In Fig. 4, the three resistors are said to be in series with each other. The sum of the voltage drops across each resistor must equal the voltage of the source: V=V1+V2+V3
(2) V = IR1+IR2+IR3 = I*(R1+R2+R3) (2a)
Therefore, the total resistance of the circuit (Rt) is equal to: Rt = R1+R2+R3
(3)
Build the circuit in Fig. 4 and fill in Table 2. In Fig. 5, the three resistors are said to be in parallel with each other. The voltage across each resistor must equal the voltage of the source. The total current (It) divides among the three resistors in such a way that: It = I1+I2+I3 (4) It= V/R1 + V/R2 + V/R3 = V*(1/R1+1/R2+1/R3) (4a) Therefore, the total resistance of the circuit (Rt) is equal to: 1/Rt = 1/R1 + 1/R2 + 1/R3 (5) Build the circuit in Fig. 5 and fill in Table 3. POTENTIOMETER This device is commonly known as a "pot" or "trim pot". It consists of a fixed resistor and a "wiper" as shown in Fig. 6. The position of the wiper can be adjusted so that it makes contact with any point along the potentiometer resistance. In this way the resistance between the wiper and one terminal of 16
the trim pot can be continuously adjusted from 0 Ω to 10 kΩ. Therefore, by varying the trim pot one can adjust the voltage at the wiper. Potentiometers are often used to build voltage dividers. Choose a 10 kΩ potentiometer, as shown in Fig.6. Then connect leads 1 and 3 to +15 volts and ground respectively. The circuit is equivalent to two resistors in series. Adjust the trim pot to obtain 10 volts at the wiper (between leads 2-3). Measure the voltage at each pin. Take the trim pot out of the circuit and measure the resistance. Complete Table 4. OPERATIONAL AMPLIFIER CIRCUITS The operational amplifier (op-amp) used in this lab is shown schematically in Fig 7. The actual op-amp is a TL 071 operational amplifier. Any "741 compatible" op-amp from any manufacturer will have an identical layout and similar performance characteristic. This is moderately priced, good overall performance standard op amp. Better performance operational amplifiers such as the "411" may be purchased at an additional cost but may be packaged differently. A circle, notch or other mark will identify pin 1 on the 741 op-amp. This is also true of any linear or digital IC component. It is used to orient the device and is often placed in the lower left quadrant of the breadboard. The package style is known as a "dual in-line package" or DIP for short. The 741 is an 8 pin DIP. Obviously when it is mounted on the breadboard, it must straddle the horizontal gap along the center of the board to prevent pins on opposite sides of the package from shorting. NOTE: Be very careful when handling ICs because they can be damaged very easily. There are some GOLDEN RULES for operational amplifiers. These rules (below) are approximations but good ones: OP AMP "GOLDEN RULES" 1.The output attempts to do whatever is necessary to make the voltage difference between the two inputs zero. 2.The inputs draw no current.
17
Figure 4 Series Circuit
figure 5 Paralell Circuit
figure 6 Trim Pot Circuit (voltage divider)
19
FIGURE 7 Pin assignment for the “741” operational amplifier in the 8 pin dual in-line package
TABLE 7A Pin assignment for the “741” operational amplifier in the
8 pin dual in-line package.
Figure 8
Operational Amplifier; circuit schematic.
20
VOLTAGE FOLLOWER This is the simplest of the operational amplifier circuits and is also one of the few circuits where the op amp is used in a non-inverting configuration (Figs. 10, 11)The gain of this circuit is unity. There are special op-amps, useful only as followers, with improved characteristics (mainly higher speed), e.g., the LM 310 and the OPA633. The voltage applied to the non-inverting input appears at the output. The input impedance is near infinite (>1 MΩ) and the output impedance is almost zero. This means that it draws almost no current from the signal source but can supply large amounts of current (typically 5 mA) to drive low resistance loads. An amplifier of unity gain is sometimes called a buffer. (Can you see why? Question 1). Build the circuit of Fig. 9 and fill in Table 5. The voltage is measured from the junction at 1 to the ground junction at 2 (NOTE: all measurements are taken with respect to ground ). What do you think is the purpose of R? (Question 2). Once the table is filled, add the follower circuit as in Fig. 10 and fill in Table 6A. The voltages are measured at the input of the follower (point 1) and across the load resistor R (point 2). In this case note the difference in the voltages. Build the circuit of Fig. 11. Vary the pot and measure the voltage at 1 and 2. Fill in Table 6B. What is the difference in this circuit as compared to the circuit in Fig. 9? (Question 3). Name one use for the voltage follower circuit (Question 4). INVERTING AMPLIFIER The inverting amplifier is one of the most common operational amplifier configuration. It is so named because the sign of the output is the opposite (invert) of the input. The output voltage of the circuit is given by, Vout = -Vin(Rf/Rin) (6)
21
where Vin and Vout refer to the input and the output voltages, respectively, Rin is the input resistance and Rf the resistance across the amplifier. Build the inverting amplifier circuit of Fig. 12 and fill in Table 7. Adjust the potentiometer to apply 2.0 V DC to the input resistor. Measure the voltage drop across the 47kΩ resistor. Set the gain at 10 and measure the output voltage. According to the above equation Vout should be -20V. Why does the output not correspond to this value? (Question 5). Name one use of such a circuit (Question 6).
Fig. 9 Non-Follower Circuit
Fig.
10
Follower
22
Circuit Fig 11. Follower Circuit (Voltage Divider)
Fig 12. Inverting Amplifier
Fig 13. Summing Amplifier Summing Amplifier
23
The previous circuit can be easily modified to produce a summing amplifier. The schematic diagram of Fig.8 shows how a second input resistor is added to the basic inverting amplifier configuration to create a summing amplifier. The output voltage is given by, Vout = -V1(Rf/R1) - V2(Rf/R2) (7) Build the circuit of Fig. 13 by adding a second input resistor and potentiometer to the inverting amplifier of the previous section. Adjust the potentiometers to obtain an input voltage of 2 V DC and 1 V DC. Measure the output of the inverting amplifier across the 47kΩ load resistor and fill in Table 8.
CURRENT-TO-VOLTAGE CONVERTER Many transducers, such as photomultipliers, phototubes, phototransistors, etc., generate a current what is unfortunate since most amplifiers and recorders only accept a voltage input. Remember that the humble resistor is the simplest current to voltage converter. It has the disadvantage of presenting a non zero impedance to the source of input current. This can be fatal if the device providing the input current does not produce a constant current as the output voltage changes. The voltage drop across the resistor is directly related (through Ohm's Law) to the current. Unfortunately the resistor "loads" the transducer resulting in a current that is smaller than that which would flow through a wire of zero resistance. The current to voltage converter circuit of Fig. 14 performs exactly the function that its name implies. It is used to measure the current from a phototransistor, which is incapable of driving a resistive load. This circuit can be adapted for circuits that involve photomultiplier tubes (PMTs), photodiodes and electrochemical working electrodes. Build the I-V converter of Fig. 14. On the phototransistor there are two leads, e (emitter), and c (collector). Connect the lead marked e (the 24
longer lead) to the input of the I-V converter. Then connect the lead marked c ( the shorter) to the +15 V DC. Try to block the light from entering the phototransistor by placing your hand over the diode. What seems to happen and why? (Question 7). Add a capacitor across the 100kΩ resistor. What happens now? (Question 8).
Fig.14 Current to Voltage Converter
Fig.15 Analog to Digital Converter
25
ANALOG-TO-DIGITAL CONVERTER CIRCUIT In electrical circuits, it is often necessary to convert from an analog to digital signal through an A\D conversion. What are analog and digital signals? All the circuits that were built till now are analog circuits. The voltages in an analog signal can span any range, from -15 volts to + 15 volts and so on. Therefore, the definitions are as follows: Digital signals : Inputs and outputs that are available in a discrete number of levels , where only two states are possible: a logic 1 (5 volts) and a logic 0 (0 volts). Analog signals: Inputs and Outputs that are available in a continuous range of values. For example: a digital input from a logic gate, recognizes only two input levels, 5 and 0 volts. The input of an analog device, such as a voltmeter, can receive a continuous range of readings on the meter scale from the bottom to the top of the scale. The experiment will use an 8-bit A/D converter, known as the AD570. The AD570 is a successive approximation A/D converter consisting of a DAC, voltage reference, clock, comparator, successive approximation register and output buffers, all fabricated on a single chip. This A/D converter requires no external components. The operating supply voltages are +5 V DC to +15 V DC and -15 V DC. The AD570 will accept analog inputs of 0 to +10 V DC. The conversion is performed in the following way. When the BLANK and CONVERT-bar (pin 11 in Fig.15) input is driven low, i.e., set to zero volts, the conversion will start. At the output of the AD570, the corresponding binary number of the input voltage will appear. After pulling the BLANK and CONVERT-bar input high, i.e., setting them to +5 V DC, the outputs will be reset to zero and the A/D is ready for the next conversion. Further discussion of A/D conversion will be done in the software part of the course. The next step is to test the simple analog-to-digital converter as in Fig.15. The button marked S1 (start convert) should be connected to
26
the Powerace switch marked S1. Part of the circuit has been done. All that remains is to connect the proper output wires from the A/D converter (pins 2 to 9 in Fig.15) to the LEDs. Measure the output of the pot using a voltmeter. Then press the switch marked S1 and watch the LEDs come on. Some of the LEDs will be on and some off. The 8-bit number is read from the most significant bit (MSB) to the least significant bit (LSB). To reset the A/D converter, simply press the switch S1 again and watch the LEDs set to zero. The corresponding values for the A/D are as follows: 10.00 volts = 1111 1111 in binary = 255 in decimal 9.01 volts = 1110 0110 in binary = 230 in decimal 1.02 volts = 0001 1010 in binary = 26 in decimal Fill in Table 9. Choose different values to be converted by varying the pot. What is the conversion ratio from volts to decimal? (Question 9). Operational amplifier circuits Complete the following tables. Do not forget units and sample calculations. No other report is required for this experiment.
27
TABLE 1
Testing the Power Supply and the DMM
COMMON Black Probe
V/kΩ Red Probe
Measured Voltage
GND
+15 V
____________
GND
-15 V
____________
GND
S1 (off)
____________
GND
S1 (on)
____________
+15 V
-15 V
____________
-15 V
+15 V
____________
28
Table 2
Series Resistor Circuit Build the series circuit shown in Figure 3a, measure the voltage drop across the resistors and complete the following tables.
nominal resistance actual resistance
R1 = 10kΩ ________
R2 = 22kΩ ________
COMMON 2 3 4
(+) 1 2 3 TOTAL
voltage _________ _________ _________ _________
4 4 4 4
1 2 3 4
_________ _________ _________ _________
R3 = 47kΩ ________
current (calc) _________ _________ _________ _________
The total resistance for the circuit: Rt = The total current through the circuit?: It =
29
Table 3
Parallel Resistor Circuit Build the parallel circuit shown in Figure 3b, measure the voltage drop across the resistors and complete the following tables.
nominal resistance actual resistance
R1 = 10kΩ ________
R2 = 22kΩ ________
COMMON
(+)
voltage
4 4 4
1 2 3
_________ _________ _________
R3 = 47kΩ ________
current i= V/R _________ _________ _________
The total resistance of the circuit: 1/Rt = Rt = The total current through the circuit: It =
Table 4
Potentiometer (trim pot) Build the circuit in Figure 4 with a 10 kΩ potentiometer. Adjust the trim pot to obtain 10.00 volts between ground and complete the following tables (+) 1 1 2
COMMON 3 2 3
resistance _________ _________ _________
voltage _________ _________ _________
30
Table 5
Voltage follower (without op-amp) R
Voltage at 1
Voltage at 2
4.7 kΩ 10 kΩ 22 kΩ
Table 6A Voltage follower (with op-amp) R
Voltage at 1
Voltage at 2
4.7 kΩ 10 kΩ 22 kΩ
Table 6B Voltage follower (with op-amp) R
Voltage at 1
Voltage at 2
4.7 kΩ 10 kΩ 22 kΩ
31
Table 7
Inverting Amplifier Adjust the potentiometer to obtain an input voltage of 2 V DC. Measure the output of the inverting amplifier with feedback resistances of 4.7 kΩ, 10 kΩ, 2.2 kΩ, 47 kΩ and 100 kΩ.
applied voltage
Rf
Voutput (calc)
Voutput (measured)
_________
4.7 kΩ
_________
_________
_________
10 kΩ
_________
_________
_________
22 kΩ
_________
_________
_________
47 kΩ
_________
_________
_________
100 kΩ
_________
_________
32
Table 8
Summing Amplifier Adjust the potentiometer to obtain an input voltage of 2 VDC and 1 VDC. Measure the output of the inverting amplifier with feedback resistances of 4.7 kΩ, 10 kΩ, 2.2 kΩ, 47 kΩ and 100 kΩ.
V1 (1 VDC)
V2 (2 VDC)
Voutput (calc)
Voutput (measured)
Rf
________
________
4.7 kΩ
_________
_________
________
________
10 kΩ
_________
_________
________
________
22 kΩ
_________
_________
________
________
47 kΩ
_________
_________
________
________
100 kΩ
_________
_________
Table 9
ANALOG-TO-DIGITAL CONVERTER CIRCUIT
Voltage Into The A/D Cicruit
Binary Number Read
09/04/04
33
INT2 Interfacing Part II Data Acquisition in MatLab
Name
____________________________________________
Date of Experiment
____________________________________________
Date of Report
____________________________________________
Complete and attach to report.
Demonstrator
____________________________________________
Mark
______________
34
INTERFACING - PART II SOFTWARE DESIGN USING MATLAB Computers have become an important part of the chemistry laboratory. They are used to control operating conditions of instruments, to process data and to communicate results in a meaningful way. Intelligent devices are designed to provide information rather than numbers, i.e., a report from analysis of a water sample will state whether the water is potable or not instead of listing various concentrations of organic and metal contaminants. The field of intelligent instruments is booming and accounts for a growing fraction of current research. The first step in the development of an intelligent instrument is to interface it to a computer. The term interfacing covers the development of both hardware and software. This experiment involves the use either the CIO-DAS08/Jr or the PCI-DAS08 Board. Both are A/D (analog to digital converter) boards made by ComputerBoards Inc. and run very similarly under MatLab. The A/D board is a piece of hardware located in a slot on the computer's bus, which performs the actual analog-to-digital conversion. An explanation of how A/D converters work is outlined in the course text (Skoog, Holler and Neiman, “Principles of Instrumental Analysis”, 5th ed., Section 4C7), but it is not necessary to understand how the actual conversion is done to be able to use the A/D converter. When using these A/D boards with MatLab, drivers (software that runs hardware like the A/Ds, printers etc) are provided in a toolbox. When the toolbox is added to the basic MatLab package, the software can perform additional functions. MatLab has an enormous selection of toolkits, which may examine on the company website at www.mathworks.com . REMEMBER TO SAVE ALWAYS YOUR PROGRAM AFTER EACH MODIFICATION. The best way to do this is by having a main body for the name and then changing the end. For example: EDSint1, EDSint2 or EDSint1A, etc. Remember, save often! We are not interested in hearing stories about how things were lost. Save on both the hard drive and the floppy. Then, when done, copy the floppy to your OMC network directory. You will need to use your program that you develop today for the Interfacing 3 and Signal to Noise experiments. 35
Prelab Preparation The goals of the experiment are: (1) Learn to use an A/D board using MatLab, (2) Learn to use a Fourier Transform (actually you will use a Fast Fourier Transform (FFT) routine built into MatLab) to do some signal processing, (3) Learn the effect of time constants on the output signal and (4) Learn to use a summing amplifier. Most of the experiment involves programming using MatLab. To minimize the time in the lab and (almost) ensure success, write the programs before entering the laboratory. One of the best ways to learn how to write software is to modify someone else’s code. Most of the functions you will need are already provided in the example program listed below or in Appendix I. You will need to identify the useful MatLab functions, then cut, paste, modify and understand how these functions work in order to write your Interfacing program. The programs that you can use are those provided in the manual below. They are also available on the course WebCT site. Bring your program to the laboratory, load it into the computer and show that it works to a demonstrator before starting with the data acquisition part of the experiment. The program outline, in “pseudo code” is presented below. Note: you are welcome to develop a more advanced version as long as it has the required functionality. Function calls etc., are welcome. Program Outline Start Loop Give user choice of one of the following and then implement 1. Read in a data file 2. Get prepared to take data with the A/D converter Set acquisition frequency Set number of points to be taken Give option to subtract out mean of data set from all values 3. Generate dummy data (input parameters for dummy data as in demo FFT program) With the data from above offer the user the option of Plotting Saving With the data from above offer the user the option of doing an FFT on the data With the FFT results offer the user the option of
37
Plotting (note: no need to save the FFT as the FFT can always be regenerated from the saved data) End loop? (is the user ready to quit? If not, go back to Start Loop) In the Laboratory Part I Turn on the computer and start MatLab by double clicking on the icon labeled MatLab R12. Load your own program file adding to it a few lines of code presented below without the comments. The basic data acquisition program listed below will not work on computers that do not have the Data Acquisition Toolbox installed (e.g., computers outside of lab 300). Anything to the right of a ‘%’ is a comment and placed there to make the program more readable. % m-file Inter1M 1.0% Eric Salin 14 Nov 2001 % Program takes data on PC computer with PCI DAS08 card % in slot 1 (first slot) % note that the 1 in the next statement might have to % be a 0 depending on the card ID
ai=analoginput('cbi',1); %setup to use channel 0 (could use a total of 8 channels)
addchannel(ai,0); %set data acquisition rate to 100 points per second (rate = 100 Hz)
set(ai,'SampleRate',100) %take 100 points
set(ai,'SamplesPerTrigger', 100); set(ai,’clocksource’,’software’); %collect values for the number of points and rate specified above
start(ai); %put collected values into the array called "data". Note that %there is no ';' at the end of the line, so it will automatically print out 38
% the value once it is collected. During long acquisitions the % collection routine can run in the background, allowing multiple tasks % to be performed simultaneously.
data=getdata(ai) % now the acquired numbers are in an array called "data" % shut the A/D variables down, clean up workspace
delete(ai) clear ai The range of the A/D has been set at the factory to be +5 to –5 Volts. This is a 12 bit converter, so the range of possible values will be 0 (normally –5V) to 4095. What is the minimum voltage change you should be able to observe?
+15V P o t
A/D
+
-15V Figure 1. Voltage divider with follower circuit. Build the follower circuit provided in Figure 1, connect the ground to the black connector on the A/D interface and the signal to the red connector. This is the convention usually followed. Now, adjust the pot to produce a range of values from just below +5 volts to just above –5 volts. You will find that if you go over 5V or under –5V, the readings become constant, meaning that the A/D card has reached its saturation point (overranging) and the values are useless. Use the basic program above, or your own program, to fill in the values below. Perform a linear regression using the command: p=polyfit(x,y,1) where x-vector of values read from the A/D, y-vector of values read from the DMM, and 1 indicates a polynomial of the first order. The first p coefficient,
39
p(1), printed corresponds to the slope, the second, p(2), to the intercept of the straight line. To obtain the calculated values, use the command: ycal=polyval(p,x); Plot the experimental and calculated points with the plot(x,y,’*’,x,ycal) command. TABLE 1. Results of the A/D conversion. Enter the reading from the A/D
Enter the Voltage Read from the DMM
Formula for the calibration curve:_______________________________________ Tasks: 1. Modify the program as needed to put correct voltage values into the array called “data”. 2. Demonstrate that the data array can be saved or output to a file. The “save” function is probably the easiest to use, although other input functions are available. The ASCII (text) option is recommended. Test that it is working properly by using the complementary “load” function to import the saved data back into the workspace. Optional, but very useful: make the file name an input variable. 3. Plot the data, with labels on the x and y axes. Optional, but very convenient: using the “input” function, set up the number of points and the frequency as input variables, so that you do not have to constantly alter the program.
40
Part II In the next portion of the experiment, you will record a rapidly changing (or transient) signal, which cannot be recorded on a DMM (Digital Multi Meter, sometimes also called a DVM, Digital Volt Meter). Start by generating a chromatographic-type peak with a width of roughly 1 to 10 seconds. Do this by varying the pot (variable resistor); turn the pot up for a few seconds, and then back down for a few seconds. Do not go outside the range of the A/D converter. You will probably want to record at about 100 Hz (100 times/s), so you will want to take about 2000 points. In fact, you only usually need between 5 and 10 points over a peak range to get a good height or area measurement. This means for a one second peak, 10 Hz is sufficient. Tasks: 4. Record, plot and save your simulated chromatographic peak.
Part III Now, we want to show how the computer can quickly give information from seemingly complex data. You will use the program you developed to take data for the Signal-to-Noise experiment. In Appendix I, you can find a program which demonstrates Fourier transforms using functions to provide the data. You are encouraged to take what you need from this program and combine with your previously developed program to make a program which records data, displays it, then generates an approximate power spectrum (absolute FFT values as in the program), displays and saves the values (optional, as you can always perform an FFT later if you have the original data values). Recommendation: subtract the average value from the data. This can be done easily with a command like data=data-mean(data). This will remove a lot of information at 0 frequency which will tend to suppress your automatic plotting (a large value used with autoscaling will make all the others look small). Connect the follower circuit to the first function generator sine wave output. See Appendix II for a pinout of the function generator chip. Set your data 41
acquisition rate, so that you are certain that you are meeting the Nyquist criteria. If in doubt, record at a high acquisition rate and then slow it down once you are certain that you are not aliasing (see below). Nyquist Theorem (in our terms): The frequency of data acquisition must be at least twice as fast as any signal being recorded. Aliasing (going under another name): In data acquisition, when the Nyquist criteria have not been met, a signal will show up at another (lower) frequency. Tasks: 5. Record sine wave data. Plot it to be certain that it is not too large in amplitude and that the recording rate is adequate. Save this data. 6. Do an FFT (Fast Fourier Transform) on your data. Plot the data. 7. Do the same two steps for the sine wave data from the second function generator. Part IV Build a summer circuit and combine the sine wave output from one function generator with the square wave from the other function generator. Tasks: 8. Design, build and test a summer circuit. Verify that each half of the circuit works properly by connecting the other input to ground and recording the signal. Record the square wave signal from the summer circuit. Do an FFT on the signal. Plot abs(FFT). Note the harmonics. These are the other frequencies which are required to build up a square wave. Note that ideally their amplitudes would be 1/3 the original (at 3 times the frequency) and 1/5 the original (at 5 times the frequency) etc. 9. Knowing that the bandwidth of a simple RC circuit is 1/2πRC, put an appropriate capacitor (one that should cut out the higher frequencies) in parallel with your RF (feedback resistor) in the summer circuit and verify that the higher frequencies are indeed reduced. 10. Remove the capacitor, so that your system is now very fast responding. Combine the two function generator signals using your summer. Record 42
the data and do an FFT. Plot the transformed data and verify that the FFT does resolve the signals. END: Show a demonstrator that your program and summer circuit works. Attach the printed program and submit it together with Table 1, the calibration plots and other plots. 5/23/2003
Appendix I %Salin fft_EDS %Modified 14 Nov 2001 %Modified by G.W. 13 December 2001 %Demonstration program %Random Noise + 2 frequencies %This version displays multiple plots %This version also displays only the first 512 points of a 4096 data set %for the initial outputs %NOTE: This program is a reference. Try to find the functions that are going to be %relevant for the interfacing program you need write, and use accordingly. %First wave %Input data acquisition parameters from user. freq1=input('Input Frequency 1 in range of 1 to 400 '); scale1=input('Input relative intensity of 1 in range of 1 to 10 '); %Generate the first sine wave to be used. set1 = linspace(0,freq1*10*pi,4096); x1 = sin(set1)*scale1; %Plot the first 512 points subplot(3,1,1); for i = 1:512 x(i) = x1(i); end; display('Paused after first wave, view the graph, press the Enter key'); plot(x), xlabel('time'),ylabel('intensity'),title(' Frequency 1'); refresh; 43
pause; %Second wave freq2=input('Input Frequency 2 in range of 1 to 400 '); scale2=input('Input relative intensity of 2 in range of 1 to 10 '); set2 = linspace(0,freq2*10*pi,4096); x2 = sin(set2)*scale2; subplot(3,1,2); for i = 1:512 x(i) = x2(i); end display('Paused after second wave, view the graph, press the Enter key'); plot(x), xlabel('time'),ylabel('intensity'),title(' Frequency 2'); refresh; pause %Noise %Add noise scale3=input('Input relative intensity of noise in range of 1 to 10 '); %Use random numbers in the time domain to create noise x3 = randn(1,4096)*scale3; subplot(3,1,3); for i = 1:512 x(i) = x3(i); end plot(x), xlabel('time'),ylabel('intensity'),title(' Random Noise'); display('View the graph.'); refresh; pause display('Press Enter'); %Add all the three components together x4=x1+x2+x3; %Store the numbers in a file. display('Do you want to store the result in a file?'); store=input('Enter 1, if yes, otherwise enter 0 '); switch store case 1 %Input the file name from user. filename=input('Input file name: ', 's'); save(filename, 'x4', '-ASCII'); otherwise 44
display('Results will be not stored. Press Enter'); end %Plot the final result subplot(3,1,3); for i = 1:512 x(i) = x4(i); end plot(x), xlabel('time'),ylabel('intensity'),title(' Sum of Two Frequencies and Noise'); refresh display('Paused after adding noise, view the graph, press the Enter key'); pause %Generate the approximate power spectrum by taking only the absolute values. %This is easier to plot and understand. ft1 = abs(fft(x4)); %Remove reflection part. %Note that on any fast Fourier transform, the last half of the FFT %is just a reflection of the first half, so here we display only the %first half. If in doubt, plot the whole thing, which is ft1. for i = 1:2048 ft2(i) = ft1(i); end subplot(3,1,1); plot(ft2) refresh; % Note, this is the frequency axis, but the "correct" frequency is not displayed. % That frequency depends on the rate of acquisition of the data. If interested, % check out the Nyquist theorem. In short, to record any frequency properly, it % must be sampled at twice its frequency. If not, you get 'aliasing'. So, % if you record data at 200 Hz, the top of the scale corresponds to a frequency % of 100 Hz. Higher frequencies will show up, but at lower frequencies, consequently % the term aliasing. xlabel('frequency'); 45
ylabel('amplitude'); title(' FFT/Approximate Power Spectrum'); display (' End of the program. View the graph. Close the graph window.');
46
Appendix II ICL8038 Precision Waveform Generator/Voltage Controlled Oscillator*
* ICL8038 Data Sheet, File Number 2864.4, Intersil Americas Inc., 2001
47
INTERFACING II EXPERIMENT
CONFIRMATION OF THE COMPLETION OF THE EXPERIMENT (TABLE 1, CALIBRATION PLOT, INTERFACING PROGRAM)
Student’s Name: Student’s Number: Laboratory Day: Date: Name of the Demonstrator: Signature of the Demonstrator:
Comments:
48
INT3
Interfacing Part III Hardware and Software Design for Data Acquisition
Name
____________________________________________
Date of Experiment
____________________________________________
Date of Report
____________________________________________
Complete and attach to report.
Demonstrator
____________________________________________
Mark
______________
49
INTERFACING - PART III HARDWARE AND SOFTWARE DESIGN FOR DATA ACQUISITION In the experiment Interfacing I you learned how to build operational amplifier circuits. In Interfacing II you wrote a program to collect analog data using an A/D converter. In Interfacing III you will apply the knowledge acquired in the previous experiments to design hardware and software necessary for interfacing a real experiment. The experiment in question is "Determination of Absorbance of the Bromothymol Blue Dye by Flow Injection Analysis." You do not have to understand detailed principles of the FIA technique to perform data acquisition. Nevertheless you may find it useful to read Appendix I to obtain more information. In brief, the experiment consists in injecting a solution of bromothymol blue (BTB) to a flow system with a visible spectrometer detector and then recording on a floppy disk the analog output of the detector (%T) in a digital form. The FIA instrument will be prepared for you and the proper solutions, as well. Hardware design The first step in the development of any interfacing arrangement is to design the necessary hardware. The circuit that you are supposed to build should be able to perform the following operations (Fig.1): • to separate the measured signal from the converting device (Can you explain why?), • to amplify the signal, • to allow for the zeroing of the baseline (i.e., changing the offset).
detector
buffer
signal amplification
offset correction
computer
Fig.1 Setup of the interfacing circuit. You should come to the laboratory with a schematic drawing of the interfacing circuit and your MatLab programs written. Once the circuit is built, connect it to the FIA detector and to the strip chart recorder. Verify its operation. If you are satisfied with the response, proceed to the next step - modification of the data acquisition program.
50
Software design In the Interfacing II experiment you wrote your own program for the digital data acquisition. Now is time to use it in a real life situation. Connect the output of the interfacing circuit to the A/D converter channel ANALOG IN. Turn on the computer. Load MatLab and then your program. Start your program when you start running the FIA experiment. The program will be compiled and the output will be shown on the screen and the data should be stored on the floppy disk at the end of the experiment (note: when asked for the filename, remember to add the drive, i.e., a:\int3A.txt). Use MatLab to display a graph of the results. Compare the graph to the strip chart recorder output. Is there a difference and what causes it? Make appropriate changes in the interfacing program or the hardware to obtain satisfactory results. REMEMBER TO SAVE ALWAYS YOUR PROGRAM WITH A DIFFERENT VERSION NUMBER AFTER EACH MODIFICATION.
51
laboratory examination Your grade in this experiment, based on the demonstration and discussion of your hardware and software, will be marked with the letter grades A, B, C or zero. You have to hand in the floppy disk with the most current version of the program and the breadboard with the interfacing circuit, as well as plots of the various outputs.
Group 1. Electronic Circuits
The first group requires that you draw common circuits using symbols, e.g., The other type of question asked in this group requires that you do a drawing using a pin out diagram of a 741 op amp. You must place in resistors, capacitors, etc., to solve the problem. This is similar to the problem above except that you are doing a schematic rather than a symbolic drawing. Group 2. Interfacing Hardware
Group 2 questions involve interfacing hardware, which was discussed in lecture and covered in Interfacing 1 and 2. You should be familiar with the various devices discussed as well as number representations in binary. Group 3. Programming
Group 3 questions cover programming in MatLab to control devices. You should know your program and the example programs thoroughly. You should also be able to explain the smoothing and integration that you have implemented in your program. General Comments
The questions for the exam are relatively easy, so you will not be given a great deal of time. Come thoroughly prepared. You are expected to complete this exam during the Interfacing 3 experiment time period, so plan accordingly.
52
Appendix I FLOW INJECTION ANALYSIS INTRODUCTION Flow injection analysis (FIA) is based on the injection of a liquid sample into a moving, non-segmented continuous carrier stream of a suitable liquid. The injected sample forms a zone, which is then transported toward a detector that continuously records the change in absorbance, electrode potential or other physical parameter as a result of the passage of the sample material through the flow cell. A combination of three principles is involved: sample injection, controlled dispersion of the injected sample zone and reproducible timing of its movement from the injection point to the detector. In contrast to all other instrumental analysis, the chemical reactions are taking place while the sample material is dispersing within the reagent, that is, while the concentration gradient of the sample zone is being formed by the dispersion process. FIA is a general solution-handling technique, applicable to a variety of tasks ranging from pH or conductivity measurement to colorimetry, titrations, and enzymatic assays. For pH measurement, or in conductimetry, or for simple atomic absorption, when the original sample composition is to be measured, the sample must be transported through the FIA channel and into the flow cell in an undiluted form in a highly reproducible manner. For other types of determinations such as spectrophotometry, the analyte has to be converted to a compound measurable by a given detector. The prerequisite for performing such an assay is that during the transport through the FIA channel the sample zone is mixed with reagents and sufficient time is allowed for production of a desired compound in a detectable amount. For a detailed discussion of theory and analytical applications using FIA refer to an excellent book by Ruzicka and Hansen (1). A variety of manifold configurations (Figure 1) may be used to allow application to nearly any chemical system. In this experiment a single-line FIA manifold is used to determine the transmittance of a solution of the bromothymol blue (BTB) dye.
53
Figure 1. Types of FIA manifolds: A, single line; B, two-line with a single confluence point; C, reagent premix into a single line; D, two-line with a single confluence point and reagent premix; E-, three-line with two confluence points. [1]
54
FIA readouts When recorded, the transient signal observed by a detector during the passage of the dispersed sample zone has the form of a peak the height H, width W, or area A of which contains the analytical information (Figure 2).
Figure 2. (a) The simplest single-line FIA manifold utilizing a carrier stream of reagent; S is the injection port, D is the flow cell, and W is the waste. (b) The analog output has the form of a peak, the recording starting at S (time of injection t0). H is the peak height, W is the peak width at a selected level, and A is the peak area. T is the residence time corresponding to the peak height measurement, and tb is the peak width at the baseline. [1].
55
In the absence of chemical reactions (such as in simple atomic absorption measurement) when the detector responds linearly and instantly to the injected species, it does not make a difference whether peak height, area or width is being measured, since each yields useful information (although the concentration of the injected material is related to each of these parameters in a different manner). Peak height H is the most frequently measured peak dimension, since it is easily identified and directly related to the detector response, such as absorbance, potential, or current. The simplest way of measuring the peak height H is to inject a well-defined volume of a dye solution (bromothymol blue for example) into a colorless carrier stream and to monitor the absorbance of the dispersed dye zone continuously by a colorimeter. To obtain H value, the height (i.e., the absorbance) of the recorded peak is measured.
Figure 3. An originally homogeneous sample zone (top left) disperses during its movement through a tubular reactor (top center), thus changing from an original square profile (bottom left) of original concentration of C0 to a continuous concentration gradient with maximum concentration Cmax at the apex of the peak. [1].
56
EXPERIMENTAL Manifolds required Injector, two-line reactor manifold (Fig.4), photometric detector.
Figure 4. Basic experimental set-up. Solutions and Chemicals The following solutions are provided: Stock 0.1M borax solution(Na2B407), stock 0.4%(w/v) bromothymol blue(BTB) (0.4g dissolved in 25mL 96% ethanol and diluted to 100mL with 0.01M borax.). NOTE: The BTB should not be injected in acid solution, since the acid form of the dye absorbs on the plastic tubing. Prepare the following solutions: Dilute 50mL of 0.1M borax solution to 500mL to prepare a 0.01M working solution. Dilute 2mL of the 0.4% bromothymol blue solution to 200mL with the 0.01M borax solution. This 0.04% BTB solution will serve as the working solution. Assembly of Apparatus The instrument will already be set up. However, the connections should be checked (Figure 4) before beginning the experiment. A Rheodyne valve injector (Rheodyne 4-way Teflon rotary valve) is used (See Figure 5 for position #s) The sample loop is connected to positions 1 and 4 on the back of the valve. The sample inlet is position 6. In either the
57
load (counterclockwise) or inject (clockwise) position, the sample exits at position 5 at the back of the valve to the waste. The carrier stream enters the valve in position 2 and exits at position 3. In the inject position, the sample in the loop is injected into the carrier stream. In this position, fresh sample continues to be pumped through the valve to waste. Hence it is important to conserve the sample solution by withdrawing the sampling tube from the sampling solution and let air be pumped.
Figure 5. The FIA system. Check whether the following connections have been made correctly. Since the peristaltic pump will pump in the clockwise direction, (i.e., the solutions will be drawn from the top of the pump) arrange the tubes in the peristaltic pump with the carrier tube on the bottom of the rollers, the reagent tube in the middle and the sample tube at the top. The carrier pump tube should be connected to the carrier inlet of the injector. The carrier exit of the injector should then be connected to the carrier inlet of the reactor. The reagent pump tube is connected to the reagent inlet of the reactor. The exit of the reactor is connected to the inlet of the detector flow cell which exits to a waste bottle. Finally, the sampling tube is connected to the inlet of the injection loop and the sample pump tube to the outlet of the loop enabling sample to be drawn in to the loop by means of the pump.
58
PROCEDURE Turn on the detector and recorder and allow to warm up. Fill the carrier bottle and the reagent bottle with the 0.01M sodium borate solution. Fill a small beaker approximately half full with the 0.04% BTB solution. Place the appropriate tubes in the bottles. Place the injector in the "Load" position and turn on the peristaltic pump. The channels will fill and the solution will exit to the waste bottle. The blue sample solution will fill the sample loop. Allow to flow until all air bubbles are gone. NOTE: Occasionally an air bubble may get stuck in the detector as indicated by a deflection of the recorder pen. This is most conveniently dislodged by introducing a large air bubble in the carrier stream by momentarily pulling the carrier tube out of the carrier solution. Set the detector at 620nm and the recorder at 1cm/min and 1V full scale. Adjust the recorder pen to the bottom of the chart. The injected sample should provide a recorded peak maximum of approximately 60% transmittance with a 1cm path flow cell. Use the interfacing circuit to set first zero and then the full scale positions. Try to obtain a deflection of about two thirds full scale. With the carrier being pumped, turn the injection valve to inject position. Note the blue sample as it passes through the channels. When the sample reaches the detector there will be a deflection followed by a return to baseline. After the sample has passed the detector, turn the valve to the load position to refill the sample loop. Continue the flow until the sample liquid reaches the end of the waste tube (this assures proper flushing of the sample loop with the new sample), then inject the sample and record the peak. Ensure in this manner that the system is operating properly, that the detector is not drifting and that reproducible peaks are obtained.
References 1. J. Ruzicka & E. Hansen, Flow Injection Analysis" 2nd Ed., John Wiley; N.Y. 1988.
59