Designing a liquid level control/delivery system for use in medical & industrial control processesEditor's note: This article describes a cost-effective, low-power, liquid-level control and delivery system based on data acquisition systems (DASs) that use a compensated silicon pressure sensor and a high-precision delta-sigma ADC.
Although pressure sensors are sensitive to temperature, many modern industrial processes as well as commercial and medical applications do not require an extended temperature range. Moreover, some of these applications operate in an air-conditioned environment where the temperature range is quite restricted. Temperature-compensated silicon pressure sensors are well suited for these applications, as they maintain their ratings better as the ambient temperature changes.
This article describes a cost-effective, low-power, liquid-level control and delivery system based on data acquisition systems (DASs) that use a compensated silicon pressure sensor and a high-precision delta-sigma ADC. This reference design is useful for a wide variety of precision sensing and portable applications that must measure and distribute industrial liquids using a noncontact measurement approach. The system uses a compensated silicon pressure sensor to measure and distribute most of the industrial liquids.
The article offers ideas for resolving high-current solenoid valve and pump controls without jeopardizing the high-accuracy delta-sigma ADC-based DAS. It also presents system algorithms, analyzes noise, and offers calibration ideas for improving system performance while reducing complexity and cost. The design described here makes use of the MPX2010 series silicon piezoresistive pressure sensor from Freescale Semiconductor, theMAX11206 ADC, and the MAXQ622 microcontroller,
A simplified block diagram of the development system for this reference design is shown in Figure 1 below.This system features a controlled-liquid reservoir consisting of a vertical plastic water-filled tube equipped with 100mL measurement marks on the side. The thin inner measurement tube is located inside the controlled reservoir and connects directly to the sensor’s positive pressure port, while the reference pressure port is exposed to the atmospheric pressure.
A small DAS PCB directly attached to the pressure sensor provides dynamic control of liquid level measurements. It generates control signals from the PC-based control-and-dispense GUI to activate the valve-driver PCB and pump-driver PCB, and then to deliver a prescribed volume of the liquid to the controlled vessel. The DAS also provides a control signal to the water pump.
The external main liquid reservoir provides large storage capacity for the liquid needed to replenish the controlled-liquid reservoir. It ensures a steady pressure. The water pump turns on whenever the level at the controlled liquid reservoir drops below a defined mark. This action maintains a constant liquid height in the controlled reservoir.
In this reference design pressure applied to the sensor’s positive pressure port is transferred by air trapped in the measurement tube, thereby providing a barrier between the liquid in the reservoir and the sensor. This design makes it possible to use a cost-effective generic pressure sensor in industrial applications with chemically aggressive or corrosive liquids.
Basic System Operation
This system (Figure 1) measures volume by measuring the height of the liquid, which is determined by the pressure inside the sealed tube with liquid pushing the air inside it. As discussed in Part 1 of this article series, the pressure will be directly proportional to the height of liquid in the large container. The air is trapped inside the inner tube, thus causing the pressure to build there. The higher the liquid rises, the more the pressure builds.
The system produces a very good reading of the height of liquid present in the large vessel. With a fixed-diameter outer vessel, the total volume can be calculated by using a simple equation: π × radius × radius × H.
Click on image to enlarge.
Hydrostatic pressure produced by the water column at the bottom of the controlled liquid reservoir uses the trapped air in the measurement tube to produce the same amount of pressure on the sensor. At its output, the pressure sensor produces a pressure equivalent voltage that is measured and digitized by the MAX11206 ADC, processed by the integrated MAXQ622 microcontroller, and finally sent to a PC though the USB cable. The PC-based control-and-dispense GUI then sends a delivery request to the DAS, which activates the valve-driver PCB to deliver a certain amount of the liquid predefined by the software. The DAS also provides control signals to the pump-driver PCB to turn on/off so an constant liquid height is maintained.
Precision and Resolution
For a system like this, we must account for the density of the liquid if we want to dispense by weight. In general, liquid density  varies with changes in temperature. For example, the density of water  increases between its melting point at 0°C and +4°C, reaching a standard value of 999.972 (practically 1000) kg/m3 at +4°C. At room temperature, +22°C, the density of water is 997.774kg/m3. All measurements in this article were done at room temperature around +22°C, ±3°C, where water density varies around ±0.1%. Note that this is below the targeted precision for the DAS referenced in this article. For a typical MPX2010 fullscale range of 10kPa, the water height equivalent is 1.022m. (See Part 1 of this article)
We start by calculating the fullscale voltage swing that we will see from the pressure sensor when the maximum pressure for this sensor, PFS - 10kPa, is applied. Note that 10kPa translates to a water height of 1 meter.
VFS = VFST × (VDD/VPST)
VFS: Fullscale voltage swing when excited by VDD
VPST: Typical excitation voltage
VFST: Fullscale sensor voltage swing when excited by VPST
VDD: Excitation voltage
Since we are exciting this pressure sensor with a VDD of 3.3V instead of the typical VPST of 10V, we will only see a swing of VFS = 8.25mV instead of VFST = 25mV.
VFS = 25mV × (3.3/10) = 8.25mV (fullscale span at 3.3V)
From this equation we know how much of the ADC’s range we require: 8.25mv to measure up to the 1000mm level of water. Note that in this setup the ADC does have a range of 3.3V. In fact, we are not using the full range of 1000mm for this sensor. We are only going to the height of 480mm, which will translate to a pressure range of approximately half of maximum range of 10kPa. To keep it simple, we will just multiply by 0.48 to obtain the new fullscale voltage swing.
The MAX11206 used in this design is a 20-bit delta-sigma ADC suitable for low-power applications that require a wide dynamic range. It has an extremely low input-referred RMS noise of 570nV at 10sps. We know that the noise-free resolution (NFR) is about 6.6 × RMS noise. In this case it will be 2.86µV. (This is also sometimes called the flicker-free code.) The noise-free codes present in the range can be found by dividing the ADC range used by the input-referred noise-free bits size:
Where HFS is the measurement resolution of height. Therefore:
The estimated fullscale resolution at ±0.056% is more than sufficient to achieve the DAS’s target precision of ±1% in this reference design. This proves that the ADC can directly interface with a new compensated silicon pressure sensor without additional instrumentation amplifiers.
Calibration and Calculation
In the current design example liquid is located inside two concentric cylindrical walls. Dispensing volume can be calculated using a linear function based on the two-point calibration, as shown in Figure 2.
Figure 2: Calculation of dispensing volume
In this design example the calibration procedure is based on the points selected at volumes X2 = 3L and X1 = 1.5L. This calibration range was chosen because the control system maintains a constant liquid height around X2 = 3L and the maximum single dispense is 1.5L. Y2 and Y1 represent ADC codes correspondingly.
From two-point calibration and Figure 2, a linear function formula is defined in Equation 4:
∆Y = KCAL × ∆X
∆Y – ADC: the code needed for dispensing ∆X volume of liquid.
KCAL: the calibration coefficient calculated by Equation 5 (see Figure 2).
KCAL = (Y2-Y1)/(X2-X1)
This calculation method works efficiently when two-point calibration is available; it makes volume distribution independent of the specific liquid density.
Figure 3: Simplified block diagram of the pressure-measurement and control DAS PCB
Figure 3 shows the implementation of the pressure-measurement and control DAS PCB with direct interface to the compensated, silicon pressure sensor, utilizing a ratiometric approach. This design allows use of the analog power supply as a reference. The DAS PCB also provides a USB-based interface with the PC-based control-and-dispense GUI software, and it generates control signals to the identical valve-drive PCB and pump-driver PCB. This approach produces a fully automated delivery system.
Figure 4: Schematic for the valve- and pump-driver PCBs
Schematic shows the implementation of the optically isolated driver PCB. Control signals from the DAS PCB are transferred to the driver PCB through a simple two-wire cable and applied directly to the optocoupler U5. The phototransistor output of U5 activates power MOSFET Q1 and provides the high-current drive needed to operate the valve or pump. Optocoupler U5 is the means for the cost-effective galvanic isolation for the DAS PCB’s high-accuracy control over any interference coming from the high-power driver PCBs.
Processing the Data
The firmware in the MAXQ622 microcontroller (Figure 3) provides the data-reading capability to the software through USB. The GUI software manages the following major functions, which are charted in Figure 5:
- Initializes the MAX11200 ADC
- Collects and processes the ADC's output data
- Calculates the code for the volume to be dispensed using Equations 4 and 5
During initialization the MAX11200 ADC goes through the self-calibration process, enables the input signal buffers, and disables system gain calibration and system offset calibration.
Selection of the sampling rate is very important for pressure measurement in industrial and medical applications. This DAS allows reasonably fast data acquisition with excellent (100dB or better) power line 50Hz/60Hz rejection. The recommended external clock for 60Hz line-frequency rejection is 2.4576MHz, which is effective for data rates of 1, 2.5, 5, 10, and 15sps. For 50Hz line-frequency rejection, the recommended external clock is 2.048MHz, which is effective for data rates of 0.83, 2.08, 4.17, 8.33, and 12.5sps. Input signal buffers increase the input impedance to the high-megaohms range. This improves measurement precision because it practically eliminates the shunting effect of the input dynamic current.
The software implements algorithms based on Equations 4 and 5. Raw measurement data is processed inside the PC.
Figure 5. Chart outlines the top-level actions of the DAS firmware and software
Figure 6: Implementation of the development system shown in Figure 1
This system features a controlled liquid reservoir equipped with 100mL measurement marks on the side of the tube. The thin measurement tube is located inside the main liquid reservoir and connects directly to the sensor’s positive pressure port. The control DAS PCB is attached directly to the pressure sensor and permits dynamic measurement of the liquid level. Control signals from the PC-based control-and-dispense GUI activate both the valve-driver PCB and the pump-driver PCB so they deliver a prescribed amount of the liquid to the receiving liquid vessel. The control-and-dispense GUI also provides a control signal to the water pump. The main liquid reservoir stores the liquid needed to replenish and maintain the controlled-liquid reservoir. The water pump turns on when the level in the controlled-liquid reservoir drops below 3 liters and, thus, maintains an constant liquid height of 3 liters.
To test the system, the calibrated receiving liquid vessel was filled repeatedly to the 500mL level with 1mL (0.2%) liquid. Table 1 lists the resulting output code measurements.
Table 1: Output code measurements for receiving liquid vessel filled to the 500mL level
Table 1 shows that this DAS liquid-level control and delivery system based on the MAX11206 ADC achieved better than ±1% precision for 500mL distribution.
New MEMS temperature-compensated silicon pressure sensors are dropping in price and package size. This makes them attractive for a wide variety of precision sensing and portable applications that must measure and distribute industrial liquids using a noncontact measurement approach. These applications require a low-noise delta-sigma ADC such as the MAX11206 to directly interface to the PCB-mounted silicon pressure sensors. With simple compensation schemes, this approach easily increases the absolute accuracy of these pressure sensors.
In the reference design presented here the MAX11206 directly interfaces with new silicon pressure sensors such as the MPXM2010 without needing additional instrumentation amplifiers or dedicated current sources. Thermal errors are reduced, and this allows designers to implement simple linear algorithms which reduce system complexity and cost. The silicon pressure sensors and the ADC create a high-performance, cost-effective, low-power liquid-level control and delivery system that is excellent for these applications.
Joseph Shtargot is a strategic-application engineer for the Signal-Processing and Conversion business unit at Maxim Integrated. He previously was a senior engineer in Apple’s portable-product division and held positions as a computer-aided tomography-scanner development engineer at General Electric and as a staff-development engineer at Metrotech Corp. Shtargot holds two patents and has co-authored several publications on instrumentation and measurement in various industrial applications. He received a master’s degree in electrical engineering from Kiev Polytechnic Institute, Kiev, Ukraine.
Sohail Mirza is strategic-application manager for the Signal-Processing and Conversion business unit at Maxim Integrated, where he leads application and customer support efforts for the high precision ADC group. He was previously a test manager at Maxim and part of a successful startup company in semiconductor testing. Mirza holds a management science and engineering certificate from Stanford University, Stanford, CA, a master’s degree in electrical engineering from San Jose State University, San Jose, CA, and a bachelor’s degree in electrical engineering from the University of Illinois—Urbana-Champaign.
Muhammad Qazi is an application engineer for the Signal Processing and Conversion business unit at Maxim Integrated. He is supporting strategic customers for high-precision A/D conversion products and is developing application-specific demo kits. Qazi served as an R&D Engineer in a previous position. He received a Master's degree in Industrial & Systems Engineering from San Jose State University, San Jose, CA) and a bachelor's degree in electronics engineering from NED University of Technology, Pakistan.
1. Joseph Shtargot, Sohail Mirza, Mohammad Qazi, “Measuring pressure with compensated silicon sensors and precision delta-sigma ADCs”, EE Times, June 19, 2012.
2. For a basic discussion of density, see en.wikipedia.org/wiki/Density.
3. For a basic discussion of water, see en.wikipedia.org/wiki/Water.
“Demystifying Piezoresistive Pressure Sensors”, Maxim Integrated application note 871.
“MAX1455 Diagnostic Clip Boost Circuit”, Maxim Integrated application note 840.
Freescale Semiconductor, “10 kPa On-Chip Temperature Compensated and Calibrated Silicon Pressure Sensors”.
“Design Considerations for a Low-Cost Sensor and A/D Interface”, Maxim Integrated application note 3775.
“Liquid-Level Measurement System Uses a Compensated Silicon Pressure Sensor and Precision Delta-Sigma ADCs”, Maxim Integrated application note 5319.