Liquid Level Control Using A Pressure Senso R: Application Note
Liquid Level Control Using A Pressure Senso R: Application Note
Control
Using
Discrete Products provide a complete solution for designing a low cost system for direct and accurate liquid level control using an ac powered pump or solenoid valve. This circuit approach which exclusively uses Freescale semiconductor parts, incorporate s a piezoresistive pressure sensor with on-chip temperature compensation and a new solid-state rel ay with an integrated power triac, to drive directly th e liquid level control equipment from the domestic 110/220 V 50/60 Hz ac main power line. PRESSURE SENSOR DESCRIPTION The MPXM2000 Series pressure sensor integrates onchip , laser-trimmed resistors for offset calibratio n and te mperature compensation. The pressure sensitive element is a patented, single piezoresistive implant which replaces the fo ur resistor Wheatstone bridge traditionally used by most pressure sensor manufacturers.
Depending on the application and pressure range, the sensor may be chosen from the following portfolio. For this application the MPXM2010GS was selected.
Device Pressure Range Application Sensitivity* MPXM2010GS 0 to 10 kPa 0.01 kPa (1 mm H MPXM2053GS 0 to 50 kPa 0.05 kPa (5 mm H MPXM2102GS 0 to 100 kPa 0.1 kPa (10 mm H MPXM2202GS 0 to 200 kPa 0.2 kPa (20 mm H * After proper gain adjustment
2 O) 2 O) 2 O) 2 O)
Pin 3 RS 1
+ VS R OFF1 R2
R1
RP
Pin 2 + VOU T - VO UT
X-ducer Pin 4
R OFF 2 RS 2 MPAK Axial Port Case 1320A Pin 1 Laser Trimmed On-Chip
POWER ISOLATOR MOC2A60 DESCRIPTION The MOC2A60 is a new isolator and consists of a gallium arsenide, infrared emitting diode, which is optically coupled to a zero-cross triac driver and a power triac. It is capable of driving a load of up to 2 A (rms) directly from a line voltage of 220 V (50/60 Hz).
Device Schematic
sensor output increases above the reference voltage, the output at pin 14 g oes low an d no drive current is available. The amplifier used is an MC33 179 . This is a quad amplifier with large current output drive capability (more than 80 mA). OUTPUT POWER STAGE For safety reasons, it is important to prevent any dire ct contact between the ac main power line and the liquid environment or the tank. In order to maintain full isolation between the sensor circuitry and the main power, the solidstate relay is placed between the low voltage circuit (sensor and a mplifier) and the ac power line used by the pump and compressor. The output of the last stage of the MC33179 is used as a current source to drive the LED (light emitting diode). The series resistor, R8, limits the current into the LED to approximately 15 mA and guarantees an optimum drive for the power opto-triac. The LD1 (MFOE76), which is an infrared light emitting diode, is used as an indicator to detect when the load is under power. The MOC2A60 works like a switch to turn ON or OFF the pump's power source. This device can drive up to 2 A for an ac load and is perfectly suited for the medium power motors (less than 500 watts) used in many applications. It consists of an op to-triac driving a power triac and has a zero-crossing detection to limit the power line disturbance problems when fast switching selfic loads. An RC network, placed in parallel with the output of the solid-state relay is not required, but it is good design practice for managing large voltage spikes coming from the inductive load commutation. The load itself (motor or solenoid valve) is connected in series with the solidstate relay to the main power line. EXAMPLE OF APPLICATION: ACCURATE LIQUID LEVEL MONITORING The purpose of the described application is to provide an electronic system which maintains a constant liquid level in a tank (within 5 mm H 2 O). The liquid level is kept constant in the tank by an ac electric pump and a pressure sensor which provides the feedback information. The tank may be of any size. The application is not affected by the vo lume of the tank but only by the difference in the liquid level. Of course, the maximum level in the tank must correspond to a pressure within the operating range of the pressure sensor. LIQUID LEVEL SENSORS Freescale has developed a piezoresistive pressure sensor family which is very well adapted for level sensing, especially whe n using an air pipe sensing method. These devices may also be used with a bubbling method or equivalent.
1, 4, 5, 6, 8.No Pin 1, 4, 5, 6 1, 4, 5, 6 1, 4, 5, 6, 1, 4, 5, 6, 2LED Cathode 3LED Anode 7Main Terminal 9Main Terminal
Figure 2 . MOC2A60 Is olator SIGNAL CONDITIONING When a full range pressure is applied to the MPXM2010GS, it wi ll provide an output of about 20 mV (at an 8 V supply). Therefore, for an application using only a few percent of the pressure range, the available signal may be as low as a few hundred microvolts. To be useful, the sensor signal must be amplified. This is achieved via a true differential amplifier (A1 and A2) as shown in Figure 4 . The GAIN ADJ (500 ohm) resistor, R G , sets the gain to about 200. The differential output of this stage is amplified by a second stage (A3) with a variable OFFSET resistor. This stage performs a differential to single-ended output conversion and references this output to the adjustable offset voltage. This output is then compared to a voltage (V REF = 4 V at TP2) at th e input of th e third stage (A4). This last amplifier is used as an inverted comparator amplifier with hysteresis (Schmitt trigger) which provides a logic signal (TP3) within a preset range variation of about 10% of the input (selected by the ratio R9/(R9 + R7). If the pressure sensor delivers a voltage to the input of the Schmitt trigger (pin 13) lower than the reference voltage (pin 12), then the output voltage (pin 14) is high and the drive current for the power stage MOC2A60 is provided. When the
AC Line
Control Module Open Pipe Before Calibration Pressure Sensor Air Electrica l Pump H Reference Liquid Level in the Pipe Level
Figure 3. Liquid Level Monitoring LEVEL SENSING THEORY If a pipe is placed vertically, with one end dipped into a liquid and the other end opened, the level in the pipe will be exactly the same as the level in the tank. However, if the upper end o f the pipe is closed off and some air volume is trapped, th e pressure in the pipe will vary proportionally with the liqu id level change in the tank. For example, if we assume that the liquid is water and that th e water level rises in the tank by 10 mm, then the pressure in the pipe will increase by that same value (10 mm of water). A gauge pressure sensor has one side connected to the pipe (pressure side) a nd the other side open to ambient (in this case, atmospheric) pressure. The pressure difference which corresponds to the change in the tank level is measured by the pressure sensor. PRESSURE SENSOR CHOICE In this example, a level sensing of 10 mm of water is desired. The equivalent pressure in kilo pascals is 0.098 06 kPa. In this case, Freescales temperature compensated 0 - 10 kPa, MPXM2010GS is an excellent choice. The sensor output, with a pressure of 0.09806 kPa applied, will result in 2.0 mV/kPa x 0.09806 = 0.196 mV. The sensing system is designed with an amplifier gain of about 1000. Thus, the conditioned signal voltage given by the modu le is 1000 x 0.196 mV = 0.196 V with 10 mm - H 2O pressure.
P MC78L08 +8 VDC C1 Offset Adjust Reference ADJ R OFF R10 R11 N MPXM2010GS 3+ 3 2 2 R1 1 4 RG Gain ADJ + R2 6+ a2 5 7 11 R4 + R3 10 9 8 a3 a4 14 4 a1 1 TP2 Motor TP1 + 12 R6 - 13 R8 D1 R5 TP3 RG = 500 R1, R2 = 100 k R5, R7 = 100 k R3, R4 . . . R6 = 10 k R9 . . . R11 = 10 k R8 = 100 R OFF= 25 k var MOC2A60 R C L a1 . . . a4 = 1/4 MC33179 D1 = MLED76 MC7808ac = REGL 8 VDC TR = TRANSFORMER 220:12 V C1 = 40 F 40 V R9 TR 220 VAC
R7
Pump Voltage (AC220V) Sensing for minimum level (pumping into the tank) The sensing probe is tied to the positive pressure port of the sensor. The pump is turned on to fill the tank when the minimum level is reached.
LEVEL CONTROL MODES This application describes two ways to keep the liquid level constant in the tank; first, by pumping the water out if the liquid level rises above the reference, or second, by pumping the water in if the liquid level drops below the reference. If pumping water out, the pump must be OFF when the liquid level is bel ow the reference level. To turn the pump ON, th e sensor signal must be decreased to drop the input to the Schmitt trigger below the reference voltage. To do this, the sensing pipe must be connected to the NEGATIVE pressure port (back or vacuum side) of the sensor. In the condition when the pressure increases (liquid level rises), the sensor voltage will decrease and the pump will turn ON when the sensor output crosses the referenced level. As pumping continues, the level in the tank decreases (thus the pressure on the sensor decreases) and the sensor signal increases back up to the trigger point where the pump was turned OFF. In the case of pumping water into the tank, the pump must be OFF when the liquid level is above the reference level. To tu rn ON the pump, the sensor signal must be decreased to drive the input Schmitt trigger be low the reference voltage. To do this, the sensing pipe must be connected to the POSITIVE pressure port (top side) of the sensor. In this configuration whe n the pressure on the sensor decreases, (liquid level drops) the sensor voltage also decreases and the pump is tu rned ON when the signal exceeds the reference. As pumping continues, the water level increases and when the maximum level is reached, the Schmitt trigge r turns the pump OFF. ADJUSTMENT S The sensing tube is placed into the water at a distance below the minimum limit l evel anywhere in the tank. The other
end o f the tube is opened to atmosphere. When the tank is filled to the desired maximum (or minimum) level, th e pressure sensor is connected to the tube with the desired port configuration for the application. Then the water level in the tank is the reference. After connecting the tube to the pressure sensor, the modu le must b e adjusted to control the water level. The output voltage at TP1 is preadjusted to about 4.0 V (half of the supply voltage). When the sensor is connected to the tube, the module output is ON (lighted) or OFF. By adjusting the offset adjust potentiometer the output is just turned into the other state: OFF, if it was ON or the reverse, ON, if it was OFF, (the chan ge in the tank level may be simulated by moving the sensing tube up or down). The reference point TP2 shows the ON/OFF re ference voltage, and the switching point of the module is reached whe n the vo ltage at TP1 just crosses the value of the TP2 voltage. The module is designed for about 10 mm of difference leve l between ON and OFF (hysteresis). CONCLUSION This circuit design concept may be used to evalua te pressure sensors used as a liquid level switch. This basic circuit may be easily modified to provide an analog signal of the level within the controlled range. It may also be easily modified to provide tighter level control ( 2 mm H 2 O) by incre asing the gain of the first ampl ifier stage (decreasing RG resistor). The circuit is also a useful tool to evaluate the performance of the power optocoupler MOC2A60 when driving ac loads directly.
NOTES
NOTES
I n f o r ma t i o n i n t h is do c u m en t i s p ro v id e d so l e ly t o en a b l e s y st e m an d s o ft wa r e i m p le m e n t e rs t o u s e F re e sc a le S e mi c on d u ct o r pr o d uc t s. Th e r e a r e n o e xp r e ss or i m p li e d co p yr ig h t li c en s e s g ra n t e d h e re u n de r t o d e s ig n o r f a b ri ca t e a n y in t e g ra t e d c i rcu i t s o r i n t e gr a t e d c ir cu i t s b a se d o n t h e i n f o rm a t io n in t h i s d o cu m e n t .
F re e sc a le a n d t h e F re e sc a le l og o a re t r ad e m a rk s o f Fr ee s ca l e Se m ic o n d uc t o r, I nc . A l l o t h e r p ro d u ct o r se rv ic e n am e s ar e t he p r op e r ty o f t he i r r es p e ct i ve o wn e rs . Fre e s ca le S e m ic o nd u c t o r, I n c . 20 0 5 . A ll ri g ht s re se r ve d .
A N1 51 6 Re v. 4 0 5 / 2 00 5