8
DIGITAL AND INTELLIGENT SENSORS
The overwhelming presence of digital systems for information processing and display in measurement and control systems makes digital sensors very attrac- tive. Because their output is directly in digital form, they require only very simple signal conditioning and are often less susceptible to electromagnetic interference than analog sensors. We distinguish here three classes of digital sensors. The ®rst yields a digital version of the measurand. This group includes position encoders. The second group relies on some physical oscillatory phenomenon that is later sensed by a conventional modulating or generating sensor. Sensors in this group are some- times designated as self-resonant, variable-frequency,orquasi-digital sensors, and they require an electronic circuit (a digital counter) in order to yield the desired digital output signal. The third group of digital sensors use modulating sensors included in variable electronic oscillators. Because we can digitally measure the oscillation frequency, these sensors do not need any ADC either. Digital computation has evolved from large mainframes to personal com- puters and microprocessors that o¨er powerful resources at low cost. Process control has similarly evolved from centralized to distributed control. Silicon technology has achieved circuit densities that permit the fabrication of sensors that integrate computation and communication capabilities, termed intelligent or smart sensors.
8.1 POSITION ENCODERS
Linear and angular position sensors are the only type of digital output sensors that are available in several di¨erent commercial models. Incremental encoders
433 434 8 DIGITAL AND INTELLIGENT SENSORS
Disk
Figure 8.1 Principle of linear and rotary incremental position encoders. (From N. Norton, Sensor and Analyzer Handbook, copyright 1982, p. 105. Reprinted by permis- sion of Prentice-Hall, Englewood Cli¨s, NJ.) are in fact quasi-digital, but we discuss them here because they are related. Each September issue of Measurements & Control lists the manufacturers and types of encoders.
8.1.1 Incremental Position Encoders An incremental position encoder consists of a linear rule or a low-inertia disk driven by the part whose position is to be determined. That element includes two types of regions or sectors having a property that di¨erentiates them, and these regions are arranged in a repetitive pattern (Figure 8.1). Sensing that property by a ®xed head or reading device yields a de®nite output change when there is an increment in position equal to twice the pitch p. A disk with diame- ter d gives
pd m 8:1 2p pulses for each turn. This sensing method is simple and economic but has some shortcomings. First, the information about the position is lost whenever power fails, or just after switch-on, and also under strong interference. Second, in order to obtain a digital output compatible with input±output peripherals in a computer, an up± down counter is necessary. Third, they do not detect the movement direction unless additional elements are added to those in Figure 8.1. Physical properties used for sector di¨erentiation can be magnetic, electric, or optic. The basic output is a pulse train with 50 % duty cycle. A toothed wheel or etched metal tape scale of ferromagnetic material yields 8.1 POSITION ENCODERS 435
Figure 8.2 Di¨erent sensors for magnetic incremental position encoders. (a) Coil and magnet (courtesy of Orbit Controls). (b) Toroidal core. a voltage impulse each time it passes by a ®xed coil placed in a constant mag- netic ®eld, as shown in Figure 8.2a. The resulting signal is almost sinusoidal, but it is easy to convert it into a square wave or just to determine its zero crossings. There is a minimal and maximal velocity that determines the appli- cation range for this method, which is used, for example, in antilock braking systems (ABS) in cars. Alternatively, an AMR or GMR sensor (Section 2.5) can replace the coil to obtain a change in resistance whose amplitude does not depend on the turning speed. Figure 8.2b shows another inductive system but this time based on a toroid with two windings. One winding is used for exciting, using currents between 20 kHz and 200 kHz, and the other is used for detection. There are two output states: ``1'' when no voltage is detected and ``0'' when a voltage with the excit- ing frequency is detected. The moving element includes regions with magne- tized material. Each time one of these regions passes in front of the reading head, the core saturates because the ¯ux emanating from the material adds to the ¯ux created by the exciting signal. When the core saturates, the secondary winding does not detect any voltage (e dF=dt, with F constantÐsaturation 436 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.3 Silver-in-glass technology for contacting incremental position encoder (courtesy of Spectrol).
¯ux): state ``1.'' When there is a region with no magnetization in front of the reading head, the secondary winding detects a voltage induced by the primary, state ``0.'' A Hall e¨ect sensor (Section 4.3.2), magnetoresistor (Section 2.5), or Wiegand sensor (Section 4.2.6) can replace the toroidal core. Inductive en- coders are sensitive to stray magnetic ®elds. Electric encoders can be capacitive or contacting encoders. Capacitive en- coders use a patterned strip such as that in the InductosynTM (Section 4.2.4.3) but without shielding between the scale and the ruler. This yields a cyclic change in capacitance with a period equal to the pitch, which can be as low as 0.4 mm. The contacting encoder in Figure 8.3 has a moving element formed by an alumina substrate with a fused glass layer and a conductive palladium±silver pattern screen printed on top of the glass. When kiln-®ring during the fabrica- tion process, the conductive pattern sinks into the glass to yield a 5 mmto8mm step-height di¨erential between the conductor and the insulator surface. The wiper is from precious metal. Former encoders with copper foil etched on printed circuit board had 25 mmto35mm steps, which increased wear and contact bouncing. This silver-in-glass technology o¨ers low cost, ruggedness, high-resistance to corrosion, and life expectancy of up to ®fteen million cycles, far above the 100,000 cycles of former PCB designs. Optical encoders can be based on opaque and transparent regions, on re- ¯ective and nonre¯ective regions, and also on interference fringes. Whatever the case, the ®xed reading head includes a light source (infrared LED), and a photodetector (phototransistor or photodiode). Main problems result from dust-particle buildup, time and temperature drifts for optoelectronic compo- nents, and vibration e¨ects on focusing elements. High-performance sensors have either a lens or an aperture to provide collimated light output and minimal spurious re¯ections. When opaque and transparent regionsÐchromium on glass, slotted metal, and so forth (Figure 8.4a)Ðare used, the emitter and the receiver must be placed on each side of the moving element. In contrast, when relying on re¯ec- tive and nonre¯ective zonesÐfor example, polished steel with an engraved surface (Figure 8.4b)Ðthe emitter and the detector must be on the same side of the coding element. Glass disks are more stable, rigid, hard, and ¯at than metal disks, but are less resistant to vibration and shock. Reference 1 discusses the design of encoders based on integrated optical subsystems. Interference fringe encoders are based on moire patterns. To create them 8.1 POSITION ENCODERS 437
Figure 8.4 Incremental optical encoder. (a) With opaque and transparent sectors. (b) With re¯ective and nonre¯ective sectors. from a linear movement, we can use a ®xed and a movable rule having lines inclined with respect to each other (Figure 8.5). If the inclination a is such that tan a p=d, a relative displacement p (line pitch) produces a vertical displace- ment d of a dark horizontal fringe. If the relative inclination is n times higher, n dark horizontal fringes appear. Interference fringes from a rotary movement can be obtained from two superimposed disks, one ®xed and the other one mov- able, one with N radial lines and the other one with N 1. Interference fringes are also obtained if both disks have N lines but one is o¨ center, or one has N lines with a di¨erent inclination. A light emitter±detector pair yields an almost sinusoidal signal with N cycles/turn for a rotary encoder. Incremental encoders have resolution ranges from 100 counts/turn to 81,000 counts/turn and accuracy up to 3000. When the detector o¨ers two sinusoidal outputs with di¨erent phase shifts, interpolation using various phase-shifting methods can increase the resolution by a factor of up to 256. One interpolation method [2] digitally measures the phase from the quadrature outputs.
p
p
Figure 8.5 Optical incremental encoder based on interference fringes (moire patterns). The horizontal dark fringe moves in the vertical direction when the sliding rule moves horizontally. 438 8 DIGITAL AND INTELLIGENT SENSORS
Va Vp cos Ny 8:2
Va Vp sin Ny 8:3 where Vp is the amplitude of the output voltage, N is the number of steps (pitches) in one turn, and y is the current shaft angle, which can be calculated from arctan V =V y b a 8:4 N
This is a periodic quantity that gives 2p rad each 360=N angle increment, so that we also need an incremental counter to determine the actual angle. To measure the phase, the 2p rad phase plane is divided in several sectors and the sector corresponding to each Va, Vb pair is stored in a ROM. Va and Vb are each digitized by an ADC, and the system looks in the ROM for the corresponding phase. Reference 3 describes a similar approach using software techniques. Usual diameters for encoder disks are from 25 mm to 90 mm. Linear incre- mental encoders can measure position with resolution of up to 0.5 mm/period and accuracy up to 50 mm. They are used for position control in generalÐfor example, reading/writing head positioning in disk and magnetic tape drives, paper positioning in printers, copiers, and fax machines, tool positioning in automatic machines, and dimensional metrology. Small rotational units replace control potentiometers in instrument panels because of their longer life. Optical encoders yield the highest resolution. The limiting factor is the photodetector size. Resolution increases by using one or several ®xed grids or masks with opaque and transparent regions, placed between the movable ele- ment and the detector, and having the same pitch as the encoded element (Figure 8.6). The detector receives the maximal light when all the grids and the
Figure 8.6 Use of a ®xed grid to limit the ®eld for a photodetector, thus increasing its resolution (courtesy of TRW Electronics Components Group). 8.1 POSITION ENCODERS 439
a
b
c Figure 8.7 Detection of movement direction in incremental encoders. (a) By means of two outputs with 90 phase shift. (b) Output electronic circuit. (c) Additional marker for absolute positioning. movable encoded element are perfectly aligned. As the encoded element moves from that position, the light received will decrease until reaching a minimum. The photodetector averages the signal from more than one slot, thus compen- sating for any possible di¨erences between them. The output is a continuous (not discrete) signal between maxima that can be interpolated. In order to determine the movement direction, we require another reading element, and sometimes another encoded element, together with some appro- priate electronic circuits. In inductive encoders, another sensing coil is placed to obtain a 90 out-of-phase signalÐquadrature encoding (Figure 8.7a). In one turning direction, signal A leads signal B, whereas in the opposite direction, signal B leads signal A. Then a phase detector indicates whether the turning direction is clockwise (CW) or counterclockwise (CCW) (Figure 8.7b). In optical and contacting (electric) encoders, another encoded track having a small phase shift with respect to the ®rst one is added, with its corresponding read head. In interference fringe encoders and in high-resolution optical encoders, two optical units are used, which yield two signals with a 90 relative phase shift. Some encoders even use two additional units at 180 with respect to the other two, in order to further increase the resolution. Pulse multiplication increases the disk resolution by two or four times. An EX-OR gate fed by two out-of-phase signals duplicates the number of pulses (Figure 8.8a). Di¨erentiating a single signal yields an impulse for each rising or falling edge, hence duplicating the number of pulses if those impulses are further recti®ed and stretched (Figure 8.8b). Di¨erentiating two pulse channels improves the resolution by four. In order to detect the absolute position of the movable part, we need an up± down counter fed by pulses from the detector. The direction of counting is de- termined by the signal that gives the movement direction, and resetting is done 440 8 DIGITAL AND INTELLIGENT SENSORS
(a)(b) Figure 8.8 Pulse multiplication to increase encoder resolution. (a) From two channel outputs through an EX-OR. (b) By pulse di¨erentiation and recti®cation. through a third encoder output signal of one pulse each turn (when it is a rotary encoder), termed marker or zero index (Figure 8.7c), which also de®nes a home position. Alternatively, one output controls the direction of counting while the other output is counted (Figure 8.9). Also, the three output signals can be in- terfaced to I/O lines of a microprocessor or microcontroller, which should poll them at a rate faster than the maximal rate the outputs are expected to change.
Figure 8.9 An up±down counter o¨ers absolute positioning from an incremental encoder with two out-of-phase outputs. 8.1 POSITION ENCODERS 441
Figure 8.10 Hysteresis in Schmitt triggers avoids erratic transitions between logic levels when input signals do not have steep edges.
When the aim is to measure a rotating speed, incremental encoders are lim- ited by the maximal frequency accepted by electronic circuits if the maximal rotating speed is very high. Digital tachometers based on the same principles yet having only one track or a few tracks yield a lower number of pulses at each turn. Encoder signals are often open collector and processed by a Schmitt trigger before feeding them to further digital circuits. Schmitt triggers have a lower threshold trigger level when they are in the on state than when they are in the o¨ state (Figure 8.10). This hysteresis minimizes any electric noise switching that could otherwise yield erratic transitions when the output level is close to the threshold of an ordinary digital IC. Output signals from contacting encoders may display contact bouncing (erratic transition from low to high level with the wiper is at a transition zone). Debouncing circuits, such as the MC14490, introduce an appropriate delay, say 5 ms, so that the output signal does not re¯ect any transition at its input within that delay period.
8.1.2 Absolute Position Encoders Absolute position encoders yield a unique digital output corresponding to each resolvable position of a movable element, rule, or disk, with respect to an internal reference. The movable element is formed by regions having a dis- tinguishing property, and designated with the binary values 0 or 1. But unlike incremental encoders, their tracks are so arranged that the reading system directly yields the coded number corresponding to each position (Figure 8.11). Each track corresponds to an output bit, with the innermost track yielding the most signi®cant bit. The most common sensors for these encoders are optical sensors, which are far ahead of contact sensors. Integrated photosensor arrays such as the TSL214 simplify system design. Absolute encoders have intrinsic immunity to interruptions and electromag- netic interference. They do not accumulate errors. Feedback systems relying on them do not require a homing sequence at start up, or when power fails, or at 442 8 DIGITAL AND INTELLIGENT SENSORS
e
Figure 8.11 Principle of absolute position encoders for linear and rotary movements. routine intervals during operation. The price to be paid is a more complex reading head as compared to incremental encoders. This is due to the need for as many reading elements as encoded tracks. Also they must be perfectly aligned; otherwise the output code may be ambiguous when changing from one position to a contiguous position. The resulting code can then be very di¨erent from the one for the actual position. If, for example, the natural binary code is used, in an 8 bit system the positions 3 and 4 are given by
Position 3: 00000011 Position 4: 00000100
Suppose that the reading heads are slightly misalignedÐfor example, the ®rst two heads are slightly advanced. Then the output reading when moving from position 3 to position 4 would be 0000 0000. Binary codes with unit distance in all positions including the ®rst one and the last one (cyclic continuous codes) are unambiguousÐthat is, codes where two contiguous positions di¨er only in one bit. In the natural binary code there are for N positions N=2 transitions where more than one bit changes. Table 8.1 shows the weight for each bit and the pattern of the coded regions corresponding to di¨erent codes. The Gray code is the commonest continuous code and has the same resolution as the natural binary code. A shortcoming is that if the output information is to be sent to a computer, it must be ®rst con- verted to binary code. The algorithm to obtain the i binary bit is to add modulo-2 (EX-OR function) the i 1 binary bit to the i Gray bit. The most signi®cant binary bit equals the most signi®cant bit in Gray code. That is,
Bi Bi1 l Gi; 0 U i < n 8:5 Bn Gn
Figure 8.12 shows the corresponding circuit. The Gray code does not permit error correctionÐfor example, when transmitting signals in a noisy environ- 8.1 POSITION ENCODERS 443
TABLE 8.1 Common Codes in Absolute Position Encoders
Figure 8.12 Gray-to-binary code converter.
ment. Reference 4 proposes a cyclic code that permits detection of single bit errors, with the exception of those contiguous to the actual position. If the objective for the measurement is only to numerically display the posi- tion, a conversion to BCD code is required. Disks directly coded in the code ®nally used do not require any conversion, but have the ambiguity problem. Another method to solve the ambiguity problem is to use a double set of reading heads displaced by a given distance between them, and then to apply some decision rule in order to accept only the reading from one of the two sensors for each track. Also, we can place a marker in the center of each track, then accept the read head signal only when it signals a nontransition zone be- tween positions. A memory stores the last position read, and it is updated when there is a valid change. 444 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.13 Digital encoder disk with an added track (along the external perimeter) to increase the resolution using a system with a ®xed grid.
The resolution of absolute encoders is from 6 bits to 21 bits in Gray code (8 bits to 12 bits is common), with diameters from 50 mm to 175 mm for rotary encoders and accuracy up to 2000. The diameter is designed by a number that is ten times the diameter in inches. For example, size 40 means a diameter of 4 inches. The resolution improves by increasing the number of encoded tracks, but the resulting increase in diameter and inertia limits this solution. An alter- native is to use a gear and another encoder, but the ®nal resolution remains always limited by that of the ®rst disk. There are multiturn models up to 26 bits. The electric output signal is usually in the form of open collector TTL. Another method to increase resolution is to add a ®xed grid to produce sinusoidal outputs and then interpolate as discussed for incremental encoders (Figure 8.6). Thus the movable disk includes an additional radial track along the disk periphery, as shown in the model in Figure 8.13. Reference 5 describes a more e½cient absolute encoder that needs a single encoded track, which for a disk is placed along the periphery (not radially as in Figure 8.13). The reading head is placed at a distance that depends on the pitch and the desired resolution. For a 0.1 mm pitch (using photodetectors), in order to achieve a 10 bit resolution we need a circumference of 102.4 mm, hence a radius of 16.3 mm. The track code is a pseudorandom binary sequence (PRBS), where only one bit changes from any code to the next. A PRBS with 2n 1 terms can be generated by an n bit register with an appropriate modulo-2 feedback. In Figure 8.14, for example, the 4 bit shift register with the feedback equation R 5R 1 l R 2 generates the 15-term sequence 000100110101111Ðwritten from R 0 to R 14. Any 4 bit window sliding over this sequence is unique. Figure 8.14 shows the code corresponding to the positions x 0 and x 7. Computer interfacing requires code conversion. Common applications for absolute position encoders are high-resolution 8.2 RESONANT SENSORS 445
Figure 8.14 A 4 bit shift register with feedback generates a 15 bit pseudorandom binary sequence in which a 4 bit sequence uniquely identi®es the absolute position. measurement and control of linear and angular positions. They suit applica- tions involving slow movements or where the movable element remains inactive for long time periods, such as parabolic antennas. They are used, for example, in robotics, plotters, machine tools, read head positioning in magnetic storage disks, radiation source positioning in radiotherapy, radar, telescope orientation, overhead cranes, and valve control. They can also sense any quantity that we convert to a displacement by means of an appropriate primary sensorÐfor example, in liquid level measurements using a ¯oat.
8.2 RESONANT SENSORS
Sensors based on a resonant physical phenomenon yield an output frequency that depends on a measurand a¨ecting the oscillation frequency. They require a frequency-counter in order to measure either the frequency or the oscillation period based on an accurate and stable clock. The choice of method depends on the desired resolution and also on the available time for the measurement (see Problem 8.1). Resonant structures of single-crystal silicon are particularly suited to IC integration [6, 7]. Sensors use either harmonic oscillators or relaxation oscillators. Harmonic oscillators store energy that changes from one form of storage to another, for example from kinetic energy in a moving mass to potential energy in a stressed spring. In relaxation oscillators there is a single energy storage form, and the stored energy is periodically dissipated through some reset mechanism. Quartz clocks are accurate enough to derive a time base for most sensor applications, but they drift with time and temperature. Time drifts arise from structural changes due to defects in crystal lattices, mechanical stress from supporting elements (that decrease as time passes and change after thermal 446 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.15 (a) A quartz crystal oscillator achieves long-term stability a few weeks after turn-on. (b) The temperature stability of quartz oscillators is nonlinear and depends on the angle at which the crystal is cut with respect to the z-axis.
cycling), and mass changes because of absorption and desorption of contami- nant gases inside the crystal package. Aging curves describing D f = f are ®rst exponential but become stable after a few weeks or months (Figure 8.15a). Accurate crystals are pre-aged at the factory before shipping. Thermal drifts are the basis of quartz thermometers (Section 8.2.1) and have the form of a recumbent ``S.'' Their value depends on the particular crystal cut considered. Figure 8.15b shows a family of temperature stability curves for a 10 MHz fundamental quartz crystal with the angle of cut with respect to the z-axis as parameter; the z-axis is the optical axis, which permits light to pass readily. For quartz clocks, the 35130 cut yields the best stability over a short temperature range about ambient temperature. The 35150 cut (the AT cut, preferred above 1 MHz) has a better stability from 0 Cto50C. Oven- controlled oscillators eliminate thermal drift by maintaining the crystal at con- stant temperature, usually at the upper turnover point in Figure 8.15b (about 70 C for the AT cut). This yields a frequency stability D f = f about 10 8 in the range from 0 Cto50C, as compared to a drift higher than 2:5 Â 10 6 for a common crystal in the same range (an RTXOÐroom temperature crystal oscillator). Temperature-compensated crystal oscillators (TCXOs) incorporate a temperature-dependent network with characteristics approximately equal to and opposite from that of the crystal. They achieve frequency stability better than 10 6 in the range from 20 C to +70 C. 8.2 RESONANT SENSORS 447
Figure 8.16 (a) High-frequency equivalent circuit for a piezoelectric material such as quartz with metal electrodes deposited on two faces. (b) The reactance of a quartz crystal varies with the operating frequency near resonance.
8.2.1 Sensors Based on Quartz Resonators Quartz is piezoelectric and therefore an applied voltage stresses the crystal (Section 6.2). If the voltage alternates at a proper rate, the crystal begins vi- brating and yields a steady signal. The equivalent circuit in Figure 8.16a then replaces that in Figure 6.14b. L1 is associated with the mass of the crystal, C1 with its elasticity or mechanical compliance, and R1 with its internal friction (resulting in heat dissipation) when oscillating. C0 is the electrostatic capaci- tance of the crystal between the electrodes plus the holder and the leads. For a crystal used in a 32.768 kHz oscillator, for example, L1 4451 H, C1 5 fF, R1 11:2kW, and C0 1:84 pF. The presence of a resonant circuit in Figure 8.16a permits the crystal to be used in an oscillator. At series resonance
1 fs p 8:6 2p L1C1 the crystal's reactive elements cancel and provide an e¨ective impedance con- sisting only of R1 (Figure 8.16b). As the frequency increases, the crystal behaves as a positive reactance in series with a resistance. At the antiresonant-frequency fa, the crystal's reactance is maximal. The range from fs to fa is referred to as the crystal's bandwidth.
The series resonant circuit (Figure 8.17a) operates above fs, where the re- actance is slightly inductive. Series capacitance is then added to tune the circuit. Figure 8.17b shows a basic oscillator based on CMOS inverters. CL1 and CL2 are loading capacitances (larger for low oscillating frequency than for high oscillating frequency), Rf 1MW, and Rd is a damping resistor that depends on the gate type and oscillation frequency. Because quartz is inert, using a high-purity single crystal yields a mechanical resonance with large long-term stability. Short-term stability depends on the 448 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.17 (a) Series resonator oscillator based on a quartz crystal. (b) Crystal (series) oscillator based on CMOS inverters. quality factor Q (sti¨ness and low hysteresis) and equivalent inductance, which are very large. Short-term stability permits the design of high-resolution sen- sors. Long-term stability implies a longer time interval between calibrations.
8.2.1.1 Digital Quartz Thermometers. The values for the elements in the equivalent circuit for a quartz crystal depend on the temperature, and therefore the oscillation frequency displays a thermal drift. If precision-cut quartz crystals are used, the relationship between temperature and frequency is very stable and repeatable. Then, from the measurement of the oscillation frequency we can infer the temperature of the element. The general equation is
2 3 f f01 a T T0b T T0 c T T0 8:7
where T0 is an arbitrary reference temperature (usually 25 C), and f0, a, b, and c depend on the cutting orientation. Ideally we would seek b c 0, but this is not easy. An alternative is to seek high sensitivity and repeatability instead of linearity and obtain T from f f0 by a look-up table (Figure 8.18). Some temperature probes using this principle include the electronic circuitry to output a pulse frequency signal enabling remote sensing with low interference suscep- tibility as compared to systems with analog voltage output. Oscillator frequencies range from about 256 kHz to 28 MHz with tempera- ture coe½cients (a) from 19 Â 10 6=Cto90Â 10 6=C. Sensitivities are up to
Figure 8.18 Simpli®ed diagram for a quartz digital thermometer. 8.2 RESONANT SENSORS 449 about 1000 Hz=C in the range from 50 C to 150 C. The resolution can be as high as 0.0001 C, but the better the resolution, the slower the measurement speed (see Problem 8.2). Some probes reach 40 C to 300 C, but with reduced linearity unless corrected by a look-up table. Low-mass probes can be applied to infrared radiation intensity measurement.
8.2.1.2 Quartz Microbalances. The oscillation frequency of a crystal resona- tor decreases when the crystal mass increases. If the initial oscillation frequency is f0, a deposition of a small mass Dm on a crystal with surface area A and density r yields an approximate frequency shift given by the Sauerbrey equa- tion [8]
Dm=A D f A f 2 8:8 0 Nr where N is a constant and it is assumed that the mass added does not experience any shear deformation during oscillationÐthat is, it is rigid. For an AT-cut 6 2 crystal, for example, D f A 2:3 Â 10 f0 Dm=A. Disks with 10 to 15 mm diameter and 0.1 to 0.2 mm thickness yield resonant frequencies from 5 MHz to 20 MHz and have a sensitivity of about 189 ng/(cm2ÁHz). Including a resonant temperature sensor compensates temperature interference. This sensing method is applied to humidity measurement by covering the crystal with a hygroscopic material exposed to the environment where humidity is to be measured. Water absorbed increases the mass and reduces the crystal oscillation frequency [9]. Crystals coated with speci®c organic nonvolatile ma- terials instead of a hygroscopic material can detect speci®c volatile compounds in a gas phase with resolution of nanograms per square centimeter [10]. Quartz crystals oscillators are widely used as thin-®lm thickness monitors to control deposition rates and in situ measurement of coating ®lm thickness in the semiconductor and optical industries. Equation (8.8) is not accurate enough for these monitors. They rely instead on a sensor function that considers the in¯u- ence of the di¨erent acoustic impedances of the deposition materials upon the resonant frequency. The mass sensitivity of these Z-matching devices depends on the material deposited [8].
8.2.1.3 Quartz Resonators for Force and Pressure Sensing. Quartz crystals, the same as other single-crystal materials, have highly stable elastic properties with very low creep and hysteresis. Hence, they suit mechanical resonators whose resonance frequency depends on the applied stress. For a string-type resonator, for example, the natural mechanical resonant frequency is [6, 8]
s n T f 8:9 n 2l r 450 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.19 (a) Voltage applied to surface electrodes creates an electric ®eld that ¯exes a quartz beam. (b) Force sensor based on a quartz vibrating beam with electrodes on both surfaces.
where n is the harmonic number considered, l is the length of the ``string'' (e.g., a long slender quartz beam), T is the stress applied, and r is the density of the crystal material. Quartz has the added advantage of being piezoelectric, so that the vibration can be excited by a driving alternating voltage and the oscillation frequency is that of the voltage detected by electrodes deposited on the crystal (Figure 8.19a). The high sti¨ness of quartz makes it suitable for force, torque, and pressure measurement. A matched crystal placed nearby but not subjected to mechanical stress yields a signal to compensate temperature interference. There is a variety of mechanical structures obtained by micromachining able to sense those measurands. Figure 8.19b shows a sensor for tensile and compressive force based on a single quartz beam. Other models have two or three beams. Load cells use a push rod to transmit the input force to the quartz sensor through a lever mechanism. Pressure sensors rely on either the force exerted by a primary sensor (diaphragm, bellows) or the changing resonant frequency because of the pressure directly applied to a quartz diaphragm. Using two diaphragms but exposing only one to the pressure to measure permits di¨erential measurements to compensate for temperature and acceleration interference.
8.2.1.4 Quartz Angular Rate Sensors. A vibrating quartz tuning fork can sense angular velocity because of the Coriolis e¨ect. The sensor typically con- sists of a double-ended quartz tuning fork micromachined from a single quartz crystal (Figure 8.20) rotating at the angular velocity to measure, W [11]. An oscillator at precise amplitude excites the drive tines so that they move toward and away from one another at a high frequency. Because of the Coriolis e¨ect (Section 1.7.7) there is a force acting on each tine,
F 2mW Â vr 8:10 8.2 RESONANT SENSORS 451
Figure 8.20 Angular rate sensor based on the Coriolis e¨ect on a micromachined quartz tuning fork (courtesy of BEI Sensors and Systems).
where m is the tine mass and vr is its instantaneous radial velocity. F is per- pendicular to both W and vr, hence to the plane of the fork assembly. Because the tines move in opposite directions, the resultant forces also have opposite directions. This produces a torque proportional to W. Because vr is sinusoidal, the torque is also sinusoidal at the same frequency of the drive tines. The pickup tines respond to the oscillating torque by moving in and out of the plane, producing a signal that can be ampli®ed and demodulated to yield a dc voltage proportional to the rate of rotation W. Quartz angular rate sensors replace spinning-wheel gyroscopes because of their lower cost, increased reliability (there are no moving mechanical parts), and light weight. The GyroChipTM, for example, weighs less than 60 g, has a sensitivity of 2.5 mV/(/s) to 50 mV/(/s), and has an operating life exceeding 5 years. It has been used to control angular velocity in aircraft, robots, and hydraulic equipment, to instrument automobile motions during crash tests, to evaluate rider quality in high-speed trains, to navigate autonomous underwater vehicles, to stabilize infrared cameras on helicopters, and in other applications.
8.2.2 SAW Sensors A perturbation produces waves on the surface of a liquid, as we all know from our experience on ponds. Similar waves also travel in the surface of a solid. 452 8 DIGITAL AND INTELLIGENT SENSORS
d
VS
L
Figure 8.21 Principle of surface acoustic wave (SAW) ®lters.
Lord Rayleigh analyzed these waves in 1885 and applied the results to seismo- graphic interpretation. In spite of the di¨erences between solid and liquid waves, in both cases they attenuate with depth. A method to produce a surface perturbation, certainly less convulsive than earthquakes, is to place two interleaved metallic electrodes (e.g., aluminum) on the surface of a piezoelectric material as shown in Figure 8.21. For a distance d between electrodes, a voltage of frequency f applied to the electrodes produces a surface deformation that propagates in both directions as a surface wave with velocity v, depending on the material, provided that v 2 fd. A similar elec- trode pair yields an alternating output voltage when the deformation wave arrives at it. These devices, designated by the acronym SAW (surface acoustic wave), were patented by J. H. Rowen and E. K. Sittig in 1963 and are ex- tensively used in ®lters and oscillators above 100 MHz. The velocity v for the surface wave depends on the deformation state for the surface and also on the temperature because they both in¯uence the density and elastic properties for the material, in addition to altering the distance between electrodes. This is the principle for the use of these devices in sensors according to a direct action on the surface or on a particular coating. SAW sensors are typically constructed as delay lines and placed in the feed- back loop of an ampli®er, resulting in an oscillator whose oscillation frequency depends on the surface deformation (Figure 8.22). The total phase shift in the feedback loop is
fT f0 G df0 G fex 8:11 where f0 2p fL=v is the phase shift due to the wave transit time from one electrode pair to the other; df0 is the phase increment due to the substrate de- formation and temperature change, if any; and fex is the phase shift due to the ampli®er and to the external impedance matching network. The system oscil- lates when fT 2np and the ampli®er gain exceeds the total loss in the system. The oscillation frequency conveys information about the measurand. An alternative is to measure the delay time in a delay line such as that in 8.2 RESONANT SENSORS 453
Figure 8.22 Oscillator based on a surface acoustic wave device used as a delay line.
Figure 8.22 with an emitter and a receiver. Any change located in the propa- gation zone L that a¨ects either the velocity v or the length will be detected. The emitter sends a wave packet that propagates on the surface with a velocity that depends on the boundary conditions. The preferred piezoelectric materials for SAW sensors are quartz and LiNdO3. Interference from temperature or other quantities is cancelled by placing another electrode pair nearby in a region where the measurand does not produce any stress but the interfering quantity does. This yields a reference oscillator whose frequency depends on the interfering quantity in the same way as the measuring oscillator. SAW sensors are applied to measure temperature, force, torque, pressure, acceleration, and gas concentration by mass adsorption (chemosensors) [10]. Gas ¯ow has been measured by detecting its cooling e¨ect on a SAW delay line oscillator. Detectors for CO, HCl, H2,H2S, NH3,NO2,SO2, hydrocarbons, and organophosphorous compounds rely on a selective binding agent into a ®lm deposited on the crystal surface. The coating can be optimized for sensi- tivity (up to femtograms), selectivity, or fast response. An uncoated SAW sen- sor working on the selective condensation of vapors depending on the surface temperature can detect the equivalent to 500 chemical species [12]. SAW sensors are very small, because v is of the order of 300 m/s to 4000 m/s and d (spatial periodicity) is about 1 mm. They are simple and manufactured by photolithographic methods compatible with planar technologies, hence rela- tively inexpensive.
8.2.3 Vibrating Wire Strain Gages According to (8.9), the lower transverse oscillation frequency for a vibrating taut string or wire of length l is 454 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.23 Vibrating wire gage. The transverse vibration is excited by a current pulse applied to the coil, which then is used to detect the vibration frequency.
s 1 F f 8:12 2l m where F is the mechanical force applied to it and m is the longitudinal mass density (mass/length). If the position of one of the ends changes because it is mounted on a movable support, then the oscillation period is directly propor- tional to the displacement. If a force is applied, the resulting oscillation fre- quency is directly proportional. For strain measurement, equation (8.12) yields
4l 2m e f 2 8:13 EA where E is Young's modulus and A is the wire's cross section. The oscillation frequency is measured with a variable reluctance sensor (Section 4.2.1) and is in the audible range. Hence it is also called an acoustic gage. Usually a self-oscillating system is arranged where the detected signal is ampli®ed and fed back to an electromagnetic driver. Some units use the driver alternately as the detector (Figure 8.23). In order for the oscillation frequency to be independent of the driver electric characteristics, the quality factor for the mechanical resonator must be at least 1000 or higher. It is convenient to use a thin wire, which is enclosed in a sealed chamber to avoid chemical corrosion and dust deposition, which would change its mass. This principle can sense any physical quantity resulting in a change in l, F,or m. A common application is strain or tension measurement [13]. In contrast with resistive strain gages, vibrating-wire strain gages can detect nonplane de- formation. In addition, they are insensitive to resistance changes in connecting wiresÐfor example, those due to temperature. Temperature interferes because it a¨ects the sensing wire length l. In order to compensate for temperature, we can measure the change in resistance of the driving coil wire, as in RTDs (see Problem 8.3). Other reported applications are the measurement of mass, displacement, pressure (using a diaphragm with an attached magnet as primary sensor), force and weight (using a cantilever as primary sensor). 8.2 RESONANT SENSORS 455
Vibrating strips are a variation on this same measurement principle. Their lower natural longitudinal oscillation frequency is s 1 E f 8:14 2l r where l is the length, E is Young's modulus, and r is the density. Vibrating strips are used for dust deposition measurement of exhaust gases and also to measure viscosity.
8.2.4 Vibrating Cylinder Sensors If instead of a vibrating wire or strip we use a thin (75 mm)-walled cylinder with a closed end, the oscillation frequency depends on the dimensions and material for the cylinder and on any mass vibrating together with its walls. By using an electromagnetic driver as in the previous case in order to keep the system oscil- lating, it is possible to measure the di¨erence in pressure between both cylinder sides because it results in mechanical stresses in its walls. We can also apply this system to gas density measurement because the gas near the walls vibrates when the walls do. For corrosive liquids it is better to use a glass or ceramic cylinder and a piezoelectric driver, thus avoiding corrosive-prone elements in electro- magnetic drivers. The most common application for this measurement principle is the mea- surement of the density of ¯owing liquids, using an arrangement like that in Figure 8.24. It consists of two parallel conduits through which the liquid ¯ows; the two tubes are clamped at their ends and coupled to the main conduit by a ¯exible joint. Because the volume is known and the oscillation frequency for
Figure 8.24 Vibrating tube method to measure liquid density. 456 8 DIGITAL AND INTELLIGENT SENSORS both conduits, which behave as a tuning fork, depends on the mass, the fre- quency depends on the density in the form [6]
f f r0 8:15 r 1 r0 where f0 is the conduit oscillation frequency when there is no liquid, and r0 is a constant that depends on system geometry. The output frequency can be mea- sured, for example, with a PLL whose voltage-controlled oscillator (VCO) drives the vibrating tube.
8.2.5 Digital Flowmeters 8.2.5.1 Vortex Shedding Flowmeters. The detection of oscillations in a ¯ow- ing ¯uid allows us to obtain a variable frequency signal, which depends on ¯uid velocity. Those oscillations can be natural or forced. The method of forced oscillations is mostly used for gases. It consists of placing inside the pipe a grooved conduit so that the outcoming ¯ow is helical and has its maximal velocity (and minimal pressure according to Bernoulli's theorem, Section 1.7.3) at a point that shifts back and forth. The frequency at which this low-pressure point passes by a ®xed detector is proportional to ¯uid velocity, and therefore to volumetric ¯ow. Fluctuations associated with the shifting point are sensed by a piezoelectric pressure sensor or a thermistor (for temperature changes). Signal frequency ranges from 10 Hz to 1000 Hz. For liquids it is more common to place inside the conduit a blunt (non- aerodynamic) object (vortex shedder), which is nonaligned with the ¯ow lines (Figure 8.25). This also works for gas and steam. When the ¯uid layer in con- tact with the object separates from it, Karman vortices are shed from the object, the same as a ¯agpole creates vortices in the blowing wind, which wave the ¯ag. Those vortices are usually detected by ultrasound whose intensity undergoes a
Figure 8.25 A blunt object inside a ¯uid stream produces downstream vortices whose frequency is proportional to ¯ow velocity. 8.2 RESONANT SENSORS 457 variable attenuation, and also by temperature ¯uctuations or by the drag force on the blunt object. Shaping the blunt object with a particular pro®le yields a frequency for the vortices proportional to the average ¯ow velocity [14]. How- ever, there is always a minimal velocity below which vortex frequency is irreg- ular. Also, the larger the pipe diameter, the lower the output frequency, which limits the diameter to about 350 mm. This method is fairly accurate (about 0.5 %) and independent of ¯uid vis- cosity, density, pressure, and temperature. It is particularly indicated for ¯ow measurements at high temperature and high pressure. Its main shortcomings are that it introduces a large drop in pressure and that it is unsuitable for dirty, abrasive, or corroding ¯uids.
8.2.5.2 Coriolis E¨ect Mass Flowmeters. A common type of mass ¯owmeter relies on the Coriolis e¨ect on a U-shaped ¯ow tube (Figure 8.26) vibrated at its natural frequency (about 80 Hz) by an electromagnetic device located at the bend of the tube [15]. As the liquid ¯ows into the tube, the Coriolis force it experiences because of the vertical movements of the tube has opposite sign to that experienced when it leaves the tube because according to (8.10) opposite velocities yield opposite forces. That is, when the liquid enters the tube, it resists being moved upward (or downward) and reacts by pushing down (respectively, up); when the ¯uid leaves the tube after having been forced upward (or down-
Figure 8.26 (a) Coriolis ¯owmeter based on a vibrating U tube. (b) When the tube moves upward, the ¯uid exerts a downward force at the inlet and an upward force at the outlet that results in (c) a tube twist. 458 8 DIGITAL AND INTELLIGENT SENSORS ward), it resists having its vertical movement decreased and pushes up (respec- tively, down). The result is a tube twisting whose amplitude is proportional to the liquid mass ¯ow rate. Coriolis ¯owmeters measure mass directly, not through volume or velocity, and can measure corrosive ¯uids and di½cult ¯uids such as slurries, mud, and mixtures. First marketed in 1978, there are models with two tubes, and di¨erent forms (S, W, loop). They are not a¨ected by changes in ¯uid pressure, density, temperature, or viscosity and can achieve an uncertainty of about 0.3 %. How- ever, they are not useful for low-pressure gas because of the low forces they develop. Each September issue of Measurements & Control lists manufacturers of Coriolis ¯owmeters in the section on Mass Flowmeters.
8.2.5.3 Turbine Flowmeters. Turbine ¯owmeters consist of a multiple-blade rotor placed inside a pipe with its rotation axis perpendicular (for low/medium ¯ow rates) or coaxial (for high ¯ow rates) to the ¯uid ¯ow. The rotor is sus- pended in the ¯uid by ball or sleeve bearings. As the ¯uid passes through the blades, the rotor spins at a velocity that is proportional to the average ¯ow rate. The rotational speed is sensed by a magnetic pickup placed outside the pipe. Each time a turbine blade with an attached magnet or Wiegand wire passes the base of the pickup, it generates an electric pulse, as in incremental encoders. Alternatively, the magnet can be mounted in the pickup and the vane rotation changes the reluctance. Some models use electro-optical sensing. The total number of pulses in a given time interval is proportional to the total volume displaced. Turbines are intrusive and therefore produce a pressure loss. Also, the im- mersed materials, including bearings, must be chemically compatible with the ¯uid. Bearings wear out, particularly at high ¯ow rates. One major advantage is their wide measurement range, usually 20:1 and even 30:1 in some models. Typical uncertainty is about 0.5 % for liquids and 1 % for gases. Temperature and viscosity (for liquids) or pressure (for gases) corrections improve accuracy. Turbine ¯owmeters are used, for example, for fuel ¯ow measurement in air- craft, in water service monitoring, and in monitoring spirometers. Each Febru- ary issue of Measurements & Control lists manufacturers of turbine ¯owmeters.
8.3 VARIABLE OSCILLATORS
When the measurand produces a variable frequency signal, frequency measure- ment yields a digital output without requiring a voltage-based ADC. Variable- frequency signals have a large dynamic range because voltage saturation or voltage noise do not limit it, particularly in low-voltage systems supplied at 5 V or 3.3 V. Also, they withstand larger interference than voltage signals in short- range telemetry. Therefore, incorporating a modulating sensor in a variable oscillator is an interesting interface option. Often, however, the relationship between the variable frequency and the measurand is not linear (Section 8.3.4). 8.3 VARIABLE OSCILLATORS 459
Furthermore, reactance-variation sensors in variable oscillators do not work at ®xed frequency. Oscillators create more interference than circuits processing dc voltage or current, and nearby oscillators may interfere each other. Circuit layout should avoid these problems. Modulating sensors use both harmonic oscillators (sine wave output) and relaxation oscillators (square wave output). Section 8.2.1 discusses oscillators that include a self-resonant self-generating sensor.
8.3.1 Sinusoidal Oscillators Sensors can be placed in either RC or LC harmonic oscillators. RC oscillators rely on either RC phase-shift networks or the Wien bridge, which is preferred here because it is more stable. Figure 8.27 shows a basic Wien bridge (reference 16, Section 10.1) and the block diagram to analyze it. If the op amp has Ad g Ac, the (transform of the) output voltage is Z2 R3 Vo AdVo 8:16 Z1 Z2 R3 R4
The circuit will oscillate when
R Z R joC 3 2 2 1 8:17 R4 Z1 1 joR2C2 1 joR1C1
This condition is ful®lled when
R R C 4 1 2 8:18 R3 R2 C1
Figure 8.27 (a) Basic Wien bridge oscillator and (b) its equivalent block diagram. 460 8 DIGITAL AND INTELLIGENT SENSORS
Figure 8.28 Actual Wien bridge with variable diode resistance, which decreases with amplitude to control oscillation amplitude.
and the oscillation frequency is
1 fo p 8:19 2p R1R2C1C2
The slew rate of common op amps limits the maximal output frequency to about 100 kHz. The sensor can be any of the elements (resistance, capacitance) of Z1 or Z2. In order to ensure oscillation at start up, R3 or R4 is made dependent on vo. When vo is small we need a large gain in order to amplify any noise at fre- quency fo at the op amp input. Once vo has reached large enough amplitude, we wish to diminish the gain to prevent output saturation. Figure 8.28 shows an 0 actual oscillator. When vo is small, R4 R4 , but when vo is large, the diodes 0 00 are on, each during one half-cycle, and R4 R4 kR4 . We can select, for ex- 0 00 0 ample, R4 2:1R3 and R4 10R4 (see Problems 8.4 and 5.7). Alternatively, we can use a ®xed R4 and place a ®lament lampÐwhich has positive tempera- ture coe½cientÐin series with R3. Higher-frequency oscillators use the circuits proposed by Hartley (capacitive sensors) or Colpitts (inductive sensors) [17]. Nevertheless, all harmonic oscil- lators have common shortcomings: They cannot directly accommodate di¨er- ential sensors, and connection leads in¯uence the actual output frequency.
8.3.2 Relaxation Oscillators Relaxation oscillators are easier to implement than harmonic oscillators, par- ticularly for resistive and capacitive sensors. Figure 8.29 shows an astable multivibrator and its output waveform after an initial transient. The voltage divider formed by R1 and R2 determines the voltage Vp at the noninverting in- 8.3 VARIABLE OSCILLATORS 461
Figure 8.29 (a) Astable multivibrator based on a voltage comparator and (b) associated voltage waveforms.
put of the comparator. During the time interval T1 when the output is at high level Vo, C charges through R and the voltage across it is