Disclosure of Invention
The application provides an alternating-current phase line on-off detection device and an on-off detection method thereof, which can realize remote real-time check of the on-off condition of a phase line without wiring.
In view of this, a first aspect of the present application provides an ac phase line on-off detection device, including:
the phase line on-off detection module, the control module and the wireless communication module;
the phase line on-off detection module is used for acquiring on-off signals of the phase line and sending the on-off signals to the control module;
the control module is used for setting a phase line on-off detection mark after receiving the on-off signal, packaging phase line on-off detection data if the phase line on-off detection mark is set after being continuously delayed for a plurality of times, and sending the phase line on-off detection data to a remote server through the wireless communication module;
and the wireless communication module adopts LoRaWAN to send the packed phase line on-off detection data to the remote server and receive downlink data issued by the remote server.
Optionally, the phase line on-off detection module comprises a rectifier bridge, a first capacitor, an optocoupler isolator, a plurality of resistors and a light emitting diode;
the rectifier bridge is connected with the phase line and is used for converting alternating current into direct current and keeping the phase sequence of the input phase line unchanged;
the first capacitor is used for triggering the reporting of one-time on-off signals when the device is powered off;
The optical coupler isolator is used for eliminating interference in the phase line on-off detection module.
Optionally, the phase line on-off detection module specifically includes:
the first alternating current input port of the rectifier bridge is connected with a phase line, the second alternating current input port is sequentially connected with a fifth resistor, a fourth resistor and a third resistor in series, and the other end of the third resistor is connected with a zero line;
the third input end of the optocoupler isolator is grounded, the fourth output end of the optocoupler isolator is respectively connected with a sixth resistor and a phase line on-off detection signal output port, the other end of the sixth resistor is respectively connected with a 3.3V power supply and a seventh resistor, the other end of the seventh resistor is connected with the anode of the light emitting diode, and the cathode of the light emitting diode is grounded.
Optionally, the first capacitance is a capacitor of 100 uf/50V.
Optionally, the method comprises the following steps:
and the zero-heat power source conversion module is used for converting commercial power into 3.3V direct-current voltage and supplying power for the phase line on-off detection module, the control module and the wireless communication module.
The second aspect of the application provides an on-off detection method of an on-off detection device of an alternating-current phase line, which comprises the following steps:
acquiring on-off signals of the phase line on-off detection module in real time, and judging whether a phase line on-off detection mark is set or not;
if the phase line on-off detection mark is set and is detected continuously for a plurality of times, judging that the phase line on-off detection mark is set;
and packaging the current phase line on-off detection data, and reporting the data to a remote server through the LoRaWAN.
Optionally, if the phase line on-off detection flag is set, and the phase line on-off detection flag is set when the phase line on-off detection flag is continuously and repeatedly detected in a delayed manner, the phase line on-off detection flag is set is judged, which specifically includes:
s1, if the phase line on-off detection mark is set, detecting whether the phase line on-off detection mark is set again after waiting for 100 ms;
and repeating the step S1 for n times, and judging that the phase line on-off detection mark is set if the phase line on-off detection mark is still set.
Optionally, the step of packaging the current phase line on-off detection data and reporting the data to a remote server through the lorewan includes:
And packaging the current phase line on-off detection data, calling LoRaWAN uplink communication to transmit to a gateway, replying a confirmation character by the gateway, and reporting the phase line on-off detection data to a remote server.
Optionally, the step of packaging the current phase line on-off detection data, reporting the current phase line on-off detection data to a remote server through the LoRaWAN, and then further includes:
the gateway receives downlink data issued by a remote server and transmits the downlink data to the alternating-current phase line on-off detection device;
after the alternating current phase line on-off detection device reports data to the gateway, the gateway packages the reported data, replies a confirmation character to the alternating current phase line on-off detection device, and reports the packaged data to the remote server.
From the above technical solutions, the embodiment of the present application has the following advantages:
The embodiment of the application provides an alternating-current phase line on-off detection device which comprises a phase line on-off detection module, a control module and a wireless communication module, wherein the phase line on-off detection module is used for acquiring on-off signals of a phase line and sending the on-off signals to the control module, the control module is used for setting a phase line on-off detection mark after receiving the on-off signals, packaging phase line on-off detection data and sending the phase line on-off detection data to a remote server through the wireless communication module if the phase line on-off detection mark is set continuously for a plurality of times, and the wireless communication module is used for sending the packaged phase line on-off detection data to the remote server through a LoRaWAN and receiving downlink data issued by the remote server.
According to the application, the phase line on-off detection module is used for collecting on-off signals in real time and sending the on-off signals to the control module, the control module is used for packaging phase line on-off detection data after detecting that the phase line on-off detection mark is set continuously and repeatedly in a delay mode, and the wireless communication module is used for sending the packaged phase line on-off detection data to the remote server by adopting the LoRaWAN, so that a user can remotely check the on-off condition of the alternating current phase line in real time without wiring.
Detailed Description
According to the application, the phase line on-off detection module is used for collecting on-off signals in real time and sending the on-off signals to the control module, the control module is used for packaging phase line on-off detection data after detecting that the phase line on-off detection mark is set continuously and repeatedly in a delay mode, and the wireless communication module is used for sending the packaged phase line on-off detection data to the remote server by adopting the LoRaWAN, so that a user can remotely check the on-off condition of the alternating current phase line in real time without wiring.
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a schematic diagram of an apparatus for detecting on/off of an ac phase line according to an embodiment of the present application, as shown in fig. 1, fig. 1 includes:
The phase line on-off detection module 1, the control module 2 and the wireless communication module 3;
The phase line on-off detection module 1 is used for acquiring on-off signals of a phase line and sending the on-off signals to the control module 2;
The control module 2 is used for setting a phase line on-off detection mark after receiving the on-off signal, packaging phase line on-off detection data if the phase line on-off detection mark is set after being continuously delayed for a plurality of times, and sending the phase line on-off detection data to a remote server through the wireless communication module 3;
The wireless communication module 3 adopts LoRaWAN to send the packed phase line on-off detection data to the remote server and receives downlink data issued by the remote server.
It should be noted that, the phase line on-off detection module 1 is directly connected with the phase line and is used for collecting on-off signals of the phase line, the other end of the phase line on-off detection module 1 transmits the collected on-off signals to the control module 2 through the phase line on-off detection port, the control module 2 analyzes and processes the received signals, for example, after the control module receives the on-off signals, a phase line on-off detection mark of the control module 2 is set.
After the control module receives the on-off signal acquired by the phase line on-off detection module 1, software filtering processing can be adopted for eliminating the influence of hardware and other external environment interference in the on-off signal, so that the monitoring result is more accurate. In addition, the application can repeatedly confirm the monitoring result by adopting a method of multiple time delay detection, for example, whether the phase line on-off detection mark is set or not is detected every preset time interval, if the phase line on-off detection mark is set for several times continuously, the phase line on-off detection mark can be judged to be in a set state, so that false triggering caused by a circuit and other external environments is eliminated, and the monitoring result is more accurate. When the phase line on-off detection mark is determined to be in a set state, the control module 2 packages phase line on-off detection data and sends the phase line on-off detection data to a remote server through the wireless communication module 3.
The wireless communication module 3 can adopt the LoRaWAN protocol to carry out data remote transmission, so that the on-off condition of the alternating current phase line can be monitored in real time, the on-off real-time condition of the alternating current phase line is reported to a remote server and recorded, and the on-off real-time condition of the alternating current phase line is saved by the remote server, so that a user can check in real time. And the remote server can also send downlink data to the alternating current phase line on-off detection device. The LoRaWAN protocol is adopted in the application, so that the method has strong universality and can be used for various places meeting the requirements, such as places with alternating-current phase line on-off real-time remote monitoring, such as card power taking, no disturbance and the like.
According to the application, the phase line on-off detection module is used for collecting on-off signals in real time and sending the on-off signals to the control module, the control module is used for packaging phase line on-off detection data after detecting that the phase line on-off detection mark is set continuously and repeatedly in a delay mode, and the wireless communication module is used for sending the packaged phase line on-off detection data to the remote server by adopting the LoRaWAN, so that a user can remotely check the on-off condition of the alternating current phase line in real time without wiring.
The specific circuit diagram of the phase line on-off detection module in the application is shown in fig. 2, and fig. 2 comprises:
the rectifier bridge, the first capacitor, the optocoupler isolator, the resistors and the light-emitting diode are formed;
The rectifier bridge is connected with the phase line and is used for converting alternating current into direct current and keeping the phase sequence of the input phase line unchanged;
the first capacitor is used for triggering the reporting of the on-off signal once when the device is powered off;
The optical coupling isolator is used for eliminating interference in the phase line on-off detection module.
It should be noted that the phase line on-off detection module in the application can comprise a rectifier bridge, a first capacitor, an optocoupler isolator, a plurality of resistors and a light emitting diode, wherein the rectifier bridge is connected with the phase line and is used for converting alternating current into direct current and keeping the phase sequence of an input phase line unchanged, and the optocoupler isolator is used for eliminating unstable circuit interference in the phase line on-off detection module, so that the monitoring result is more accurate. Two ends of the first capacitor can be respectively connected with two alternating current output ports of the rectifier bridge, and the two alternating current output ports are used for triggering a reporting function of one-time on-off signals when the device is powered off, so that the reliability of real-time monitoring of the power-off condition of equipment is ensured.
Specifically, as shown in fig. 2, a first ac input port of the rectifier bridge is connected with a phase line, a second ac input port is sequentially connected with a fifth resistor, a fourth resistor and a third resistor in series, and the other end of the third resistor is connected with a zero line;
The third input end of the optocoupler isolator is grounded, the fourth output end is respectively connected with a sixth resistor and a phase line on-off detection signal output port, the other end of the sixth resistor is respectively connected with a 3.3V power supply and a seventh resistor, the other end of the seventh resistor is connected with the anode of the light emitting diode, the cathode of the light emitting diode is grounded, when the phase line is conducted, the light emitting diode starts to emit light, otherwise, if the phase line is in an off state, the light emitting diode is extinguished.
Specifically, the specific model of the rectifier bridge can be Mb6S_C181214, the specific model of the optocoupler isolator can be LTV-217TP1-C-V-G, the first capacitor can be a large capacitor of 100uf/50V, the third resistor is 33KΩ, the fourth resistor is 33KΩ, the fifth resistor is 33KΩ, the sixth resistor is 2.2KΩ, and the seventh resistor is 1KΩ.
In a specific embodiment, the application further comprises a zero thermal power source conversion module which is used for converting the commercial power into 3.3V direct current voltage and supplying power for the phase line on-off detection module, the control module and the wireless communication module.
The zero-power source module is specifically used for converting alternating current into direct current, reducing the voltage to output 5V direct current, reducing the voltage to further output 3.3V direct current, and supplying power to the phase line on-off detection module, the control module and the wireless communication module.
Specifically, the zero thermal power source module may include a plurality of diodes, a plurality of capacitors, a plurality of resistors, a transformer, a fuse, an AC-DC conversion chip U5, and a fifth inductor. The specific model of the AC-DC conversion chip U5 can be a non-isolated AC-DC conversion chip PN8015, and the transformer can be a transformer of EE104+4 model.
A buck chip AP1117-3.3 may be used to convert the 5V voltage converted by the zero thermal power source module to a 3.3V voltage.
In a specific embodiment, as shown in fig. 5, the block diagram of the embedded software architecture in the present application, the embedded software architecture in fig. 5 includes four layers in total, including a hardware layer (including ASR6500SLC, zero thermal power source converted to 3.3V, UART serial port, phase line on-off detection, STM32G030C8T 6), a driver layer (including ASR6500SLC driver, phase line on-off detection driver, UART (Universal Asynchronous Receiver/Transmitter) serial port driver, SPI driver, RTC driver, flash driver), a MAC layer (Timer timing MAC layer, lorewan MAC layer, transmit queue MAC layer, phase line on-off detection interrupt MAC layer, flash storage MAC layer), and an application layer (including application parsing, package data, lorewan transceiver mechanism, transmit queue, storage, log printing).
The application adopts LoRaWAN protocol technology to carry out data remote transmission, ensures that the on-off condition of the alternating current phase line can be monitored in real time and reported to the server to record the on-off real-time condition of the alternating current phase line, does not need special network arrangement, and is convenient to install and arrange. The AC phase line on-off detection device adopts an optical coupling isolation technology to eliminate unstable interference of a circuit and enable a monitoring result to be more accurate, adopts a multiple time delay technology to eliminate false triggering caused by the circuit and other external environments and enable the monitoring result to be more accurate, adopts a certain large capacitance to enable a one-time remote reporting function to be triggered even if equipment is powered off, ensures the real-time monitoring reliability of the equipment power-off condition, and adopts a rectifier bridge technology to ensure that the phase sequence of an input phase line is not influenced.
The application also provides an embodiment of an on-off detection method of the alternating-current phase line on-off detection device, as shown in fig. 3, wherein fig. 3 includes:
201. Acquiring on-off signals of the phase line on-off detection module in real time, and judging whether a phase line on-off detection mark is set or not;
The phase line on-off detection module is directly connected with the phase line to acquire on-off signals of the phase line, the other end of the phase line on-off detection module transmits the acquired on-off signals to the control module through the phase line on-off detection port, and the control module analyzes and processes the received signals, for example, after receiving the on-off signals, a phase line on-off detection mark of the control module is set.
202. If the phase line on-off detection mark is set and the phase line on-off detection mark is set by continuous multiple time delay detection, the phase line on-off detection mark is set;
It should be noted that, after the control module receives the on-off signal collected by the phase line on-off detection module, software filtering processing can be adopted to eliminate the influence caused by interference of hardware and other external environments in the on-off signal, so that the monitoring result is more accurate. In addition, the application can repeatedly confirm the monitoring result by adopting a method of multiple time delay detection, for example, whether the phase line on-off detection mark is set or not is detected every preset time interval, if the phase line on-off detection mark is set for several times continuously, the phase line on-off detection mark can be judged to be in a set state, so that false triggering caused by a circuit and other external environments is eliminated, and the monitoring result is more accurate. When the phase line on-off detection mark is determined to be in a set state, the control module packages phase line on-off detection data and sends the phase line on-off detection data to the remote server through the wireless communication module.
203. And packaging the current phase line on-off detection data, and reporting the current phase line on-off detection data to a remote server through the LoRaWAN.
After the current phase line on-off detection data are packaged, the data can be remotely transmitted by adopting the LoRaWAN protocol through the wireless communication module, so that the on-off condition of the alternating current phase line can be monitored in real time, the on-off real-time condition of the alternating current phase line is reported to a remote server and recorded, and the on-off real-time condition of the alternating current phase line is saved by the remote server, so that a user can check in real time. And the remote server can also send downlink data to the alternating current phase line on-off detection device. The LoRaWAN protocol is adopted in the application, so that the method has strong universality and can be used for various places meeting the requirements, such as places with alternating-current phase line on-off real-time remote monitoring, such as card power taking, no disturbance and the like.
According to the application, the on-off signals are collected in real time, after the setting of the phase line on-off detection mark is detected by continuous multiple time delay, the phase line on-off detection data are packed, and the packed phase line on-off detection data are sent to the remote server by adopting the LoRaWAN through the wireless communication module, so that a user can remotely check the on-off condition of the alternating current phase line in real time without wiring.
The application also provides another embodiment of an on-off detection method of the on-off detection device of the alternating-current phase line, as shown in fig. 4, the on-off detection method of the on-off detection device of the alternating-current phase line in fig. 4 comprises the following steps:
301. Acquiring on-off signals of the phase line on-off detection module in real time, and judging whether a phase line on-off detection mark is set or not;
The phase line on-off detection module is directly connected with the phase line to acquire on-off signals of the phase line, the other end of the phase line on-off detection module transmits the acquired on-off signals to the control module through the phase line on-off detection port, and the control module analyzes and processes the received signals, for example, after receiving the on-off signals, a phase line on-off detection mark of the control module is set.
302. If the phase line on-off detection mark is set, detecting whether the phase line on-off detection mark is set again after waiting for 100 ms;
It should be noted that, after the control module receives the on-off signal collected by the phase line on-off detection module, software filtering processing can be adopted to eliminate the influence caused by interference of hardware and other external environments in the on-off signal, so that the monitoring result is more accurate.
303. Repeating the step 302 for n times, if the phase line on-off detection mark is still set, judging that the phase line on-off detection mark is set;
It should be noted that, the present application may repeatedly confirm the monitoring result by using a method of multiple time delay detection, for example, detect whether the phase line on-off detection mark is set every 100ms, if all the continuous 3 phase line on-off detection marks are set, then determine that the phase line on-off detection mark is in a set state, so as to eliminate false triggering caused by circuits and other external environments, and make the monitoring result more accurate. When the phase line on-off detection mark is determined to be in a set state, the control module packages phase line on-off detection data and sends the phase line on-off detection data to the remote server through the wireless communication module.
304. Packaging the current phase line on-off detection data, calling LoRaWAN uplink communication to transmit to a gateway, replying a confirmation character by the gateway, and reporting the phase line on-off detection data to a remote server;
After the current phase line on-off detection data are packaged, the data can be remotely transmitted by adopting the LoRaWAN protocol through the wireless communication module, so that the on-off condition of the alternating current phase line can be monitored in real time, the on-off real-time condition of the alternating current phase line is reported to a remote server and recorded, and the on-off real-time condition of the alternating current phase line is saved by the remote server, so that a user can check in real time.
Specifically, the ac phase line on-off detection device can firstly transmit the packed on-off detection data to the gateway, and after the gateway receives the packed on-off detection data, the gateway feeds back a confirmation character to the ac phase line on-off detection device and uploads the on-off detection data to the server.
305. The gateway receives downlink data issued by the remote server and transmits the downlink data to the alternating-current phase line on-off detection device;
306. After the AC phase line on-off detection device reports data to the gateway, the gateway packages the reported data, replies a confirmation character to the AC phase line on-off detection device, and reports the packaged data to the remote server.
When the server needs to send downlink data to the ac phase line on-off detection device, the downlink data can be transmitted to the ac phase line on-off detection device from the gateway, after the ac phase line on-off detection device receives the downlink data, the downlink data is fed back to the gateway, the data is packed and uploaded to the remote server after the gateway receives and confirms, and confirmation characters are fed back to the ac phase line on-off detection device.
Specifically, an interactive flow chart of the alternating-current phase line on-off detection device and the remote server is shown in fig. 6, the alternating-current phase line on-off detector in fig. 6 performs data interaction with the server through the LoRaWAN gateway, and in order to ensure reliability of data reporting and downlink, the alternating-current phase line on-off detector, gateway communication and the server are provided with corresponding ACK confirmation mechanisms so as to ensure reliability of uplink and downlink of data communication.
The application adopts LoRaWAN protocol technology to carry out data remote transmission, ensures that the on-off condition of the alternating current phase line can be monitored in real time and reported to the server to record the on-off real-time condition of the alternating current phase line, does not need special network arrangement, and is convenient to install and arrange. By adopting a multiple time delay technology, false triggering caused by circuits and other external environments is eliminated, so that the monitoring result is more accurate.
The terms "first," "second," "third," "fourth," and the like in the description of the application and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more, and "a plurality" means two or more. "and/or" is used to describe an association relationship of an associated object, and indicates that three relationships may exist, for example, "a and/or B" may indicate that only a exists, only B exists, and three cases of a and B exist simultaneously, where a and B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one of a, b or c may represent a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are illustrative only, and the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, indirect coupling or communication connection of apparatuses or units, electrical, mechanical, or other forms.
While the application has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that the foregoing embodiments may be modified or equivalents may be substituted for some of the features thereof, and that the modifications or substitutions do not depart from the spirit and scope of the embodiments of the application.