Intelligent water leakage sensor
By integrating the composite sensor module and dual-mode communication module in the intelligent water leakage sensor, combined with the PWM output control of the main control microprocessor, the problems of sensor limitations and single alarm mode are solved, and an intelligent water leakage monitoring system with high accuracy and diversified alarms are realized.
Patent Information
- Application Number
- CN202421828508.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2034-07-31
AI Technical Summary
The existing intelligent water leakage sensors have problems such as strong sensor limitations and single alarm methods, which are difficult to effectively detect leakage of pure water or non-conductive liquids, and have poor accuracy in complex environments. The single alarm method limits the notification efficiency in emergencies.
An intelligent water leakage sensor was designed, using a composite sensor module to integrate conductivity sensor, photoelectric sensor and temperature and humidity sensor to form a multi-dimensional water leakage monitoring network. At the same time, dual-mode communication between Wi-Fi/BLE and GSM/GPRS is realized through the dual-mode communication module, providing a diverse remote alarm method. The main microprocessor controls the active buzzer and RGB indicator light through PWM output to achieve flexible alarm sound and lighting prompts.
Through multi-sensor fusion technology, the accuracy and adaptability of water leakage detection are improved, breaking through the limitations of a single sensor in complex environments. It realizes diversified communication and alarm methods in different scenarios, and improves notification efficiency and user response capabilities in emergencies.
Smart Images

Figure CN222965733U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of safety protection, and more precisely to an intelligent water leakage sensor. Background Art
[0002] The emergence of water leakage alarms came into being under the background of the growing demand for efficient water resource management and smart home security in modern society. With the acceleration of urbanization, building pipe systems have become increasingly complex. Coupled with the frequent occurrence of extreme weather events caused by climate change, water leakage accidents have become common safety hazards in homes, commercial places, and even industrial environments. The waste of water resources not only causes economic losses but also may trigger secondary disasters such as structural damage and electrical fires, posing threats to the environment and public safety. Therefore, developing an efficient and reliable water leakage monitoring system has become an important topic for ensuring the safety of modern living and working environments.
[0003] Under such a background, existing water leakage alarms adopt a number of background technologies to achieve timely water leakage detection and alarm. The core lies in the use of the electrode detection principle. The sensor triggers the alarm mechanism by detecting the change in loop resistance caused by the contact of water or other conductive liquids with the sensor. Such alarms usually integrate a microprocessor or integrated circuit, which can convert the resistance change into an electrical signal, and then activate the sound and light alarm, and even send remote notifications through the network. In recent years, with the development of Internet of Things technology, many alarms have been integrated into the smart home ecosystem and can achieve remote monitoring and intelligent linkage through wireless technologies such as Wi-Fi and Bluetooth, improving the response speed and convenience.
[0004] However, even with continuous technological progress, existing water leakage alarms still face challenges such as strong sensor limitations and single alarm methods. The sensor limitations are mainly reflected in the identification of specific liquid types and leakage degrees. Most conductivity-based sensors are difficult to effectively detect the leakage of pure water or non-conductive liquids, and are easily interfered with in complex environments, affecting accuracy. In addition, when the sensor is exposed to a humid environment for a long time, its stability and lifespan also become a major test. The single nature of the alarm method is another common problem. Many products only provide basic sound and light alarms, ignoring the notification needs when users are not on the scene and lacking diverse remote alarm methods such as text messages and APP push notifications, which limits the notification efficiency in emergencies and the user's immediate response ability. Summary of the Utility Model
[0005] The purpose of the present invention is to design an intelligent water leakage sensor to solve the shortcomings of strong limitations and single alarm methods of existing intelligent water leakage sensors.
[0006] To achieve the above technical effects, the utility model adopts the following technical solutions:
[0007] An intelligent water leakage sensor, comprising a main control microprocessor, a composite sensor module, a dual-mode communication module, an energy supply module, a solenoid valve controller, a reset / calibration button K1, a test confirmation button K2, an active buzzer and an RGB indicator light; the composite sensor module includes a conductivity sensor, a photoelectric sensor and a temperature and humidity sensor; the dual-mode communication module includes a Wi-Fi / BLE sub-module and a GSM / GPRS sub-module; the energy supply module includes a charging management IC, a lithium battery and a DC-DC converter; the main control microprocessor is electrically connected to the composite sensor module, the dual-mode communication module, the active buzzer and the RGB indicator light through GPIO pins; the main control microprocessor performs data communication with the dual-mode communication module and the composite sensor module through a serial interface; the main control microprocessor controls the active buzzer and the RGB indicator light through PWM output.
[0008] As a further description of the above technical solution:
[0009] The SDA pin of the conductivity sensor is connected to the PB7 pin of the main control microprocessor; the SCL pin of the conductivity sensor is connected to the PB6 pin of the main control microprocessor; the INT pin of the conductivity sensor is connected to the PA0 pin of the main control microprocessor; the SDA pin of the photoelectric sensor is connected to the PB9 pin of the main control microprocessor; the SCL pin of the photoelectric sensor is connected to the PB8 pin of the main control microprocessor; the DATA pin of the temperature and humidity sensor is connected to the PB5 pin of the main control microprocessor; the SCK pin of the temperature and humidity sensor is connected to the PB4 pin of the main control microprocessor.
[0010] As a further description of the above technical solution:
[0011] The positive and negative electrodes of the lithium battery are respectively connected to the input end of the charging management IC and the power supply interface; the output end of the charging management IC is connected to the input end of the DC-DC converter; the DC-DC converter outputs a stable 5V power supply to the main control microprocessor and other modules.
[0012] As a further description of the above technical solution:
[0013] The Wi-Fi / BLE sub-module and the GSM / GPRS sub-module are connected to the main control microprocessor through a serial interface UART.
[0014] As a further description of the above technical solution:
[0015] The solenoid valve controller uses a solid-state relay SSR-25DA to control the on / off of the solenoid valve without contacts.
[0016] As a further description of the above technical solution:
[0017] The solenoid valve controller includes a solid-state relay, an isolation drive circuit, a protection circuit, a status indicator light, and a solenoid valve. The GPIO output terminal of the main control microprocessor is connected to the control terminal of the solid-state relay through the isolation drive circuit; the output terminal of the solid-state relay is connected to the control coil of the solenoid valve; the solenoid valve controller obtains power from the energy supply module and adjusts it to the voltage required by the solenoid valve through a voltage conversion circuit; the status indicator light is driven by a circuit controlled by the solid-state relay to display the open or closed state of the solenoid valve; the protection circuit is connected in series between the power supply and the solenoid valve to monitor the current and voltage.
[0018] As a further description of the above technical solution:
[0019] The control lines of the active buzzer and the RGB indicator light are respectively connected to the PWM output pins of the main control microprocessor, and the sound frequency and light brightness are controlled by changing the duty cycle of the PWM signal.
[0020] In summary, due to the adoption of the above technical solutions, the beneficial effects of the utility model are as follows: the utility model integrates conductivity sensors, photoelectric sensors and temperature and humidity sensors through a composite sensor module to form a multi-dimensional water leakage monitoring network. The conductivity sensor directly detects liquid leakage, the photoelectric sensor indirectly determines the water leakage by detecting light obstruction, and the temperature and humidity sensor monitors the environmental conditions to ensure that the water leakage can be accurately determined in various complex environments. This multi-sensor fusion technology greatly enhances the accuracy and adaptability of detection, breaking through the limitations of a single sensor in a specific environment. Through the combination of Wi-Fi / BLE module and GSM / GPRS module, the sensor can adapt to LAN communication in a home or office environment, and can also achieve remote monitoring worldwide through GSM / GPRS. This design not only meets the communication needs in different scenarios, but also ensures that alarm information can be sent in time even in areas without Wi-Fi coverage, greatly broadening the scope of application and improving the timeliness and effectiveness of the alarm. The active buzzer and RGB indicator light can be flexibly controlled by the main microprocessor using PWM output, which can not only adjust the frequency and intensity of the alarm sound, but also intuitively display the system status and warning level through lights of different colors, saying goodbye to a single alarm method and improving the user's perception and emergency response speed. The energy supply module integrates charging management IC, lithium battery and DC-DC converter to ensure the long-term stable operation of the sensor. Efficient energy management not only extends the battery life and reduces maintenance costs, but also enables the device to continue to work without an external power supply, enhancing the reliability and autonomy of the system. The settings of the reset / calibration button K1 and the test confirmation button K2 simplify the debugging and maintenance process of the equipment. Users can easily perform on-site calibration or testing to ensure that the sensor maintains the best working condition for a long time, improving the user experience and the maintainability of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor, among which:
[0022] Figure 1 This is the overall working framework diagram of the utility model;
[0023] Figure 2 This is a schematic diagram of the circuit principle of the utility model device;
[0024] Figure 3 This is the working principle diagram of the solenoid valve controller of the utility model;
[0025] Figure 4 Structural schematic diagram of the composite sensor module of the present utility model;
[0026] Figure 5 Structural schematic diagram of the dual-mode communication module of the present utility model;
[0027] Reference numerals in the figure: 1, main control microprocessor; 2, composite sensor module; 3, dual-mode communication module; 4, energy supply module; 5, solenoid valve controller; 6, reset / calibration button K1; 7, test confirmation button K2; 8, active buzzer, 9, RGB indicator light; 501, solid-state relay; 502, isolation drive circuit; 503, protection circuit; 504, status indicator light, 505, solenoid valve. Specific implementation mode
[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present utility model.
[0029] As Figures 1-5 shown, an intelligent water leakage sensor includes a main control microprocessor 1, a composite sensor module 2, a dual-mode communication module 3, an energy supply module 4, a solenoid valve controller 5, a reset / calibration button K1 6, a test confirmation button K2 7, an active buzzer 8 and an RGB indicator light 9; the composite sensor module 2 includes a conductivity sensor, a photoelectric sensor and a temperature and humidity sensor; the dual-mode communication module 3 includes a Wi-Fi / BLE sub-module and a GSM / GPRS sub-module; the energy supply module 4 includes a charging management IC, a lithium battery and a DC-DC converter; the main control microprocessor 1 is electrically connected to the composite sensor module 2, the dual-mode communication module 3, the active buzzer 8 and the RGB indicator light 9 through GPIO pins; the main control microprocessor 1 performs data communication with the composite sensor module 2 through a serial interface with the dual-mode communication module 3; the main control microprocessor 1 controls the active buzzer 8 and the RGB indicator light 9 through PWM output.
[0030] In a specific embodiment, the main control microprocessor 1 (STM32F407ZGT6) is a high-performance 32-bit microcontroller with an embedded ARM Cortex-M4 core and rich peripheral interfaces such as USART, I2C, SPI, ADC, PWM, etc., supporting high-speed operation and real-time control. It is connected to peripherals such as sensors, communication modules, and alarms through GPIO (General Purpose Input / Output) pins. Data communication with communication modules, sensors, etc. is carried out through serial interfaces (USART / I2C / SPI). The PWM output is used to control the buzzer and the RGB indicator 9.
[0031] The composite sensor module 2 includes a conductivity sensor (for detecting conductive liquids), a photoelectric sensor (such as laser ranging for non-conductive liquids or precise liquid level detection), a temperature and humidity sensor, etc. Each sensor is independently packaged and connected to the main control board through a unified interface. The conductivity sensor is connected to the main control board through an analog input interface; the photoelectric sensor and the temperature and humidity sensor are connected through the I2C interface; the sensor module reserves slots or interfaces for easy replacement or upgrade.
[0032] The dual-mode communication module 3 includes a Wi-Fi / BLE module (ESP32-WROOM) and a GSM / GPRS module (SIM800L), each independently packaged, providing wireless data transmission and remote control functions. The ESP32-WROOM is connected to the main control board through UART for Wi-Fi and BLE communication; the SIM800L is also connected through UART for GSM / GPRS communication. Both modules need to be connected with power supply and control signal lines.
[0033] The power supply module 4 includes a lithium battery, a TP4056 charging management chip, a DC-DC converter, etc., providing a stable power supply for the entire system. The positive and negative poles of the lithium battery are respectively connected to the IN and BAT pins of the TP4056; the OUT of the TP4056 is output to the input end of the DC-DC converter; the converter outputs a stable 5V power supply to the main control board and other modules.
[0034] The solenoid valve controller uses a solid-state relay (SSR-25DA) to control the opening and closing of the solenoid valve to achieve automatic water source cut-off. The solenoid valve controller is provided with a control signal by the GPIO of the main control board to turn on or off the relay, thereby controlling the operation of the solenoid valve.
[0035] The reset / calibration button K1 and the test confirmation button K2 are mechanical buttons for manual operation by the user. One end of the button is connected to the GPIO of the main control board and the other end is grounded. When the button is pressed, a circuit is formed to send a signal to the main control board.
[0036] The active buzzer 8 has its own driving circuit, the RGB indicator light 9 can adjust the color and brightness, the control lines of the buzzer and the RGB light are respectively connected to the PWM output pins of the main control board, and the sound frequency and light brightness are controlled by changing the duty cycle of the PWM signal.
[0037] The reset / calibration button is mainly used for soft reset of the device or sensor calibration. When the user finds that the alarm is abnormal or needs to restart the device, you can reset the system by long pressing this button to restore the factory settings or clear the error state. In daily maintenance, short press this button to enter the calibration mode, and with the prompts on the display, you can accurately calibrate the sensor to ensure the accuracy of detection, especially after the first installation or after the environment changes.
[0038] The test / confirm button is mainly used to test the alarm function and user interaction confirmation. During installation or regular inspection, the user can start a simulated test of water leakage detection by short pressing this button. The system will perform a complete detection process, including sensor activation, data analysis, and the issuance of alarm signals (including sound and light alarms and remote notifications). When configuring or modifying alarm settings (such as adjusting alarm thresholds, network settings, etc.), this button can be used as a confirmation button to save and apply user settings. The existence of these two buttons not only improves the convenience of alarm operation, but also enhances the maintainability and user interaction experience of the device, ensuring that the device can be effectively managed and controlled in various situations.
[0039] In a specific implementation, the input end of the main control microprocessor 1 receives the detected water leakage signal and environmental data from the composite sensor module 2. In addition, remote control instructions or status feedback are received from the dual-mode communication module 3. And the status of the reset / calibration button K1 and the test confirmation button K2 are read through GPIO. The output end (signal output) of the composite sensor module 2 is connected to the corresponding GPIO pin of the main control microprocessor 1 for reporting the detection results. The input end (power supply and control signal) is provided by the main control microprocessor 1. The output end (TX) of the dual-mode communication module 3 is connected to the RX pin of the main control microprocessor 1 for sending data. The input end (RX) is connected to the TX pin of the main control microprocessor 1 for receiving control instructions. The control pins (EN, RST) are controlled by the GPIO of the main control microprocessor 1.
[0040] The output terminal of the energy supply module 4 (including the battery, charging management chip, and DC-DC converter) provides stable power for the entire system, including the main control microprocessor 1, composite sensor module 2, dual-mode communication module 3, solenoid valve controller, active buzzer 8, RGB indicator light 9, etc. The input terminal receives external charging or is directly connected to the battery. The input terminal of the solenoid valve controller receives the control signal from the main control microprocessor 1 to control the opening and closing of the solenoid valve. The output terminal controls the action of the solenoid valve. The output terminals (closed signals) of the reset / calibration button K1 and the test confirmation button K2 are directly connected to the GPIO pins of the main control microprocessor 1, indicating that the buttons are pressed. The input terminals of the active buzzer 8 and the RGB indicator light 9 receive the PWM signals from the main control microprocessor 1 to control the changes in sound and light.
[0041] In the above embodiment, the SDA pin of the conductivity sensor is connected to the PB7 pin of the main control microprocessor 1; the SCL pin of the conductivity sensor is connected to the PB6 pin of the main control microprocessor 1; the INT pin of the conductivity sensor is connected to the PA0 pin of the main control microprocessor 1; the SDA pin of the photoelectric sensor is connected to the PB9 pin of the main control microprocessor 1; the SCL pin of the photoelectric sensor is connected to the PB8 pin of the main control microprocessor 1; the DATA pin of the temperature and humidity sensor is connected to the PB5 pin of the main control microprocessor 1; the SCK pin of the temperature and humidity sensor is connected to the PB4 pin of the main control microprocessor 1.
[0042] In a specific embodiment, SDA is one of the signal lines in the I²C (Inter-Integrated Circuit) bus and is used for bidirectional data transmission. In I²C communication, the data transmitted on the SDA line is from the host to the slave or from the slave to the host. The data line performs read and write operations of data synchronously with the clock signal SCL. SCL is another signal line of the I²C bus and is used to provide a clock signal to synchronize data transmission. All data transmissions are sampled at the rising edge or falling edge of SCL to ensure the synchronization of data transmission. DATA generally refers to a general data transmission line, which may have different meanings in different contexts. In SPI (Serial Peripheral Interface) communication, it is called MOSI (Master Output, Slave Input) or MISO (Master Input, Slave Output) and is used for unidirectional data transmission. In some simple serial communication protocols, DATA may directly refer to the data transmission line without specifying a particular communication protocol. SCK is the clock signal line in SPI communication, similar to SCL in I²C, and is used to synchronize data transmission. In SPI communication, SCK is generated by the master device and is used to control the rate and timing of data transmission. INT is a commonly used control signal line and is used for peripheral devices (such as sensors, controllers, etc.) to send interrupt requests to the microcontroller or processor. When a peripheral device needs to immediately attract the attention of the main processor (for example, data is ready or an error occurs, etc.), it will set the INT line to a high level or a low level (depending on the system design) to notify the processor to process the corresponding interrupt service routine (ISR).
[0043] The conductivity sensor and the photoelectric sensor are connected to the main control microprocessor 1 through the I²C bus. SDA (Serial Data) is used for bidirectional data transmission, and SCL (Serial Clock) provides a clock signal to synchronize data transmission. This indicates that these sensors support intelligent configuration and reading of measurement results. The main control establishes communication with the conductivity sensor through PB6 (SCL) and PB7 (SDA), and with the photoelectric sensor through PB8 (SCL) and PB9 (SDA) to read the detected changes in water body conductivity (for directly detecting water leakage) and light intensity changes (indirectly judging whether there is water blockage and assisting in detection). The temperature and humidity sensor uses another serial communication protocol (such as Dallas 1-Wire), where the DATA pin (PB5) is used for bidirectional data transmission and also undertakes the clock function, while the SCK pin (PB4) may be used as a strobe or auxiliary control signal in this context, depending on the model of the temperature and humidity sensor used. Such sensors are mainly used for environmental temperature and humidity monitoring to help the system evaluate the possibility of water leakage or environmental adaptability.
[0044] During the implementation process, first ensure that all sensors are correctly installed and in good contact with the monitored environment. The main control microprocessor 1 activates the I²C and single-wire communication interfaces in sequence through a pre-programmed initialization sequence, identifies and configures the address of each sensor, and sets the necessary reading cycle or trigger threshold. Once the sensors detect abnormal water conductivity (conductivity sensor), light changes (photoelectric sensor), or the environmental temperature and humidity reach the preset conditions (temperature and humidity sensor), they will report data to the microprocessor or trigger an interruption through the corresponding communication interface (for example, the INT pin of the conductivity sensor is connected to PA0 for real-time alarm).
[0045] In the above embodiment, the positive and negative electrodes of the lithium battery are respectively connected to the input end of the charging management IC and the power supply interface; the output end of the charging management IC is connected to the input end of the DC-DC converter; the DC-DC converter outputs a stable 5V power supply to the main control microprocessor 1 and other modules.
[0046] In a specific embodiment, the charging management IC integrates a battery charging control and protection mechanism, which can intelligently adjust the charging current and voltage according to the battery state to ensure safe and efficient charging of the battery, while preventing dangerous situations such as overcharging, over-discharging, and short circuits. During the charging process, the positive and negative electrodes of the battery are connected to the charging management IC through a protection circuit, and the charging management IC dynamically adjusts the charging strategy according to the built-in algorithm and battery characteristics. Subsequently, the output end of the charging management IC is connected to the input end of the DC-DC converter. The DC-DC converter is a switching power supply converter that can convert the input unstable voltage (from the output of the charging management IC, which changes with the battery state) into a stable 5V DC voltage, which is the ideal operating voltage for most electronic components (including microprocessors and other sensor modules). The DC-DC converter achieves efficient energy conversion and stable voltage output through high-frequency switching technology and passive components such as inductors and capacitors, reducing energy loss.
[0047] During implementation, first ensure that the lithium battery is correctly installed and connected to the input terminal of the charging management IC through a protection circuit. This protection circuit automatically cuts off the power supply in case of battery abnormalities to ensure safety. After the charging management IC receives an external power supply (such as USB charging, adapter), it starts to intelligently charge the battery while monitoring the battery temperature, voltage, and charging status to ensure the safety and reliability of the entire charging process. When the battery is fully charged or the system starts, the output voltage of the charging management IC supplies the DC-DC converter. The DC-DC converter starts and, through the internal high-frequency switching control and filtering circuit, stably converts the input voltage to 5V and then distributes it to the main control microprocessor 1 and other modules (such as sensors, communication modules, etc.). Each component in the system is connected to the output of the DC-DC converter through a reasonable power line layout according to the design requirements to form a complete power supply network.
[0048] The application of this power connection scheme in the intelligent water leakage sensor significantly improves the stability and energy utilization efficiency of the system. First of all, it ensures the continuous operation ability of the system. Even when the external power supply is unavailable, it can rely on the lithium battery to maintain operation, enhancing the independence and reliability of the system. Secondly, the combination of efficient charging management and DC-DC conversion technology effectively extends the battery life and reduces energy consumption, which is particularly important for devices relying on battery power. Moreover, the stable 5V power output provides unified and high-quality power support for all electronic components, ensuring the accuracy of sensor data acquisition, the efficiency of processor operation, and the reliable transmission of the communication module, thus improving the performance and user experience of the entire system. Finally, this scheme also facilitates the maintenance and upgrade of the system because the power distribution between modules is clear, making it easy to troubleshoot and replace, increasing the flexibility and scalability of the system.
[0049] In the above embodiment, the Wi-Fi / BLE sub-module and the GSM / GPRS sub-module are connected to the main control microprocessor 1 through the serial interface UART.
[0050] In a specific embodiment, the dual-mode communication module 3 integrates the Wi-Fi / BLE sub-module and the GSM / GPRS sub-module, providing a flexible wireless communication solution that is suitable for both short-range wireless communication (such as home automation, device interconnection in a local area network environment) and long-range wide area network communication (such as remote monitoring, alarm information transmission).
[0051] The Wi-Fi part includes a Radio Frequency Front End (RF Front End), a Media Access Control (MAC) baseband processing unit, a Power Management Unit (PMU), and a memory. The Wi-Fi sub-module receives and transmits wireless signals in the 2.4 GHz or 5 GHz frequency band through an antenna, follows the IEEE 802.11 standard, supports connection to a router or hotspot, and enables high-speed data transmission. The BLE part (Bluetooth Low Energy) includes an RF transceiver, a Digital Signal Processor (DSP), a controller, and a flash memory, etc. BLE is designed for low-power scenarios and uses two modes, Advertising and Connection, for data exchange, and is suitable for short-distance, low-speed data transmission and status updates between devices.
[0052] Among them, the main control microprocessor 1 communicates with the Wi-Fi / BLE sub-module through a serial interface (such as UART, SPI, or I2C) to send control commands or receive data. Wi-Fi and BLE each require an independent or shared antenna, which is connected to the RF front end of the module through a matching circuit to ensure good signal transmission and reception. The power supply line of the module is directly connected to the stable voltage output by the DC-DC converter to ensure a stable power supply. The main control microprocessor 1 controls the switch, mode switching, etc. of the Wi-Fi / BLE sub-module through GPIO.
[0053] The hardware circuit of the GSM / GPRS sub-module includes: a baseband processor: processing the modulation and demodulation, encoding and decoding, and signal processing of GSM / GPRS signals; a radio frequency unit: responsible for the transceiver of wireless signals within the GSM frequency range (such as 900 MHz and 1800 MHz); a SIM card interface: used to insert a SIM card to achieve authentication and data exchange with the mobile network; power management: managing the power requirements of the module, including battery charging monitoring and voltage conversion; a memory: storing firmware and temporary data.
[0054] Among them, the main control microprocessor 1 also exchanges data and control instructions with the GSM / GPRS sub-module through a serial interface (such as UART). The SIM card holder connects to the SIM card to provide authentication information for network connection. The antenna interface is connected to the antenna through a matching circuit to ensure the transmission quality of GSM / GPRS signals. The power supply line obtains power from the energy supply module 4 and may require dedicated power management control lines for status monitoring and control. The main control microprocessor 1 can control the power on, power off, sending of text messages, or establishment of a data connection, etc. of the GSM / GPRS sub-module through control signal lines to achieve GPIO control.
[0055] In the above embodiment, the solenoid valve controller 5 uses a solid-state relay SSR-25DA to control the switch of the solenoid valve without contacts.
[0056] In the above embodiments, the solenoid valve controller 5 includes a solid-state relay 501, an isolation drive circuit 502, a protection circuit 503, a status indicator light 504, and a solenoid valve 505. The GPIO output terminal of the main control microprocessor 1 is connected to the control terminal of the solid-state relay 501 through the isolation drive circuit 502; the output terminal of the solid-state relay 501 is connected to the control coil of the solenoid valve 505; the solenoid valve 505 controller obtains power from the energy supply module 4 and adjusts it to the voltage required by the solenoid valve 505 through a voltage conversion circuit; the status indicator light 504 is driven by a circuit controlled by the solid-state relay 501 to display the open or closed state of the solenoid valve 505; the protection circuit 503 is connected in series between the power supply and the solenoid valve 505 to monitor the current and voltage.
[0057] In a specific embodiment, the GPIO output terminal of the main control microprocessor 1 is configured in an output mode. The GPIO output terminal is connected to the control terminal (generally marked as IN) of a solid-state relay (SSR) through an isolation drive circuit (such as an optocoupler or a magnetic coupler). The purpose of this is to enhance signal isolation and improve the anti-interference ability of the system. When the main control microprocessor 1 detects a water leakage signal, the corresponding GPIO outputs a high level (or a low level, depending on the SSR model), triggering the relay inside the optocoupler or magnetic coupler to act, thereby controlling the conduction or cutoff of the SSR.
[0058] The output terminal (OUT) of the solid-state relay is connected to the control coil of the solenoid valve. When the SSR conducts, current is allowed to pass through the control coil of the solenoid valve, and the electromagnet inside the solenoid valve attracts, opening or closing the valve (depending on the design of the solenoid valve).
[0059] The status indicator light (LED) is connected in parallel with the output terminal of the solid-state relay through a resistor (or directly controlled through an auxiliary contact / status output terminal). When the solenoid valve is opened or closed, the change in the state of the solid-state relay will drive the LED to light up or go out through the circuit, intuitively displaying the working state of the solenoid valve.
[0060] Specifically, after the main control microprocessor 1 detects a water leakage signal, it outputs a signal through the GPIO. This signal is amplified or converted by the isolation drive circuit to trigger the solid-state relay. The solid-state relay conducts, allowing power to pass through, the solenoid valve control coil obtains voltage, and the solenoid valve operates. At the same time, the change in the state of the solid-state relay controls the status indicator light through the circuit to display the current state of the solenoid valve. The protection circuit monitors the current and voltage throughout the process to ensure the safety of the circuit.
[0061] In the above embodiments, the control lines of the active buzzer 8 and the RGB indicator light 9 are respectively connected to the PWM output pins of the main control microprocessor 1, and the sound frequency and the light brightness are controlled by changing the duty cycle of the PWM signal.
[0062] In a specific embodiment, pulse width modulation (PWM) technology is adopted for the control of both the active buzzer 8 and the RGB indicator light 9. PWM is a method of simulating different average voltages by quickly switching the output signal and adjusting the high-level time (i.e., the duty cycle) of the signal within one cycle. For the active buzzer 8, by changing the frequency of the PWM signal, different frequencies of sound can be emitted by the buzzer; for the RGB indicator light 9, by adjusting the duty cycle of the PWM signal, the average current flowing through the LED can be controlled, thereby changing its brightness. An oscillation circuit is integrated inside the active buzzer 8, and it can work only by providing a square wave signal with an appropriate frequency. The main control microprocessor 1 sends pulse signals with different frequencies to the buzzer through the PWM output, and by changing the frequency of the pulse, the beeping frequency of the buzzer can be adjusted, so as to realize the change of the alarm sound. For example, when water leakage is detected, different fast and slow alarm sounds are emitted to indicate the warning level. The RGB light is composed of red, green, and blue LEDs, and the brightness of each color LED is controlled by a separate PWM signal. Mixing different proportions of the three primary colors of light can produce rich color effects. The main control microprocessor 1 controls the brightness of the RGB light through three independent PWM outputs, and by adjusting their respective duty cycles, the brightness of each color can be changed to achieve a colorful visual prompt. For example, green indicates normal, red indicates alarm, and blue is used for special status indication, etc.
[0063] During the implementation of the intelligent water leakage sensor, first, the main control microprocessor 1 calculates the parameters (frequency and duty cycle) of the corresponding PWM signal according to the preset logic or the detected water leakage state. Then, through the PWM output pins of the microprocessor, these pulse signals are sent to the control ends of the active buzzer 8 and the RGB indicator light 9. For the buzzer, the microprocessor sets the corresponding frequency according to the required alarm mode; for the RGB indicator light 9, the duty cycles of the three color channels are adjusted according to the preset color code to display a specific color and brightness.
[0064] Through fine adjustment of PWM, not only can the diversification of the alarm sound of the active buzzer 8 and the richness of the brightness and color of the RGB indicator light 9 be realized, but also the energy consumption can be effectively reduced and the battery life can be extended while maintaining the effect. Different frequencies of beeping sounds and colorful light prompts provide intuitive and clear alarm and status information for users, facilitating users to quickly understand and respond, and improving the usability and user experience of the system. The flexibility of the PWM control strategy allows the alarm mode and indication logic to be adjusted through software upgrade in the later stage without hardware modification, which is convenient for system maintenance and function upgrade, and enhances the adaptability of the product and the potential for future development.
[0065] Although the specific embodiments of the present utility model have been described above, those skilled in the art should understand that these specific embodiments are only illustrative examples. Without departing from the principles and essence of the present utility model, those skilled in the art can make various omissions, substitutions, and changes to the details of the above methods and systems. For example, combining the above method steps so as to perform substantially the same function in a substantially the same manner to achieve substantially the same result falls within the scope of the present utility model. Therefore, the scope of the present utility model is only defined by the appended claims.
Claims
1. An intelligent water leakage sensor, characterized in that: The invention comprises a main control microprocessor (1), a composite sensor module (2), a dual-mode communication module (3), an energy supply module (4), a solenoid valve controller (5), a reset / calibration button K1 (6), a test confirmation button K2 (7), an active buzzer (8) and an RGB indicator light (9); the composite sensor module (2) comprises a conductivity sensor, a photoelectric sensor and a temperature and humidity sensor; the dual-mode communication module (3) comprises a Wi-Fi / BLE submodule and a GSM / GPRS submodule; the energy supply module (4) comprises a charging management IC, a lithium battery and a DC-DC converter; the main control microprocessor (1) is electrically connected to the composite sensor module (2), the dual-mode communication module (3), the active buzzer (8) and the RGB indicator light (9) through a GPIO pin; the main control microprocessor (1) performs data communication with the dual-mode communication module (3) and the composite sensor module (2) through a serial interface; and the main control microprocessor (1) controls the active buzzer (8) and the RGB indicator light (9) through a PWM output.
2. The intelligent water leakage sensor according to claim 1, characterized in that: The SDA pin of the conductivity sensor is connected to the PB7 pin of the main control microprocessor (1); the SCL pin of the conductivity sensor is connected to the PB6 pin of the main control microprocessor (1); the INT pin of the conductivity sensor is connected to the PA0 pin of the main control microprocessor (1); the SDA pin of the photoelectric sensor is connected to the PB9 pin of the main control microprocessor (1); the SCL pin of the photoelectric sensor is connected to the PB8 pin of the main control microprocessor (1); the DATA pin of the temperature and humidity sensor is connected to the PB5 pin of the main control microprocessor (1); and the SCK pin of the temperature and humidity sensor is connected to the PB4 pin of the main control microprocessor (1).
3. The intelligent water leakage sensor according to claim 1, characterized in that: The positive and negative electrodes of the lithium battery are respectively connected to the input end of the charging management IC and the power supply interface; the output end of the charging management IC is connected to the input end of the DC-DC converter; and the DC-DC converter outputs a stable 5V power supply to the main control microprocessor (1) and other modules.
4. The intelligent water leakage sensor according to claim 1, characterized in that: The Wi-Fi / BLE submodule and the GSM / GPRS submodule are connected to the main control microprocessor (1) via a serial interface UART.
5. The intelligent water leakage sensor according to claim 1, characterized in that: The solenoid valve controller (5) uses a solid-state relay SSR-25DA to control the switch of the solenoid valve without contact.
6. The intelligent water leakage sensor according to claim 1, characterized in that: The solenoid valve controller (5) comprises a solid-state relay (501), an isolation drive circuit (502), a protection circuit (503), a status indicator light (504) and a solenoid valve (505); the GPIO output end of the main control microprocessor (1) is connected to the control end of the solid-state relay (501) through the isolation drive circuit (502); the output end of the solid-state relay (501) is connected to the control coil of the solenoid valve (505); the solenoid valve (505) controller obtains power from the energy supply module (4) and adjusts the power to the voltage required by the solenoid valve (505) through a voltage conversion circuit; the status indicator light (504) is driven by a circuit controlled by the solid-state relay (501) to display the open or closed state of the solenoid valve (505); the protection circuit (503) is connected in series between the power supply and the solenoid valve (505) to monitor the current and voltage.
7. The intelligent water leakage sensor according to claim 1, characterized in that: The control lines of the active buzzer (8) and the RGB indicator light (9) are respectively connected to the PWM output pins of the main control microprocessor (1), and the sound frequency and the light brightness are controlled by changing the duty cycle of the PWM signal.