Water level control system using PLC and wireless sensors Cosmina Illes*, Gabriel Nicolae Popa* and Ioan Filip** *“Politehnica” University of Timisoara, Engineering Faculty of Hunedoara ** “Politehnica” University of Timisoara, Faculty of Automation and Computers Science
[email protected],
[email protected],
[email protected]
Abstract—This paper describes a water level control system, using SIEMENS LOGO! 24RL Programmable Logic Controller (PLC), RTX-MID-3V transceivers, converters and a pump controlled by electrical motor. The maximum water level, the minimum water level, the correct functioning of the motor driven system or some errors that can appear during the functioning of the motor driven system are visually signalled by LED-s connected to the PLC-s outputs. The goal of this paper is to present a low cost method for a water level control using a wireless solution. Key Words-PLC, wireless sensor, transceiver and water level control.
I. INTRODUCTION Today a very important problem is the management of the water resources from all over the world. Water is commonly used in agriculture, industry and in households. In practice are known many types of level control that can be done. But the most common ones are those with overflow control used to prevent exceeding the maximum level that a storage tank can hold and those with fully drain for preventing the pomp to work without liquid. There are cases when the two methods are combined for a maximum use of pumps capacity, for reducing the frequently starts and to reduce working for a short period of time. Low power control system are based on a specialized sensor are very simple but must take in consideration the pumps power and the power that the sensor can switch. Some types of water level control systems can be enumerated: - Water level control systems using programmable logic controller and industrial wireless modules for industrial plants, in this system the process variable is the water level from a tank [1,2,3]. The Programmable Logic Controller (PLC) starts the pump when the water level is minimum and allows it to run until the water reaches the maximum level. - Water level control systems using microcontrollers [4]. This type of system simply starts the pump when the water level is minimum and allows it to run until it is reached the maximum level in the tank. Audio visual alarms at desired levels can be used in the system. - Water level control systems using a wireless fluid level measurement technique. In this system the fluid level sensor is a magnetic field response sensor [5]. A measurement acquisition method for acquiring
measurements from magnetic field response sensors is presented in ref [6-11]. - Water level control systems based on fuzzy logic, water level is controlled using SCADA [12] (supervisory control and data acquisition system). - For a nonlinear water-tank level it is necessary to design a gain scheduling controller for a water level control system. This device has more advantages than a classic PI (proportional-integral) controller, for example, a shorter time required to fill the tank [13]. The advantages of a water level control systems are the possibility of maintaining a constant level at a variable filing or draining flow, avoiding shocks that are introduced in the network when the pump is started, the possibility of using a motor of a different power than the maximum one for a longer interval without frequently turn offs or short functioning. The main disadvantages are the high cost of the level sensors with analogical outputs and of the frequency converter. For drinking water storage tanks are used low power automated systems controlled by a single sensor powered on continuous current at a low voltage where as actuators are used optical sensors. Such system can be used for obtaining an error signal depending on the water level in the tank. A water level control system design must also take in consideration the cost of the system devices. II.
WATER LEVEL CONTROL SYSTEMIMPLEMENTATION ASPECTS
Sensors with floating balloon are frequently used for small home and industrial applications because of their low acquisition cost. T20/T21 is a level sensor with floating balloon assembled above the tank produced by Magnetrol (fig. 1). T20 model has only one level contact, and T21 model has two level contacts for the minimum and the maximum level that can appear between the two commutations. Another level sensor produced by Magnetrol is T62/64, but for this sensor the floating balloon is assembled on the side of the tank. Thermal detection sensors produced by Ameritron are used in the pharmaceutical, chemical, oil and food industry with the possibility of detecting and recognizing a liquid by its heat, a liquid from a solid, the turbulence level inside a storage tank and a fluid flow rate. Optical sensors for detecting fluid level produced by GEMS are a revolutionary type of sensors for industrial and home applications because of their low acquisition
cost. The main disadvantages of this type of sensors are the periodic maintenance tasks and the impossibility of being used in dirty liquid tanks. In the magnetic level sensors case the visual system is different by the way it’s attached to the storage tank.
consumption of 4.5mA, from this mode the transceiver becomes transmitter when DATA IN line is driven high. The transceiver becomes receiver when line TX/RX is driven low and line ENABLE is driven high. In fig.2 is presented the RTX-MID-3V wireless sensor. These transceivers can be supplied with a voltage between 2.1 and 3.6 V.
Figure 2. Pin description:1-antenna, 2-ground, 4-data in, 5-TX/RX, 6enable, 7- ground, 8- analog out, 9- data out, 10- Vcc [15] Figure 1. Level sensor T20/T21 [14]
The liquid enters inside the probe offering a level visual indication besides that offered by the analogical output of 4-20 mA or by the modules mounted directly for obtaining by the level that is set the maximum or minimum control. Contact ultrasonic sensors detect liquids or solids by their viscosity. Contact guided wave radar sensors have a very accurate liquid or fluid particles level detection principle and they are sensors with GWR (Guided Wave Radar) revolutionary technology. Radar sensors for level detection without contact are Pulsar R50 [14], they are produced by Magnetrol and they are the most advanced generation of sensors. Theoretical, they can be used for any substance level measurement including substances that release vapours or with surface turbulences, dielectric liquids and volatile particles. A transceiver that can be used for transmitting or receiving data is RTX-MID-3V. This transceiver has an ASK (Amplitude Shift Keying) modulation, a battery supply and it’s ideal for low cost applications. ASK is a modulation form, which presents the digital information as amplitude variations of a carrier wave. The amplitude of an analogical carrier varies with the modulation signal, keeping constant the frequency and the phase. The amplitude level can be used for binary representing logic 0 and 1. Like amplitude modulation (AM), ASK modulation is linear, sensitive to atmospheric noises and sensitive to distortions. These wireless sensors are used to hand held terminals and to wireless ringers. All transceiver features can be handled by 5 lines: TX/RX, ENABLE, DATA IN, DATA OUT, ANALOG OUT. If line TX/RX is driving low then the transceiver is a receiver and if the line is driving high then is a transmitter. If line ENABLE is driving low then the transceiver is on reducing energy consumption mode, the energy consumption is 8 μA in this case. In this mode the transceiver can’t neighter transmit or receive data. If lines ENABLE and TX/RX are driven high and line DATA IN is driven low then the transceiver is on the Idle mode. In this mode the transceiver is on with
In fig.3 is presented the experimental stand (electronic panel) implementing an automated changeover system controlling the water level and using a resistive electronic sensor. In fig. 4 is presented the diagram of this installation. This diagram can be manual controlled, not only automatic controlled. The sensor used is a resistive electronic sensor with electrodes. The automatic or manual operating mode can be choose by a function selection key that has three positions. On the 0 position the installation is turned off. On the D position the installation is manual controlled by the buttons: on button, off button and error button which is installed by the motor of the pump for emergency stop in case of need. The L position is for automatic control. The system works only when is selected the L position, b7 button is on OP position, the delay time has passed and k 4 is on close position.
Figure 3. Water level control system - experimental stand (partial view)
The minimum level is detected by k1 . When the maximum level is reached, k 2 and k 3 are switching to logic 1, k 2 is ordering through the off button k 0 which memorizes the plug in position through k1 and by an auxiliary contactor. When the maximum water level is decreasing the pump is turned ON through k1 , when the water level is decreasing under the minimum level the power supply of the k 0 contactor coil is stopped and in this way the pumping installation is turned off.
contactor, which supplies voltage to the motor). When the minimum level is reached a LED signals this, the LED is connected to the Q2 programmable logical controller output. When the maximum level it’s reached the sensor sends the information to the convertor, which converts the information received in logic 1 and then it’s interpreted by TX 2 transmitter sensor. The TX 2 transmitter sensor sends the information to RX 2 receiver sensor, the information is converted from logic 1 to 24 V continuous current and then it is introduced into the programmable logic controller by the I 2 input. Using Q1 output the programmable logic controller turns off the pump. When the maximum level is reached a LED signals this, the LED is connected to the Q3 programmable logic controller output.
Figure 4. The diagram of classical control installation for a pump driven by a 5.5 kW motor
III.
WATER LEVEL MEASUREMENT USING WIRELESS SENSORS
The maximum water level measurement and adjustment system accomplished uses a water tank, two RTX-MID3V transceivers, a SIEMENS LOGO! 24RL PLC, four converters and a pump driven by a motor.
For measuring motor speed pump, at the rotors shaft it’s connected an analogical tahogenerator, which at the nominal motor speed has about 24 V output. The PLC input I 3 is used for measuring the pump motor speed (fig. 6). Q4 and Q5 programmable logic controller outputs have connected a LED that signals the motor correct functioning or a motor error. The transmitter sensor TX 1 and the receiver sensor RX 1 have the same frequency, as well as the transmitter sensor TX 2 and the receiver sensor RX 2 . Depending on the relief the distance between the transmitter sensor and the receiver sensor can be hundreds of meters.
Figure 5. The tank’s diagram with the level-logic 1 converters and the transmitter sensors TX 1 and TX 2
The principle of this system is: when the water in the tank is at the minimum level the sensor detects the minimum level and sends the information to level-logic 1 converter which converts the information in logic 1 to be interpreted by the transmitter sensor TX 1 . The transmitter sensor TX 1 sends the information to the receiver sensor RX 1 , the information is converted from logic 1(a signal between 1.2 and 2.6 V, depending on the distance) to 24 V continuous current and then it is introduced into the programmable logic controller by the I 1 input. Using Q1 output the programmable logic controller turns on the pump ( Q1 programmable logic controller output orders K
Figure 6. The PLC inputs and output diagram
The programmable logic controller is powered on 24 V continuous voltage, it has 12 inputs numbered from I 1 to I 12 and 8 outputs numbered from Q1 to Q8 . If it’s considered that the nominal voltage of the LED is 1 V and the nominal current is 10 mA then the value of R2 , R3 , R4 , R5 resistors from fig.6 is determined with the expression:
U S [V ] U LED [V ] I [mA ] The closes nominal value of R2 , R3 , R4 , R5 resistors is 2.7 kΩ, and the power is 0.27 W. R[k]
In fig. 9 it’s presented the variation of the exit voltage when the voltage supply is growing from 0.2 to 0.2 V, for the case when the receiver sensor is driven high and low. In fig. 9 the exit voltage is growing faster when the receiver sensor is driven high than when the receiver sensor is driven low. The used PLC has two types of visual programming languages: - FBD (Function Block Diagram)- using its buttons and display - LAD (LADDER diagram) and FBD- when the programmable logic controller is connected to the computer [16] The PLC program (FBD) is presented in fig. 10.
Figure 7. The variation of the current depending on the voltage supply when it’s transmitted logic 1-experimental measured information
In fig. 7 it’s presented the variation of the current depending on the voltage supply when the transmitter sensor is driven high and the receiver sensor must detect the logic 1. The transmitter sensor current is growing faster then the receiver sensor current.
Figure 8. The variation of the current depending on the voltage supply when it’s transmitted logic 0-experimental measured information
In fig. 8 it’s presented the variation of the current depending on the voltage supply when the transmitter sensor is driven high and the receiver sensor must detect the logic 0. The transmitter sensor and the receiver sensor current is growing constant. In fig. 7 and 8 is presented the current variation when the voltage supply is growing from 0.2 to 0.2 V.
Figure 9. The variation of the exit voltage depending on the voltage supply when the receiver sensor is driven high and low
Figure 10. The PLC program (FBD)
While the sensor send information signalling that the water level is under the minimum level ( I 1 = 0 logic) for the t1 time the pump is turned on. Depending on the motors power, it needs a t 2 turn on time from the B07 block (fig. 10). When the t 2 time has passed it’s considered that the motor reached to the nominal speed and I 3 is driven high. If after the t 2 passed the I 3 isn’t driven high then Q1 output is driven low and the motor is turned off. By measuring the motors speed with the tahogenerator we can determine if the motor is working correctly. B06 input, which is a NOT block, is I 1 which represents the minimum level detection. The NOT blocks output is B05 input, B05 block is a timing block. The second B05 input is the T( t1 ) timing. B07s input, which is a timing block, is I 3 which represents the detection of the nominal motor speed and the T( t 2 ) timing. The two block outputs are inputs for B04 block, which is a NOR block with three inputs. The third input is the expression
lo(driven low). The NOR block output is input for the OR block B03, together with I 2 input, that represents the detection of the maximum level and the expression lo (driven low). B02 block input, which is a NOT block, is I 1 , which represents the minimum level detection. B02 block output is B01 block set input, B01 block is a ResetSet block. The reset input is B03 block output. And the third input is a parametric input represented by the expression lo (driven low). B01 block output is Q1 , which turns on or off the pump. For detecting the minimum and the maximum level, as well as the correct functioning of the motor are used I 1 , I 2 , Q1 inputs and Q2 , Q3 and Q4 outputs. For every block are used logical Or gates and other two inputs driven low. B01 block is presented in fig.12 it’s input is Q1 and Q5 is it’s output , B01 is an inverter detects if the motor is on(because the maximum level it’s reached or the motor failed).
[2] [3] [4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
Figure 11. Experimental panel for the SIEMENS LOGO!24RL programmable logic controller
The program was made on an experimental panel conducted in the laboratory (fig.11). IV. CONCLUSIONS A solution for water level control system using PLC and wireless sensors is proposed, designed, implemented and tested. The advantages of a design based on a PLC are simplicity, flexibility. The water level control system using PLC and wireless sensors is a simple one and combines wireless sensors and programmable logic controllers. The program was made on an experimental panel with a SIEMENS LOGO! 24RL programmable logic controller conducted in the laboratory. Wireless sensors and PLC are modern technologies that can be used for several control systems such as water tank level process. REFERENCES [1]
Ramazan Bayindir, Yucel Centiceviz, “A water pumping control system with a programmable logic controller(PLC) and industrial wireless modules for industrial plants-An experimental setup”,
[14] [15] [16]
Technology Faculty, University of Gazi, Besevler/Ankara, Turkey, 2010 Medida S. Pocket guide industrial automation.first ed. Perth(Australia),2008. Parr EA. Programmable controllers an engineer’s guide. third ed. Burlington: Oxford,2003. S.M. Khaled Reza, Shah Ahsanuzzaman Md. Tariq, S.M. Mohsin Reza, “Microcontroller based automated water level sensing and controlling: design and implementation issue”, Proccedings of the World Congres of Engineering and Computer Science 2010, vol. I, WCECS 2010, San Francisco, USA. Stanley E. Woodard, Bryant D.Taylor, “A wireless fluid-level measurement technique”, NASA Langley Research Center Hampton, VA 23681, June 2006 Woodard, S. E., Taylor, B. D. , Shams, Q. A. and Fox, R. L., “Magnetic Field Response Measurement Acquisition System,” NASA Technical Memorandum 2005-213518, February 2005. Woodard, S. E., Taylor, B. D., Shams, Q. A. and Fox, R. L., “Magnetic Field Response Measurement Acquisition System” submitted to Measurement Science and Technology, Aug 2004. Woodard, S. E. and Taylor, B. D., “Magnetic Field Response Sensor for Conductive Media,” Submitted to U. S. Patent Application Number 10/839,448, April 30, 2004. Woodard, S. E., Taylor, B. D., Shams, Q. A., Fox, R. L. and Bryant, R. G.,“Magnetic Field Response Measurement Acquisition System,” U. S. Patent Application Number 10/839,445, April 30, 2004. Woodard, S. E., Taylor, B. D., Shams, Q. A., and Fox, R. L., “L-C Measurement Acquisition Method For Aerospace Systems,” Proceedings of the 2003 AIAA Aviation Technology, Intergration and Operations Technical Fourm, AIAA Paper No. 2003-6842, Denver,CO, November 17-19, 2003. Taylor, B. D. and Woodard, S. E., “Wireless Fluid Level Measuring System,” Submitted to U.S. Patent Application Number, September 12, 2005. LAR 17155. Zafer Aydogmus, “Implementation of a fuzzy-based level control using SCADA”, Fırat University Technical Education Faculty, Elazıg˘, Turkey, 2008. Miao Wang, Francesco Crusca,” Design and implementation of a gain scheduling controller for a water level control system”, Taiyuan University of Technology, China, Monash University, Australia, 2000 www.megatrol.com www.soselectronic.com/a_info/resource/c/RTX-MID-3V.pdf http://www.shiva.pub.ro/PDF/SCI/Manual_Logo.pdf