|
|||||
August 1, 1997 Use RS-232C port to measure pressure W Stephen Woodward, University of North Carolina--Chapel Hill A simple circuit (Figure 1) and accompanying software turn a pressure sensor into an accurate and cheap pressure digitizer that works with any PC's RS-232C COM port. Many manufacturers make micromachined silicon piezoresistive pressure sensors. Sensors are available with full-scale sensitivities ranging from inches of water to hundreds of pounds per square inch. A particularly useful breed of these sensors has temperature-compensated outputs proportional to the product of applied pressure and excitation current. This feature makes these sensors suitable for ratiometric operation and accurate functioning with a range of supply voltages. The figure uses a handy example from this group: the Lucas Novasensor (Fremont, CA) family. This series of sensors undergoes factory calibration to a range of differential or absolute pressures, and the sensors incorporate on-chip gain-setting resistors that promote trim-free interchangeability. Electrically, the sensor is equivalent to a strain-gauge bridge biased by R1, the on-chip gain-setting resistor. Pressure-induced mechanical strain in the silicon of the piezoresistive bridge produces a pressure-proportional differential signal VP=PxSxIB, in which S is the sensor's sensitivity, P is the applied pressure, and IB is the bias current. IC1A and IC1B sense VP. Integrator IC1C accumulates the resulting Q1 collector current, causing its output to ramp up. The collector current is equal to: Comparator IC1D combines with a dual CD4052B multi plexer, IC2, to close the feedback loop around IC1C by periodically connecting R3 to 5V. When this connection happens, the current through R3 into the integrator equals IBxR1/R3. If d equals IC2's duty cycle for integrator balance, then Factory calibration sets S/R1 equal to 1/(1000xfull-scale psi), so Seven-bit binary characters, including start/stop bits, with the pattern of 0000011, drive the conversion. The PC's COM port transmits these characters on TXD at 9600/7, or 1371 Hz. With the start of each character, IC2 samples the state of IC1D's output. If this output is low, which indicates integrator balance, IC2 goes into State 1 of its four possible states. This state shorts R4, which latches IC1D low for the remainder of the character time. Meanwhile, State 1 holds RCD negative, so the COM port receives no characters. If, however, IC1D's output is high, which indicates integrator imbalance, IC2 goes to State 3, which latches IC1D high. This action connects R3 to 5V, which nudges the integrator toward balance, and drives RCD to 5V, which echoes the 0000011 character to the COM port. Because TXD has a 5-out-of-7 high/low pattern, the maximum value of d is 5/7, and the best choice for R3/R2 equals S/R1x5/7=1000x 5/7=714. This ratio causes the fraction of characters echoed back to the port to range from 0 to 100% as the pressure ranges from 0 to full-scale psi. The sensor program computes this average frequency as a fraction of 9600 Hz/7x0.979 sec=1342 and converts the result into a pressure reading by multiplying it by the appropriate full-scale factor. (You can download the program from EDN's Web site. At the registered-user area, go into the "Software Center" to download the file from DI-SIG, #2061.) Conversion resolution is proportional to conversion time and is greater than 10 bits (1 part in 1342) in 1 sec, as illustrated in the listing, and 12 bits in 3 sec. (DI #2061) |
|||||
|
|||||
| EDN Access | Feedback | Table of Contents | |
|||||
| Copyright © 1997 EDN Magazine, EDN Access. EDN is a registered trademark of Reed Properties Inc, used under license. EDN is published by Cahners Publishing Company, a unit of Reed Elsevier Inc. | |||||