Texas Instruments Liquid-Level Monitoring Using a Pressure Sensor Application Note

Add to my manuals
8 Pages

advertisement

Texas Instruments Liquid-Level Monitoring Using a Pressure Sensor Application Note | Manualzz

ADC121S101,ADC161S626

Liquid-Level Monitoring Using a Pressure Sensor

Literature Number: SNAA127

SIGNAL PATH designer

®

Tips, tricks, and techniques from the analog signal-path experts

No. 115

Feature Article ............... 1-4

Design Made Easy .............5

Liquid-Level Monitoring Using a Pressure Sensor

— By Amy Le, Applications Engineer

L iquid-level monitoring plays an important role in today’s automotive, oil, water, pressure, and gas industries, to name a few. For example, pumping oil into a storage tank requires liquid-level monitoring to prevent spillage. Draining liquid out of a silo into bottles also requires liquidlevel monitoring for volume control. a pressure sensor. Since obtaining the pressure is just one vital piece of the information, how to convert the sensor’s output voltage into the liquid’s height using an analog-to-digital converter (ADC) will also be explained.

Details of the pressure sensor, ADC connections, system calibration and calculations, as well as an example application, are available to guide designers through the development phase.

Pressure Sensor

Level-Sensing Theory pressure sensor. Placed at the top of the container, the pressure sensor is connected to an open-ended tube that is submerged a proportional amount of pressure on the sensor via the trapped air in the tube. At its output, the sensor produces a pressureequivalent voltage.

Essentially, the pressure sensor is a Wheatstone Bridge

(Figure 1). Changes to the pressure on the bridge are analogous to the changes in the value of the bridge’s resistors, R.

V

BR

R

R

V

SENSE +

V

SENSE

-

R R

Figure 2. Container

Trapped Air in Tube

Height of the Liquid in Container

Figure 1. Bridge Sensor

SIGNAL PATH designer

Liquid-Level Monitoring Using a Pressure Sensor

Hardware

Pressure Sensor

Both confi gurations contain the gain stage to amplify the millivolts sensor output to the reasonable 0V to

NPC-1210 has a typical Full Scale Output (FSO) of of water in the container corresponds to a typical

ADC is read by a microcontroller via SPI and is uploaded to a PC to be analyzed. An example block diagram of the diff erential to single-ended signal path can be seen in Figure 3.

linear relationship is useful information for calculating the liquid’s height and determining the appropriate ADC and amplifi er for the system.

Pressure Pressure

Sensor

V

SENSE +

+

-

V

SENSE -

Instrumentation

Amplifier

V

OUT _AMP

V

IN_ADC

ADC121S101

Figure 3. SP1202S01RB Sensor

Reference Board Block Diagram

D

OUT sensitivity characteristic, which means its output will be in the millivolts range. Since the example application has a small amount of liquid volume

(approximately 540 inches 3 ), a sensitive pressure sensor is adequate. It is important to select the pressure sensor appropriate for a given application.

National Semiconductor’s Sensor WEBENCH

®

online design tool (national.com/appinfo/webench/ sensorpath.html) can help customers in choosing the appropriate sensor based on input range and desired accuracy.

Sensor Reference Board

National’s newest sensor reference boards (Order

No: SP1202S01RB and SP1602S02RB) are ideal sensor interface developments for liquid-level moni-

Pressure Sensor Calibration

Finding the linear relationship between the sensor’s output voltage and height of the liquid requires sensor datasheet states that a typical relationship is

50 mV to 10 inches of liquid. By pouring in the con- tainer ‘x’ inches of liquid and then measuring the sensor’s diff erential output voltage ‘∆y’, where ∆y is

[(Vsense+ ) - (Vsense- )], the sensor can be calibrated.

∆V

SENSOR_OUT

= ( V

SENSE +

) – ( V

SENSE-

)

( 1 )

∆V

SENSOR_OUT

=

∆y ( ( x ( Height ) ( 2 ) board has a diff erential to single-ended confi guration using an instrumentation amplifi er connected to a single-ended, 12-bit, single-channel ADC121S101 tion amplifi er but uses a diff erential, 16-bit, singlechannel ADC161S626 device in a single-ended fashion.

Both boards serve the similar function of amplifying the sensor’s output voltage and converting it to an output code. However, because the resolution for the

SP1602S02RB sensor reference board is higher due to the 16-bit ADC, it is more sensitive to changes in the liquid’s level than the SP1202S01RB sensor reference board. sensor’s diff erential output voltage, ∆V

SENSOR_OUT

, at a new height as seen in Equation 2.

The Liquid’s Height Calculation

As shown in Figure 3, the liquid-level monitoring signal path has three stages. For that reason, calculating the liquid’s height in terms of the ADC and fi nding the gain of the amplifi er and multiplying this gain with the sensor’s output voltage,

∆V

SENSOR_OUT

, to obtain the ADC input voltage,

V

IN_ADC

.

V

IN_ADC

= V

OUT_AMP

= ( ∆V

SENSOR_OUT

) x ( Gain ) ( 3 )

2

SIGNAL PATH designer

Finding the gain of any amplifi er stage can be cumbersome. For simplifi cation, an example calculation for the instrumentation amplifi er (Figure 4) used in the example application can be seen in a

D

OUT_DIFF

=

V

IN_ADC

(

2 x V

(

REF x (2 n

) ( 5a )

D

OUT_SE

=

V

IN_ADC

(

V

REF

( x (2 n

) ( 5b ) superposition and simple op amp equations to derive the ADC input, V

IN_ADC

, and gain of the instrumentation amplifi er stage. To obtain a good common-mode rejection, RF

1

should be equal to

RF

2

; RA

1

should be equal to RA

2

; and RB be equal to RB

2

.

1

should

RB

1

V

SENSE +

V

1 +

-

RG

1

RA

1

RF

1

RF

2

V

2

RA

2

-

+

V

OUT_AMP

= V

IN_ADC

V

X

-

+ RB

2

V

SENSE -

V

1

= (

Figure 4. Instrumentation Amplifi er

V

SENSE+

) × 1

(

+

RF

1

RG

1

(

V

2

= ( V

SENSE+

) ×

( -RF

2

RG

1

(

+ ( V

SENSE-

)

+ ( V

SENSE-

)

×

( -RF

1

RG

1

(

( RF

2

(

RG

1

( 4a )

( 4b )

Finally, the output code is converted to the liquid’s height using Equation 6a for a diff erential ADC or derived from Equation 2 but diff er from Equation 2 because ∆V

SENSOR_OUT

is now written in terms of the

ADC and amplifi er gain.

Height

DIFF

[ x

= x

∆y

[

Height

SE

= x [ [ x

1 ( (

Gain

1 ( (

Gain x

[ x

[

(D

OUT_DIFF

) x (2 x V

REF

)

(2 n

)

(D

OUT_SE

) x (V

REF

)

(2 n

)

[

[

( 6a )

( 6b )

Example Application

An example application is illustrated in Figure 7 in which a container full of water is measured using the NPC-1210 pressure sensor. Water is continuously drained out of the container into an external water tub that contains an electrical pump. When the water level is low, the electrical pump turns on and pumps water back into the tube. When the water level reaches a predetermined point near the top, the pump turns off and awaits the lower trip point to turn on again as water is drained out of the tube.

V

X

=

( RB

2

RB

2

+ RA

2

(

× ( V )

2

( 4c )

( 4d )

To create this continuous fl uctuation of water level, a comparator with hysteresis (Figure 5), an inverter, and a relay switch are added to the previously menV

IN_ADC

= V

OUT_AMP

= V

X

×

[ RB

1

+ RA

1

RA

1

[

V

1

×

( RB

1

(

RA

1

Gain =

V

IN_ADC

∆V

SENSOR_OUT

( 4e ) compared to the reference voltage of the comparator,

V

REF_COMP

(not to be confused with the reference voltage of the ADC). If V

IN_ADC

is greater than

R

2

Next, simple diff erential (DIFF) and single-ended

(SE) ADC formulas can be used to fi nd the ADC output code, D

OUT chosen based on the type of ADC used in a given system. In both confi gurations, V

REF

is the ADC reference voltage and n is the ADC-bit resolution.

V

IN_ADC

R

1

V

REF_ COMP

+

-

V

OUT_COMP

Figure 5. Comparator with Hysteresis signalpath.national.com/designer 3

SIGNAL PATH designer

Liquid-Level Monitoring Using a Pressure Sensor

powered FETs acting as a buff er. Although the inverter is not necessary, the FETs’ main purpose

Pump

On

Pump

Off

Having one pin connected to AC power and the other unconnected, the relay switches between a pump-to-power connection and a pump-to-ground connection.

0

V

IN1

V

IN_ADC

Figure 6. Hysteresis

V

IN 2

V

REF_COMP

, then the comparator’s output is high; otherwise, it’s low. As shown in Figure 6, hysteresis is added to the comparator to create two switching thresholds at V

IN1

and V

IN2

ese switching thresholds represent the positions when the pump turns on and off .

Equations 7a and 7b show how these thresholds can be easily adjusted by changing the comparator’s resistors R

1

and R

2

. It is up to the designer to pick a comfortable reference voltage, V

REF_COMP

, and available resistor values to get the desired threshold voltages.

level monitoring systems that require a safety mechanism. Without depending on software, this hardware connection can turn off the pump when ample application also illustrates the usefulness of the sensor reference board. Its complete signal path design makes enhancing any sensor applications signifi cantly more convenient.

Conclusion

Liquid-level monitoring systems require the use of pressure sensors to measure the pressure, and thus the height, of the liquid. Since the sensor’s output voltage is meaningless to the average users, an ADC is needed to convert the analog voltage to a digital language in which a computer’s software can math-

V

IN1

=

[(V

REF_COMP

) (R

1

+ R

2

)] - [V

CC

R

1

]

R

2

(7a)

V

IN2

=

[(V

REF_COMP

) x (R

1

+R

2

)]

R

2

Pressure Sensor

(7b) signal path design is encapsulated in National’s sensor reference boards. As illustrated in the example application, the SP1202S01RB sensor reference board is ideal for many pressure-sensor applications.

Pump

V

SENSE +

SP1202S01RB Sensor Reference Board

V

REF

V

A

+

Instrumentation

Amplifier

-

ADC121S101 Microcontroller

V

SENSE -

5V

Liquid Monitoring Board

10 kOhm

R

2

R

1

V

REF_COMP

+

-

LMV762

BS270

10 kOhm

Relay

5V

`

AC Line

Unconnected

Tub of Water

Figure 7. Liquid Monitoring System

4

national.com/easy

Discover a wealth of design resources

Explore “how to” videos, online courses, articles, and the latest design technologies.

Find the perfect mix of products for your design

Use National’s online product catalog, downloadable collateral, and featured online sites to compare and select products.

Design, build and validate a solution

Speed time-to-market with the new WEBENCH ® Sensor

Designer and enhanced

WEBENCH Power Designer.

National Semiconductor

2900 Semiconductor Drive

Santa Clara, CA 95051

1 800 272 9959

Mailing address:

PO Box 58090

Santa Clara, CA 95052

Visit our website at: www.national.com

For more information, send email to: [email protected]

Design Tools

WEBENCH

®

Signal Path Designer

®

Tools

Design, simulate, and optimize amplifi er circuits in this FREE online design and prototyping environment allowing you to:

■ Synthesize an anti-alias fi lter

■ Select the best amplifi er/ADC combo for your system specs

■ Make trade-offs based on SNR, SFDR, supply voltage

■ Simulate real-world operating conditions using SPICE

■ Receive samples in 24 hours

webench.national.com

WaveVision 4.1 Evaluation Board

Test and evaluate A/D converters with National’s easy-to use

WaveVision 4.1 evaluation board. Each evaluation board comes complete with USB cable and support software.

Features and benefi ts:

• Plug-n-play ADC evaluation board

• USB 2.0 interface to PC

• PC-based data capture

• Easy data capture and evaluation

• Highlighted harmonic and SFDR frequencies

• Easy waveform examination

• Produces and displays FFT plots

• Dynamic performance parameter readout with FFT

• Produces and displays histograms

Don’t miss a single issue!

when new issues of

Signal Path Designer ® are available: signalpath.national.com/designer

Also, be sure to check out our power.national.com/designer

©2008, National Semiconductor Corporation. National Semiconductor, , WEBENCH, and Signal Path Designer are registered trademarks of National Semiconductor.

All other brand or product names are trademarks or registered trademarks of their respective holders. All rights reserved.

550263-019

IMPORTANT NOTICE

Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI ’ s terms and conditions of sale supplied at the time of order acknowledgment.

TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI ’ s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.

TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.

TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions.

Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.

TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications.

TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or " enhanced plastic.

" Only products designated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer ' s risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use.

TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements.

Following are URLs where you can obtain information on other Texas Instruments products and application solutions:

Products

Audio

Amplifiers

Data Converters

DLP ® Products

DSP

Clocks and Timers

Interface

Logic www.ti.com/audio amplifier.ti.com

dataconverter.ti.com

www.dlp.com

dsp.ti.com

www.ti.com/clocks interface.ti.com

logic.ti.com

Applications

Communications and Telecom www.ti.com/communications

Computers and Peripherals

Consumer Electronics

Energy and Lighting

Industrial

Medical

Security www.ti.com/computers www.ti.com/consumer-apps www.ti.com/energy www.ti.com/industrial www.ti.com/medical www.ti.com/security

Space, Avionics and Defense www.ti.com/space-avionics-defense

Power Mgmt

Microcontrollers

RFID www.ti-rfid.com

OMAP Mobile Processors www.ti.com/omap

Wireless Connectivity power.ti.com

microcontroller.ti.com

www.ti.com/wirelessconnectivity

Transportation and Automotive

Video and Imaging

TI E2E Community Home Page www.ti.com/automotive www.ti.com/video e2e.ti.com

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265

Copyright © 2011, Texas Instruments Incorporated

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement