CN113238499A - Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel - Google Patents

Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel Download PDF

Info

Publication number
CN113238499A
CN113238499A CN202110468325.2A CN202110468325A CN113238499A CN 113238499 A CN113238499 A CN 113238499A CN 202110468325 A CN202110468325 A CN 202110468325A CN 113238499 A CN113238499 A CN 113238499A
Authority
CN
China
Prior art keywords
data
unit
data packet
port
full
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110468325.2A
Other languages
Chinese (zh)
Inventor
贺晨煜
陈伟
周锋
郝笑
陈巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Institute of Technology
Original Assignee
Nanjing Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Institute of Technology filed Critical Nanjing Institute of Technology
Priority to CN202110468325.2A priority Critical patent/CN113238499A/en
Publication of CN113238499A publication Critical patent/CN113238499A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24215Scada supervisory control and data acquisition

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention belongs to the technical field of data acquisition, and discloses a device and a method for acquiring full-duplex narrow-band Internet of things general data under a symmetric channel, wherein the device for acquiring the full-duplex narrow-band Internet of things general data under the symmetric channel comprises the following components: the sensing unit is compatible with the access of various sensors and acquires data by utilizing the accessed sensors; the MCU micro control unit processes data acquired by corresponding sensors connected with the acquisition sensing units of different buses, and performs data filtering and coordination among the units; the radio frequency unit transmits data information; debugging and updating communication port software; the power supply unit provides power support for the MCU micro control unit and the sensing unit; the data storage unit stores the transmission parameters and new firmware set in the radio frequency unit. The method for collecting the universal data of the full-duplex narrowband Internet of things under the symmetrical channel can finish the relevant work of numerical value collection and calculation aiming at different application occasions.

Description

Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel
Technical Field
The invention belongs to the technical field of data acquisition, and particularly relates to a device and a method for acquiring full-duplex narrow-band Internet of things general data under a symmetric channel.
Background
At present: data acquisition refers to the process of automatically acquiring information from analog and digital units under test, such as sensors and other devices under test. Real-time data acquisition needs to be communicated in time, received data are transmitted out, and data acquisition is achieved. With the improvement of the industrial automation level, the data acquisition process is often linked with an industrial control link to form a complete set of data acquisition monitoring system. Many business departments such as the industries of environmental protection, weather, electric power and the like and scientific research fields such as military, marine hydrology and the like often have a large amount of widely distributed field data to be automatically acquired, stored and transmitted, and some provide high or even harsh requirements for data acquisition and application technologies thereof. How to construct a remote data acquisition system with strong practicability, wide coverage, good flexibility and high data processing efficiency, and meeting the requirements of various aspects on monitoring information becomes an important problem. The development of modern data acquisition technology is based on the improvement of the software and hardware platform performance of an acquisition system. With the rapid development of computer technology, data acquisition systems have been developed from traditional measurement and control circuits to modern data acquisition and measurement and control systems composed of microcomputers, interface circuits, external general-purpose devices, industrial production objects and the like, and are widely applied to various industries.
However, the existing data acquisition technology has short communication distance, high power consumption and high maintenance cost, and the data processing unit has poor effect on finishing related numerical calculation and data acquisition.
Through the above analysis, the problems and defects of the prior art are as follows: the existing data acquisition technology has short communication distance, high power consumption and high maintenance cost, and the data processing unit has poor effect on finishing related numerical calculation and data acquisition related work.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a device and a method for acquiring full-duplex narrow-band Internet of things general data under a symmetric channel.
The invention is realized in such a way that the device for acquiring the universal data of the full-duplex narrowband Internet of things under the symmetrical channel is provided with:
the sensing unit consists of a GPIO interface, an I2C interface, an SPI interface, a CAN bus interface, an ADC interface and a UART interface and is used for being compatible with the access of various sensors; meanwhile, the system is used for acquiring data by utilizing the accessed sensor;
the MCU micro-control unit adopts an STM32L151C8T6 embedded processor based on a Cortex-M3 framework and is used for processing data acquired by corresponding sensors connected with acquisition sensing units of different buses and filtering the data; for coordinating work among the various units; meanwhile, the system is used for setting the working mode of the SX1278 module and controlling the SX1278 module of the radio frequency unit to work;
the radio frequency unit consists of an SX1278 module and a serial port communication end; for transmitting data information;
the debugging and communication port is used for debugging and updating software;
a power supply unit consisting of a lithium ion polymer battery, a voltage down converter TLV 62565; the MCU micro control unit is used for providing power support for the MCU micro control unit and the sensing unit;
and the data storage unit is 64Kb Flash inside the MCU micro control unit and is used for storing the transmitting parameters including the receiving frequency, the spreading factor, the transmitting power and the signal bandwidth and new firmware set in the radio frequency unit.
Further, the radio frequency unit includes:
the SX1278 module comprises two SX1278 wireless communication chips; for full duplex operation, transmitting data to be transmitted and received; one of the two SX1278 wireless communication chips is used for sending data, and the other chip is used for receiving data;
the SX1278 wireless communication chip is provided with an SCK port, an MOSI port, a MISO port, an NSS port, DIO 0-DIO 5 and an RST port;
the SCK port is used for the MCU micro control unit to provide an SPI clock source for the SX1278 module;
the MOSI and MISO ports are data input and output ports of the SPI bus;
the NSS is a chip selection port of the bus and is set at a low level during working;
the DIO 0-DIO 5 are general I/O ports and are used for prompting the current working state to the MCU, and signal ports of interrupt sources are arranged under the channel activity monitoring mode CAD;
the RST port is used for resetting the SX1278 module, and the low level is effective during working;
the SX1278 module utilizes one path of hardware SPI port and two paths of serial ports of the MCU micro control unit, wherein the reset port of the SX1276 can be connected with any GPIO port of the MCU micro control unit.
Further, the buck converter comprises:
the step-down converter is used for converting DC 5V voltage into MCU micro control unit working voltage DC3.3V to supply power to the node, and the output voltage of the step-down circuit is set by selecting proper resistors R23 and R26.
Further, the debugging and communication port consists of a CH340G chip and a USB interface;
and TXD pins and RXD pins of the CH340G chip are cut to a serial port 1 pin of the embedded processor, and UD + and UD-are respectively linked with a data pin of a Micro USB port.
Another object of the present invention is to provide a full-duplex narrowband internet of things general data acquisition system under a symmetric channel carrying the full-duplex narrowband internet of things general data acquisition device under the symmetric channel, where the full-duplex narrowband internet of things general data acquisition system under the symmetric channel includes:
the master node module and the slave node module;
the main node module comprises a protocol analysis unit, a data packet sending unit and a data packet receiving unit; the system comprises a slave node device, a first network device and a second network device, wherein the slave node device is used for configuring and inquiring radio frequency parameters for each device according to the ID number of the slave node device, updating firmware and restarting the devices; the system is used for disassembling the new firmware into small data packets of 128 subbytes and then sending the data packets in batches;
the slave node module is used for acquiring data according to a certain time interval, performing Kalman filtering on the data and sending the filtered data according to a certain protocol; meanwhile, the system is used for checking whether a new data packet from the main node equipment is received or not, receiving data after the ID number is matched and verifying the data; after receiving data each time, sending a corresponding parameter data packet or a response signal to the main node equipment;
parameter configuration, parameter inquiry, firmware update and equipment restart can be carried out between the master node module and the slave node module.
Further, the master node module includes:
the protocol analysis unit is used for sending data packets of different protocol frames according to the four different functions;
the data packet sending unit is used for sending protocol frames of parameter configuration, parameter query, firmware update and equipment restart functions to the slave node equipment;
and the data packet receiving unit is used for receiving the response signal data packet from the slave node equipment after the protocol frames with different functions are sent to the slave node equipment.
Further, the parameter configuration protocol is composed of a data length, a frame mode, a node ID, a transmission channel, a transmission power, a reception frequency, a frequency bandwidth, a spreading factor, a coding rate, a preamble, a number of timeout symbols, and a transmission timeout time.
Further, the slave node module includes:
the data acquisition and processing unit is used for reading bus information or acquiring ADC channel information to obtain data and performing Kalman filtering on the obtained data;
the data packet sending and receiving unit is used for sending the filtered data packet by the LoRa wireless communication technology; the slave node equipment sends a response signal after receiving the data packet to the master node equipment;
the protocol analysis unit is used for receiving a data packet from the main node equipment, storing the data packet into a buffer area, performing protocol analysis on the data, identifying a frame mode, and decomposing to obtain corresponding radio frequency parameters and firmware packet data;
the radio frequency parameter updating unit is used for setting a transmitting parameter used in the LoRa communication process according to a data packet sent by the main node equipment and storing a new parameter into Flash;
the remote firmware updating unit is used for receiving the firmware updating packet from the main node, analyzing and judging each frame of data packet, and judging whether the data packet has errors or packet loss; meanwhile, IAP updating is carried out after the new firmware is received.
The low-power consumption sleep unit is used for controlling the slave node equipment to enter a low-power consumption sleep mode after data is sent each time; and waiting for the delay time or receiving new data from the main node equipment to wake up the slave node equipment.
The invention also aims to provide a full-duplex narrow-band internet of things general data acquisition method under a symmetric channel, which is applied to a full-duplex narrow-band internet of things general data acquisition device under the symmetric channel, and the full-duplex narrow-band internet of things general data acquisition method under the symmetric channel comprises the following steps:
initializing a hardware peripheral, checking whether a hardware boundary is correct, reading radio frequency parameters from Flash inside STM32 after the initialization is successful, and acquiring data;
secondly, performing Kalman filtering on the acquired data, packaging the data and sending the data through a radio frequency module, and entering a low power consumption mode for dormancy according to set delay time after the data is successfully sent;
step three, judging whether a new data packet from the main node equipment is received or not, if so, immediately waking up the equipment, and receiving corresponding new parameters after judging the frame mode; and after the delay time is reached, waking up the system, and repeating the second step to the third step.
Further, the receiving the corresponding new parameter after the frame mode is judged includes:
judging whether the received data packet has errors or not;
if the data packet does not conform to the set data packet format, discarding the data packet and emptying a receiving buffer area;
and if the format of the data packet is correct, storing the new parameters into Flash, and erasing the old parameters stored in Flash.
By combining all the technical schemes, the invention has the advantages and positive effects that: the slave node equipment has various wired communication interfaces, accesses different types of sensors according to specific requirements, carries out low-power consumption remote transmission on the acquired data through the LoRa radio frequency technology, and can finish receiving and transmitting data packets at the same time to realize full-duplex communication; the master node device constructs a wireless IAP upgrading scheme based on an LoRa full duplex communication framework on the basis of an IAP online upgrading technology, and remotely updates the radio frequency parameters and the firmware program of the slave node device. The two node devices use the same hardware platform and comprise an MCU (microprogrammed control unit), a radio frequency unit, a debugging and communication interface and other units. The method for collecting the universal data of the full-duplex narrowband Internet of things under the symmetrical channel can finish the relevant work of numerical value collection and calculation aiming at different application occasions.
The invention can realize the acquisition of low-power consumption remote data, and the slave node equipment can increase or decrease different sensors according to the requirements of different occasions to acquire data; the LoRa communication technology can effectively ensure that the service life of the equipment can be greatly prolonged under the low-power consumption sleep mode on the premise of remote communication; when multiple slave nodes are used, the master node is used for remotely configuring radio frequency parameters and updating firmware, so that the working efficiency can be effectively improved, and the maintenance cost is reduced. The data sending and receiving functions are respectively completed through the two SX1278, full-duplex communication is realized, and the communication efficiency is effectively improved.
Drawings
Fig. 1 is a schematic diagram of a full-duplex narrowband internet of things general data acquisition device under a symmetric channel according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a full-duplex narrowband internet of things general data acquisition system under a symmetric channel according to an embodiment of the present invention;
in fig. 1 and 2: 1. a master node module; 1-1, a protocol analysis unit; 1-2, a data packet sending unit; 1-3, a data packet receiving unit; 2. a slave node module; 2-1, a data acquisition and processing unit; 2-2, a data packet sending and receiving unit; 2-3, a protocol analysis unit; 2-4, a radio frequency parameter updating unit; 2-5, a remote firmware update unit; 2-6, a low power consumption sleep unit; 3. a sensing unit; 4. an MCU micro control unit; 5. a radio frequency unit; 6. a debug and communication port; 7. a power supply unit; 8. and a data storage unit.
Fig. 3 is a schematic diagram of a full-duplex narrowband internet of things general data acquisition method under a symmetric channel according to an embodiment of the present invention.
Fig. 4 is a flowchart of a method for acquiring full-duplex narrowband internet of things general data under a symmetric channel according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a radio frequency module according to an embodiment of the present invention.
Fig. 6 is a wiring diagram of the radio frequency module and the MCU micro control unit according to the embodiment of the present invention.
FIG. 7 is a schematic diagram of a power module provided by an embodiment of the invention
Fig. 8 is a schematic diagram of a master-slave node device interaction process according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail with reference to the following embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Aiming at the problems in the prior art, the invention provides a full-duplex narrow-band Internet of things general data acquisition device under a symmetric channel, and the invention is described in detail with reference to the attached drawings.
As shown in fig. 1, the device for acquiring general data of a full-duplex narrowband internet of things under a symmetric channel provided by the embodiment of the present invention includes:
the sensing unit 3 consists of a GPIO interface, an I2C interface, an SPI interface, a CAN bus interface, an ADC interface and a UART interface and is used for being compatible with the access of various sensors; meanwhile, the system is used for acquiring data by utilizing the accessed sensor;
the MCU 4 adopts an STM32L151C8T6 embedded processor based on a Cortex-M3 framework and is used for processing data acquired by corresponding sensors connected with acquisition sensing units of different buses and filtering the data; for coordinating work among the various units; meanwhile, the system is used for setting the working mode of the SX1278 module and controlling the SX1278 module of the radio frequency unit to work;
the radio frequency unit 5 consists of an SX1278 module and a serial port communication end; for transmitting data information;
the debugging and communication port 6 is used for debugging and updating software;
a power supply unit 7 composed of a lithium ion polymer battery, a voltage down converter TLV 62565; the MCU micro control unit is used for providing power support for the MCU micro control unit and the sensing unit;
and the data storage unit 8 is 64Kb Flash inside the MCU micro control unit and is used for storing the transmitting parameters including the receiving frequency, the spreading factor, the transmitting power and the signal bandwidth and new firmware set in the radio frequency unit.
The radio frequency unit provided by the embodiment of the invention comprises:
the SX1278 module comprises two SX1278 wireless communication chips; for full duplex operation, transmitting data to be transmitted and received; one of the two SX1278 wireless communication chips is used for sending data, and the other chip is used for receiving data;
the SX1278 wireless communication chip is provided with an SCK port, an MOSI port, a MISO port, an NSS port, DIO 0-DIO 5 and an RST port;
the SCK port is used for the MCU micro control unit to provide an SPI clock source for the SX1278 module;
MOSI and MISO ports are data input and output ports of the SPI bus; NSS is a chip selection port of the bus and is set at a low level during working;
DIO 0-DIO 5 are general I/O ports and are used for prompting the current working state to the MCU, and signal ports of interrupt sources are used in the channel activity monitoring mode CAD;
the RST port is used for resetting the SX1278 module, and the low level is effective during working;
the SX1278 module utilizes one hardware SPI port and two serial ports of the MCU micro control unit, wherein a reset port of the SX1276 can be connected with any GPIO port of the MCU micro control unit.
The buck converter provided by the embodiment of the invention comprises:
and the step-down converter is used for converting the DC 5V voltage into the working voltage DC3.3V of the MCU to supply power to the node, and the output voltage of the step-down circuit is set by selecting proper resistors R23 and R26.
The debugging and communication port provided by the embodiment of the invention consists of a CH340G chip and a USB interface;
and TXD pins and RXD pins of the CH340G chip are cut to a serial port 1 pin of the embedded processor, and UD + and UD-are respectively linked with a data pin of a Micro USB port.
As shown in fig. 2, the system for acquiring general data of a full-duplex narrowband internet of things under a symmetric channel provided by the embodiment of the present invention includes:
a master node module 1 and a slave node module 2;
the main node module 1 comprises a protocol analysis unit 1-1, a data packet sending unit 1-2 and a data packet receiving unit 1-3; the system comprises a slave node device, a first network device and a second network device, wherein the slave node device is used for configuring and inquiring radio frequency parameters for each device according to the ID number of the slave node device, updating firmware and restarting the devices; the system is used for disassembling the new firmware into small data packets of 128 subbytes and then sending the data packets in batches;
the slave node module 2 is used for acquiring data according to a certain time interval, performing Kalman filtering on the data and sending the filtered data according to a certain protocol; meanwhile, the system is used for checking whether a new data packet from the main node equipment is received or not, receiving data after the ID number is matched and verifying the data; after receiving data each time, sending a corresponding parameter data packet or a response signal to the main node equipment;
parameter configuration, parameter query, firmware update and equipment restart can be carried out between the master node module 1 and the slave node module 2.
The master node module 1 provided by the embodiment of the invention comprises:
a protocol analysis unit 1-1, configured to send data packets of different protocol frames according to the four different functions;
the data packet sending unit 1-2 is used for sending protocol frames of parameter configuration, parameter query, firmware update and equipment restart functions to the slave node equipment;
and the data packet receiving unit 1-3 is used for receiving the response signal data packet from the slave node equipment after the protocol frames with different functions are sent to the slave node equipment.
The parameter configuration protocol provided by the embodiment of the invention consists of data length, frame mode, node ID, sending channel, sending power, receiving frequency, frequency bandwidth, spreading factor, coding rate, lead code, number of overtime symbols and sending overtime time.
The slave node module 2 provided by the embodiment of the invention comprises:
the data acquisition and processing unit 2-1 is used for reading bus information or acquiring ADC channel information to obtain data, and performing Kalman filtering on the obtained data;
a data packet sending and receiving unit 2-2, configured to send the filtered data packet through an LoRa wireless communication technology; the slave node equipment sends a response signal after receiving the data packet to the master node equipment;
the protocol analysis unit 2-3 is used for receiving a data packet from the main node equipment, performing protocol analysis on the data when the data packet is stored in a buffer area, identifying a frame mode, and decomposing to obtain corresponding radio frequency parameters and firmware packet data;
the radio frequency parameter updating unit 2-4 is used for setting a transmitting parameter used in the LoRa communication process according to a data packet sent by the main node equipment and storing a new parameter into Flash;
the remote firmware updating unit 2-5 is used for receiving a firmware updating packet from the main node, analyzing and judging each frame of data packet, and judging whether the data packet has errors or packet loss; meanwhile, IAP updating is carried out after the new firmware is received.
The low-power consumption sleep units 2-6 are used for controlling the slave node equipment to enter a low-power consumption sleep mode after data is sent each time; and waiting for the delay time or receiving new data from the main node equipment to wake up the slave node equipment.
As shown in fig. 3 to 4, the method for acquiring full-duplex narrowband internet of things general data under a symmetric channel provided by the embodiment of the present invention includes:
s101, initializing a hardware peripheral, checking whether a hardware boundary is correct, reading radio frequency parameters from Flash inside STM32 after initialization is successful, and collecting data;
s102, performing Kalman filtering on the acquired data, packaging the data and sending the data through a radio frequency module, and entering a low power consumption mode for dormancy according to set delay time after the data is successfully sent;
s103, judging whether a new data packet from the main node equipment is received or not, if so, immediately waking up the equipment, and receiving corresponding new parameters after judging a frame mode; and after the delay time is reached, waking up the system, and repeating the steps S102 to S103.
The receiving of the corresponding new parameters after the frame mode is judged, which is provided by the embodiment of the invention, comprises the following steps:
judging whether the received data packet has errors or not;
if the data packet does not conform to the set data packet format, discarding the data packet and emptying a receiving buffer area;
and if the format of the data packet is correct, storing the new parameters into Flash, and erasing the old parameters stored in Flash.
The technical solution of the present invention is further illustrated by the following specific examples.
Example 1:
the low-power-consumption data acquisition and processing device based on the Cortex-M3 framework provided by the embodiment of the invention specifically comprises:
MCU microcontrol unit: the data processing unit is used for processing the acquired data and coordinating the work among all the units;
a radio frequency unit: for transmitting data information;
debugging and communication ports: debugging and updating software;
a power supply unit: the power supply is used for supplying power to the micro control unit and the sensing unit;
a data storage unit: the device is used for storing relevant parameters of the radio frequency unit, such as transmitting and receiving frequency, spreading factor, transmitting power, signal bandwidth and the like;
a sensing unit: the bus is used for collecting data, various buses are reserved, and function expansion is facilitated.
The MCU is used for coordinating the work, transmission and data analysis among all units. The micro control unit comprises an STM32L151C8T6 chip, a device reset circuit and a crystal oscillator circuit. The radio frequency unit consists of a radio frequency chip SX1278 and an antenna. The SCK end of the radio frequency chip SX1278 is connected to an STM32 hardware SPI bus clock port SPI _ CLK and used for the MCU micro control unit to provide an SPI clock source for the SX1278 module; the MOSI and MISO ports are respectively connected to the data port MISO and the MOSI of the SPI and are used as data input and output ports of the SPI bus, and the NSS is a chip selection port of the bus and is set at a low level during working; DIO 0-DIO 5 are general I/O ports, are respectively connected to GPIO ports PB 10-PB 15 of STM32, have multiple multiplexing functions, can be used for prompting the current working state to the MCU micro control unit, such as the state after receiving and sending are finished by DIO0, and can also be used for signal ports of interrupt sources under a channel activity monitoring mode CAD; the RST port is used for resetting the SX1278 module, is connected to a PB0 pin of the STM32 and is active at a low level during operation. The power supply unit consists of a lithium ion polymer battery, a buck converter TLV 62565. The voltage reduction converter TLV62565 is supplied with power by DC 5V, and the output end sets the output voltage of the voltage reduction circuit by selecting proper resistors R23 and R26.
The internal work flow of the device is as shown in fig. 3, firstly, hardware peripheral initialization is carried out, whether a hardware boundary is correct or not is checked, radio frequency parameters are read from Flash inside the STM32 after the initialization is successful, data acquisition is carried out after the radio frequency parameters are successfully read, Kalman filtering is carried out on the acquired data, and the data are packaged and sent through a radio frequency module. And after the transmission is successful, entering a low power consumption mode for dormancy according to the set delay time. During the dormancy, if receive the new data packet from the host node equipment, wake up the apparatus immediately, receive the corresponding new parameter after judging the frame mode, judge whether the data packet received has the mistake at first, if not conform to the data packet format presumed, abandon the data packet, and empty the receiving buffer, if the data packet format is correct, store the new parameter to Flash, erase the old parameter stored in Flash at the same time. And after the delay time is reached, waking up the system, performing next data acquisition, performing Kalman filtering and sending data.
The main node equipment can carry out parameter configuration, parameter inquiry, firmware update and equipment restart on the slave node equipment.
The master-slave node device interaction process is shown in fig. 8. In the radio frequency parameter configuration mode, the master node device firstly sends a parameter configuration message with a frame mode of 0x01 to the slave node device, the slave node receives a data packet and then analyzes the data packet, stores a new parameter after checking the data packet, and sends a response signal to the master node. In the radio frequency parameter reading mode, the main node device firstly sends a parameter reading message with a frame mode of 0x02 to the slave node device, the slave node device reads radio frequency parameters from Flash after receiving the information, and the data is stored in a transmission buffer area and then sent to the main node. In the firmware package updating mode, the master node device firstly splits a new firmware package into a plurality of small data packages with the size of 128 bytes, sends the small data packages to the slave node devices in batches, the slave node verifies the data packages, sends a response signal after the data packages are verified to be correct, and sends the next firmware package after the master node receives the response signal until all the split data packages are completely transmitted. In the device restart mode, the master node device first sends a restart command with a frame mode of 0x04 to the slave node device, and after receiving the command, the slave node first returns a response signal to the master node, indicating that the command is received, and then the master node device restarts and loads a new application program.
In the parameter configuration mode, the master node device transmits a data frame shown in table 1 to the slave node device, where the data frame occupies 21 bytes, each of which is a 2-byte slave node device ID number, for setting a target slave node, and the frame mode occupies 1 byte, for indicating that the data frame is the parameter configuration mode, a transmission channel, transmission power, reception frequency, flat band width, spreading factor, coding rate, and preamble occupy 1 byte, and the number of timeout symbols and transmission timeout time occupy 2 bytes, respectively, and leave a space of 7 bytes for subsequent development and use.
After receiving the data packet from the node equipment, analyzing the data packet, judging whether the data has errors or not, if the data has errors, discarding the data packet, and emptying a buffer, if the data packet is correct, erasing old data in Flash, storing new data in Flash, and introducing the new data into a sending parameter structure body so as to be used in next data sending. And further sending a response signal to the master node device, where a response signal protocol frame is composed of a host node serial number, a frame mode and a current node serial number as shown in table 2, the host node serial number occupies 2 bytes and is used to send data to a corresponding host, the frame mode occupies 1 byte, the data is fixed 0x01, and the current node serial number occupies 2 bytes.
When the master node device needs to read the configuration parameters of the slave node device with the corresponding ID number, a data frame in the format shown in table 3 is sent, and the protocol occupies 3 bytes, which are 2 bytes of slave node device ID numbers and a frame mode, where the frame mode is fixed 0x02, that is, a parameter reading mode.
After receiving the data, the slave node device sends a data frame as shown in table 4 to the master node device, wherein the data frame occupies 16 bytes, and the data frame is a master device ID number of 2 bytes; 1 byte frame mode, fixed content is 0x02, namely parameter query mode; the node ID number, the sending channel, the sending power, the receiving channel, the frequency bandwidth, the spreading factor, the coding rate and the lead code of the current slave equipment with 2 bytes respectively occupy 1 byte space, and also comprise the supermarket symbol number with 2 bytes and the sending overtime bit with 2 bytes.
In the firmware update mode, the master node device transmits to the slave node device a data frame in the format of table 5, the data packet occupies 133 bytes, wherein there is a slave node ID number of 2 bytes for indicating the destination slave device, the frame mode occupies 1 byte, and the content is fixed 0x04, i.e. the firmware update mode.
Because the new firmware occupies a large memory space, the firmware needs to be transmitted for multiple times when being transmitted, and the firmware package is split into 128-byte small data packages to be transmitted in batches. The fourth byte of the protocol frame stores the currently transmitted small data packet batch, the fourth byte of the protocol frame stores how many small data packets are split into in total, and the remaining 128 bytes are used for storing firmware information.
After receiving the data packet each time, the slave node device feeds back a response signal as shown in table 6 to the host. The reply signal occupies 9 bytes, which are respectively a master ID number of 2 bytes, a frame pattern of 1 byte, a current slave ID number of 2 bytes, and a hash value of 4 bytes for checking the data packet. And if the data are correct, storing the data into Flash, and if the data are detected to be wrong, sending a request for resending the data packet to the main equipment, emptying the current buffer area and preparing for receiving again.
After the slave node equipment receives the new firmware package, when a restart instruction from the master node is received, a response signal is sent to the master node, and then the system is restarted to load new firmware. The format of the restart command for the master node device is shown in table 7, and the protocol occupies 3 bytes, namely, 2 bytes of slave node device ID number and frame pattern, where the frame pattern is fixed 0x03, i.e., the restart pattern. As shown in table 8, the response signal of the slave node device is that the protocol occupies 5 bytes, the master node ID number occupies 2 bytes, the frame mode occupies 1 byte, and the current slave device ID number occupies 2 bytes.
TABLE 1
Figure BDA0003044237520000131
Figure BDA0003044237520000141
TABLE 2
Figure BDA0003044237520000142
TABLE 3
Figure BDA0003044237520000143
TABLE 4
Figure BDA0003044237520000144
Figure BDA0003044237520000151
TABLE 5
Figure BDA0003044237520000152
TABLE 6
Figure BDA0003044237520000153
Figure BDA0003044237520000161
TABLE 7
Configuring parameters Name of variable Byte(s) Remarks for note
Node sequence number Node_Id 2 Sequence number of target slave node
Frame mode Frame_Type 1 0x03
TABLE 8
Figure BDA0003044237520000162
In the description of the present invention, "a plurality" means two or more unless otherwise specified; the terms "upper", "lower", "left", "right", "inner", "outer", "front", "rear", "head", "tail", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are only for convenience in describing and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the invention. Furthermore, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
It should be noted that the embodiments of the present invention can be realized by hardware, software, or a combination of software and hardware. The hardware portion may be implemented using dedicated logic; the software portions may be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or specially designed hardware. Those skilled in the art will appreciate that the apparatus and methods described above may be implemented using computer executable instructions and/or embodied in processor control code, such code being provided on a carrier medium such as a disk, CD-or DVD-ROM, programmable memory such as read only memory (firmware), or a data carrier such as an optical or electronic signal carrier, for example. The apparatus and its modules of the present invention may be implemented by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or by software executed by various types of processors, or by a combination of hardware circuits and software, e.g., firmware.
The above description is only for the purpose of illustrating the present invention and the appended claims are not to be construed as limiting the scope of the invention, which is intended to cover all modifications, equivalents and improvements that are within the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. The utility model provides a general data acquisition device of full duplex narrowband thing networking under symmetrical channel, its characterized in that, general data acquisition device of full duplex narrowband thing networking is provided with under the symmetrical channel:
the sensing unit consists of a GPIO interface, an I2C interface, an SPI interface, a CAN bus interface, an ADC interface and a UART interface and is used for being compatible with the access of various sensors; meanwhile, the system is used for acquiring data by utilizing the accessed sensor;
the MCU micro-control unit adopts an STM32L151C8T6 embedded processor based on a Cortex-M3 framework and is used for processing data acquired by corresponding sensors connected with acquisition sensing units of different buses and filtering the data; for coordinating work among the various units; meanwhile, the system is used for setting the working mode of the SX1278 module and controlling the SX1278 module of the radio frequency unit to work;
the radio frequency unit consists of an SX1278 module and a serial port communication end; for transmitting data information;
the debugging and communication port is used for debugging and updating software;
a power supply unit consisting of a lithium ion polymer battery, a voltage down converter TLV 62565; the MCU micro control unit is used for providing power support for the MCU micro control unit and the sensing unit;
and the data storage unit is 64Kb Flash inside the MCU micro control unit and is used for storing the transmitting parameters including the receiving frequency, the spreading factor, the transmitting power and the signal bandwidth and new firmware set in the radio frequency unit.
2. The device for acquiring the universal data of the full-duplex narrowband internet of things under the symmetric channel according to claim 1, wherein the radio frequency unit comprises:
the SX1278 module comprises two SX1278 wireless communication chips; for full duplex operation, transmitting data to be transmitted and received; one of the two SX1278 wireless communication chips is used for sending data, and the other chip is used for receiving data;
the SX1278 wireless communication chip is provided with an SCK port, an MOSI port, a MISO port, an NSS port, DIO 0-DIO 5 and an RST port;
the SCK port is used for the MCU micro control unit to provide an SPI clock source for the SX1278 module;
the MOSI and MISO ports are data input and output ports of the SPI bus;
the NSS is a chip selection port of the bus and is set at a low level during working;
the DIO 0-DIO 5 are general I/O ports and are used for prompting the current working state to the MCU, and signal ports of interrupt sources are arranged under the channel activity monitoring mode CAD;
the RST port is used for resetting the SX1278 module, and the low level is effective during working;
the SX1278 module utilizes one path of hardware SPI port and two paths of serial ports of the MCU micro control unit, wherein the reset port of the SX1276 can be connected with any GPIO port of the MCU micro control unit.
3. The apparatus for acquiring data of the internet of things in full duplex narrowband under the symmetric channel as set forth in claim 1, wherein the buck converter comprises:
the step-down converter is used for converting DC 5V voltage into MCU micro control unit working voltage DC3.3V to supply power to the node, and the output voltage of the step-down circuit is set by selecting proper resistors R23 and R26.
4. The device for acquiring the universal data of the full-duplex narrowband internet of things under the symmetric channel according to claim 1, wherein the debugging and communication port is composed of a CH340G chip and a USB interface;
and TXD pins and RXD pins of the CH340G chip are cut to a serial port 1 pin of the embedded processor, and UD + and UD-are respectively linked with a data pin of a Micro USB port.
5. The system for acquiring the universal data of the full-duplex narrowband internet of things under the symmetric channel, which is carried by the universal data acquisition device of the full-duplex narrowband internet of things under the symmetric channel according to any one of claims 1 to 4, is characterized by comprising:
the master node module and the slave node module;
the main node module comprises a protocol analysis unit, a data packet sending unit and a data packet receiving unit; the system comprises a slave node device, a first network device and a second network device, wherein the slave node device is used for configuring and inquiring radio frequency parameters for each device according to the ID number of the slave node device, updating firmware and restarting the devices; the system is used for disassembling the new firmware into small data packets of 128 subbytes and then sending the data packets in batches;
the slave node module is used for acquiring data according to a certain time interval, performing Kalman filtering on the data and sending the filtered data according to a certain protocol; meanwhile, the system is used for checking whether a new data packet from the main node equipment is received or not, receiving data after the ID number is matched and verifying the data; after receiving data each time, sending a corresponding parameter data packet or a response signal to the main node equipment;
parameter configuration, parameter inquiry, firmware update and equipment restart can be carried out between the master node module and the slave node module.
6. The system for acquiring the general data of the full-duplex narrowband internet of things under the symmetric channel according to claim 5, wherein the master node module comprises:
the protocol analysis unit is used for sending data packets of different protocol frames according to the four different functions;
the data packet sending unit is used for sending protocol frames of parameter configuration, parameter query, firmware update and equipment restart functions to the slave node equipment;
and the data packet receiving unit is used for receiving the response signal data packet from the slave node equipment after the protocol frames with different functions are sent to the slave node equipment.
7. The system as claimed in claim 6, wherein the parameter configuration protocol comprises data length, frame mode, node ID, transmission channel, transmission power, reception frequency, frequency bandwidth, spreading factor, coding rate, preamble, number of symbols over time and transmission time-out.
8. The system for acquiring the universal data of the full-duplex narrowband internet of things under the symmetric channel according to claim 5, wherein the slave node module comprises:
the data acquisition and processing unit is used for reading bus information or acquiring ADC channel information to obtain data and performing Kalman filtering on the obtained data;
the data packet sending and receiving unit is used for sending the filtered data packet by the LoRa wireless communication technology; the slave node equipment sends a response signal after receiving the data packet to the master node equipment;
the protocol analysis unit is used for receiving a data packet from the main node equipment, storing the data packet into a buffer area, performing protocol analysis on the data, identifying a frame mode, and decomposing to obtain corresponding radio frequency parameters and firmware packet data;
the radio frequency parameter updating unit is used for setting a transmitting parameter used in the LoRa communication process according to a data packet sent by the main node equipment and storing a new parameter into Flash;
the remote firmware updating unit is used for receiving the firmware updating packet from the main node, analyzing and judging each frame of data packet, and judging whether the data packet has errors or packet loss; meanwhile, IAP updating is carried out after the new firmware is received;
the low-power consumption sleep unit is used for controlling the slave node equipment to enter a low-power consumption sleep mode after data is sent each time; and waiting for the delay time or receiving new data from the main node equipment to wake up the slave node equipment.
9. A full-duplex narrow-band Internet of things general data acquisition method under a real symmetric channel is characterized by comprising the following steps:
initializing a hardware peripheral, checking whether a hardware boundary is correct, reading radio frequency parameters from Flash inside STM32 after the initialization is successful, and acquiring data;
secondly, performing Kalman filtering on the acquired data, packaging the data and sending the data through a radio frequency module, and entering a low power consumption mode for dormancy according to set delay time after the data is successfully sent;
step three, judging whether a new data packet from the main node equipment is received or not, if so, immediately waking up the equipment, and receiving corresponding new parameters after judging the frame mode; and after the delay time is reached, waking up the system, and repeating the second step to the third step.
10. The method for acquiring the universal data of the full-duplex narrowband internet of things under the symmetric channel according to claim 9, wherein the step of receiving the corresponding new parameters after the frame mode is judged comprises the steps of:
judging whether the received data packet has errors or not;
if the data packet does not conform to the set data packet format, discarding the data packet and emptying a receiving buffer area;
and if the format of the data packet is correct, storing the new parameters into Flash, and erasing the old parameters stored in Flash.
CN202110468325.2A 2021-04-28 2021-04-28 Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel Pending CN113238499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110468325.2A CN113238499A (en) 2021-04-28 2021-04-28 Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110468325.2A CN113238499A (en) 2021-04-28 2021-04-28 Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel

Publications (1)

Publication Number Publication Date
CN113238499A true CN113238499A (en) 2021-08-10

Family

ID=77131303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110468325.2A Pending CN113238499A (en) 2021-04-28 2021-04-28 Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel

Country Status (1)

Country Link
CN (1) CN113238499A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778739A (en) * 2021-11-08 2021-12-10 广州朗国电子科技股份有限公司 System repair method, system, equipment and storage medium of all-in-one machine

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170628A (en) * 2017-12-25 2018-06-15 东华理工大学 A kind of water meter meter based on LORA communications
CN207732991U (en) * 2018-02-05 2018-08-14 黑龙江大学 Internet of things data acquisition transmitter based on LoRa
CN109495233A (en) * 2018-05-24 2019-03-19 杭州盈飞驰科技有限公司 A kind of high-effective data collecting system and control method based on LoRaWAN agreement
CN209593464U (en) * 2019-04-03 2019-11-05 浙江利尔达物联网技术有限公司 A kind of multichannel full-duplex things-internet gateway based on LoRaWAN
CN211018824U (en) * 2020-02-21 2020-07-14 中国人民解放军战略支援部队航天工程大学 Remote anti-interference digital interphone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170628A (en) * 2017-12-25 2018-06-15 东华理工大学 A kind of water meter meter based on LORA communications
CN207732991U (en) * 2018-02-05 2018-08-14 黑龙江大学 Internet of things data acquisition transmitter based on LoRa
CN109495233A (en) * 2018-05-24 2019-03-19 杭州盈飞驰科技有限公司 A kind of high-effective data collecting system and control method based on LoRaWAN agreement
CN209593464U (en) * 2019-04-03 2019-11-05 浙江利尔达物联网技术有限公司 A kind of multichannel full-duplex things-internet gateway based on LoRaWAN
CN211018824U (en) * 2020-02-21 2020-07-14 中国人民解放军战略支援部队航天工程大学 Remote anti-interference digital interphone

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778739A (en) * 2021-11-08 2021-12-10 广州朗国电子科技股份有限公司 System repair method, system, equipment and storage medium of all-in-one machine
CN113778739B (en) * 2021-11-08 2022-03-04 广州朗国电子科技股份有限公司 System repair method, system, equipment and storage medium of all-in-one machine

Similar Documents

Publication Publication Date Title
CN107092568B (en) Data communication interface for processing data in low power system
CN102055611B (en) Low-power wireless data acquisition system
CN110166975B (en) Agricultural Internet of things sensor communication method based on wireless network and raspberry-set node
CN105527878B (en) A kind of collecting method, device and data acquire debugging system
CN101004707A (en) Embedded type software debugging device, and method for implementing debugging
CN102665292B (en) Sensor node device for wireless sensor network and operation method of sensor node device
CN102801818A (en) Universal sensor interface acquisition system based on ZigBee technology
CN110119282A (en) A kind of internet-of-things terminal and system based on general-purpose built-in type computer
CN103077366B (en) Radio-frequency identification device of multichannel data interface and data transmission method
CN113238499A (en) Full-duplex narrow-band Internet of things general data acquisition device and method under symmetric channel
CN103826246B (en) A kind of multiband wireless sensor node
CN101860077A (en) Wireless sensor network system for preventing disasters and remotely monitoring power tower
CN106059877B (en) EtherCAT main station module based on SPARC framework CPU
CN110166971A (en) Low-consumption wireless communication device and system applied to inspection shaft pipe network
CN105812030A (en) Sensor general interface based on low power consumption bluetooth technology
CN201955893U (en) Temperature and humidity data acquisition management device
CN101377823A (en) Electric identification apparatus based on intelligent personal identification and implementing method thereof
CN208000509U (en) Scale based on wireless sense network supports fowl environment automatic control system
CN116185917A (en) Intelligent processing and interface control unit architecture of distributed system
CN212963730U (en) NB-IOT temperature remote transmission module
CN101807044B (en) Clock timing method of multifunctional meter
CN209842365U (en) Signal processing system
CN205038468U (en) Special intelligent control ware of low temperature pump control system case with GPRS communication
CN204680000U (en) The wireless renovator of a kind of DSP program code
CN102843386B (en) Radio frequency communication module for fault indicator of power distribution network line and applications of radio frequency communication module

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210810

WD01 Invention patent application deemed withdrawn after publication