You are on page 1of 23

Electronics for Chemical Instrumentation 1. Basic Circuit Components 1.1 Voltage.

A central idea in all of science is the concept of potential energy difference between two physical (or chemical!) states. In electronics, we will exclusively address potential energy differences in terms of electrical potential (voltage), V, measured in volts (V). Because the voltage is a potential energy difference, it is always measured between two circuit points. Frequently, one of the points is implied to be the ubiquitous (and maddeningly named) ground potential (see below). Furthermore, given the equivalence of work and energy, it should not be surprising that we can identify the voltage with the work done in moving a given charge through a given potential difference. For example,
E = QV

(1.1)

where the energy, E, is related to the product of charge, Q, and voltage. The SI units are defined such that 1 Joule (J) of work is required to move 1 Coulomb (C) of charge through 1 volt of potential difference. To give some sense of proportion, the charge on a single electron is 1.6 x -19 10 C. Another commonly used measure of charge is constituted by a mole of electrons, for which we have,

Q (mole) = Qe N A = (1.6 x 10 -19 C)(6.02 x 10 23 mo -1 ) = 9.64 x 10 4 C mo -1 = 1 Faraday

(1.2)

We will make extensive use of the Faraday in electrochemistry, where it is useful to relate the quantity of charge consumed or produced by an electrochemical reaction in terms of the reactants or products that are expressed in moles. Given the emphasis on voltages as potential differences, wouldnt it be nice if there were a common reference energy, that could be used to relate different points in a circuit to a single reference value. Fortunately for us, there is the aforementioned eponymous ground potential. The ground point in a circuit is physical location with a potential that is negligibly different from the electrical potential of the earth. Almost always, ground potential in an instrumentation circuit is established through the 3rd prong of a grounded outlet which is ultimately connected (through lowresistance thick copper wires) to a water pipe or similar structure in intimate contact with the earth. In Fig. 1.1, the ground is established through the thick copper wires twisted together with the red connector in the center. The physical basis for using the earth as a reference potential derives from the relative 1

Figure 1.1. Exploded drawing of a threeterminal duplex electrical outlet (U.S.). The ground lead is connected to the round terminal at the bottom of each receptacle. Adapted from http://www.thisoldhouse. com/toh/article/0,,216662,00.html

Chemistry 30333 Electronics for Chemical Instrumentation

Figure 1.2. Common symbols to denote ground. Adapted from http://en.wikipe dia.org/wiki/Gr ound_(electricit y).

insensitivity of the voltage on the earth to any charge that is added or subtracted from it by an electronic circuit. The earth is massive, so that any difference in the charge it supports produces an immeasurably small change in the earths potential. In a circuit diagram, ground is represented in a couple of common formats, illustrated in Fig. 1.2. The final point about voltage concerns its time behavior. Some voltages, such as those derived from batteries, are inherently constant in time. These are referred to as DC (derived from direct current) voltages. Alternatively, the voltage may depend on time, i.e. V = V(t). These are referred to as AC (derived from alternating current) voltages. A very commonly encountered time dependent voltage is a sinusoidal voltage given by,

V (t) = V0 cos(t + )

(1.3)

where V0 is the maximum amplitude of the signal, is the (radial) frequency, and is the phase angle. It is also possible to combine AC and DC voltages to produce composite voltages of the form,

V (t) = VDC + V0 cos(t + )

(1.4)

where VDC refers to a time-independent offset added to the time-varying part of the voltage. Clearly, eqn. 1.3 implies that voltage can be either negative or positive, with the simple physical interpretation that electrons intrinsically move toward more positive voltages. Finally, we end this brief overview by introducing a mathematical device for simplifying work with timedependent, i.e. AC, voltages, phasor notation. In this notation we take advantage of the fact that any complex quantity, C = a + ib, can be represented in polar form as,

C = re i
where

(1.5)

b r = a 2 + b 2 ; = tan1 a
Now taking advantage of the identity,

(1.6)

e i = cos + isin ei = cos isin

(1.7)

we can construct arbitrary time-dependent voltages, by noting that,

cos(t + ) =

e i(t + ) + ei(t + ) 2
2

(1.8)

Chemistry 30333 Electronics for Chemical Instrumentation

Thus, the prescription for exploiting the phasor notation to make your life simple is: 1. Express the AC voltage of interest in terms of the first term in the numerator above. For example, V(t) = V0 cos t would be expressed as V0 exp(it). Note carefully that the exact equivalence is given in eqn. 1.8; the term used here is just the 1st term in the numerator of the exact expression. 2. Perform all the signal manipulation calculations you need to perform in the phasor notation, using the simplified expression above. 3. When you are ready to recover the exact answer, just write down the complex conjugate of the expression obtained at the end of step 2, sum them and divide by 2. Again, we stress that these manipulations are for computational convenience only. No additional information is required or added by performing the computations with phasor notation. 1.2 Current. While voltage is fundamental, the point of electronic circuitry is frequently to produce and manipulate electrical currents, I, which can be defined as the time rate of change of charge at a given point in a circuit, i.e.

I=

dQ dt

(1.9)

Another way to think about current is as a flux of charge. Current is measured in the SI system in units of Amperes, with 1 Ampere being equal to a charge flux of 1 C s-1. Aside from the fundamental physical origins of the two quantities voltage being a potential energy difference and current a charge flux many other things about them are similar. For example, current can be either positive or negative, corresponding to the direction of electron flow in a circuit; current can be either DC or AC (now the notation actually makes sense); and AC currents can be handled using the same phasor approach we developed for voltages above. For example, I(t) = I0 cos t can be represented by I0 exp (t) and handled according to steps 1-3 above. 1.3 Passive Circuit Elements. The whole point of electrical circuits is to combine physical elements that behave with unique current-voltage relationships, I = f(V), in such a way as to manipulate signals in interesting and useful ways. A very common I-V relationship that applies to a specific class of electrical circuit elements is given by the famous Ohms Law,

V = IR

(1.10)

Circuit 1 C

where R, the resistance measured in ohms, , is a proportionality constant that specifies the voltage needed to produce a given magnitude current. Undoubtedly you already know that a voltage of 1 V will produce a current of 1 A in a 1 resistance. Physical resistors come in values in the range ~1 108 , and with this knowledge we are ready to construct our first circuit, Ckt. 1. 3

Chemistry 30333 Electronics for Chemical Instrumentation

What questions can reasonably be answered about Ckt. 1? We might reasonably want to know: (1) how much total current flows from supply to ground and (2) how is the current divided between the two current paths, R1 and R2. In order to answer the questions, we need to introduce two very useful laws. Kirchoffs Law: This law deals with circuit nodes, i.e. points at which one or more incoming and outgoing current paths intersect and says that the sum of all incoming currents must equal the sum of all outgoing currents, i.e.

in

= Iout

(1.11)

Parallel Elements: This law deals with parallel circuit elements and states that the voltage dropped across parallel elements must be equal. We can now usefully apply these two laws to the analysis of the above questions. First, Kirchoffs Law says that the (positive) current entering the top node will be divided into two outgoing currents, I1 flowing through R1 and I2 flowing through R2. However, it does not tell us the magnitudes of I1 and I2. To determine that we need to apply Ohms Law (eqn. 1.10). In doing this, clearly the applied voltage is 5 V, but what do we use for R, since there are two resistors in the network. Here we utilize a trick to replace the pair of resistors with a single equivalent resistance, determined by the (hopefully) familiar formula,
1 Requiv =
n

1 i=1 Ri

(parallel)

(1.12)
(series)

Requiv = Ri
i=1

In our case,
1 Requiv = 1 1 1 = + ; 1000 2000 i=1 Ri
2

Requiv = 666

Now, we simply apply eqn. 1.10, which yields,

Itotal =

V 5V = = 7.5 mA Requiv 666

Clearly, 8.33 mA is the total current entering the top node of Ckt. 1, but how much flows into each branch of the circuit. We could set up the simultaneous equations for I1 and I2, but there is an easier way. We simply recognize that the total voltage dropped across each resistor must be the same, namely 5 V. Then we can apply Ohms Law to each branch in sequence, i.e.
Chemistry 30333 Electronics for Chemical Instrumentation

V 5V = = 5mA; R1 1k V 5V I2 = = = 2.5mA R2 2k I1 =

Notice that our answers are internally consistent, i.e. I1 + I2 = Itotal. Furthermore, note that the fraction of the current flowing in each branch is inversely proportional to the resistance in that branch a general observation impedance (i.e. resistance) networks. We went through this for example in significant detail, because all resistor network problems can ultimately be handled using combinations of these simple steps. The second commonly used passive circuit element is the capacitor. As the name implies, capacitors are charge storage devices, and the value of capacitance, C, measured in Farads, denotes the ability of the particular component to store charge. Capacitors are governed by,
Q = CV

(1.13)

and, because the current is the time derivative of charge we can relate the current through a capacitor to a time-varying voltage, dQ dV I= =C (1.14) dt dt Right away we can see that capacitors will behave in fundamentally different ways from resistors when voltages are applied across them, because the I = f(V) is different. In general, when a voltage is initially applied across a capacitor, the capacitor will begin to charge, meaning that charge separation begins to occur. Eventually the capacitor will become fully charged. The time it takes for this to happen is determined by the value of the capacitance and the total resistance through which the capacitive current must flow. As an example, consider Ckt. 2, where the capacitor and resistor are in series. At time t < 0, the applied voltage, Vin = 0, so the output voltage, Vout Circuit 2 = 0 also. Upon application of a step-input voltage, Vin at t = 0, all of the voltage immediately appears across the resistor, because the capacitor has not had time to rearrange any of its charge. We begin by recognizing that all of the current flowing in the circuit has to be the same through both elements, i.e. none flows through the external impedance of whatever instrument is being used to measure Vout. Thus,

Vout = IR = RC

dV dt

(1.15)

Chemistry 30333 Electronics for Chemical Instrumentation

We arrived at eqn. 1.15 through direct application of eqn. 1.14, but the equation is somewhat ambiguous, because it does not tell us what the value of V is. Clearly this must be the voltage across the terminals of the capacitor, i.e. Vin Vout. Thus, the correct equation is,

Vout = IR = RC

d (Vin Vout ) dt

(1.16)

Because the input voltage does not change, its time derivative is zero, so we have,

Vout = RC

dVout dt

(1.17)

This is a simple boundary value problem of the type you have seen before. Rearranging and directly integrating yields,

dVout 1 = dt; Vout RC t lnVout = +K RC

(1.18)

where K is a constant of integration. Exponentiating both sides yields,

Vout = e K et / RC = V0et / RC

(1.19)

where we have re-labeled the constant of integration as V0. To finish up we simply re-use the initial condition that at t = 0, Vout = Vin, finally giving us,

Vout = Vin et / RC

(1.20)

Apparently the behavior of the simple RC circuit is an exponential charging curve, where the speed of the charging is governed by the value of RC, which has units of time, i.e. expressing R in ohms and C in Farads produces a product with units of seconds. A practical note capacitance values found in typical electrical circuits in instrumentation have values in the range 10-12 F < C < 10-6 F and are either denoted in units of pF (1 pF = 10-12 F) or F (1 F = 10-6 F). Thus, a value of 10-9 F will be specified as 1000 pF, never as 1 nF. Thus, if we had chosen, C = 1000 pF and R = 1 k, the RC time constant would be (10-9 F) x (103 ) = 10-6 s = 1 s. If we choose an arbitrary value of 5RC as the time it takes the voltage to reach its steady state value, then 5 s after application of Vin the voltage would appear entirely across the capacitor, and Vout ~ 0. Now having gone through this example in detail you should be able to derive (or at least convince yourself) that Ckt. 3 would be Circuit 3 governed by,
Chemistry 30333 Electronics for Chemical Instrumentation

Vout = Vin (1 et / RC )

(1.21)

Note that the physical behavior of the elements in the two circuits is exactly the same, i.e. all of the voltage initially is dropped across the resistor, then as time passes more of the voltage is dropped across the capacitor until at some later time (t > 5RC) all of the voltage appears across the capacitor.

Figure 1.3. An input square wave with frequency 2.77 kHz (dashed line, T = 360 s) and the associated output voltages from Ckt. 2 with two values of RC 18 s (red) and 1.8 ms (blue).

We can extend this analysis for both circuits by considering a square wave input and then use the behavior in response to step changes in applied potential to develop the behavior in each halfcycle. The behavior for Ckt. 2 is shown in Fig. 1.3. The applied potential ( ) is a square wave with frequency f = 2.77 kHz (T = 360 s). When 1/RC >> f ( ), the full exponential decay of the output voltage, indicated in eqn. 1.20 is apparent. One can easily see that as the RC time constant is made smaller (1/RC larger), the limiting output would be a series of sharp spikes nearly coinciding with the voltage steps positive spikes for positive-going changes in the voltage and negative spikes for falling voltage edges. Alternatively, when 1/RC << f ( ), the exponential decay does not proceed very far before the voltage switches again, and the voltage changes very little from Vin during the time of the half-cycle. Again one can easily see that as the RC time constant is made larger (1/RC smaller), the limiting output would be negligibly different than the input. Thus, the overall behavior of this circuit for a square-wave input is to produce a series of spikes for low frequency (f << 1/RC) inputs, but to produce a faithful replica of the input for high (f >>1/RC) frequencies. This is exactly the behavior of a high-pass filter, so called because high frequencies are passed undiminished, while low frequencies are severely attenuated.

Chemistry 30333 Electronics for Chemical Instrumentation

The same analysis can be applied to Ckt. 3, as shown in Fig. 1.4. The applied potential is again a square wave with frequency f = 2.77 kHz (T = 360 s). When 1/RC >> f (red), the full exponential rise of the output voltage, indicated in eqn. 1.20 is apparent. One can easily see that as the RC time constant is made smaller (1/RC larger), the limiting output becomes a better and better reproduction of Vin. Alternatively, when 1/RC << f (blue), the exponential rise does not proceed very far before the voltage switches again, and the voltage changes very little during the time of the half-cycle. Again one can easily see that as the RC time constant is made larger (1/RC smaller), the limiting output would be negligibly different than 0V. Thus, the overall

Figure 1.4. An input square wave with frequency 2.77 kHz (dashed line, T = 360 s) and the associated output voltages from Ckt. 3 with two values of RC 18 s (red) and 1.8 ms (blue).

behavior of this circuit for a square-wave input is to produce little deviation from zero for high frequency (f >> 1/RC) inputs, but to produce a faithful replica of the input for low (f << 1/RC) frequencies. This is exactly the behavior of a low-pass filter, so called because low frequencies are passed undiminished, while high frequencies are severely attenuated. Now there is little hope of keeping all of this straight without significant experience, so it is a worthwhile exercise for students encountering simple filters for the first time to make a 2 x 2 table of low and high frequencies and both kinds of circuits. A couple of additional notes in regard to electronic filtering. First, although these circuits certainly do display filtering behavior they are hardly ever used for any but the most rudimentary filtering applications. Largely this is due to the frequency behavior of these simple filters. If we define a transfer function for the filter,
T= Vout Vin

(1.22)

and measure Vout just prior t the end of the half-cycle, then we would immediately recognize that T is a function of frequency, T = T(). If T() is plotted vs. log , then the resulting Bode plot explicitly shows how sharp the frequency cutoff is for a given filter, cf. Fig. 1.5. Typically simple filters, such as those represented by Ckts. 2 and 3, do not exhibit sufficiently sharp
Chemistry 30333 Electronics for Chemical Instrumentation

frequency cutoffs to be of more than limited utility. The second point also refers to the Bode plot and introduces a very central, but frequently misunderstood concept, namely the frequency bandwidth, . Figure 1.5 illustrates how this information is commonly conveyed. The y-axis is the transmittance, T, expressed in units of dB.
T (dB) = 20log10 Vout Vin

(1.23)

This is done to make the display of widely varying quantities practical. Note that frequently the relevant Figure 1.5. Bode plot for the frequency response of an idealized measured quantities are powers, Butterworth filter with a cutoff (3 dB) frequency of 1 s-1. rather than voltages, and since power scales as P ~ V2, the factor of 20 is replaced by 10 in eqn. 1.23. Thus a transmittance value of -20 dB corresponds to Vout = Vin/10. Also note that frequencies < 1 s-1 are denoted as the passband, while frequencies > 1 s-1 are denoted as the stopband. The bandwidth is simply the width of the pass band in frequency space. In our example here, the bandwidth contains all frequencies between 0 and 1 s-1, so = 1 s-1. Of course, you will also often see frequency displayed in units of circular, rather than angular, frequency. The two are related by = /2, so = /2. The bandwidth, although it is a frequently cited quantity, is a fuzzy quantity in the sense that the circuit response does not drop abruptly to zero outside the passband, but rather falls off in a gentler fashion, as shown in Fig. 1.5. The last issue to raise with regard to capacitors and their behavior concerns the equivalent of resistance, called capacitive reactance, or more generically, impedance. The basic idea can be gained by considering the simple circuit shown in Ckt. 4. Here the input voltage is a pure sinusoidal voltage, so we can use the phasor notation to write,
V (t) = V0 cos(t + ); or V (t) = V0e it e i

Circuit 4

(1.24)

so if we use eqn. 1.14, I = C(dV/dt),

I(t) = CV0 sin(t + ); or I(t) = iCV0e i(t + ) = iCV (t)

(1.25)

Chemistry 30333 Electronics for Chemical Instrumentation

Thus, if we recognize a generalized form of Ohms Law, V=IZ, where Z is a generalized form of resistance, called impedance (generally) or capacitive reactance. For the case of a capacitor, as shown in Ckt. 4, the capacitive reactance is given by comparing eqn. 1.25 to the generalized form of Ohms Law, to yield,

Z( ) =

1 iC

(1.26)

As we might guess from the form of the impedance in eqn. 1.26, the way in which combinations of capacitors are accounted for is different than it is for resistors,
1 Cequiv =
n

1 i=1 C i

(series) (parallel)

Cequiv = Ci
i=1

(1.27)

One final word about simple passive components. Less frequently used are inductors, which are nothing more than small solenoids, coupling electric and magnetic fields. These passive components are governed by,
Z( ) = iL

(1.28)

where L is the inductance in Henrys (H). Inductors are governed by an f(V) relationship given by, dI V =L (1.29) dt where a voltage of 1 V across an inductance of 1 H corresponds to a rate of change in the current of 1 A s-1. Before leaving our consideration of circuits built on purely passive elements, we introduce one last, extremely important and ubiquitous, idea the voltage divider. Consider the circuit shown in Ckt. 5. Lets illustrate the principle with a specific example; suppose Vin =10 V. Then we can immediately calculate the total current flowing because there is only one current path, and the current will be given by the input voltage and the total resistance, I = Vin/(R1 + R2 + R3 + R4) = 10 V/10 k = 1 mA. Now that we know the total current we can Circuit 5 calculate the voltage at all of the intermediate points in the circuit by calculating the voltage dropped across each individual resistor. For example, the voltage across R1 is given by V = (1 mA)(1 k) = 1V. Thus, the voltage between R1 and R2 is
Chemistry 30333 Electronics for Chemical Instrumentation

10

V12 = Vin - V = 10 V 1V = 9V. Now, the voltage dropped across R2 is (1 mA)(2 k) = 2 V. Therefore, the voltage V23 = V12 2 V = 7 V. The voltages dropped across R3 and R4 are subsequently given by (1 mA)(3 k) = 3 V and (1 mA)(4 k) = 4 V, respectively, giving V34 = V23 3 V = 4 V. Thus, the simple circuit gives a series of voltages at the intermediate points that are determined by the relative magnitude of the resistances. For example, if we had chosen R1 = R2 = R3 = R4, then independent of the specific values chosen, the voltages dropped across each of the resistors would be the same, and the voltage would drop in four equal increments from the 10 V input to ground. Apparently then, the voltage divider provides a series of voltages at the intermediate points of the circuit that are proportional to the ratio of the remaining resistances to Vin. The voltage divider in its many guises is probably the most commonly encountered circuit element. A specific realization of the voltage divider that is particularly useful in chemical instrumentation is the Wheatstone bridge, shown in Ckt. 6. First, a note about schematic reading the arrow over the resistor Rb indicates that this resistor is variable, i.e. it can be changed during circuit operation, either manually or, more commonly today, automatically as part of a control circuit. The analysis of the circuit starts with the fact that the two voltage dividers R1-Rb and R2-Rx are in parallel, so Vin must be dropped across both pairs, i.e. I1(R1 + Rb) = I2(R2 + Rx), and Rb is adjusted to Circuit 6 make Vbal = 0, i.e. I2Rx = I1Rb and I1R1 = I2R2. We can solve the first equation for I2 = I1(R1 + Rb)/(R2 + Rx). After some algebra, we finally obtain,
Rx = R2 Rb R1

(1.30)

Rarely do we actually use the bridge to actually measure the value of Rx. More commonly, we measure the amount that Rb must be changed in order to keep Vbal = 0, i.e. the null condition. As a specific example the commonly encountered thermal conductivity detector in gas chromatography places a heated filament with resistance Rx(T) in the effluent stream of the GC. Small changes in the gas composition cause the thermal conductivity to change which changes the temperature and, therefore, the resistance, Rx, to change. Rb is continually altered to maintain the null condition, Vbal = 0, and the signal required to do this is logged as the GC detector output voltage. 1.4 Active Circuit Elements. Although there are a number useful functions that can be accomplished with combinations of passive components only, to realize the full potential of modern electronics, we need to take advantage of so-called active components. The first element that we introduce is the diode, represented by the triangle-bar symbol in Ckt. 7. First, lets explain the symbol. Diodes, as the name implies are bipolar devices with an anode (excess positive carriers, i.e. holes) and a cathode (excess negative carriers, i.e. electrons). The mnemonic to remember how the diode is oriented is The arrow points north, where north stands for the n-type material (i.e. the material with excess electrons). Under forward bias conditions, this is the electrode that serves as the cathode. An alternative way to think about it is 11

Chemistry 30333 Electronics for Chemical Instrumentation

that a negative voltage applied to the cathode will repel the electrons in the n-type region, driving them over the barrier and into the p-type material, thereby supporting an electrical current. The I = f(V) relationship of the diode can be expressed mathematically, but it is much simpler to just refer to the graph of the I-V characteristic, an example of which is shown in Fig. 1.6. First, note that the y-axes are asymmetric, with reverse bias currents in the low range, while forward bias currents are orders of magnitude larger (mA). Second, there is a large asymmetry between the forward and reverse-bias voltage axes. While the forward bias current turns on at a voltage near 0.7V (Si diodes) or 0.3 V (Ge diodes), the large increase in reverse current occurs at much larger Figure 1.6. I-V characteristic of a typical Si diode. voltages, 75-100 V is a typical value. Both x- and y-axes are asymmetric. Adapted from In fact, there are specific diodes which koala.ece.stevens-tech.edu/~utureli are meant to be run in reverse bias /EE359/lecture/uncompressed/lecture2.ppt. mode, called Zener diodes. Third, there is a sharp increase in the forward bias current past the threshold or turnon voltage, meaning that the forward bias voltage is held very close to the threshold voltage due to current limitations under normal circumstances. As an example of this phenomenon, consider Ckt. 7 with R = 1 k and Vin = 10 V. Even if there were no resistance at all in the diode, the maximum current would be 10 mA. However, this current occurs in the steeply rising portion of the I-V characteristic and naturally limits the voltage dropped across the diode, e.g. the 1N4148 Si diode would limit at ~ 0.7 V forward bias voltage under these conditions, and the remainder of the voltage would be dropped across the load resistance, R. Circuit 7 By far the dominant application of diodes exploits their unidirectional conduction properties. The circuit shown in Ckt. 8 illustrates the point. A square wave input, symmetric about 0 V, is differentiated by the C-R1 combination to produce a series of alternating positive- and negative-going spikes at the input of the diode, D1. Assuming that the spikes are larger than Circuit 8 0.7 V, the forward spikes (less the 0.7 V
Chemistry 30333 Electronics for Chemical Instrumentation

12

forward bias voltage) are passed on to the output and dropped across output resistor, R2. Of course, we could have chosen to turn the diode around and passed only the negative-going spikes. A slightly more complicated variant of the diode is the bipolar transistor, essentially the circuit element on which the electronics revolution was based. These devices are signified by the symbol shown in Fig. 1.7 and always have 3 terminals emitter, base and collector. These 3 terminals are either n-p-n or p-n-p. In other words the base is composed of Si doped with the opposite polarity material as the emitter and collector. Standard circuit drawing conventions always place the arrow at the base-emitter junction, and again we use the mnemonic arrow points north to determine which terminal is n-type (frequently in modern practice the circle is Figure 1.7. omitted). Clearly the device shown is an npn transistor. Basically, we will Symbol for npn be concerned with an extremely limited set of transistor behavior, transistor. determined by a simple set of rules: (1) The collector must be more positive than the emitter for an npn (reverse this for a pnp); (2) The base-emitter and base collector junctions act like diodes normally the base-emitter is conducting and the basecollector is not; (3) The circuit must be designed not to exceed maximum values of IC, IB and VCE; and (4) If rules 1-3 are obeyed then the current flowing in the collector arm is determined by
IC = hFE IB

(1.31)

where hFE is the transistor gain, typically of the order hFE ~ 100. Essentially the simple bipolar transistor is a current amplifier, where the current flowing in the collector arm is a large multiple of the current in the base. This property has an enormous number of useful consequences, of which we will examine only one, illustrated in Ckt. 9, the emitter follower. First, as long as Vin stays below about 10.7 V, the base-collector junction is reversebiased, as required by rule 1. Then, forward biasing the base-emitter junction requires ~0.7 V, so the emitter voltage is the base voltage less the forward bias requirement, i.e. Vout = VE = VB 0.7 V. Whenever VB changes, the output voltage faithfully follows the change, minus the 0.7 V forward bias. {Parenthetical but important! remark. Circuit 9 This seems to be a fairly trivial accomplishment, so what is the point of the emitter follower in a phrase its load management. In chemical instrumentation we often encounter measurement components that have extreme values of impedance; a good example is an indicating electrode used in potentiometry which can have an
Chemistry 30333 Electronics for Chemical Instrumentation

Circuit 10 13

equivalent input impedance near the G range. Lets think about the problem presented in Ckt. 10, where Vm is a voltage measuring device, e.g. a voltmeter. Up to this point we have been thinking about voltage measurements as an ideal process, by which we mean that the process of measuring the voltage does not perturb the circuit in any way. However, this is never strictly true. Just to the side of the voltmeter is a small resistor, Rm, which is meant to convey the idea that the voltmeter has an internal resistance, called the input impedance. If we want to measure the voltage being dropped across resistor R2, then we want the input impedance, Zin, to be as high as possible. Lets see why. Suppose Vin = 10 V, and R1 = R2 = 1 M. Then, the ideal voltage dropped across R2 is just 5V, as given by the voltage divider equation. Suppose that we are using a Keithley 2000 6-1/2 digit voltmeter with an input impedance rated at 10 G. Now, as the arrows indicate, current splits at the circuit branch point with part going through each arm. Now we can exercise a straightforward (but tedious) voltage divider analysis by (1) calculating the equivalent resistance, Requiv, of the R2-Zin parallel combination; (2) calculate the total current Itotal = Vin/(R1 + Requiv); (3) solve for the current spit in the lower half of the circuit, Im = (R2/R2 + Rm)Itotal; (4) finally calculate the measured voltage using Vm = ImZin. When we go through this for the case stated, we find that Itotal = 5.000 25 A, and Vm = 4.999 75 V. Since the ideal voltage would be 5.000 00 V, the error is (5.000 00 4.999 75)/5V = 0.005%. Now consider the case where we are trying to measure the voltage of an indicating electrode presenting an output impedance of 1 G. The same process leads to Itotal = 5.2381 nA, and Vm = 4.7619 V, for a relative error of 0.24 V/5 V = 4.8%. Now the fractional error we are willing to tolerate will depend on the application to which the voltage measurement is put, but 5% is too large for most chemical determinations. The solution of course is to use a voltage measuring device with a much higher input impedance. Fortunately for us such instruments exist; for example there are special electrometers built exactly for this type of application with Zin values ~ 2 x 1014 . End of parenthetical remark} With this background we can now analyze the behavior of the emitter follower with respect to load management. Previously we noted that Vout = VE = VB 0.7 V. Clearly, any change in the base voltage will immediately be recognized at the emitter, i.e. VB = VE. he change in emitter current is then IE = VB/R. Now using eqn. 1.31 and IE = IC + IB, we get IE = hFEIB + IB = (1 + hFE)IB. Rearranging,
IB = 1 I ; (1+ hFE ) E

1 IB = I (1+ hFE ) E

(1.32)

and combining with the expression for change in emitter current yields,

IB =

VB (1+ hFE )R
14

(1.33)

Chemistry 30333 Electronics for Chemical Instrumentation

Finally we are ready to recognize the input impedance of the emitter follower as,
Z in = VB = (1+ hFE ) R hFE R IB

(1.34)

Typically the value of the transistor gain, hFE ~ 100, so the input impedance is the actual load resistance R multiplied by ~100, making the load much easier to drive it draws a factor of 100 less current than the load would by itself. Now lets turn the problem around and use the emitter follower in Ckt. 9 on the output end of a driving circuit. The output impedance will be governed by the quantity, VE/IE. Using the relations, VB = VE and IE = IC + IB, we can derive an expression for the output impedance. Suppose the base voltage is being determined by another circuit with characteristic voltage and impedance, Vsource and Zsource. Then,
IB = VB Z source

(1.35)

and
(1+ hFE )VB = (1+ hFE )VE IE = (1+ hFE )IB = Z source Z source

(1.36)

so

Z out =

VE Z source = IE 1+ hFE

(1.37)

Thus, the output impedance is lowered by the same factor that the input impedance was raised. If we think back to the example in the parenthetical remark, we could run the output of our 1 G indicator electrode through an emitter follower with hFE ~ 100 and produce a voltage source with an equivalent output impedance of ~10 M, thereby making the measurement problem much simpler and reducing the measurement error. It is hard to overemphasize the importance of loading in electrical circuitry and, by extension, in chemical instrumentation. Together with ground loops (another pernicious problem that we will not be able to address) in this class, they represent one of the biggest problems to the design of highly functional circuitry for chemical instruments. We always want to design for high input impedance and low output impedance. The terminology we use is that poorly designed (or just intrinsically high output impedance) source circuits will load the measurement device, leading to inaccurate measurements. Finally we note that there are an enormous number of different uses for and types of transistors. We have specifically addressed one application of bipolar transistors, and mainly as a way to introduce the important topic of loading. The other major type of transistor function is provided
Chemistry 30333 Electronics for Chemical Instrumentation

15

by so-called field-effect transistors, or FETs, where the application of a gate voltage, VG, controls the passage of current from a source to a drain contact, IDS. These devices are extraordinarily useful; in fact the majority of contemporary digital logic is based on the complementary metal oxide semiconductor (CMOS) version of FETs. 2. Integrated Circuits and Instrumentation Systems 2.1 Operational Amplifiers. If we had to rely on individual components to assemble the electronic functions we have al come to now and love, then your personal music device would be the size of a room. What powered the electronics revolution was the development of the integrated circuit, or IC. In an IC all of the circuit components are fabricated into a single piece of silicon, utilizing suite of technologies ranging from photolithography for pattern transfer to high temperature diffusion to alter the conductance properties of exposed portions of the silicon wafer. For our purposes we need not concern ourselves with how ICs are made but can treat them as functional elements to be incorporated into chemical instrumentation to produce modules of great power and utility. A particularly useful and ubiquitous integrated circuit is the operational amplifier (op amp), essentially a multi-stage differential amplifier designed to exhibit extremely large open-loop gain values, A ~ 106, very high input impedance and very low output impedance. Based on what we just learned about load management, these sound like intriguing properties. In addition, it is usually utilized in combination with negative feedback to control the output, but before we introduce this concept, lets take a look at what the packages look like and how they are represented. Figure Figure 2.1. (Top) Photograph of 2.1 shows the circuit diagram for a 8 DIP (dual in-line package) modules. At the lower left generic op amp and a photograph of is the famous 741C op amp. (Bottom) Complete circuit a set of individual ICs. We can see graphic representing an op amp. Typically the positive from the figure that the device is a (VS+) and negative (VS-) supply voltages are not shown in the circuit diagram, even though they must always be 3-terminal device with two additional power supply inputs. present for the device to function. The 3 additional connections in the 8-pin DIP are typically either used for null offset or are left unconnected. The two input connections labeled V+ and V- are the noninverting and inverting inputs, respectively. As shown in the configuration of Fig. 2.1, the op amp output would be governed by the simple equation,

Chemistry 30333 Electronics for Chemical Instrumentation

16

Vout = A(V+ V )

(2.1)

with the caveat that the maximum (minimum) voltage output is governed by VS+ (VS-). In other words, the output voltage can never be greater than VS+ or less than VS-. Thus, if A = 106 and |VS| = 10 V, then the measurable voltage difference between the (+) and (-) inputs would be 10 V. Any V greater than 10 V would result in the output limiting at either VS+ or VS-. Of course, the specific voltage range depends both on A and the supply voltages, but the point is that very little difference in the input voltages causes the output to slew to its positive or negative limit, according to eqn. 2.1. Since voltages used in practical circuits would rarely need to be discerned with this level of precision, the op amp would seem to have limited utility, outside of the (useful) function of acting as a voltage comparator. The development that saves the op amp and adds great power and flexibility to its operation is the feedback loop, more specifically negative feedback, as shown in Ckt. 11. The feedback loop shown here between the output and the Circuit 11 inverting input produces behavior such that the op amp adjusts the output to keep the two inputs equal, i.e. V+ = V-, or in the case of Ckt. 11, since the output is connected directly to the inverting input, Vout = V+, effectively forming a voltage follower. Again, just as in the case of the emitter follower, there is no voltage gain, but as you might have guessed there is great capacity for load management; in fact instead of simply increasing (decreasing) the input (output) impedance by hFE, the op amp inherently has a very large Zin and a very low Zout. Thus, the voltage follower shown in Ckt. 11 performs the very useful function of isolating the load from the drive circuitry. In fact the concept of negative feedback is so powerful that it gives rise to two ideal properties that can be used to evaluate the function of the vast majority of op amp circuits. They are: 1. The op amp adjusts the output to keep V+ = V-, and 2. The op amp draws no current, i.e. Zin = . To see how useful these properties are, lets take a look at a few op amp circuits using feedback. Ckt. 12 shows a very simple design, that employs some common op amp circuit features. First, the non-inverting input is grounded. Thus, the inverting input, by property (1), is held very close to ground potential. It is said to be at virtual ground. Property (2) says that the op amp will draw no current, so all of the current Iin present at the inverting input is shunted through the feedback resistor producing an output voltage, Vout = -IinR, i.e. the Circuit 12 output voltage is proportional to the input current, effectively converting current to voltage, an extremely useful function for chemical instrumentation. To see why consider just two very different types of detectors, flame ionization detector used in gas chromatography and photomultiplier tubes used in various types
Chemistry 30333 Electronics for Chemical Instrumentation

17

of optical spectrometers. Both of these detectors produce a current signal, however, the computers used to run the instruments and log the data can record only voltages (vide infra). Thus, the current-to-voltage converter shown in Ckt. 12 is very handy. A slightly altered version of this circuit is shown in Ckt. 13. This circuit can be analyzed in essentially the same manner as was just used for Ckt. 12. The inverting input is held at virtual ground, and it draws no current. That means that the current coming into the input leg of the circuit, Iin = Vin/Rin, is equal in magnitude to the current in the feedback loop, If = -Vout/Rf. Equating the two yields,

Vout =
Circuit 13

Rf Vin Rin

(2.2)

Thus, the input voltage is inverted and amplified by the ratio Rf/Rin. We can extend this idea to make a summing arranged to sum at the (virtual ground) inverting input, as shown amplifier, if the input legs are in Ckt. 14. Now things are starting to get very handy; by choosing R1 =R2 =R3 =Rf, one can readily sum the three input voltages and obtain,
V V V Vout = R f 1 + 2 + 3 = (V1 + V2 + V3 ) R1 R2 R31

(2.3)

There are other useful combinations of the passive elements in the summing amplifier in Ckt. 14, e.g. choosing R3 = 2R2 = 4R1 produces an output that is the weighted sum of the inputs, and significantly the weighting factors vary by powers of 2, suggesting an application in converting the binary digits (bits) of a computer representation of a digital number to an analog voltage proportional to that number, i.e. a digital-to-analog converter, or D/A. This, in fact, is exactly how modern potentiostats produce voltage programs needed for Circuit 14 voltammetry experiments the computer designs the voltage program in software, and the digital values are fed to the reference electrode-working electrode pair through a high bandwidth D/A. We can, of course, put other circuit elements in the feedback loop. Replacing Rf of Ckt. 13 with a capacitor, C, produces a nearly ideal integrator. The current in the input leg, Vin/R must equal the current in the feedback loop, If = -dQ/dt =-CdVout/dt. Integrating this last equation yields,

Vout =

1 RC

in

dt + const.

(2.4)

Chemistry 30333 Electronics for Chemical Instrumentation

18

As you can imagine this is very handy. Frequently, it is necessary to vary some voltage in a linear fashion in time, i.e. to produce a ramp voltage. The ramp can produced quite nicely from an op amp integrator and a constant Vin. Choosing the RC time constant then sets the rate of increase (decrease) of the ramp. 2.2 Analog-to-Digital Conversion It will com as no surprise that measurements are typically carried out so as to produce analog (i.e. continuously varying) quantities, while digital computers need, well, digital information to process. Whole textbooks can be written about the various methods of analog-to-digital, or A/D, conversion, so we have time only to hit the high spots. We begin with the orientation that none of us in the chemical sciences are likely to build our own A/D, so we are faced with the task of purchasing A/D converters designed by someone else intelligently. The three principal figuresof-merit that we need to consider are: (a) range, (b) precision and (c) speed. All three parameters need to be carefully chosen and specified in order to optimize the performance/cost ratio. Generally we want enough performance to accomplish the measurement of interest, but extra performance costs more, so we want to be circumspect. Lets begin with a real example. Consider a flame ionization detector in a gas chromatograph capable of producing output currents in the range, 0 > Iout > 100 A being fed to a current-to-voltage converter with Rf = 50 k, thus converting the current to output voltages in the range, 0 5 V. This clearly sets the range needed for our application (logging the output of the gas chromatograph detector into the Figure 2.2. Arbitrary time-dependent computer for processing and display). Now the fun signal being sampled at regular begins. We have to decide what kind of precision we intervals. need for both the y- (voltage) and x- (time) axes. To understand lets look at a generic time-dependent signal, such as the one shown in Fig. 2.2. The figure makes the idea of sampling clear. We want to obtain specific digital representations of the waveform at regularly spaced time intervals, so that instead of being represented by the continuous curve in the figure, the waveform can be represented as a set of (voltage, time) pairs. The first problem is how frequently do we need to sample the waveform in order to obtain an accurate representation. Remember that we can go very fast indeed if we are willing to spend a lot of money, so there is a speed/cost trade-off that we have to consider in practice. Here we are guided by a very important concept known as the Nyquist Sampling Theorem, which states: Nyquist Sampling Theorem: In sampling an analog waveform the sampling frequency must be at least twice the highest frequency component found in the original waveform to avoid aliasing the results. Thus, once we know the bandwidth of the signals to be sampled, we can determine the maximum frequency needed for the A/D converter. But wait a minute you say, how do we know the
Chemistry 30333 Electronics for Chemical Instrumentation

19

maximum frequency associated with the data in Fig. 2.2, since it does not consist of regular periodic signals? There are several ways to get at this. First, one could acquire similar data, subject it to Fourier analysis and look for the highest significant amplitude components in the frequency domain. Admittedly this involves some work. Second, we could determine (for example by looking up the specs) the bandwidth of the detector being used. If the detector has a bandwidth of 100 Hz, there is little point in paying for a 1MHz A/D, since very little of the bandwidth would actually be used. Finally, we could assess the signal directly and make our choice based on an analysis of the time-domain behavior. Admittedly this latter approach is a bit seat-of-the-pants but it has the advantage of being simple, fast and cheap. Going along with our example, lets assume that the flame ionization detector is specified at a maximum bandwidth of 100 Hz. We could choose anything with 200 Hz or higher for A/D. Choosing a faster A/D would not hurt anything, but we would of course be paying for unused bandwidth. However, if we chose anything less than 200 Hz, then our A/D converter would introduce a deterministic error, known as aliasing, into the results. The other issue we need to consider is the precision of the A/D, typically specified by the number of bits, e.g. a 16-bit A/D has the capability to provide readings over its range with a precision of the range/216 = range/65,536. In our example above, that would provide us with (5 V)/65,536 = 76.3 V wide data bins. In other words, two adjacent digital values, say 2154 and 2155 would represent voltages separated by 76.3 V. A/Ds with up to 24-bits of precision are readily available commercially, so the choice is again one of price (you pay more for more bits) vs. performance. Most commonly the choice here is made based on the noise characteristics of the measurement. For voltages measured across resistive load, R, with bandwidth, f, the noise floor is determined by the Johnson noise given by,
VJ = 4kTRf

(2.5)

where k is Boltzmanns constant and T is the temperature in K. For the example considered here with f = 100 Hz and R = 50 k, the Johnson noise floor is ~ 300 nV. However, a typical flame ionization detector is much noisier then this thermal limit. Lets use a typical figure determined from the instrument of 1 mV. Under these conditions, the 16-bit A/D is overkill, because it would devote 2 mV/.076 mV ~ 26 units of measurement just to noise. Given these conditions we could get by with a (much cheaper) 12-bit A/D with a precision of 1.2 mV in a 5 V range. Alternatively, we do not want to do what Fig. 2.2 implies and introduce so-called digitization noise into the measurement. Notice just past halfway along the time axis the sampled data do not do a particularly good job of representing the data. Thus, we are looking for a compromise position, where we sample with enough precision to represent the data well, but not so much as to devote significant measurement capacity to noise. Finally we note that there are several different ways to accomplish the actual A/D conversion. They include successive approximation converters, sampling converters, and flash converters to name a few. A simplified circuit schematic for a very fast flash A/D converter is shown in Fig. 2.3. Clearly the successive comparators are arranged to have non-inverting inputs of 1 V, 2 V, 3 V,.. etc. The analog input voltage is available for comparison at the inverting input of all 7 comparators simultaneously. Thus, if the analog input is M volts, then all of the comparators <
Chemistry 30333 Electronics for Chemical Instrumentation

20

M will be negative, while the rest will be positive. The box labeled Encoder Logic, then takes this information and produces a 3-bit number. For example, if M = 5.2 V, then the first 5 comparators would be negative, and the output would be {101}. This type of A/D is very fast (hence the name) but extremely inefficient, since it requires 1 comparator for each distinguishable voltage level, e.g. an 8bit flash A/D would require 256 comparators. We could go on to explore the inner workings of other types of A/Ds, but for our purposes we do not care so much about the operational details but rather about their operating characteristics. 2.3 Lock-In Amplifiers Finally we end by taking a somewhat closer look at the concept of electronic noise. We have already encountered the concept of Johnson noise, the noise associated with the diffusive motion of electrons through resistive materials. Another fundamental limit is placed on electron transmission when the absolute number of electrons becomes small. Called shot noise, this type of noise arises from the discrete nature of electrons and has a magnitude given by,
Ishot = 2eIf

Figure 2.3. Flash A/D converter. Adapted from http://hyperphysics.phyastr.gsu.edu/hbase/electronic /adc.html

(2.5)

where e = electron charge = 1.6 x 10-19 C, I is the dc current magnitude and f is the measurement bandwidth. Like Johnson noise, shot noise is defined as an rms (root-mean-square) quantity, and also like Johnson noise it is Gaussian and white (frequency-independent). Shot noise is significant only at relatively small currents. If the current is 1 A and the measurement bandwidth 10 kHz, Ishot = 57 pA, or more to the point, Ishot/Idc = 0.0057%. However, if Idc = 1 pA, then the shot noise is 57 fA, Ishot/Idc = 5.7%. The Gaussian nature of shot (or Johnson) noise refers to its amplitude distribution, i.e.
2 expI 2 2Ishot p( I, I + dI ) = dI 2 Ishot

(2.6)

which gives the probability of a given current fluctuation having an amplitude between I and I + dI. Perhaps more important for this discussion is the fact that both Johnson noise and shot noise have flat frequency distributions, i.e. shot() = constant. Both shot noise and Johnson noise are fundamental, meaning that under normal circumstances, they are unavoidable. However, there are other sources of noise which can swamp these fundamental noise sources and these can (and must) be addressed by design. The most important source of noise is actually a whole family of noise sources, that is denoted by the common
Chemistry 30333 Electronics for Chemical Instrumentation

21

frequency spectrum and called 1/f noise. The 1/f frequency spectrum of this ubiquitous noise source, not to mention the fact that both Johnson and shot noise decrease as the square root of bandwidth suggest a generic approach to low noise measurements. What if we could arrange to make measurements where the 1/f noise is small, i.e. at high frequencies, and over a limited bandwidth, thereby making f small as well. Then we could address both issues simultaneously. There are a whole class of electronic measurement strategies that fit this description and are known generically as bandwidth-narrowing technique. We will consider only one such technique, lock-in detection. Figure 2.4. Schematic block diagram of a simple lockin amplifier. Adapted from www.ee.tamu.edu/People/ The basic idea for lock-in detection bios/hemmer_files/18-Lock-in-amplifiers.ppt is shown in Fig. 2.4. To begin lets assume that we are dealing with a time-periodic signal. If the signal is not naturally periodic, then we can always arrange to make it periodic by simply repeating the perturbation applied to the chemical system in a periodic fashion to yield,

E(t) = E S cos(t + )
This in turn can be mixed with (i.e. multiplied by) a reference square wave of the same frequency that transitions at the zeroes of sin t, 1; 0 < t < / E ref (t) = 1; / < t < 2 /

(2.6)

(2.7)

If we low pass filter the resulting output, thereby averaging the result over times long compared to the period, = RC >> 2/, the output will be,
1 Vout = E S cos(t + ) 2
0

E S cos(t + )

2E = S sin

(2.8)

where the angle brackets, denote a time average. The operation conveyed mathematically in eqn. 2.8 is carried out between the red box, labeled PLL for phase-locked loop, and the oscillating signal. The PLL is critical. It basically locks onto the frequency of the signal in such a way that if a frequency difference, , develops, the voltage-controlled oscillator, VCO, changes its frequency in such a way to drive the reference frequency in the direction to bring back to zero. This is good, but what if the relative phases just happen to be at a particularly poor
Chemistry 30333 Electronics for Chemical Instrumentation

22

value, e.g. = 0. Since we cannot control the phase of the experimental perturbation, in general, it is necessary to add a phase adjustment to the lock-in amplifier. This is typically under operator control via a front-panel adjustment. Finally, we also have to choose the low pass filter for the output again via a front panel adjustment. This is also important, because the bandwidth of the low pass filter effectively determines the pass band of the electronic filtering. Suppose we wish to perform an ac voltammetry experiment, where the potential is modulated by a small amplitude sine wave at 1 kHz added to the usual ramp voltage. We can de-modulate via a lock-in amplifier with say a = 1 s time constant, giving a bandwidth, 1/ = 1/(1 s) = 1 Hz. This is equivalent to making a new measurement covering the frequency range from 999.5 Hz to 1000.5 Hz, thereby discriminating against all of the low frequency noise sources, such as 1/f noise and power line bleedthrough at multiples of 60 Hz.

Chemistry 30333 Electronics for Chemical Instrumentation

23

You might also like