A communication gateway and a LoRa node control system
By designing a communication gateway including the main control circuit, the LoRa communication module and the BACnet communication module, the protocol conversion and data cache between the LoRa node and the BACnet device are realized, which solves the problem of low communication efficiency between the LoRa node and the BACnet device, and realizes efficient communication and reasonable control.
Patent Information
- Application Number
- CN201911206385.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-29
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2039-11-29
AI Technical Summary
There is no communication solution that can efficiently realize the communication between LoRa nodes and BACnet devices, which makes it impossible to fully utilize the advantages of both.
A communication gateway is designed, including a main control circuit, a LoRa communication module and a BACnet communication module, to realize the conversion of LoRa to BACnet protocol, and to set a variable storage area in the main control circuit to cache data to improve the response speed.
It realizes efficient communication between LoRa nodes and BACnet devices, improves communication efficiency, and can reasonably control LoRa terminal nodes.
Smart Images

Figure CN111131011B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication control technology, in particular to a communication gateway and a LoRa node control system. Background Art
[0002] BACnet (A Data Communication Protocol for Building Automation and Control Network) is a data communication protocol for building automation and control networks. It enables the integration of control products from different manufacturers (such as HVAC, lighting, fire protection, access control, and security equipment) into a unified system, achieving interoperability. BACnet's advantages lie at the application layer. Its use of a standard model simplifies installation and maintenance, while significantly enhancing scalability and compatibility. Consequently, BACnet has been widely adopted in building air conditioning, heating networks, clean rooms, laboratories, operating rooms, and geothermal applications in coal mines.
[0003] LoRa (Long Range) is a Low-Power Wide-Area Network (LPWAN) communication technology. It is an ultra-long-distance, low-power data transmission technology launched by Semtech in 2013. LoRa offers advantages such as long range, low power consumption, and low cost. In particular, LoRa's transmission range is as long as 15 to 20 kilometers, it uses license-free frequency bands, and its infrastructure and node / terminal costs are low. These factors make LoRa highly advantageous at the end, saving wiring and significantly reducing operating costs.
[0004] Therefore, combining BACnet and LoRa communication technologies, establishing a BACnet-based primary system with LoRa as the endpoint, can maximize the advantages of both, enabling effective control of LoRa nodes and possessing high application value. However, there is currently no solution that can efficiently enable communication between LoRa nodes and BACnet devices. Summary of the Invention
[0005] In view of the above problems, the present invention is proposed to provide a communication gateway and a LoRa node control system that overcome the above problems or at least partially solve the above problems.
[0006] An object of the present invention is to provide a communication gateway that can efficiently implement communication between LoRa nodes and BACnet devices.
[0007] A further object of the present invention is to improve the response speed of the communication gateway through the variable caching scheme of the communication gateway, thereby improving the communication efficiency between the LoRa node and the BACnet device.
[0008] Another object of the present invention is to apply the communication gateway to the LoRa end node, so as to achieve reasonable and effective control of the LoRa end node.
[0009] According to one aspect of an embodiment of the present invention, there is provided a communication gateway applied to the communication between a LoRa node and a BACnet device. The communication gateway includes:
[0010] A main control circuit, and a LoRa communication module and a BACnet communication module connected to the main control circuit; wherein,
[0011] The LoRa communication module is configured to receive first data from the LoRa node and send the first data to the main control circuit;
[0012] The BACnet communication module is configured to receive second data sent by the BACnet device and send the second data to the main control circuit;
[0013] The main control circuit is configured to perform LoRa to BACnet protocol conversion on the received first data to obtain the converted first data, and send the converted first data to the BACnet communication module, and perform BACnet to LoRa protocol conversion on the received second data to obtain the converted second data, and send the converted second data to the LoRa communication module;
[0014] The LoRa communication module is further configured to send the received converted second data to the LoRa node;
[0015] The BACnet communication module is further configured to send the received converted first data to the BACnet device.
[0016] Optionally, a variable storage area is included in the main control circuit; the first data is variable data of the LoRa node;
[0017] The main control circuit is further configured to perform data mapping and transformation of LoRa to BACnet protocol on the received variable data of the LoRa node to obtain the converted variable data, and cache the converted variable data in the variable storage area;
[0018] The main control circuit is further configured to read the corresponding converted variable data from the variable storage area in response to a data request from the BACnet device sent through the BACnet communication module and send it to the BACnet communication module, and then the BACnet communication module sends the converted variable data to the BACnet device.
[0019] Optionally, a specified logic file is built in the main control circuit;
[0020] The main control circuit is further configured to perform a logic operation on the variable data of the LoRa node according to the specified logic file to obtain a variable result, store the variable result in the variable storage area, and send the variable result to the LoRa communication module. Furthermore, the LoRa communication module sends the variable result to the LoRa node to which the variable corresponding to the variable result is hooked.
[0021] Optionally, the BACnet communication module includes:
[0022] An RS485 interface module, configured to convert the converted first data into data in the BACnet MS / TP protocol format and send the converted BACnet MS / TP protocol format data to the BACnet device, and send the second data in the BACnet MS / TP protocol format received from the BACnet device to the main control circuit to implement BACnet MS / TP communication between the LoRa node and the BACnet device; and / or
[0023] An Ethernet interface module, configured to send the converted first data to the BACnet device on the network side and send the second data from the BACnet device on the network side to the main control circuit to implement BACnet UDP communication between the LoRa node and the BACnet device.
[0024] Optionally, the RS485 interface module includes:
[0025] An RS485 transceiver chip, as well as an isolated power supply and an optocoupler connected to the RS485 transceiver chip;
[0026] The Ethernet interface module includes:
[0027] An interconnected Ethernet interface chip and network transformer.
[0028] Optionally, the LoRa communication module includes:
[0029] A first LoRa transceiver, configured to be switchable between a first state and a second state; when the first LoRa transceiver is in the first state, the first LoRa transceiver is configured to receive data from the main control circuit and send the received data to the LoRa node; when the first LoRa transceiver is in the second state, the first LoRa transceiver is configured to receive data from the LoRa node and send the received data to the main control circuit; and
[0030] A second LoRa transceiver, configured to only receive data from LoRa nodes and send the received data to the main control circuit.
[0031] Optionally, the main control circuit includes:
[0032] A central processing unit;
[0033] A DIP switch, connected to the central processing unit, configured to set the communication addresses of LoRa nodes and BACnet devices;
[0034] A non-volatile memory, connected to the central processing unit; and
[0035] A crystal oscillator, connected to the central processing unit, configured to provide working pulses to the central processing unit.
[0036] Optionally, the main control circuit further includes an extended random access memory connected to the central processing unit.
[0037] According to another aspect of an embodiment of the present invention, there is also provided a LoRa node control system, including:
[0038] The communication gateway of any one of the above; and
[0039] At least one LoRa end node, wirelessly connected to the communication gateway, configured to collect data and send the collected data to the communication gateway;
[0040] The communication gateway is configured to perform logical judgment on the data from the LoRa end node to generate a control command, and send the control command to the LoRa end node, so as to achieve the control of the LoRa end node.
[0041] According to still another aspect of an embodiment of the present invention, there is also provided a LoRa node control system, including:
[0042] The communication gateway of any one of the above;
[0043] At least one LoRa end node, wirelessly connected to the communication gateway, configured to collect data and send the collected data to the communication gateway; and
[0044] A BACnet controller, connected to the communication gateway, configured to obtain the data collected by the LoRa end node from the communication gateway, perform logical judgment on the collected data to generate a control command, and send the control command to the LoRa end node via the communication gateway, so as to achieve the control of the LoRa end node.
[0045] In the communication gateway provided by the embodiment of the present invention, the LoRa communication module receives the first data from the LoRa node and sends the first data to the main control circuit. The BACnet communication module receives the second data sent by the BACnet device and sends the second data to the main control circuit. The main control circuit performs LoRa to BACnet protocol conversion on the received first data to obtain the converted first data and sends it to the BACnet communication module, and performs BACnet to LoRa protocol conversion on the received second data to obtain the converted second data and sends it to the LoRa communication module. Then, the LoRa communication module sends the converted second data to the LoRa node, and the BACnet communication module sends the converted first data to the BACnet device, thereby realizing communication between the LoRa node and the BACnet device. By implementing the protocol conversion between LoRa and BACnet, the communication gateway of the present invention can efficiently realize the communication between the LoRa node and the BACnet device.
[0046] Further, a variable storage area is provided in the main control circuit of the communication gateway of the present invention. By caching the variable data of the converted LoRa node in the variable storage area and reading the corresponding converted variable data from the variable storage area in response to the data request of the BACnet device and sending it to the requesting BACnet device, the response speed of the communication gateway to the data request is greatly accelerated, and further the communication efficiency between the LoRa node and the BACnet device is improved.
[0047] Furthermore, by applying the communication gateway of the present invention to the LoRa node control system, effective and reasonable control of the LoRa end node can be realized.
[0048] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable, the following specifically describes the embodiments of the present invention.
[0049] According to the following detailed description of the specific embodiments of the present invention in conjunction with the drawings, those skilled in the art will be more clear about the above and other purposes, advantages and features of the present invention. Description of the Drawings
[0050] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0051] Figure 1Shows a schematic structural diagram of a communication gateway according to an embodiment of the present invention;
[0052] Figure 2 Shows a schematic structural diagram of a communication gateway according to another embodiment of the present invention;
[0053] Figure 3 Shows a schematic structural diagram of an RS485 interface module according to an embodiment of the present invention;
[0054] Figure 4 Shows a schematic structural diagram of an Ethernet interface module according to an embodiment of the present invention;
[0055] Figure 5 Shows a schematic structural diagram of a main control circuit according to an embodiment of the present invention;
[0056] Figure 6 Shows a schematic structural diagram of a LoRa node control system according to an embodiment of the present invention; and
[0057] Figure 7 Shows a schematic structural diagram of a LoRa node control system according to another embodiment of the present invention. Detailed implementation manners
[0058] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0059] To solve the above technical problems, an embodiment of the present invention proposes a communication gateway. Figure 1 Shows a schematic structural diagram of a communication gateway 100 according to an embodiment of the present invention. The communication gateway 100 is applied to the communication between a LoRa node 140 and a BACnet device 150. Refer to Figure 1, the communication gateway 100 generally may include a main control circuit 110, and a LoRa communication module 120 and a BACnet communication module 130 connected to the main control circuit 110. The LoRa communication module 120 may be configured to receive first data from a LoRa node 140 and send the first data to the main control circuit 110. The BACnet communication module 130 may be configured to receive second data sent by a BACnet device 150 and send the second data to the main control circuit 110. The main control circuit 110 may be configured to perform LoRa to BACnet protocol conversion on the received first data to obtain the converted first data, and send the converted first data to the BACnet communication module 130, and perform BACnet to LoRa protocol conversion on the received second data to obtain the converted second data, and send the converted second data to the LoRa communication module 120. Further, the LoRa communication module 120 may also be configured to send the received converted second data to the LoRa node 140. The BACnet communication module 130 may also be configured to send the received converted first data to the BACnet device 150. The LoRa node 140 mentioned herein may be, for example, various LoRa terminal devices, such as LoRa sensors, LoRa actuators, etc., which communicate with the LoRa communication module 120 through a wireless connection. The BACnet device 150 may be, for example, a field controller, a server, etc. that conforms to the BACnet protocol. It should be noted that Figure 1 the numbers of the LoRa node 140 and the BACnet device 150 are only illustrative, and those skilled in the art should recognize that any appropriate numbers of the LoRa node 140 and the BACnet device 150 can be set according to application requirements.
[0060] In the communication gateway 100 proposed by the embodiments of the present invention, the LoRa communication module 120 receives the first data from the LoRa node 140 and sends the first data to the main control circuit 110. The BACnet communication module 130 receives the second data sent by the BACnet device 150 and sends the second data to the main control circuit 110. The main control circuit 110 performs LoRa to BACnet protocol conversion on the received first data to obtain the converted first data and sends it to the BACnet communication module 130, and performs BACnet to LoRa protocol conversion on the received second data to obtain the converted second data and sends it to the LoRa communication module 120. Further, the LoRa communication module 120 sends the converted second data to the LoRa node 140 and the BACnet communication module sends the converted first data to the BACnet device 150, thereby realizing communication between the LoRa node 140 and the BACnet device 150. By implementing protocol conversion between LoRa and BACnet, the communication gateway 100 of the present invention can efficiently realize communication between the LoRa node 140 and the BACnet device 150.
[0061] Continue to refer to the following Figure 1 The structure of the communication gateway 100 will be described. The communication gateway 100 is usually connected to an external power supply (such as mains power) to obtain the operating power. Therefore, the communication gateway 100 may further include a power converter 160. The power converter 160 is connected to an external power supply (not shown in the figure) and is respectively connected to the LoRa communication module 120, the BACnet communication module 130, and the main control circuit 110, for converting the external power supply voltage (such as 220V AC voltage) into the voltage required by the chip-level devices in the communication gateway 100 (usually 5V or 3.3V) and outputting it to the LoRa communication module 120, the BACnet communication module 130, and the main control circuit 110.
[0062] Furthermore, the communication gateway 100 further has a housing 170. Other components of the communication gateway 100, including the LoRa communication module 120, the BACnet communication module 130, the main control circuit 110, and the power converter 160, are arranged inside the housing 170 to play roles such as dust isolation and protection.
[0063] The above introduced Figure 1 The hardware structure of the shown communication gateway 100. Next, the software architecture of the communication gateway 100 will be introduced.
[0064] When the communication gateway 100 processes the BACnet protocol, it can provide functions such as building BACnet devices, responding to WHO-IS, answering I-AM, modifying device numbers, responding to read and write variables, and responding to read and write of mapping files and logical files.
[0065] In one embodiment, a variable storage area may be included in the main control circuit 110. The first data is specifically the variable data of the LoRa node 140. In this case, the main control circuit 110 may also be configured to perform data mapping and transformation from LoRa to BACnet protocol on the received variable data of the LoRa node 140 to obtain the transformed variable data, and cache the transformed variable data in the variable storage area. The main control circuit 110 may also be configured to read the corresponding transformed variable data from the variable storage area in response to a data request from the BACnet device 150 sent through the BACnet communication module 130 and send it to the BACnet communication module 130. Then, the BACnet communication module 130 sends the transformed variable data to the BACnet device 150. Considering the diversity of the LoRa nodes 140, in order to implement data mapping and transformation of the variable data of the LoRa nodes 140, it is necessary to configure the mapping file according to a specific syntax, and pre-set or download the configured mapping file into the main control circuit 110, and perform data mapping and transformation according to the mapping and transformation relationships in the mapping file during operation.
[0066] By caching the transformed variable data of the LoRa node 140 in the variable storage area and reading the corresponding transformed variable data from the variable storage area in response to the data request of the BACnet device 150 and sending it to the requested BACnet device 150, the response speed of the communication gateway 100 to the data request is greatly accelerated, thereby improving the communication efficiency between the LoRa node 140 and the BACnet device 150.
[0067] In one embodiment, the main control circuit 110 may also be built-in with a specified logic file. The specified logic file may be pre-loaded or downloaded. In this case, the main control circuit 110 may also be configured to perform logical operations on the variable data of the LoRa node 140 according to the specified logic file (such as the syntax specified therein) to obtain a variable result, store the variable result in the variable storage area, and send the variable result to the LoRa communication module 120. Then, the LoRa communication module 120 sends the variable result to the LoRa node 140 to which the variable corresponding to the variable result is hooked. Specifically, the variable result can be pushed into the LoRa sending queue of the LoRa communication module 120 and then sent to the LoRa node 140 to which the variable corresponding to the variable result is hooked. By performing logical operations, the communication gateway 100 can break through the functional limitation of the routing communication gateway that can only upload and download, and implement the required logical operation and control functions.
[0068] In addition, when the LoRa communication module 120 receives data from the LoRa node 140, it first sends the received data to the LoRa data buffer, and then sends it to the main control circuit 110 for data mapping and transformation. When sending data to the LoRa node 140, the earliest data is picked out from the LoRa send queue (FIFO (First Input First Output) queue) and sent to the LoRa node 140. Moreover, when receiving and sending data, the principle of sending priority is observed.
[0069] Figure 2 FIG. shows a schematic structural diagram of the communication gateway 100 according to another embodiment of the present invention. Refer to Figure 2 As shown, in some embodiments, the BACnet communication module 130 may include an RS485 interface module 131. The RS485 interface module 131 is configured to convert the converted first data (usually serial port data) sent by the main control circuit 110 into data in the BACnet MS / TP (Master-Slave / Token-Passing) protocol format and send the converted BACnet MS / TP protocol format data to the BACnet device 150, and send the second data in the BACnet MS / TP protocol format received from the BACnet device 150 via the BACnet MS / TP bus to the main control circuit 110, so as to implement BACnet MS / TP communication between the LoRa node 140 and the BACnet device 150.
[0070] In some embodiments, the BACnet communication module 130 may include an Ethernet interface module 132. The Ethernet interface module 132 is configured to send the converted first data sent by the main control circuit 110 to the BACnet device 150 on the network side, and send the second data from the BACnet device 150 on the network side to the main control circuit 110, so as to implement BACnet UDP communication between the LoRa node 140 and the BACnet device 150.
[0071] In some embodiments, the BACnet communication module 130 may also include both an RS485 interface module 131 and an Ethernet interface module 132, which are respectively connected to the main control circuit 110.
[0072] Through the settings of the RS485 interface module 131 and the Ethernet interface module 132, BACnet MS / TP communication and BACnet UDP communication between the LoRa node 140 and the BACnet device 150 can be respectively implemented, thereby enhancing the adaptability and compatibility of the communication gateway 100.
[0073] In one embodiment, as Figure 3 shown, the RS485 interface module 131 may include an RS485 transceiver chip 133, as well as an isolated power supply 134 and an optocoupler 135 connected to the RS485 transceiver chip 133. The isolated power supply 134 generally uses an isolation transformer to isolate the input power supply from the external power supply, thereby improving safety and avoiding the risk of electric shock to users. The implementation of the isolated power supply 134 is well-known in the art and will not be described herein in detail. The RS485 transceiver chip 133 has a positive pole pin (D+), a negative pole pin (D-), a transmitter output enable (DE) pin, a transmit signal (TX) pin, and a receive signal (RX) pin. In application, the transmitter output enable (DE) signal and the transmit signal (TX) are input into the RS485 transceiver chip 133 through the optocoupler 135, and the receive signal (RX) is output from the RS485 transceiver chip 133 through the optocoupler 135.
[0074] In one embodiment, as Figure 4 shown, the Ethernet interface module 132 may include an Ethernet interface chip 136 and a network transformer 137 connected to each other. The Ethernet interface chip 136 may adopt W5500, RTL8019AS, etc., and is connected to the main control circuit 110 to receive data sent from the main control circuit 110. The network transformer 137 has the function of signal transmission. It is further connected to an external network, thereby transmitting data from the Ethernet interface chip 136 to the network, and then the data reaches the BACnet device 150 through the network, and transmitting the data from the BACnet device 150 on the network to the Ethernet interface chip 136 and then reaching the main control circuit 110. In addition to signal transmission, the network transformer 137 can also play a role in high-voltage isolation, thereby improving safety.
[0075] Continuing to refer to Figure 2 , in one embodiment, the LoRa communication module 120 may include a first LoRa transceiver 121. The first LoRa transceiver 121 is configured to be switchable between a first state and a second state. When the first LoRa transceiver 121 is in the first state, the first LoRa transceiver 121 is configured to receive data from the main control circuit 110 and send the received data to the LoRa node 140; when the first LoRa transceiver 121 is in the second state, the first LoRa transceiver 121 is configured to receive data from the LoRa node 140 and send the received data to the main control circuit 110. By switching between the first state (i.e., the sending state) and the second state (i.e., the receiving state), it is convenient to realize uploading data from the LoRa node 140 and issuing commands to the LoRa node 140.
[0076] In one embodiment, the LoRa communication module 120 may further include a second LoRa transceiver 122. The second LoRa transceiver 122 is configured to only receive data from the LoRa node 140 and send the received data to the main control circuit 110.
[0077] LoRa nodes can generally be divided into two types: scanning type and non-scanning type. Scanning type LoRa nodes are powered by a sufficient power source (such as the power grid), have a high polling frequency, and adopt a one-question-one-answer form. Scanning type LoRa nodes are, for example, thermostats. Non-scanning type LoRa nodes are powered by batteries and are usually event-triggered or timed-triggered, such as triggered by the pressing of a wireless button, data change, etc. Non-scanning type LoRa nodes are, for example, temperature and humidity sensors. For these two types of LoRa nodes, the embodiments of the present invention provide a first LoRa transceiver 121 and a second LoRa transceiver 122, and the two use two non-interfering channels to process scanning type and non-scanning type LoRa nodes respectively. The second LoRa transceiver 122 is set to the receiving state and is specifically responsible for receiving data from non-scanning type LoRa nodes. The first LoRa transceiver 121 is responsible for processing data from scanning type LoRa nodes. When data (such as a read / write command) needs to be sent to a scanning type LoRa node, it is set to the first state (i.e., the sending state), and after the data is sent, it is switched to the second state (i.e., the receiving state) to wait for the response from the scanning type LoRa node. By providing the first LoRa transceiver 121 and the second LoRa transceiver 122, different treatments for scanning type and non-scanning type LoRa nodes are realized through two non-interfering channels, avoiding LoRa signal collisions and improving the success rate and communication speed of LoRa communication.
[0078] Further, each of the first LoRa transceiver 121 and the second LoRa transceiver 122 may include a LoRa transceiver chip and a radio frequency antenna, and internal registers are provided in the LoRa transceiver chip. When receiving data from the LoRa node 140, the data received by the radio frequency antenna is first sent to the LoRa data buffer of the internal register, and then sent to the main control circuit 110 for data mapping and transformation. When sending data (such as a command) to the LoRa node 140, the earliest data is selected from the LoRa sending queue and sent to the LoRa node 140. Moreover, when receiving and sending data, the principle of sending priority is followed.
[0079] In one embodiment, such as Figure 5As shown, the main control circuit 110 may include a central processing unit 111, a DIP switch 112, a non-volatile memory 113, and a crystal oscillator 114. The central processing unit 111 may also be referred to as the main MCU (Microcontroller Unit), including but not limited to a 32-bit single-chip microcomputer, which is configured to perform operations such as data mapping, protocol conversion, and logical operations. The DIP switch 112 is connected to the central processing unit 111 and is configured to set parameter information such as the communication addresses of the LoRa node 140 and the BACnet device 150. The non-volatile memory 113 is connected to the central processing unit 111 and is used to store parameters, logical files, etc. that need to be permanently remembered for the central processing unit 111 to access. According to actual application requirements, the non-volatile memory 113 can be selected from EEPROM (Electrically Erasable Programmable Read-Only Memory), FLASH (Flash Memory), etc. The crystal oscillator 114 is connected to the central processing unit 111 and is the "engine" that drives the central processing unit 111 to work, and is configured to provide working pulses to the central processing unit 111. Through the setting of a specific structure, the processing efficiency of the main control circuit 110 is ensured, thereby ensuring the response speed of the communication gateway 100.
[0080] Continue to refer to Figure 5 , in one embodiment, the main control circuit 110 may further include an extended random access memory (RAM) 115 connected to the central processing unit 111. By setting the extended RAM, the access requirements of the central processing unit 111 during operation can be ensured, thereby ensuring the processing efficiency of the main control circuit 110.
[0081] Based on the same inventive concept, an embodiment of the present invention also provides a LoRa node control system, which uses the communication gateway 100 to achieve effective and reasonable control of the LoRa end nodes.
[0082] Figure 6 Shows a schematic structural diagram of a LoRa node control system 10 according to an embodiment of the present invention. Refer to Figure 6As shown, the LoRa node control system 10 may at least include the communication gateway 100 described in any of the above embodiments or combinations of embodiments, and at least one LoRa end node 200. The at least one LoRa end node 200 is wirelessly connected to the communication gateway 100 and is configured to collect data and send the collected data to the communication gateway 100. The communication gateway 100 is configured to generate a control command based on logical judgment according to the data from the LoRa end node 200, and send the control command to the LoRa end node 200, thereby realizing the control of the LoRa end node 200. It should be noted that Figure 6 The number of LoRa end nodes 200 shown in
[0083] In a specific implementation, the LoRa end node 200 may include sensors (such as air quality detectors, temperature and humidity sensors, etc.) and actuators (such as thermostats, contact switches, switch panels, etc.), and the actuator is connected to the electromechanical equipment. And the LoRa end node 200 can be subdivided into the following three types: (1) Scanning LoRa nodes, which are powered stably by the power grid and adopt the polling scanning and trigger response methods, including air quality detectors, thermostats, contact switches, etc.; (2) Non-scanning LoRa nodes, which are powered by batteries and adopt the timed trigger data sending method, including temperature and humidity sensors, etc.; (3) Non-scanning LoRa nodes, which are powered by batteries and adopt the event trigger data sending method. In application, the sensor senses the physical signal and sends it to the communication gateway 100 through LoRa communication technology. The communication gateway 100 makes a judgment according to the physical signal data sensed by the sensor through the internal running logic program, and sends a command to the actuator (such as a contact switch), thereby realizing the reasonable control of the electromechanical equipment.
[0084] Figure 7 The structural schematic diagram of the LoRa node control system 20 according to another embodiment of the present invention is shown. Refer to Figure 7 As shown, the LoRa node control system 20 may at least include the communication gateway 100 described in any of the above embodiments or combinations of embodiments, at least one LoRa end node 200, and a BACnet controller 300. The at least one LoRa end node 200 is wirelessly connected to the communication gateway 100 and is configured to collect data and send the collected data to the communication gateway 100. The BACnet controller 300 is connected to the communication gateway 100 and is configured to obtain the data collected by the LoRa end node 200 from the communication gateway 100, generate a control command based on logical judgment according to the collected data, and send the control command to the LoRa end node 200 via the communication gateway 100, thereby realizing the control of the LoRa end node 200. It should be noted that Figure 7The numbers of LoRa end nodes 200 and BACnet controllers 300 shown are merely illustrative and do not limit the present invention.
[0085] In a specific embodiment, the LoRa end node 200 may adopt the same settings as those in the Figure 6 illustrated embodiment. In application, the physical signal is sensed by the sensor and sent to the communication gateway 100 through LoRa communication technology. The communication gateway 100 sends the physical signal data sensed by the sensor to the relevant BACnet controller 300, or the BACnet controller 300 reads out the physical signal data from the communication gateway 100. Furthermore, the BACnet controller 300 makes a judgment according to the physical signal data sensed by the sensor through the logic program running inside, and sends a command to the actuator (such as a contact switch) through the communication gateway 100, so as to realize the reasonable control of the electromechanical equipment.
[0086] It should be noted that in practical applications, all the above optional implementation manners can be combined arbitrarily to form optional embodiments of the present invention, which will not be elaborated one by one here.
[0087] According to any one of the above optional embodiments or a combination of multiple optional embodiments, the embodiments of the present invention can achieve the following beneficial effects:
[0088] In the communication gateway proposed by the embodiment of the present invention, the LoRa communication module receives the first data from the LoRa node and sends the first data to the main control circuit, the BACnet communication module receives the second data sent by the BACnet device and sends the second data to the main control circuit, and the main control circuit performs LoRa to BACnet protocol conversion on the received first data to obtain the converted first data and sends it to the BACnet communication module, and performs BACnet to LoRa protocol conversion on the received second data to obtain the converted second data and sends it to the LoRa communication module. Furthermore, the LoRa communication module sends the converted second data to the LoRa node and the BACnet communication module sends the converted first data to the BACnet device, so as to realize the communication between the LoRa node and the BACnet device. By implementing the protocol conversion between LoRa and BACnet, the communication gateway of the present invention can efficiently realize the communication between the LoRa node and the BACnet device.
[0089] Furthermore, a variable storage area is provided in the main control circuit of the communication gateway of the present invention. By caching the variable data of the converted LoRa node in the variable storage area and reading the corresponding converted variable data from the variable storage area in response to the data request of the BACnet device and sending it to the requesting BACnet device, the response speed of the communication gateway to the data request is greatly accelerated, thereby improving the communication efficiency between the LoRa node and the BACnet device.
[0090] Furthermore, by applying the communication gateway of the present invention to the LoRa node control system, effective and reasonable control of the LoRa end node can be achieved.
[0091] In the specification provided here, a large number of specific details are described. However, it can be understood that the embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and technologies are not shown in detail so as not to obscure the understanding of this specification.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that within the spirit and principles of the present invention, they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the corresponding technical solutions to deviate from the protection scope of the present invention.
Claims
1. A communication gateway is applied to the communication between LoRa nodes and BACnet devices, characterized in that, The communication gateway includes: a main control circuit, and a LoRa communication module and a BACnet communication module connected to the main control circuit; wherein, the LoRa communication module is configured to receive first data from the LoRa node and send the first data to the main control circuit; the BACnet communication module is configured to receive second data sent by the BACnet device and send the second data to the main control circuit; the main control circuit is configured to perform LoRa to BACnet protocol conversion on the received first data to obtain the converted first data, and send the converted first data to the BACnet communication module, and perform BACnet to LoRa protocol conversion on the received second data to obtain the converted second data, and send the converted second data to the LoRa communication module; the LoRa communication module is further configured to send the received converted second data to the LoRa node; the BACnet communication module is further configured to send the received converted first data to the BACnet device; wherein, a variable storage area is included in the main control circuit; the first data is variable data of the LoRa node; the main control circuit is further configured to perform data mapping and transformation of LoRa to BACnet protocol on the received variable data of the LoRa node to obtain the converted variable data, and cache the converted variable data in the variable storage area; the main control circuit is further configured to read the corresponding converted variable data from the variable storage area in response to a data request from the BACnet device sent by the BACnet communication module and send it to the BACnet communication module, and then the BACnet communication module sends the converted variable data to the BACnet device.
2. The communication gateway according to claim 1, wherein The main control circuit has a specified logic file built in; the main control circuit is further configured to perform a logical operation on the variable data of the LoRa node according to the specified logic file to obtain a variable result, store the variable result in the variable storage area, and send the variable result to the LoRa communication module, and then the LoRa communication module sends the variable result to the LoRa node to which the variable corresponding to the variable result is hooked.
3. The communication gateway according to claim 1, characterized in that, The BACnet communication module includes: an RS485 interface module, configured to convert the converted first data into data in the BACnet MS / TP protocol format and send the converted BACnet MS / TP protocol format data to the BACnet device, and send the BACnet MS / TP protocol format second data received from the BACnet device to the main control circuit to implement BACnet MS / TP communication between the LoRa node and the BACnet device; and / or The Ethernet interface module is configured to send the converted first data to the BACnet device on the network side, and send the second data from the BACnet device on the network side to the main control circuit, so as to realize the BACnet UDP communication between the LoRa node and the BACnet device.
4. The communication gateway according to claim 3, wherein The RS485 interface module includes: an RS485 transceiver chip, as well as an isolated power supply and an optocoupler connected to the RS485 transceiver chip; The Ethernet interface module includes: an Ethernet interface chip and a network transformer connected to each other.
5. The communication gateway according to claim 1, characterized in that, The LoRa communication module includes: a first LoRa transceiver configured to be switchable between a first state and a second state; when the first LoRa transceiver is in the first state, the first LoRa transceiver is configured to receive data from the main control circuit and send the received data to the LoRa node; when the first LoRa transceiver is in the second state, the first LoRa transceiver is configured to receive data from the LoRa node and send the received data to the main control circuit; and a second LoRa transceiver configured to only receive data from the LoRa node and send the received data to the main control circuit.
6. The communication gateway according to claim 1, characterized in that, The main control circuit includes: a central processing unit; a DIP switch connected to the central processing unit and configured to set the communication addresses of the LoRa node and the BACnet device; a non-volatile memory connected to the central processing unit; and a crystal oscillator connected to the central processing unit and configured to provide a working pulse to the central processing unit.
7. The communication gateway according to claim 6, characterized in that, The main control circuit further includes an extended random access memory connected to the central processing unit.
8. A LoRa node control system, characterized in that, It includes: the communication gateway according to any one of claims 1-7; and at least one LoRa end node wirelessly connected to the communication gateway and configured to collect data and send the collected data to the communication gateway; The communication gateway is configured to generate a control command based on the data from the LoRa end node through logical judgment and send the control command to the LoRa end node, so as to realize the control of the LoRa end node.
9. A LoRa node control system, characterized in that, It includes: the communication gateway according to any one of claims 1-7; at least one LoRa end node wirelessly connected to the communication gateway and configured to collect data and send the collected data to the communication gateway; and a BACnet controller connected to the communication gateway and configured to obtain the data collected by the LoRa end node from the communication gateway, generate a control command based on the collected data through logical judgment, and send the control command to the LoRa end node via the communication gateway, so as to realize the control of the LoRa end node.
Citation Information
Patent Citations
Wireless transmission system
CN109143939A
Communication gateway and LoRa node control system
CN210927660U