Power supply quality detection and power failure detection method and device of Internet of Things gateway
By detecting the power supply voltage fluctuation frequency and setting the power outage threshold in the Internet of Things gateway in real time, the problem that traditional gateways cannot accurately determine the cause of the fault is solved, and power outage detection is realized to ensure stable operation of the equipment and data storage.
Patent Information
- Application Number
- CN202411258758.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2025-01-03
AI Technical Summary
Traditional IoT gateways lack the ability to monitor power quality and power outage detection, resulting in the inability to accurately determine the cause of equipment failure, affecting the efficiency of operation and maintenance work.
By pre-acquisitioning the average input power supply voltage, setting the reference fluctuation upper and lower limits, detecting the power supply voltage fluctuation frequency in real time, issuing an early warning if the threshold is exceeded, and switching to the backup power supply when the power is off, providing the automatic reset function of power-on.
实现了准确的电源健康状态监控和断电检测,确保设备稳定运行,并能在断电情况下提供临时供电和数据保存能力。
Smart Images

Figure CN119247198A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a power quality detection and power failure detection method and device for an Internet of Things gateway, belonging to the technical field of power supply monitoring. Background Art
[0002] With the widespread application of IoT technology, IoT devices that are used in large quantities in relatively fixed areas often use IoT gateways to connect to devices in the area, manage devices within the network, and provide networking capabilities for devices. Devices operated in this way are mostly unattended. When the device cannot be connected to the Internet, the problem point cannot be accurately analyzed, which will affect the subsequent maintenance work. Some IoT gateways will make judgments on the server side and roughly infer what kind of fault the device has, but they still cannot accurately determine whether the device failure is caused by network abnormalities or power outages.
[0003] Traditional IoT gateways generally do not have the ability to monitor power quality and report power outages. When unattended, if a power failure causes the device to not work stably, it is impossible to remotely identify the problem point and arrange for maintenance. If a power outage occurs on site, the remote server cannot determine whether the device has a network failure or a power outage, which will affect the subsequent maintenance work of the operation and maintenance personnel. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention proposes a power quality detection and power failure detection method and device for an Internet of Things gateway.
[0005] The technical solution of the present invention is as follows:
[0006] On the one hand, the present invention provides a method for detecting power quality and power failure of an Internet of Things gateway, comprising the following steps:
[0007] Collect the average input power supply voltage of the IoT gateway within a fixed time in advance;
[0008] Taking the average input power supply voltage as a reference value, and setting a reference fluctuation upper limit and a reference fluctuation lower limit based on the reference value;
[0009] Collect the input power supply voltage of the IoT gateway in real time, calculate the frequency of the current input power supply voltage fluctuation exceeding the upper and lower limits of the benchmark fluctuation, and if the frequency exceeds the preset threshold, issue an early warning for the power health status of the IoT gateway and upload the early warning information to the server;
[0010] The power-off threshold is set based on the reference value. If the current input power voltage fluctuation of the IoT gateway exceeds the power-off threshold, it is considered that the current power supply is insufficient and the power-off information is reported to the server.
[0011] As a preferred embodiment of the present invention, when the power is cut off, the backup power supply is switched to supply power to the Internet of Things gateway.
[0012] As a preferred embodiment of the present invention, if the power outage time is less than the threshold value and the power of the backup power supply is not exhausted, the original power supply is restored and the Internet of Things gateway is reset.
[0013] On the other hand, the present invention also provides an IoT gateway power quality detection and power failure detection device, including a DC-DC circuit, a diode, an automatic power supply switching circuit, a supercapacitor charging circuit, a supercapacitor, a LOD power conversion circuit, an MCU, and a voltage divider circuit;
[0014] When the DC power supply is input to the device, it is divided into two paths for input into the DC-DC circuit and the voltage divider circuit respectively;
[0015] The DC-DC circuit is connected to the diode input end, the diode output end is respectively connected to the power supply automatic switching circuit and the super capacitor charging circuit input end, the super capacitor charging circuit output end is connected to the super capacitor input end, and the super capacitor output end is connected to the power supply automatic switching circuit input end;
[0016] The output end of the automatic power supply switching circuit is respectively connected to the input end of the Internet of Things gateway and the input end of the LOD power conversion circuit, and the output end of the LOD power conversion circuit is connected to the MCU;
[0017] The MCU is also connected to the output end of the voltage divider circuit and the MCU respectively.
[0018] As a preferred embodiment of the present invention, when the DC power supply is working normally, the current passes through the DC-DC circuit-diode-power supply automatic switching circuit to power the IoT gateway;
[0019] The current passes through the DC-DC circuit-diode-power supply automatic switching circuit-LOD power conversion circuit to power the MCU;
[0020] The current passes through the DC-DC circuit-diode-supercapacitor charging circuit to charge the supercapacitor;
[0021] The MCU detects the voltage value of the DC power supply in real time through a voltage divider circuit.
[0022] As a preferred embodiment of the present invention, when the DC power supply is disconnected, the power supply automatic switching circuit switches to the supercapacitor as the power source to provide temporary power supply for the Internet of Things gateway and MCU.
[0023] As a preferred embodiment of the present invention, the IoT gateway power quality detection and power failure detection device is further provided with a power-on automatic reset circuit;
[0024] When the DC power supply is input, another path is separated and connected to the input end of the power-on automatic reset circuit, and the output end of the power-on automatic reset circuit is connected to the MCU.
[0025] As a preferred embodiment of the present invention, when the power is turned on again after being disconnected, the power-on automatic reset circuit sends a reset signal to the MCU, and the MCU resets the device to an initial state after receiving the reset signal.
[0026] The present invention has the following beneficial effects:
[0027] 1. The present invention collects the input power supply voltage, assisted by the collection and judgment algorithm, to achieve good wide voltage compatibility, accurate power failure detection and reporting capabilities, and long-term power supply health status monitoring capabilities.
[0028] 2. The present invention stores a certain amount of electrical energy through supercapacitors, leaving a period of time for the IoT gateway device to report information and save data after a power outage occurs. The addition of an automatic power supply switching circuit ensures the smooth switching of the power supply and ensures the stable operation of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of the method of the present invention;
[0030] Figure 2 It is a structural diagram of the device of the present invention. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0033] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0034] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0035] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0036] Embodiment 1:
[0037] See also Figure 1 , a power quality detection and power failure detection method for an Internet of Things gateway, comprising the following steps:
[0038] Collect the average input power voltage of the IoT gateway within a fixed time in advance;
[0039] The average input power supply voltage is used as the reference value. Since the collected voltage is in the form of ripples, the reference fluctuation upper limit and the reference fluctuation lower limit are set based on the reference value.
[0040] Collect the input power supply voltage of the IoT gateway in real time, calculate the frequency of the current input power supply voltage fluctuation exceeding the upper and lower limits of the benchmark fluctuation, and if the frequency exceeds the preset threshold, issue an early warning for the power health status of the IoT gateway and upload the early warning information to the server;
[0041] The power-off threshold is set based on the reference value. If the current input power voltage fluctuation of the IoT gateway exceeds the power-off threshold, it is considered that the current power supply is insufficient, and the power-off information is reported to the server. Then the IoT gateway is controlled to save local data and automatically shut down safely.
[0042] Operation and maintenance personnel can comprehensively consider whether maintenance is needed based on the events reported by the gateway (power quality problems, gateway offline, gateway power outage).
[0043] As a preferred implementation of this embodiment, when the power is off, switch to the backup power supply to power the Internet of Things gateway.
[0044] As a preferred implementation of this embodiment, if the power outage time is less than the threshold and the power of the backup power supply is not exhausted, the original power supply is restored and the Internet of Things gateway is reset.
[0045] Embodiment 2:
[0046] See also Figure 2, a power quality detection and power failure detection device for an Internet of Things gateway, including a DC-DC circuit, a diode (the diode includes a traditional Schottky diode, a general diode, an ideal diode circuit and other circuits with a backflow prevention function), an automatic power supply switching circuit, a supercapacitor charging circuit, a supercapacitor, a LOD power conversion circuit, an MCU and a voltage divider circuit;
[0047] When the DC power supply is input to the device, it is divided into two paths for input into the DC-DC circuit and the voltage divider circuit respectively;
[0048] The DC-DC circuit is connected to the diode input end, the diode output end is respectively connected to the power supply automatic switching circuit and the super capacitor charging circuit input end, the super capacitor charging circuit output end is connected to the super capacitor input end, and the super capacitor output end is connected to the power supply automatic switching circuit input end;
[0049] The output end of the automatic power supply switching circuit is respectively connected to the input end of the Internet of Things gateway and the input end of the LOD power conversion circuit, and the output end of the LOD power conversion circuit is connected to the MCU;
[0050] The MCU is also connected to the output end of the voltage divider circuit and the MCU respectively.
[0051] As a preferred implementation of this embodiment, when the DC power supply is working normally, the current passes through the DC-DC circuit-diode-power supply automatic switching circuit to power the IoT gateway;
[0052] The current passes through the DC-DC circuit-diode-power supply automatic switching circuit-LOD power conversion circuit to power the MCU;
[0053] The current passes through the DC-DC circuit-diode-supercapacitor charging circuit to charge the supercapacitor;
[0054] The MCU uses its own ADC peripheral to detect the voltage value of the DC power supply in real time through a voltage divider circuit;
[0055] As a preferred implementation of this embodiment, when the DC power supply is disconnected, the DC-DC circuit cannot provide sufficient power for the subsequent stage, and the power supply automatic switching circuit smoothly switches to the supercapacitor as the power source to provide temporary power supply for the IoT gateway and MCU, and provide power for the device for a period of time to complete operations after power failure, such as saving data and controlling the IoT gateway to upload power failure information to the server;
[0056] When the power supply performance degrades due to various factors, the MCU will collect this information through the voltage divider circuit and report this event to the server through the IoT gateway.
[0057] As a preferred implementation of this embodiment, the IoT gateway power quality detection and power failure detection device is also provided with a power-on automatic reset circuit;
[0058] When the DC power supply is input, another path is separated and connected to the input end of the power-on automatic reset circuit, and the output end of the power-on automatic reset circuit is connected to the MCU.
[0059] As a preferred implementation mode of this embodiment, when the power supply is disconnected and then powered on again, the electric energy in the supercapacitor has not been consumed and the device is still working, but the working state cannot be determined at this time. The power-on automatic reset circuit sends a reset signal to the MCU. After receiving the reset signal, the MCU resets the device to the initial state, thereby ensuring the subsequent stable operation of the device.
[0060] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0061] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0062] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0063] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0064] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for detecting power quality and power failure of an Internet of Things gateway, characterized in that: The following steps are involved: Collect the average input power supply voltage of the IoT gateway within a fixed time in advance; Taking the average input power supply voltage as a reference value, and setting a reference fluctuation upper limit and a reference fluctuation lower limit based on the reference value; Collect the input power supply voltage of the IoT gateway in real time, calculate the frequency of the current input power supply voltage fluctuation exceeding the upper and lower limits of the benchmark fluctuation, and if the frequency exceeds the preset threshold, issue an early warning for the power health status of the IoT gateway and upload the early warning information to the server; The power-off threshold is set based on the reference value. If the current input power voltage fluctuation of the IoT gateway exceeds the power-off threshold, it is considered that the current power supply is insufficient and the power-off information is reported to the server.
2. The method for detecting power quality and power failure of an Internet of Things gateway according to claim 1, characterized in that: When the power is off, switch to the backup power supply to power the IoT gateway.
3. The method for detecting power quality and power failure of an Internet of Things gateway according to claim 2, characterized in that: If the power outage time is less than the threshold and the backup power supply is not exhausted, the original power supply is restored and the IoT gateway is reset.
4. A power quality detection and power failure detection device for an Internet of Things gateway, implementing the methods described in claims 1 to 3, characterized in that: Including DC-DC circuit, diode, automatic power supply switching circuit, super capacitor charging circuit, super capacitor, LOD power conversion circuit, MCU and voltage divider circuit; When the DC power supply is input to the device, it is divided into two paths for input into the DC-DC circuit and the voltage divider circuit respectively; The DC-DC circuit is connected to the diode input end, the diode output end is respectively connected to the power supply automatic switching circuit and the super capacitor charging circuit input end, the super capacitor charging circuit output end is connected to the super capacitor input end, and the super capacitor output end is connected to the power supply automatic switching circuit input end; The output end of the automatic power supply switching circuit is respectively connected to the input end of the Internet of Things gateway and the input end of the LOD power conversion circuit, and the output end of the LOD power conversion circuit is connected to the MCU; The MCU is also connected to the output end of the voltage divider circuit and the MCU respectively.
5. The power quality detection and power failure detection device for an Internet of Things gateway according to claim 4, characterized in that: When the DC power supply works normally, the current passes through the DC-DC circuit-diode-power supply automatic switching circuit to power the IoT gateway; The current passes through the DC-DC circuit-diode-power supply automatic switching circuit-LOD power conversion circuit to power the MCU; The current passes through the DC-DC circuit-diode-supercapacitor charging circuit to charge the supercapacitor; The MCU detects the voltage value of the DC power supply in real time through a voltage divider circuit.
6. The power quality detection and power failure detection device for an Internet of Things gateway according to claim 5, characterized in that: When the DC power supply is disconnected, the power supply automatically switches to the supercapacitor as the power source to provide temporary power for the IoT gateway and MCU.
7. The power quality detection and power failure detection device for an Internet of Things gateway according to claim 6, characterized in that: The IoT gateway power quality detection and power failure detection device is also provided with a power-on automatic reset circuit; When the DC power supply is input, another path is separated and connected to the input end of the power-on automatic reset circuit, and the output end of the power-on automatic reset circuit is connected to the MCU.
8. The power quality detection and power failure detection device for an Internet of Things gateway according to claim 7, characterized in that: When the power supply is turned on again after being disconnected, the power-on automatic reset circuit sends a reset signal to the MCU, and the MCU resets the device to an initial state after receiving the reset signal.
