Freescale Semiconductor Application Note AN1309 Rev 2, 05/2005 Compensated Sensor Bar Graph Pressure Gauge by: Warren Schultz Discrete Applications Engineering INTRODUCTION Compensated semiconductor pressure sensors such as the MPX2000 family are relatively easy to interface with digital systems. With these sensors and the circuitry described herein, pressure is translated into a 0.5 to 4.5 volt output range that is directly compatible with Microcomputer A/D inputs. The 0.5 to 4.5 volt range also facilitates interface with an LM3914, making Bar Graph Pressure Gauges relatively simple. Figure 1. DEVB147 Compensated Pressure Sensor Evaluation Board (Board No Longer Available) © Freescale Semiconductor, Inc., 2005. All rights reserved. EVALUATION BOARD DESCRIPTION Pin-by-Pin Description The information required to use evaluation board number DEVB147 follows, and a discussion of the design appears in the DESIGN CONSIDERATIONS section. Function The evaluation board shown in Figure 1 is supplied with an MPX2100DP sensor and provides a 100 kPa full scale pressure measurement. It has two input ports. P1, the pressure port, is on the top side of the sensor and P2, a vacuum port, is on the bottom side. These ports can be supplied up to 100 kPa (15 psi) of pressure on P1 or up to 100 kPa of vacuum on P2, or a differential pressure up to 100 kPa between P1 and P2. Any of these sources will produce the same output. The primary output is a 10 segment LED bar graph, which is labeled in increments of 10% of full scale, or 10 kPa with the MPX2100 sensor. An analog output is also provided. It nominally supplies 0.5 volts at zero pressure and 4.5 volts at full scale. Zero and full scale adjustments are made with potentiometers so labeled at the bottom of the board. Both adjustments are independent of one another. B+ Input power is supplied at the B+ terminal. Minimum input voltage is 6.8 volts and maximum is 13.2 volts. The upper limit is based upon power dissipation in the LM3914 assuming all 10 LED’s are lit and ambient temperature is 25°C. The board will survive input transients up to 25 volts provided that average power dissipation in the LM3914 does not exceed 1.3 watts. OUT An analog output is supplied at the OUT terminal. The signal it provides is nominally 0.5 volts at zero pressure and 4.5 volts at full scale. Zero pressure voltage is adjustable and set with R11. This output is designed to be directly connected to a microcomputer A/D channel, such as one of the E ports on an MC68HC11. GND ELECTRICAL CHARACTERISTICS There are two ground connections. The ground terminal on the left side of the board is intended for use as the power supply return. On the right side of the board one of the test point terminals is also connected to ground. It provides a convenient place to connect instrumentation grounds. The following electrical characteristics are included as a guide to operation. TP1 Characteristic Power Supply Voltage Symbol MIn Typ Max Units B+ 6.8 — 13.2 dc Volts PFS — — 100 kPa PMAX — — 700 kPa VFS — 4.5 — Volts VOFF — 0.5 — Volts Analog Sensitivity SAOUT — 40 — mV/kPa Quiescent Current ICC — 40 — mA Full Scale Current IFS — 160 — mA Full Scale Pressure Overpressure Analog Full Scale Analog Zero Pressure Offset Test point 1 is connected to the LM3914’s full scale reference voltage which sets the trip point for the uppermost LED segment. This voltage is adjusted via R1 to set full scale pressure. TP2 Test point 2 is connected to the +5.0 volt regulator output. It can be used to verify that supply voltage is within its 4.75 to 5.25 volt tolerance. P1, P2 Pressure and Vacuum ports P1 and P2 protrude from the sensor on the right side of the board. Pressure port P1 is on the top and vacuum port P2 is on the bottom. Neither port is labeled. Maximum safe pressure is 700 kPa. Content Board contents are described in the parts list shown in Table 1. A schematic and silk screen plot are shown in Figure 2 and Figure 6. A pin by pin circuit description follows. AN1309 2 Sensors Freescale Semiconductor S1 B+ D1 ON/OFF U3A 3 – 4 2 + D9 D10 D2 D3 D4 D5 D6 D7 D1–D10 MV57164 BAR GRAPH 1 MC33274 C2 0.1 µF U1 MC78L05ACP R6 3 I G 2 R7 75 O 1 3 2 4 1 R8 75 XDCR1 MPX2100DP GND R5 R13 1k R10 820 R11 200 1 2 3 4 5 6 7 8 9 7.5 k 13 – U3D 14 12 + MC33274 R3 1.2 k 5 – U3B 7 6 + MC33274 R4 1k 10 – 9 + ZERO CAL. U2 LED GND B+ RLO SIG RHI REF ADJ MOD LED LED LED LED LED LED LED LED LED LM3914N R1 1k FULL SCALE CAL. 18 17 16 15 14 13 12 11 10 TP1 (FULL SCALE VOLTAGE) GND R2 2.7 k 1k U3C MC33274 11 D8 C1 1 µF TP2 +5 VOLTS R14 470 D11 MV57124A POWER ON INDICATOR R12 470 8 R9 1k ANALOG OUT Figure 2. Compensated Pressure Sensor EVB Schematic B+ C1 0.1 µF U1 MC78L05ACP 3 I G 2 O 1 U2B XDCR MPX2100 3 C2 1 µF 2 5 – 4 7 6 + MC33274 R3 4 1 R4 1k GND R5 1k U2C MC33274 10 – 8 9 + 11 NOTE: For zero pressure voltage independent of sensor common mode R6/R7 = R2/R1 VOFFSET R7 R6 1k 1k 100 k 13 – U2D 14 12 + MC33274 U2A 3 – 1 2 + MC33274 R2 R1 1k 1k OUTPUT Figure 3. Compensated Sensor Interface AN1309 Sensors Freescale Semiconductor 3 DESIGN CONSIDERATIONS In this type of application the design challenge is how to take a relatively small DC coupled differential signal and produce a ground referenced output that is suitable for driving microcomputer A/D inputs. A user friendly interface circuit that will do this job is shown in Figure 3. It uses one quad op amp and several resistors to amplify and level shift the sensor’s output. Most of the amplification is done in U2D which is configured as a differential amplifier. It is isolated from the sensor’s positive output by U2B. The purpose of U2B is to prevent feedback current that flows through R3 and R4 from flowing into the sensor. At zero pressure the voltage from pin 2 to pin 4 on the sensor is zero volts. For example with the common mode voltage at 2.5 volts, the zero pressure output voltage at pin 14 of U2D is then 2.5 volts, since any other voltage would be coupled back to pin 13 via R3 and create a nonzero bias across U2D's differential inputs. This 2.5 volt zero pressure DC output voltage is then level translated to the desired zero pressure offset voltage (VOFFSET) by U2C and U2A. To see how the level translation works, assume 0.5 volts at (VOFFSET). With 2.5 volts at pin 10, pin 9 is also at 2.5 volts. This leaves 2.5 - 0.5 = 2.0 volts across R7. Since no current flows into pin 9, the same current flows through R6, producing 2.0 volts across R6 also. Adding the voltages (0.5 + 2.0 +2.0) yields 4.5 volts at pin 8. Similarly 2.5 volts at pin 3 implies 2.5 volts at pin 2, and the drop across R2 is 4.5 V - 2.5 V = 2.0 volts. Again 2.0 volts across R2 implies an equal drop across R1, and the voltage at pin 1 is 2.5 V - 2.0 V = 0.5 volts. For this DC output voltage to be independent of the sensor's common mode voltage it is necessary to satisfy the condition that R6/R7 = R2/R1. Gain is close but not exactly equal to R3/R4(R1/R2+1), which predicts 200.0 for the values shown in Figure 3. A more exact calculation can be performed by doing a nodal analysis, which yields 199.9. Cascading the gains of U2D and U2A using standard op amp gain equations does not give an exact result, because the sensor's negative going differential signal at pin 4 subtracts from the DC level that is amplified by U2A. The resulting 0.5 V to 4.5 V output from U2A is directly compatible with microprocessor A/D inputs. Tying this output to an LM3914 for a bar graph readout is also very straight forward. The block diagram that appears in Figure 4 shows the LM3914’s internal architecture. Since the lower resistor in the input comparator chain is pinned out at RLO, it is a simple matter to tie this pin to a voltage that is approximately equal to the interface circuit’s 0.5 volt zero pressure output voltage. In Figure 2, this is accomplished by dividing down the 5.0 volt regulator's output voltage through R13 and adjustment pot R11. The voltage generated at R11’s wiper is the offset voltage identified as VOFFSET in Figure 3. Its source impedance is chosen to keep the total input impedance to U3C at approximately 1K. The wiper of R11 is also fed into RLO for zeroing the bar graph. The full scale measurement is set by adjusting the upper comparator’s reference voltage to match the sensor’s output at full pressure. An internal regulator on the LM3914 sets this voltage with the aid of resistors R2, R3, and adjustment pot R1 that are shown in Figure 2. Five volt regulated power is supplied by an MC78L05. The LED's are powered directly from LM3914 outputs, which are set up as current sources. Output current to each LED is approximately 10 times the reference current that flows from pin 7 through R3, R1, and R2 to ground. In this design it is nominally (4.5 V/4.9K)10 = 9.2 mA. Over a zero to 50°C temperature range combined accuracy for the sensor, interface and driver IC are +/- 10%. Given a 10 segment display total accuracy for the bar graph readout is approximately +/- (10 kPa +10%). APPLICATION Using the analog output to provide pressure information to a microcomputer is very straightforward. The output voltage range, which goes from 0.5 volts at zero pressure to 4.5 volts at full scale, is designed to make optimum use of microcomputer A/D inputs. A direct connection from the evaluation board analog output to an A/D input is all that is required. Using the MC68HC11 as an example, the output is connected to any of the E ports, such as port E0 as shown in Figure 5. To get maximum accuracy from the A/D conversion, VREFH is tied to 4.85 volts and VREFL is tied to 0.3 volts by dividing down a 5.0 volt reference with 1% resistors. CONCLUSION Perhaps the most noteworthy aspect to the bar graph pressure gauge described here is the ease with which it can be designed. The interface between an MPX2000 series sensor and LM3914 bar graph display driver consists of one quad op amp and a few resistors. The result is a simple and inexpensive circuit that is capable of measuring pressure, vacuum, or differential pressure with an output that is directly compatible to a microprocessor. AN1309 4 Sensors Freescale Semiconductor LM3914 RHI 6 1k 11 – + 12 – + 13 1k – + 14 1k – + 15 1k – + 16 1k – + 17 1k – + 18 1k – + 1 1k V+ 1k 7+ This load determines LED brightness REF ADJ V+ RLO Reference Voltage Source 1.25 V – 8 3 4 10 – + 1k REF OUT Comparator 1 OF 10 – + LED V+ From Pin 11 Mode Select Amplifier 9 – Buffer SIG IN 5 20 k V– Controls type of display bar or single LED 2 + Figure 4. LM3914 Block Diagram AN1309 Sensors Freescale Semiconductor 5 +5 V 15 OHMS 1% +12 V 4.85 V VREFL 453 OHMS 1% 0.302 V VREFH 30.1 OHMS 1% B+ Compensated Sensor Bar Graph Pressure Gauge ANALOG OUT GND Pressure/ Vacuum In M68HC11 0 1 2 3 4 5 6 7 Port E Figure 5. Application Example Compensated Pressure Sensor EVB % Full Scale 100 U1 C1 90 U3 80 C2 40 U3 50 MV57164 60 LM3914N 70 Sensor 30 20 U2 10 R12 R2 R3 R10 R9 R4 R5 R8 R6 R7 TP2 R7 R6 R8 R5 R4 R9 R10 R3 R2 OUT R12 B+ TP1 GND R14 R13 GND DEVB147 Power + R13 R14 ON R11 R1 Zero Full Scale OFF Freescale Discrete Applications Figure 6. Silk Screen AN1309 6 Sensors Freescale Semiconductor Table 1. Parts List Designators Quant. Description C1 C2 1 1 Ceramic Capacitor Ceramic Capacitor D1-D10 D11 1 1 Bar Graph LED LED R2 R3 R4, R5, R9, R13 R6 R7, R8 R10 R12, R14 R1 R11 1 1 4 1 2 1 2 1 1 1/4 Watt Film Resistor 1/4 Watt Film Resistor 1/4 Watt Film Resistor 1/4 Watt Film Resistor 1/4 Watt Film Resistor 1/4 Watt Film Resistor 1/4 Watt Film Resistor Trimpot Trimpot S1 1 U1 U2 U3 Rating Manufacturer Part Number 1.0 µF 0.1 µF GI GI MV57164 MV57124A Bourns Bourns 3386P-1-102 3386P-1-201 Switch NKK 12SDP2 1 1 1 5.0 V Regulator Bar Graph IC Op Amp Freescale National Freescale MC78L05ACP LM3914N MC33274P XDCR1 1 Pressure Sensor Freescale MPX2100DP — — — — 1 1 1 1 Terminal Block Test Point Terminal (Black) Test Point Terminal (Red) Test Point Terminal (Yellow) Augat Components Corp. Components Corp. Components Corp. 2SV03 TP1040100 TP1040102 TP1040104 2.7K 1.2K 1.0K 7.5K 75 820 470 1.0K 200 AN1309 Sensors Freescale Semiconductor 7 How to Reach Us: Home Page: www.freescale.com E-mail: [email protected] USA/Europe or Locations Not Listed: Freescale Semiconductor Technical Information Center, CH370 1300 N. Alma School Road Chandler, Arizona 85224 +1-800-521-6274 or +1-480-768-2130 [email protected] Europe, Middle East, and Africa: Freescale Halbleiter Deutschland GmbH Technical Information Center Schatzbogen 7 81829 Muenchen, Germany +44 1296 380 456 (English) +46 8 52200080 (English) +49 89 92103 559 (German) +33 1 69 35 48 48 (French) [email protected] Japan: Freescale Semiconductor Japan Ltd. Headquarters ARCO Tower 15F 1-8-1, Shimo-Meguro, Meguro-ku, Tokyo 153-0064 Japan 0120 191014 or +81 3 5437 9125 [email protected] Asia/Pacific: Freescale Semiconductor Hong Kong Ltd. Technical Information Center 2 Dai King Street Tai Po Industrial Estate Tai Po, N.T., Hong Kong +800 2666 8080 [email protected] For Literature Requests Only: Freescale Semiconductor Literature Distribution Center P.O. Box 5405 Denver, Colorado 80217 1-800-441-2447 or 303-675-2140 Fax: 303-675-2150 [email protected] AN1309 Rev. 2 05/2005 Information in this document is provided solely to enable system and software implementers to use Freescale Semiconductor products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits or integrated circuits based on the information in this document. Freescale Semiconductor reserves the right to make changes without further notice to any products herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. “Typical” parameters that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals”, must be validated for each customer application by customer’s technical experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights of others. Freescale Semiconductor products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer purchase or use Freescale Semiconductor products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2005. All rights reserved.