Share this

Research on PLC-based water level sensor testing system

2026-04-06 04:34:13 · · #1
Abstract: This paper introduces a PLC control system for testing a water level sensor, including the system control principle, hardware composition, and software design. A touch screen is used as the human-machine interface for parameter setting and monitoring. The entire system is simple to implement and highly reliable. Keywords: test system; programmable logic controller; touch screen 1 Introduction Currently, programmable logic controllers (PLCs) have become one of the most important automation devices in the industrial control field due to their powerful functions, programmability, and intelligence. They are the main means of implementing current electrical programmable control technology. Replacing the traditional relay control method with a PLC control system simplifies wiring, facilitates debugging, and improves system reliability. Touchscreens are high-tech human-machine interface products designed specifically for PLC applications. Due to their advantages such as ease of operation, aesthetically pleasing interface, space-saving control panel, high cost-effectiveness, and good human-machine interaction, they have been increasingly used in industrial control and other fields in recent years. This paper utilizes PLC and touchscreen technology to develop a water level sensor testing system. This system is mainly used for quality inspection of water level sensors used in washing machines. The entire system is simple to implement, has good stability, and a high degree of automation, replacing the previous purely manual operation, better meeting the requirements of actual production, and improving production efficiency. 2 System Control Principle and Requirements The working principle of the water level sensor in the washing machine is to convert changes in water level height into changes in pressure on the diaphragm inside the sensor, thereby causing a change in the sensor's output inductance L. By combining the water level sensor's output inductance with an external circuit to form an LC oscillation circuit, the change in inductance can be converted into a change in oscillation frequency. Different water level heights can generate different oscillation frequencies through the water level sensor. Finally, by detecting the correspondence between the oscillation frequency and the water level height, the quality inspection of the water level sensor can be achieved. [align=center] Figure 1 Control System Principle Block Diagram[/align] Figure 1 is the control system principle block diagram. The testing system is required to accurately measure the oscillation frequency of the oscillation circuit composed of water level sensors at different water levels. High accuracy is required for both water level and oscillation frequency measurements, thus placing high demands on the testing system. The DC motor, acting as the main motor, is controlled by a PLC. The motor uses PID speed regulation, and its output is connected to the actuator via a reduction gear mechanism. This drives a thin steel pipe to move up and down within the water tank, accurately controlling the water level according to the detection requirements. Real-time detection of water level changes is achieved through an encoder, while real-time frequency detection is performed by a high-speed counter on the PLC. Control commands are input to the PLC's input terminals, and the PLC's output terminals are connected to execution relays and operating status indicator lights. The system uses a touchscreen as the human-machine interface, displaying the operation screen and allowing for parameter modification and command input. The touchscreen allows for setting and modifying parameters such as water level rise and fall, real-time display of actual water level changes, output oscillation frequency, and total output, and real-time monitoring of the work process. 3. Control System Hardware Composition Based on the technological characteristics and control requirements of the water level sensor testing system, this system selects the Mitsubishi FX1N-24MR basic PLC, which has 24 input/output points, including 14 input points and 10 relay output points. Its performance indicators such as ambient temperature resistance, shock resistance, and noise resistance all meet the requirements. Figure 2 shows the hardware wiring diagram of the PLC control system. Inputs X0~X1 are the A and B phase output pulse signals of the encoder, X3 is the oscillation frequency signal, and X4~X14 are the signals for buttons, selector switches, limit switches, and count start, etc. Outputs Y0~Y7 control relays, indicator lights, etc., respectively. [align=center] Figure 2 Control System Hardware Wiring Diagram[/align] The water level measurement is mainly accomplished by the encoder. The A and B phases of the encoder can send pulses to the high-speed counting terminal of the programmable controller, and the count value of the pulse is obtained through the high-speed counter C251. When the motor rotates, the count value of the high-speed counter will continuously accumulate. With a well-designed transmission mechanism, each pulse corresponds to a 0.25mm change in water level. The actual water level change can be calculated through programming. The frequency of the oscillation signal can be measured using the PLC's high-speed counter C253. Through programming, the high-speed counter C253 can count the number of pulses of the oscillation signal within a specified time (e.g., 3 seconds), and the count value is stored in data memory D0. Dividing the value in D0 by 3 yields the measured oscillation frequency. The touchscreen uses a cost-effective PWS6600S manufactured in Taiwan, equipped with a 5.7-inch high-definition LCD screen with a resolution of 320×240. It communicates serially with the PLC via an RS232 serial port. It supports static text controls and dynamic objects such as on/off buttons, numerical input, screen buttons, numerical displays, and status indicator controls, and supports Chinese character display. When a variable is specified in a static text control, the touchscreen can display the variable value from the connected PLC on the screen in real time, greatly facilitating system monitoring and status detection for operators. When the operator touches the numerical input control, the PWS6600S automatically pops up a virtual numeric keypad, including numbers from 0 to 9 and functions such as clear, cancel, delete, and confirm. After entering a number, pressing the cancel key cancels the input value, and pressing the confirm key confirms the input. After the virtual numeric keypad disappears, the number in the control becomes the input value, and the corresponding variable in the PLC changes accordingly. When the operator touches controls such as on/off buttons, screen buttons, status indicator lights, and numerical displays, the PWS6600S can trigger events such as button press, button release, screen switching, status display, and numerical display. The operator can then clear data, change the working mode, and select screen displays. 4 System Software Design The system software consists of two parts: PLC control software and touch screen software. The PLC has rich programming instructions and a good software design environment, and can use basic programming languages ​​such as ladder diagrams (LD), sequential function charts (SFC), and instruction lists (IL). This system uses ladder logic programming with FXGP as the programming software. First, a computer (PC) is used for programming and debugging. After successful debugging, the control program is downloaded to the PLC via an interface cable. The PLC program mainly includes a main program and subroutines for segmented rising and falling. The segmented rising and falling subroutines are mainly used to make the thin steel pipe rise and fall in seven segments according to the test requirements, so as to test the frequency of the sensor output at different water levels and thus determine the quality of the water level sensor. Figure 3 shows the PLC program control flowchart. The PWS6600S touchscreen screen is designed and configured using dedicated support software ADP6.0. First, the interface, including windows, menus, and buttons, is designed on a personal computer using this software. After design, the program is downloaded to the PWS6600S touchscreen memory via RS232 serial port. The PLC reads and writes data from the touchscreen status control area and notification area to achieve information interaction between the two. The PLC reads data from the touchscreen status notification area to obtain the current screen number, and forces a screen switch by writing data to the touchscreen status control area. After the touchscreen is powered on, it enters the design screen. Data in the PLC's data memory can be displayed and modified via the touchscreen buttons, enabling communication with the PLC. The screen consists of two parts: one is the display screen, mainly including the system screen, the operating status of the test system, water level display, oscillation frequency output, and daily total output, as shown in Figure 4; the other is the parameter setting screen, mainly used to set the working mode, water level segment rise and fall values, etc., as shown in Figure 5. Due to the PWS6600S touchscreen's strong human-machine interaction capabilities, ease of operation, simple interface, and high reliability, it has achieved good results. 5 Conclusion Applying PLC and touchscreen technology to the water level sensor detection system simplifies operation. Speed ​​and water level can be controlled according to test requirements, greatly improving system reliability and efficiency. It offers high control precision, strong operability, and allows observation of the PLC's internal workings and on-site conditions via the touchscreen, enabling verification of relevant parameters. Operation is flexible and convenient. Since its successful development, this system has been put into use by several water level sensor manufacturers that supply washing machine manufacturers. The system is stable and reliable, and the economic benefits are very obvious. At the same time, it has been well received by users because of its simple operation, strong practicality, and real-time data monitoring. References: [1] Yu Guoliang PLC Principles and Applications [M]. Tsinghua University Press, 2005. [2] Mitsubishi Micro Programmable Controller FX1N Programming Manual, Mitsubishi Corporation, 2001 [3] HITECH Human-Machine Interface Operation Manual, 2003 [4] Yin Lijuan and Gao Suping Automatic Tester for Flexural Test Based on PLC, Microcomputer Information, No. 4, 2006, pp. 52-54
Read next

CATDOLL 123CM Tina (TPE Body with Hard Silicone Head)

Height: 123cm Weight: 23kg Shoulder Width: 32cm Bust/Waist/Hip: 61/54/70cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm Anal...

Articles 2026-02-22