You are on page 1of 8

Auto-Titrator Development Revised Sept 4 2008 pr

How to Build an Autotitrator


As an example to illustrate the issues involved in building and operating chemical instrumentation, consider the following scenario. Dont worry if you are unfamiliar with some (or many!) of the ideas presented here; the objective is to show you where we are going in CHEM3440, and how these ideas fit together into the understanding of modern instrumentation.
The VeryBigCorporation (Inc.) has hired you (congratulations!) to measure the buffer capacity of solutions that are used in their products. Your paycheck depends on being able to measure the inflection point as shown on the graph. The companys viability requires that this volume must be between 0.995-1.005 ml when using a particular HCl solution.

No problem, you say to yourself, and you arrive for work on your first day with the keen eye of the New Kid. All you need is a burette, a pH meter and a beaker or two. But then you find out, to your horror and disappointment, that you must repeat this seemingly simple titration 50-100 times per day. What do you do? What do you do? Although this was not mentioned in the interview, you decide that, as a graduate of Chemistry at Guelph, you will do your best in the face of adversity. The first thing that comes to mind is to hire a Guelph co-op student to do these titrations for you. However, your employer thinks that this is a poor, no, a bad idea, since they have already hired you at three times the coop salary (again, congratulations!). The next idea is more creative : why not make a machine that will do this for us?

What would we need ?


1) Some way to precisely deliver the HCl solution into the buffer sample, such that at any instant the quantity dispensed is precisely deterministic. 2) Some way to measure the pH of the resulting solution, in real time, as the HCl is added. 3) An algorithm to control the instrument, and to co-ordinate the delivery and measurement components 4) An algorithm to analyze the data to determine the inflection point based on the pH vs volume data.

Page 1 of 8

Auto-Titrator Development Revised Sept 4 2008 pr Although items (3) and (4) are very interesting, they are beyond the scope of this course. It would be an interesting exercise for you to think of what might be involved in designing and implementing these algorithms. For now, lets consider items (1) and (2) in turn, but notice that from the above description, (with words like deterministic, measure, algorithm, determine, precisely, etc) there will most likely be a computer involved in this to-be-constructed instrument.

Delivery of HCl
Although burettes work well when manually operated, most efforts to automate them fail because the rate that the liquid issues from the tip is dependent upon the hydrostatic pressure of the vertical liquid column, yet this column height is changing during operation of the burette. Successful operation of a burette is in fact a testimony to your human adaptability and eye-hand coordination. We take it for granted because it is now one of the chemists standard tools, but try to remember back to your first (awful) titration experience. A reasonable alternative is to use a motorized syringe to inject known quantities of liquid under computer control. An example of such a device is shown in the photos that follow.

The black block on the right is a stepper motor, a very useful device that, upon command and application of various voltages to activate the internal coils, will turn the shaft in either direction by a precise fraction of a complete rotation. In this case, each step is 1/200 th of a rotation (i.e.1.8 degrees). This is a standard motor design; some have 100 steps per rotation. (i.e. 3.6 degrees per step). The other characteristics that you will find are Bipolar vs Unipolar operation, and the available Page 2 of 8

Auto-Titrator Development Revised Sept 4 2008 pr torque. Big motors often have bigger torque, and consume more power to provide this torque. Inkjet printers use these motors to precisely position the paper and print head. Attached to the motor is a horizontal threaded rod (drive shaft) that has exactly 20 threads per inch (tpi). The threads per inch on a threaded rod can vary from ~2 to 80. To advance a nut by 1.0, we must turn it (or the shaft) by exactly 20 turns. This then moves the carriage that advances or retreats at this rate. In the case here, we can attach a 1.0, 5.0 or 50.0 ml syringe to the fixed body of the system, and connect the plunger to the moving carriage. Voila! We have a system that can deliver liquids under computer control. Surprisingly, higher tpi does not necessarily lead to a more precise device, since the friction increases greatly for fine pitch systems. Too high a friction causes stick-slip motion (finger-nails on a blackboard) of the nut with respect to the rod, and leads to irregular advancing rates. If the friction becomes excessive, the motor will stall in place. The first question is : what is the relationship between the quantity delivered and the number of steps commanded by the computer? Intuitively, this quantity must be related in some way to the accuracy of the delivery system, and hence the accuracy of the instrument. As we will also see in Chapter 1, the relationship between steps and delivered liquid is the heart of a TRANSFER FUNCTION that relates quantities in different data domains. Note however that this transfer function tells us NOTHING AT ALL about the precision of the instrument (Chapter 1), which will be determined by the physical construction of the device, and the control algorithms used. Consider a 1.0 ml syringe that requires 60mm of plunger motion to empty its contents. For the mechanical stage, 200 (steps/rotation) x 20 (rotations/inch) / 25.4 (mm/inch) = 157.5 steps / mm of travel. For the coupled syringe, 1.0 ml / 60 mm of travel = 16.67 microlitres per mm of plunger travel. Together, this implies that this syringe will deliver 16.67/157.5 =0.1058 microlitres per step, or 9.45 steps per microlitre. This is our required transfer function. If we had used a 5.0 or 50.0 ml syringe (with the same 60 mm plunger travel), then this transfer function would be 0.529 and 5.29 microlitres per step (respectively), or 1.89 and 0.189 steps per microlitre, respectively. Can we obtain the required accuracy with this device, according to these transfer functions? To find out, (and hopefully keep the VeryBigCorporation (Inc.) in business) calculate how many steps are needed to dispense the anticipated target volume of 1.0 ml. Again with the 1.0 ml syringe, # Steps = 1.0 ml x 1000 microlitre/ml x 9.45 steps/microlitre = 9450 steps. Since in principle we can move the plunger one step at a time, our accuracy will be 1 part in 9450, or ~0.0001 : this is easily ( ! ) within the required 1% accuracy. Repeating this estimation with the 5ml and 50 ml syringes gives us 1890 and 189 steps per ml of acid respectively, and so both would be acceptable. But clearly a 100 ml syringe would be a mistake, even if the Page 3 of 8

Auto-Titrator Development Revised Sept 4 2008 pr mechanical components are perfectly constructed with no backlash, lost-steps, etc. So how to choose among the 1.0, 5.0 and 50.0 ml syringes? There are no clear cost differences, but if we are going to be doing 50-100 titrations per day, it would make a great deal of sense to use as large a syringe as possible to minimize reloading downtimes, etc. I would go with the 50 ml injector. Commercial syringe pumps have devised elegant solutions to this problem. In one variation, a computer-controlled set of valves connects the syringe to either the experiment (i.e. our titration cell) or to the supply of liquid titrant. When the syringe is empty, the appropriate valves are opened and closed, and fresh titrant is loaded into the syringe by withdrawing the plunger. When full, the valves are reversed, and now the plunger is advanced to the end of the syringe barrel, thus dispensing the solution into the experimental volume.

Detection System
We have a pH meter at our disposal that can measure pH=0-14, and produces an analog voltage output that is proportional to the pH. Notice that pH meters use glass electrodes, and these have very high impedances (Chapter 5). The voltage output of this unit varies from 0 to 100 mV according to the pH; it was originally used with a chart recorder, and this was a popular full-scale span for these output devices. However, we need to acquire this voltage signal into our computer using an analog/digital interface, and these are often configured to read 0 to +10 Vdc. We require a Gain of (Vout/Vin = 10.0 V/0.1 V) 100 prior to digitization. As we will see in Chapter 3, one way to amplify an electrical signal is to use an Operational Amplifier, or an OpAmp. These versatile devices come in many flavours, but they all work in the same way. One configuration for an OpAmp is that of the Inverting Amplifier. How and why this works will be discussed in class.

The Gain of the amplifier is set by the Rfeedback : Rinput resistance ratio, we would like a gain of 100, so it would be reasonable to try Ri=1 KOhm, Rf=100KOhm. This would work, but unfortunately the output voltage now goes from 0 to -10 V (it is an inverting amplifier after all). So we can do a trick here and use two OpAmps in series, each stage having (say) a Gain of 10 (Ri=10K, Rf=100K). Now the overall gain is (10)(-10)=+100 as required. In this example, Gains of (-1, -100), or (-100, -1), or (-20, -5), or (-25, -4), would all probably work just as well. With 14 pH units spanning 10 V, this is 0.714 V/pH unit : yet another TRANSFER FUNCTION. As it turns out, many OpAmps are available with 2 independent devices within the single 8-pin integrated chip package. For example, we use the dual OpAmp LF412 extensively in our lab, which costs $1-$2 each. Thus, both gain stages could be achieved with a single device.

Page 4 of 8

Auto-Titrator Development Revised Sept 4 2008 pr But wait! As bad luck would have it, we now have a serious noise problem. When I measure the amplified signal on my oscilloscope, I found that there is a great deal of electrical noise on the output signal, and this noise is not being generated by our amplifier circuit since we designed it very well (and tested it too!). No, the noise is coming from the pH meter. According to the scope, we have 150 mV peak-to-peak noise, which corresponds to (0.150 V/0.714 V/pH)=0.21 pH units. This means that if we look at the voltage output at any point in time, there will be an unknown error that could reach 20% of a pH unit (peak-to-peak). This is unacceptable! Looking closer at the scope, and performing a Fourier Transform on the signal, we find that the noise is dominated by a 960 Hz component. In CHAPTER 5 we will see that this is a high harmonic of the 60 Hz mains frequency (the 16th harmonic to be precise). This suggests that the noise is environmental in nature, and is not due to the process in the sample under test. In fact, the problem probably stems from the use of the glass electrode pH probe; its high impedance makes it sensitive to the pickup of ambient electrical noise (CHAPTER 5), much as an open-circuit wire functions like an antennae. Circuits that have low impedances are less susceptible to noise pickup (but they have their problems too!). It would be a very good question to ask why such a large noise level was not noticed previously with this pH meter; in fact, many instruments that use simple mechanical display systems like analog meters (with a needle) or a chart recorder (with a pen) will automatically filter out highfrequency noise because of the mechanical inertia of the needle or pen device. Thus, many of these devices have noisier electronics than might appear on first inspection. There are a few solutions available. We could put the experiment in a sealed metal box (a Faraday cage) knowing that electric fields cannot penetrate such a conductive enclosure. This is the principle by which signal cables (e.g. cable- and satellite TV, instrumentation) work, since they include a shielding layer of wire to minimize the penetration of electrical fields into the enclosed signal-bearing wires. In some research laboratories they will construct entire rooms with this metal-clad shielding for highly sensitive measurements. However this is often very difficult (read : very expensive) to do in practice. Instruments can be shielded from magnetic fields using metals with a high B-field permeability (called -metal, pronounced mu-metal) that diverts the B-field into the metal and away from the experiment. However, in CHAPTER 2 we will see that it is possible to filter out the high-frequency components of a signal with just a simple resistor and a capacitor, arranged in series as shown below; this is one example of Signal Conditioning. See Figure 2-11 for a better image. The input voltage is applied on the left across the R + C pair, and the filtered output is seen across the capacitor on the right. This arrangement works because at low frequencies the capacitor functions like an insulator, so the appropriate voltage is maintained across the two electrodes. At higher frequencies, the capacitor appears (important word in this context) to leak the current across it, such that the voltage across the device appears to decrease.

Page 5 of 8

Auto-Titrator Development Revised Sept 4 2008 pr

The figure of merit (CHAPTER 1) for such a device is the cutoff frequency that is given by the product of the resistance (in Ohms) and the capacitance (in Farads), which surprisingly, gives a quantity in seconds. For example, a 1 megaOhm resistance and one microfarad capacitor (readily available, well suited to this function) would have a time constant (CHAPTER 2) of 1 second, and will attenuate anything above this frequency. Arranged as a low-pass filter, CHAPTER 2 tells us that the attenuation ratio (Vout / Vin ) is given by Vout/Vin = ( 1/2 f C ) / sqrt( R2 + (1/2 f C)2 ) where f is the frequency. If you think that the denominator of this equation resembles the hypotenuse of a right-angled triangle or the radius of a circle in the R-C plane, you would be right. Most formulas dealing with time-varying signals are presented in this 2D way, for reasons that we may discuss. The difference between impedance and resistance is that resistance is a scalar quantity, while impedance (same units : Ohms) must be presented in the complex plane (i.e. a 2D representation) because of its frequency dependence. The appearance of this attenuation is shown below, and still better in Figure 2-12.

Somewhat arbitrarily, I suggest a filter frequency of 0.01 second (this will pass AC signals up to ~100 Hz), with R=10 kOhm, C=1 microFarad, although as shown below, there is still dramatic attenuation at 100 Hz. Using this information, we can calculate the attenuation ratio for frequencies leading up to our 960 Hz noise level.

Page 6 of 8

Auto-Titrator Development Revised Sept 4 2008 pr 1 Hz : 10 Hz 100 Hz 960 Hz Vout/Vin=0.998 (near unity transmission, but still not perfect) Vout/Vin=0.85 Vout/Vin=0.16 Vout/Vin=0.016 (i.e. over 50-fold reduction)

Using this simple circuit, our 150 mV peak to peak noise will be reduced to 150 mV x 0.016 = 2.4 mV. This is only 0.003 pH units for our system, and will probably be adequate. Alternative active filters can be constructed with operational amplifiers, with improved characteristics, for only a modest increase in complexity. Why not filter out more noise by using a low-pass filter with an even lower characteristic frequency (e.g. 1 Hz instead of 100 Hz)? Dont forget that we will be doing our titrations as a function of delivered volume, which in turn will vary as a function of time as the syringe injects the acid. If the conditioning electronics filter out signals that vary on the 1 second time scale, then we will be forced to add our HCl titrant very slowly (i.e. such that the real changes in pH take place over timescales greater than 1 second) in order for the true pH voltage changes not to be damped out by the filter! Of course, once the pH value has been stable for ~1 second, then this new pH would be recorded by our system, but this means we have to wait ~1 second between changes to the sample to avoid overshooting the intended end-point. Each titration would take many (many!) minutes, and there is no way that we could do 50-100 per day. High stability is usually obtained only at the price of slower acquisition. All components of the design must work together, on compatible timescales. The only remaining issue is the transfer of the analog voltage into a digital representation within the computer. This is most easily accomplished using an Analog-to-Digital Converter (ADC) (CHAPTER 4). These are characterized by their conversion rate (samples per second), their accuracy (error expressed in Least Significant Bits), the number of bits in the conversion (8, 10, 12 and 16 bit ADCs are common). The good news is that these things are readily available and of high quality, probably below $50 for our needs. Which ADC to pick? Imagine an 8-bit device. 28 gives 256 distinguishable voltage levels in the 8-bit format. The voltage span is 10 V, corresponding to 14 pH units. This means that we will have 10 V / 256 steps = 39 mV separation between each representation, or 0.055 pH units; again the transfer function makes these transformations trivial to work with. This is not a terrifically high resolution however. For the higher bit-width devices, we have Bits and Steps 8 256 10 1024 12 4096 16 65536 Voltage increment between steps (10 V span) 39 mV 9.9 mV 2.4 mV 0.15 mV pH increment between steps 0.055 0.014 0.003 0.0002

On the surface of this, why not use a 16 bit ADC ? Remember that we have dramatically reduced the 960 Hz noise, but there is still 2.4 mV that will get through our RC low-pass filter. In this case using a ADC with

Page 7 of 8

Auto-Titrator Development Revised Sept 4 2008 pr 0.15 mV resolution is just a waste of money because the lowest (least significant) 4 bits will just be sampling the noise fluctuations. I expect that the 12 bit ADC would do just fine. Most electronic designs have intrinsic noise levels of ~ 1mV, so it is not too surprising that 12 bit converters are adequate for most routine applications. Q.E.D.

Although this scenario was short and necessarily glosses over some practical issues (e.g. items (3) and (4) of our requirements), it does illustrate several of the principles that we will be exploring in CHEM 3440.

Transfer Functions Signal-to-Noise considerations Noise sources Operational Amplifiers Signal Conditioning Mechanical Design Analog-to-Digital Interfacing Fourier Transforms

Page 8 of 8

You might also like