Intelligent data acquisition device
Through the design of the intelligent data acquisition device, the main and secondary acquisition modules and wireless transmission systems are used to solve the problem of inefficient multi-point data acquisition, and efficient data acquisition and processing are achieved, which is suitable for meteorology, electricity, agriculture and environmental protection fields.
Patent Information
- Application Number
- CN202510776027.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-08-12
AI Technical Summary
The prior art requires manual measurements in multi-point data acquisition, which leads to inefficient and time-consuming, and is difficult to achieve simultaneous measurements when sampling points are dispersed and distances are long.
An intelligent data acquisition device is designed, including a main acquisition module and multiple sub-acquisition modules. The main acquisition module and the sub-acquisition module are one by one. The centralized acquisition and display of data is realized through the wireless transmission system and the Internet of Things module. The STM32 series MCU is used as the main control chip, and data acquisition and processing are collected and processed in combination with different sensors and protocol modules.
Multi-point simultaneous data acquisition is realized, manual intervention is reduced, and collection efficiency is improved. It is suitable for data acquisition in fields such as meteorology, electricity, agriculture and environmental protection.
Smart Images

Figure CN120467409A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data acquisition, and in particular to an intelligent data acquisition device. Background Art
[0002] In real life, when we need to collect data at multiple sampling points, we often use a single machine to go to each sampling point to measure in turn. If the sampling points are scattered and far apart, a single person and a single device are required to measure them one by one, which cannot achieve simultaneous measurement and is also very time-consuming. Therefore, a data acquisition device is needed that can collect data from each sampling point at the same time, eliminating the need for manual labor to go to each sampling point to collect data each time, saving labor and improving collection efficiency. Summary of the Invention
[0003] The purpose of this application is to provide an intelligent data acquisition device that can avoid going to each sampling point every time for collection, and can realize simultaneous data collection at multiple points. Fewer data collection staff are required, which can save labor, improve collection efficiency, and has a wide range of applications. As long as sensors for the corresponding fields are configured, it can be applied to different fields, such as meteorology, electricity, agriculture, environmental protection, etc.
[0004] To achieve the above objectives, this application provides the following solutions:
[0005] In the first aspect, the present application provides an intelligent data acquisition device, comprising: a main acquisition module and a plurality of sub-acquisition modules connected to the main acquisition module, wherein the main acquisition module and the sub-acquisition modules are arranged in a one-to-one correspondence with the sampling points; the main acquisition module comprises a host system and a first data acquisition system connected to the host system; the sub-acquisition module comprises a sub-machine system and a second data acquisition system connected to the sub-machine system; the sub-machine systems in each sub-acquisition module are connected to the host system
[0006] In one embodiment, the intelligent data acquisition device also includes: a display system connected to the host system; the data collected by the second data acquisition system in each sub-acquisition module and the system status of each sub-machine system are transmitted to the host system, and the host system displays the data collected by the first data acquisition system, the system status of the host system, the system status of each sub-machine system, and the data collected by the second data acquisition system in each sub-acquisition module through the display system.
[0007] In one embodiment, the intelligent data acquisition device further includes: a cloud server and an Internet of Things module, and the cloud server is connected to the host system via the Internet of Things module.
[0008] In one embodiment, the intelligent data acquisition device further includes: a wireless transmission system, and the auxiliary system is connected to the host system via the wireless transmission system.
[0009] In one embodiment, the first data acquisition system includes: a first sensor module and a first protocol module connected in sequence, and the first sensor module is connected to the host system through the first protocol module; the second data acquisition system includes: a second sensor module and a second protocol module connected in sequence, and the second sensor module is connected to the auxiliary system through the second protocol module.
[0010] In one embodiment, the first protocol module and the second protocol module both include: I2C protocol, single bus protocol and MODBUS protocol.
[0011] In one embodiment, the display system includes: a homepage module, an export module, a display module corresponding to the host system, and display modules corresponding to each auxiliary system; the homepage module is used to display the system status of the host system and the system status of each auxiliary system; the display module corresponding to the host system is used to display the system status of the host system and the data collected by the first data acquisition system; the display module corresponding to the auxiliary system is used to display the system status of the auxiliary system and the data collected by the second data acquisition system corresponding to the auxiliary system; the export module is used to export the data collected by the first data acquisition system and the data collected by the second data acquisition system according to preset conditions.
[0012] In one embodiment, the intelligent data acquisition device further includes: the first sensor module and the second sensor module each include: a humidity sensor, a pressure sensor, a temperature sensor, a wind speed sensor, a wind direction sensor, and a light sensor; the intelligent data acquisition device further includes: a DC boost voltage regulator circuit, a first DC buck voltage regulator circuit, and a second DC buck voltage regulator circuit;
[0013] The wireless transmission system and the Internet of Things module are both connected to a 12V DC battery via the first DC step-down voltage stabilizing circuit; the first DC step-down voltage stabilizing circuit is used to reduce the voltage of the 12V DC battery to DC5V;
[0014] The display system, the wind speed sensor, the wind direction sensor and the light sensor are all connected to a 12V DC battery via the DC boost voltage stabilizing circuit; the DC boost voltage stabilizing circuit is used to boost the voltage of the 12V DC battery to DC24V;
[0015] The humidity sensor, the pressure sensor, the temperature sensor, the host system and the auxiliary system are all connected to the output end of the first DC buck voltage stabilizing circuit through a second DC buck voltage stabilizing circuit, and the second DC buck voltage stabilizing circuit is used to reduce the DC5V voltage to DC3.3V.
[0016] In one embodiment, the intelligent data acquisition device further comprises: a 12V DC battery that uses mains electricity or photovoltaic power to supplement electrical energy.
[0017] In one embodiment, the host system and the secondary system both use STM32 series MCU as a main control chip.
[0018] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides an intelligent data acquisition device, including a main acquisition module and multiple sub-acquisition modules. The main acquisition module and the sub-acquisition modules are set in one-to-one correspondence with the sampling points. An acquisition module is pre-set at each sampling point. The sampling module set at the sampling point can be directly used for detection. During detection, there is no need for manual collection at each sampling point every time, which saves labor and improves collection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 This is a structural block diagram of an intelligent data acquisition device provided in one embodiment of the present application;
[0021] Figure 2 This is the circuit diagram for connecting the DS18B20 sensor to the power supply;
[0022] Figure 3 This is the circuit diagram for connecting the wind speed, wind direction, and light sensors to the power supply;
[0023] Figure 4 This is the minimum system diagram of STM32F429IGT6;
[0024] Figure 5 This is the minimum system diagram of STM32F103C8T6;
[0025] Figure 6 This is the circuit diagram of DC voltage regulation and step-down 5V;
[0026] Figure 7 This is the circuit diagram of the MCGS touch screen and wireless serial port module;
[0027] Figure 8 This is the circuit diagram of the ML307R IoT module;
[0028] Figure 9 This is a 24V DC boost and voltage regulator circuit diagram;
[0029] Figure 10 This is the DC boost and voltage stabilization 3.3V circuit diagram;
[0030] Figure 11 This is the MODBUS RTU host program flow chart;
[0031] Figure 12 This is the MODBUS RTU slave program flow chart;
[0032] Figure 13 Flowchart of MODBUS RTU parsing program;
[0033] Figure 14 This is a schematic diagram of CRC verification;
[0034] Figure 15 It is the flow chart of CRC algorithm;
[0035] Figure 16 This is the circuit diagram for connecting the humidity sensor to the power supply;
[0036] Figure 17 This is the circuit diagram for connecting the pressure sensor to the power supply;
[0037] Figure 18 Run the home page interface diagram for the device;
[0038] Figure 19 Run the host interface diagram for the device;
[0039] Figure 20 This is the interface diagram of the device running auxiliary machine 1;
[0040] Figure 21 To export the interface diagram. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0042] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0043] In an exemplary embodiment, Figure 1As shown, an intelligent data acquisition device is provided, comprising: a main acquisition module and multiple sub-acquisition modules connected to the main acquisition module, wherein the main acquisition modules and the sub-acquisition modules are arranged in a one-to-one correspondence with sampling points; the main acquisition module comprises a host system and a first data acquisition system connected to the host system; the sub-acquisition module comprises a sub-machine system and a second data acquisition system connected to the sub-machine system; and the sub-machine systems in each sub-acquisition module are connected to the host system.
[0044] In another exemplary embodiment of the present application, the intelligent data acquisition device further includes: a cloud server and an Internet of Things module, and the cloud server is connected to the host system through the Internet of Things module.
[0045] In another exemplary embodiment of the present application, the intelligent data acquisition device also includes: a display system connected to the host system; the data collected by the second data acquisition system in each sub-acquisition module and the system status of each sub-machine system are transmitted to the host system, and the host system displays the data collected by the first data acquisition system, the system status of the host system, the system status of each sub-machine system and the data collected by the second data acquisition system in each sub-acquisition module through the display system.
[0046] In another exemplary embodiment of the present application, the intelligent data acquisition device further includes: a wireless transmission system, and the auxiliary system is connected to the host system via the wireless transmission system.
[0047] In another exemplary embodiment of the present application, the first data acquisition system includes: a first sensor module and a first protocol module connected in sequence, and the first sensor module is connected to the host system through the first protocol module; the second data acquisition system includes: a second sensor module and a second protocol module connected in sequence, and the second sensor module is connected to the auxiliary system through the second protocol module.
[0048] In another exemplary embodiment of the present application, the first protocol module and the second protocol module both include: I2C protocol, single bus protocol and MODBUS protocol.
[0049] In another exemplary embodiment of the present application, when the intelligent data acquisition device is applied to the field of meteorological environment acquisition, the first sensor module and the second sensor module each include: a humidity sensor, a pressure sensor, a temperature sensor, a wind speed sensor, a wind direction sensor, and a light sensor. The intelligent data acquisition device also includes: a DC boost voltage regulator circuit, a first DC buck voltage regulator circuit, and a second DC buck voltage regulator circuit. The wireless transmission system and the Internet of Things module are both connected to a 12V DC battery via the first DC buck voltage regulator circuit; the first DC buck voltage regulator circuit is used to reduce the voltage of the 12V DC battery to DC5V. The display system, the wind speed sensor, the wind direction sensor, and the light sensor are all connected to a 12V DC battery via the DC boost voltage regulator circuit; the DC boost voltage regulator circuit is used to increase the voltage of the 12V DC battery to DC24V. The humidity sensor, pressure sensor, temperature sensor, host system, and auxiliary system are all connected to the output end of the first DC step-down voltage regulator circuit via a second DC step-down voltage regulator circuit. The second DC step-down voltage regulator circuit is configured to reduce the DC 5V voltage to DC 3.3V. The 12V DC battery is supplemented with electricity from the mains or photovoltaic power.
[0050] In another exemplary embodiment of the present application, the humidity sensor adopts a mobile moisture meter with a signal of HD2, and the connection relationship with the power supply is as follows: Figure 16 shown.
[0051] In another exemplary embodiment of the present application, the temperature sensor utilizes a DS18B20 temperature sensor. This sensor utilizes the One-Wire protocol, enabling communication and power supply via a single data line, making circuit connection and integration relatively simple. The DS18B20 metal chip package offers excellent waterproof properties, making it suitable for applications requiring temperature measurement in humid or liquid environments. Therefore, this application utilizes a temperature sensor probe in this package.
[0052] DS18B20 is powered by DC 3.3V. In order to ensure the stability of its power supply, three capacitors are added: the first capacitor C14, the second capacitor C15 and the third capacitor C16 as bypass filters for DS18B20. Figure 2 As shown, the first capacitor C14 and the second capacitor C15 can filter out high-frequency interference signals in the power supply, and the third capacitor C16 can filter out low-frequency interference signals, greatly improving its working stability. The main acquisition module and the auxiliary acquisition module are equipped with a total of 5 DS18B20 sensors. The specific circuit diagram is as follows Figure 2 shown.
[0053] In another exemplary embodiment of the present application, BMP280 is used as a pressure sensor, and the connection relationship with the power supply is as follows: Figure 17 shown.
[0054] In another exemplary embodiment of the present application, the RS-FSJT-N01 wind speed transmitter is selected as the wind speed sensor. This transmitter can measure 360° wind speed. It has the advantages of strong wind resistance, low starting wind speed, high accuracy, wide range, small moment of inertia, sensitive response, and simple and convenient installation. It is output via RS485 through the MODBUS RTU standard protocol, and the standard protocol allows for better modular design. It operates stably, and CRC data is used for verification during data output to ensure the accuracy of the output data. It has a high protection level and is rainproof and dustproof.
[0055] In another exemplary embodiment of the present application, the RS-FSJT-N01-360 wind direction transmitter is selected as the wind direction sensor. The transmitter can measure 360° wind direction and has the advantages of strong wind resistance, low starting wind speed, high accuracy, wide range, small moment of inertia, sensitive response, simple and convenient installation, etc. It communicates via RS485.
[0056] In another exemplary embodiment of this application, the PR-300JT-RA-NO1 photoelectric global solar radiation sensor is used as the light sensor. This sensor communicates via RS485 and boasts high accuracy, excellent sensitivity, good stability, wide-spectrum absorption, and an all-aluminum housing. With an IP68 dust and water resistance rating, it can measure solar radiation outdoors at any time. This sensor is widely used to measure solar radiation energy in meteorology, agriculture, building material aging, and air pollution.
[0057] The wind speed sensor, wind direction sensor and light sensor in this application are all powered by DC 24V. Since they all use RS485 communication, according to the communication protocol design, each device must have an independent ID address, so you only need to connect all the sensors in parallel. The specific circuit diagram is as follows Figure 3 As shown, the probe can be a wind speed sensor, a wind direction sensor or a light sensor.
[0058] In another exemplary embodiment of the present application, the display system includes: a home page module, an export module, a display module corresponding to the host system and a display module corresponding to each auxiliary system; the home page module is used to display the system status of the host system and the system status of each auxiliary system; the display module corresponding to the host system is used to display the system status of the host system and the data collected by the first data acquisition system; the display module corresponding to the auxiliary system is used to display the system status of the auxiliary system and the data collected by the second data acquisition system corresponding to the auxiliary system; the export module is used to export the data collected by the first data acquisition system and the data collected by the second data acquisition system according to preset conditions.
[0059] In another exemplary embodiment of the present application, the MCGS (Kunlun Tongtai) embedded touch screen TPC1061Ti is selected as the display system, which adopts the advanced Cortex-A8 CPU core with a main frequency of 600MHz, providing a high-performance embedded integrated touch screen solution. The product is equipped with a 10.2-inch high-brightness TFT LCD display with a resolution of 1024×600 and excellent visibility. Its outstanding features include complete functions, simple operation and strong maintainability. When combined with other hardware devices, the TPC1061Ti touch screen can quickly and conveniently develop various field acquisition, data processing and control equipment. Users can build their own application systems through simple modular configuration, and flexibly combine special equipment such as smart meters, data acquisition modules, paperless recorders, unmanned field acquisition stations, and human-machine interfaces.
[0060] The homepage module, export module, display module corresponding to the host system, and display modules corresponding to each auxiliary system in the display system provided by this application all have corresponding function buttons and user interfaces on the MCGS touch screen. The corresponding functions are realized through the corresponding function buttons and user interfaces. The user interface corresponding to the homepage module is called the homepage interface, which is also the first interface entered when the computer is turned on. Buttons for jumping to other interfaces and a real-time clock display are set on this interface. This interface also has the function of displaying the system status of the host system and auxiliary system, such as: operating status display, remaining power percentage display, charging status display, and equipment failure alarm information.
[0061] The user interface of the display module corresponding to the host system is the host interface, and the user interface of the display module corresponding to the slave system is the slave interface. The system status of the current device can also be viewed in the host interface and the slave interface, and the data values collected by the current device can also be displayed in real time.
[0062] The export module's user interface is the export interface. In this interface, you can view recorded data. The data record header contains information such as the serial number and time. In this interface, you can set the start and end time for data export, as well as the maximum number of data to export. If the data within the set time range is less than the maximum number of data to export, all data recorded within this time range will be exported. If the data saved exceeds the maximum number of data to export, the data will be exported starting from the start time until the data exported reaches the maximum number of data to export.
[0063] In the export interface, you can also set up a data viewing interface, flip the interface up and down, jump to the start page or end page, etc. The displayed data records will be refreshed once when entering the export interface, and will not be actively refreshed afterwards, but the data will still be recorded in the internal database of the MCGS touch screen. If you need to refresh the display interface, you can click the refresh button on the interface, which will refresh the number of recorded data in the display box. In order to facilitate data management, a data delete button is also set on the current interface. When this button is pressed, the recorded data will be cleared.
[0064] In order to help new users better use this system, they can enter the help interface after the system is turned on. This interface will record the system's operation methods, usage details, usage precautions and other information in text form.
[0065] In another exemplary embodiment of the present application, the humidity sensor and pressure sensor in the first data acquisition system are connected to the host system via the I2C protocol, the temperature sensor in the first data acquisition system is connected to the host system via the single bus protocol, and the wind speed sensor, wind direction sensor and light sensor in the first data acquisition system are all connected to the host system via the MODBUS protocol.
[0066] The humidity sensor and pressure sensor in the second data acquisition system are connected to the auxiliary system through the I2C protocol, the temperature sensor in the second data acquisition system is connected to the auxiliary system through the single bus protocol, and the wind speed sensor, wind direction sensor and light sensor in the second data acquisition system are all connected to the auxiliary system through the MODBUS protocol.
[0067] In another exemplary embodiment of the present application, the host system needs to communicate with a display system, sensors, wireless transmission systems, and auxiliary systems. This requires a large amount of computing power and high performance requirements. Therefore, this application uses an STM32F429IGT6 MCU as the main control chip for the host system. The STM32F429IGT6 microcontroller has 144 pins, covering a variety of functions, including general-purpose input and output pins (GPIO), serial communication interface pins (USART, SPI, I2C), analog input and output pins (ADC), Ethernet pins, LCD-TFT controller pins, USB interface pins, audio input and output pins, etc. These pins provide a rich interface and connection options suitable for various types of peripherals and application scenarios. In the specific design, these pins are selected and configured according to the project requirements to meet the system's functional and connection requirements. The STM32F429IGT6 is a powerful microcontroller suitable for a variety of high-performance embedded systems, especially in graphical user interface (GUI) applications. Its rich peripherals and high performance make it an ideal choice for a wide range of applications in industrial control, embedded graphical interfaces, network communications, and other fields. In the design of the STM32F429IGT6 host system, its clock circuit, reset circuit, download circuit, BOOT setting circuit, and power supply need to be considered. Its clock circuit is divided into an external low-speed clock and an external high-speed clock. The capacitor C5 in the reset circuit design acts as a hardware filter to prevent the microcontroller from detecting multiple reset signals after pressing the reset button. The BOOT setting circuit consists of BOOT0 and BOOT1, which use binary format to set the ROM used during startup. The minimum system diagram of the STM32F429IGT6 is shown below. Figure 4 As shown, Figure 4 Parts (A) and (C) represent the microcontroller interface pins. Figure 4 Part (B) represents the microcontroller power supply. Figure 4 Part (D) represents the reset circuit. Figure 4 The (E) part represents the program download circuit. Figure 4 The (F) part represents the high-speed clock circuit. Figure 4 The (G) part represents the low-speed clock circuit. Figure 4 The middle (H) part represents the BOOT program startup path configuration circuit.
[0068] Since the computing power of the auxiliary system is small and the required performance requirements are not very high, in order to consider economic benefits, the auxiliary system uses an MCU model STM32F103C8T6 as the main control chip. The STM32F103C8T6 microcontroller has 48 pins. These pins include general-purpose input and output pins (GPIO), analog input pins (ADC), serial communication interface pins (USART, SPI, I2C, etc.), timer pins, power pins, etc. This packaged STM32F103C8T6 usually uses the LQFP48 package, which provides a smaller package size and is suitable for use in embedded systems with space constraints. The STM32F103C8T6 uses the ARM Cortex-M3 core, with an operating frequency of usually 72MHz, providing high-performance computing capabilities. In the design of the STM32F103C8T6 in the auxiliary system, like the host system, its clock circuit, reset circuit, download circuit, BOOT setting circuit, and power supply need to be designed. The minimum system diagram of the STM32F103C8T6 is as follows: Figure 5 As shown, Figure 5 Part (A) represents the high-speed clock circuit. Figure 5 Part (B) represents the low-speed clock circuit. Figure 5 Part (C) represents the BOOT program startup path configuration circuit. Figure 5 The (D) part in the middle represents the microcontroller lead pins. Figure 5 The (E) part represents the program download circuit. Figure 5 The (F) part represents the reset circuit. Figure 5 The (G) part in the middle indicates that the system output interface is short-circuited.
[0069] In another exemplary embodiment of this application, the ML307R module is selected as the IoT module. This module has been deeply optimized for cost and power consumption, aiming to provide high quality standards while reducing overall costs. It utilizes an industry-standard 15.7mm × 17.7mm 2G module package, which is compact and easy to integrate. Furthermore, the ML307R inherits the standardized AT and OpenCPU standards of the ML307S / ML307A, enabling forward compatibility between software and hardware and reducing product switching costs.
[0070] Use ML307R to upload local collected data to the cloud. The module uses a UART communication interface and supports the standard AT protocol. The BT pin of the module is the control pin used for downloading programs. If you do not need to enter the download program module, you need to set this pin to a high level. LED3 is used as the working status indicator of the module. Its circuit design is as follows Figure 8 shown.
[0071] In another exemplary embodiment of the present application, the wireless transmission system includes two wireless modules that communicate with each other, one of which is connected to the host system and the other is connected to the auxiliary system. This application uses the A22B433A20D1a 433M wireless serial port module as the wireless module. The module supports remote wireless transparent transmission of data and adopts the RS485 communication interface. It has the advantages of high-speed data transmission, low latency and high sensitivity, high stability, and small size. It can realize point-to-point, one-to-many, and many-to-many communication. And each module can be set with an independent address. It has a transparent broadcast mode, which allows multiple modules to receive data at the same time. And long-distance communication of 2500 meters can be achieved between modules.
[0072] In another exemplary embodiment of the present application, the A22B433A20D1a wireless module uses a DC 5V voltage for power supply, so it needs to adapt to the voltage level. The RT7272BGSP high-frequency buck chip is used for DC-CD, 12V to 5V buck and voltage regulation. The chip can output a maximum current of 3A. Its circuit design is as follows Figure 6 As shown in the figure, since the touch screen, wind speed sensor, wind direction sensor, solar radiation sensor and other sensors use a DC 24V power supply, the LM2577S linear boost voltage regulator chip is selected here. The maximum output current of this chip can reach 5A, which can meet the power supply requirements of all sensors. The circuit design is as follows Figure 9 In order to meet the DC 3.3V voltage supply requirements of devices such as STM32F429IGT6, STM32F103C8T6, BMP280 and DS18B20, the AMS1086CD DC linear step-down voltage regulator chip is selected to step down the output of the 5V DC power supply to obtain a stable 3.3V voltage output. The circuit design is as follows Figure 10 As shown in the figure, this design effectively provides the required power for the MCU and sensors. The fourth capacitor C34 is primarily used to filter out low-frequency interference signals from the power supply, while the fifth capacitor C29 is used to filter out high-frequency interference signals from the power supply. This ensures stable and reliable operation under normal operating conditions.
[0073] In another exemplary embodiment of the present application, the MCGS touch screen and the A22B433A20D1a wireless serial port module both use the RS485 interface protocol and have unique ID addresses, so the two data communication link methods are the same, and the hardware connection diagram is as follows: Figure 7 As shown, Figure 7 Part (a) is the hardware connection diagram of the A22B433A20D1a wireless serial port module. Figure 7 Part (b) is the MCGS touch screen hardware connection diagram.
[0074] In another exemplary embodiment of the present application, the display system is connected to the host system via the MODBUS protocol, and the host system and the auxiliary system are connected to the wireless transmission system via the MODBUS protocol.
[0075] In practical applications, the MODBUS protocol can be: MODBUS RTU protocol. MODBUS RTU is a serial communication protocol used for communication between devices in industrial automation and control systems. It is a variant of the MODBUS protocol that uses binary encoding to transmit data over serial lines. MODBUS RTU uses serial communication and typically runs on serial communication standards such as RS-232, RS-422, or RS-485. MODBUS RTU supports device addresses from 1 to 247. Device addresses 0 and 248 to 255 are specially reserved; each individual device must be assigned a unique address. Data is transmitted in binary form, using 8 bits per byte, with data transmitted in least significant bit first. MODBUS RTU uses a CRC-16 checksum to detect errors in frames. The CRC-16 calculation covers all parts of the frame, including the address, function code, and data. MODBUS RTU supports a variety of function codes, including reading holding registers, writing a single holding register, writing multiple holding registers, and reading input registers. A MODBUS RTU frame consists of a start character, address, function code, data, CRC checksum, and end character. Each field has a fixed length. The start character (Start Frame) is usually a colon or a special flag, indicating the beginning of the frame. The device address (Address) is 1 byte, used to specify the target device for communication. The function code (Function Code) is 1 byte, specifying the type of operation performed by the device. The data (Data) has a variable length depending on the function code and instruction. The CRC checksum is 2 bytes, used to detect frame transmission errors. The end character (End Frame) is usually a space or a carriage return, indicating the end of the frame.
[0076] If the host system needs to read data from the slave system, the device address must be the device address of the slave system that needs to read data. The function code can use the host system to obtain the slave system's data read function code 03 (0x03), followed by a 16-bit starting address, and a 16-bit length of the data to be obtained, and finally a 16-bit CRC checksum is added and sent to the slave. The data frame model for reading function code 03 is shown in Table 1:
[0077] Table 1 Reading function code 03 data frame model table
[0078] 0x01 03 00 01 00 01 D5 CA Slave Address Function Number Data address Number of data read CRC check
[0079] After the slave system receives the data from the master system and completes the verification, it needs to return a response data frame. The device address is the slave system's device address, the function code remains unchanged at 03 (0x03), the 8-bit data byte length (corresponding to the data length), the 16-bit data (the amount of data depends on the length of the previous byte), and finally the 16-bit CRC checksum. The data frame model for the read response function code 03 is shown in Table 2:
[0080] Table 2 Read response function code 03 data frame model table
[0081] 0x01 03 02 00 17 F8 4A Slave Address Function Number Number of data bytes Two bytes of data CRC check
[0082] In actual applications, before using the MODBUS RTU protocol, it is necessary to initialize the MCU hardware clock, serial port, and port.
[0083] When the host system uses MODBUS RTU, the host system actively sends data frames to the slave system, and then waits for the slave system to respond. If there is no data response within 1 second, it will be resent. When the response data is returned, the program will enter the serial port callback function and prohibit receiving data, then clear the reception completion flag, and finally analyze the response data. The MODBUS RTU host program flow chart is as follows Figure 11 shown.
[0084] When the slave system uses MODBUS RTU, the slave system will receive data sent by the host system in real time. If data reception is completed, it will enter the serial port return function. The MODBUS RTU slave program flow chart is as follows Figure 12 shown.
[0085] Then execute the MODBUS RTU parsing command program. After a data reception is completed, the data will be parsed to determine whether the data is valid. If the data is valid, it will be directly written into the program database. Otherwise, the data will be determined to be invalid and will be directly abandoned without parsing the data. The MODBUS RTU parsing program flow chart is as follows: Figure 13 shown.
[0086] In practical applications, because the design uses more MODBUS RTU data communication protocols, in order to ensure the accuracy of each data transmission, the communication between data uses CRC (Cyclic Redundancy Check), which is a commonly used verification method.
[0087] CRC is primarily used to detect errors introduced during data transmission, such as bit flips caused by noise, interference, or other factors. By using CRC, the receiver can quickly detect errors during transmission and take appropriate corrective measures or retransmission. CRC is also a highly efficient error detection algorithm, capable of calculating the checksum in a relatively short time. The CRC algorithm is relatively simple and can be easily implemented in hardware or software. CRC is applicable not only to large data transmissions but also to small data packets, making it useful in a variety of communication scenarios.
[0088] The CRC calculation formula is G(x)=X 16 +X 15 +X 2 +1, where G(x) is called the generator polynomial for the check code, and X represents the data to be sent. Different CRC generator polynomials have different error detection capabilities. To use an R-bit check code, the generator polynomial must be a power of R. The following is the standard CRC-16 polynomial, represented by 0x8005.
[0089] The CRC algorithm appends an R-bit checksum to the K-bit data message to be sent. The algorithm then regenerates a communication frame and sends it to the receiver. Upon receiving the frame, the receiver recalculates the received data and the checksum to verify that it is correct.
[0090] CRC check diagram is as follows Figure 14 The form shown is data + check code, and the CRC algorithm flow chart is as follows Figure 15 Shown, including:
[0091] Step (1): Use a 16-bit register, change all the contents to 1 (i.e. 0xFFFF), and set this register to store CRC data.
[0092] Step (2): Perform bitwise XOR on the first byte of the communication data and the lower 8 bits of the CRC register, and store the result back into the CRC register.
[0093] Step (3): Shift the data in the CRC register one bit to the right, fill the missing high bits with 0, and detect the removed bits.
[0094] Step (4): If the removed bit is 0, step 3 is repeated; if the removed bit is 1, the CRC register is XORed with the polynomial A001 (1010000000000001).
[0095] Step (5): Repeat steps (3) and (4) until the data is shifted to the right by 8 bits.
[0096] Step (6): After repeatedly repeating steps (2) to (5), the next byte of the communication information frame is processed.
[0097] Step (7): After all bytes of all communication information frames are calculated according to the above steps, a 16-bit CRC register will be obtained again, and the high 8 bits of data in the register will be exchanged with the low 8 bits of data.
[0098] Step (8): The value in the CRC register finally obtained is the CRC code of the communication information frame.
[0099] In another exemplary embodiment of the present application, a single host system and multiple slave systems are used for multi-point data acquisition. The host and slave systems communicate using a wireless serial port transparent transmission module, with the highly stable MODBUS RTU protocol. Therefore, separate programs for the host and slave systems are designed, with the host system acting as the query command sender and the slave system as the command response receiver.
[0100] The workflow of the host system is to first perform communication initialization configuration, sensor initialization configuration, and host system initialization configuration. When the host system initialization is completed, the data collected by all sensors mounted on the host system will be read, and the data will be stored in the database, and then read commands will be sent to each slave system in turn. After reading the data collected by the sensors in all slave acquisition modules, the data will be packaged and processed uniformly, and finally all the packaged data will be sent to the MCGS touch screen. After sending the data to the touch screen, the data on the touch screen will also be read once for human-computer interaction or manual setting of system parameters, etc. Finally, the data will be uploaded to the cloud server through the Internet of Things module, and the data can be viewed and analyzed on the cloud server.
[0101] The slave system needs to use two UART serial ports, one of which is used as the slave system to process message output, and the other is used as the RS485 communication interface to communicate with the host system and sensors.
[0102] At program startup, the slave system and all connected sensors are initialized and configured. After initialization and configuration, the data collected by all sensors mounted on the slave system is read and stored. After reading the sensor data once, the slave system enables the serial port receive callback interrupt. If the host system sends a read data command to the slave system, the slave system responds and sends the read sensor data to the host system. After the transmission is completed, the slave system reads the sensor data again and responds to the host system's command.
[0103] Because the display system in this application only communicates with the host system via RS485, the programs of all auxiliary systems need to be aggregated and packaged by the host system, and then the data is sent together to the MCGS touch screen for processing and display. This embodiment uses two auxiliary systems as an example to illustrate the allocation of communication addresses between the MCGS touch screen and the host, as shown in Tables 3 and 4.
[0104] Table 3 Host sends MCGS address allocation table
[0105]
[0106]
[0107] Table 4 MCGS sending host address allocation table
[0108] Host Control word 1 Control word 2 Control word 3 Reserve Reserve MCGS 4WUB0001 4WUB0002 4WUB0003 4WUB0004 4WUB0005
[0109] In actual applications, the host system utilizes a PCB design. This system's PCB utilizes a two-layer structure, with the bottom layer housing signal transmission and power management circuits, and the upper layer used for controller chips and sensor connections. To enhance reliability and stability, high-quality materials are used, and manufacturing processes are strictly adhered to. Copper cladding is applied to all areas without wires, significantly reducing external interference with the device.
[0110] After the PCB design is completed, the 3D model is added to the PCB according to the size of the components to check whether the layout of the components is reasonable. After confirming that the layout of the components is reasonable, the PCB is proofed. Figure 19 shown.
[0111] In another exemplary embodiment of the present application, the main acquisition module further includes a housing, the host system and the touch screen are arranged in the housing, an interface is provided on the housing, the first data acquisition system is connected to the host system via the interface, and the display system is arranged in the housing. In actual application, the housing adopts a portable box design, the entire system introduction circuit is integrated into a portable suitcase, and charging and switching functions are added to the side of the suitcase. In order to consider economy, all sensors adopt a modular plug-in design. The total external design includes 9 temperature sensors, 4 solar radiation sensors, 4 wind speed sensors and 1 wind direction sensor, all of which adopt a plug-in design, and the sensors used can be increased or decreased at any time.
[0112] To increase the device's portability, a space for storing sensors has been designed inside the box. A 10-inch touchscreen is also embedded to facilitate human-computer interaction and system data debugging. A separate USB port is also included for exporting detected data to a USB flash drive. The data is exported in CVS format and can be opened directly in office software.
[0113] In practice, due to cost constraints, the slave system uses a universal soldering system. Three temperature detection interfaces and two RS485 detection interfaces are temporarily configured, and an independent battery is set up for power supply. The slave system battery uses a DC 3.3V power supply and can be directly charged using the Type-C interface. The measured data of the slave system is transmitted to the host system via a wireless serial port module for storage and processing.
[0114] The present application also provides an embodiment of the steps for testing the above-mentioned intelligent data acquisition device, specifically including: equipment operation test and data export and stability test, among which.
[0115] Equipment operation tests include:
[0116] Step 1: Turn on the power of the main unit and slave unit 1, and enter the home page interface by default on the device, such as Figure 18 As shown, the home page will display the working status of all devices. Currently, the main system and slave 1 system are in the running state, showing the main battery voltage of 12.2V and slave 1 battery voltage of 3.2V. The charging status of the devices is not charged, and the devices are in good condition.
[0117] Step 2: When you click on the host interface, the device will enter the host interface, such as Figure 19 The device status and the data detected by the device are shown. At this time, if you insert the second temperature sensor and wind direction sensor, you can see the detection data of the inserted sensors on the screen.
[0118] Step 3: Click on the slave 1 interface, the screen will jump to this interface, insert the third temperature sensor and the first wind speed sensor into the slave 1 system device, and the interface will display the sensor values, such as Figure 20 shown.
[0119] Data export and stability testing includes:
[0120] The touch screen interface has many functions, including data export function. Figure 21 Users can customize the time range and export quantity as needed, providing flexibility in obtaining the data they need. Furthermore, the interface provides the option to view historical data for both the master and slave units, allowing users to easily browse through past records. For viewing historical data, users can quickly navigate by scrolling up, down, left, and right, and can also use the quick jump function to return directly to the first or last row of the data record, improving operational efficiency.
[0121] In addition, the interface also features a historical data deletion function, allowing users to manage archived data and ensure that the system's data storage is properly maintained and managed. This design not only provides convenient data export and viewing functions, but also ensures the integrity and reliability of the system's data management and maintenance.
[0122] This application has the following beneficial effects:
[0123] 1. System Architecture: Combining the MODBUS RTU protocol with specific hardware (STM32) and a sensor network creates a complete distributed architecture consisting of a single host, multiple slaves, and the cloud. This expands the scope of data detection and enables interconnection through wireless transmission, resolving the issues of bulky and short transmission distances associated with traditional devices.
[0124] 2. Modular data acquisition. Both the host system and the slave system are designed with three types of data interfaces, which are suitable for the access of various sensors in the fields of meteorology, electricity, agriculture, environmental protection, water conservancy, etc., and are plug-and-play, enhancing the flexibility and adaptability of the device.
[0125] 3. Optimization of the communication protocol. The highly stable MODBUS RTU protocol is used to achieve communication between the host system and the slave system, ensuring the stability and reliability of the system in complex environments. Wireless transmission technology is used to achieve data interaction between the host system and the slave system, avoiding the limitations of wired connections and improving the portability and deployment convenience of the device.
[0126] 4. Improvements in data verification and transmission. The introduction of a cyclic redundancy check (CRC) algorithm during data transmission effectively improves data transmission accuracy and reduces errors caused by noise or interference. The host system supports local data storage and query, as well as data upload to the cloud via serial ports, enabling multi-point data storage and enhancing data timeliness and security.
[0127] 5. Hardware Design: A three-way power supply system (DC 3.3V, 5V, and 24V) is designed to meet the voltage requirements of different sensors and modules, improving system compatibility and stability. The entire system is integrated into a portable suitcase with built-in sensor storage and a touch screen, making it easy to carry and deploy on site.
[0128] 6. Extensibility of application scenarios. The device can be applied to multiple fields such as meteorology, electricity, agriculture, water conservancy, and environmental protection. It supports the collection of different environmental parameters and has strong practical value and market prospects.
[0129] 7. This application has the ability to monitor and collect data in real time. It uses a sensor network to transmit data from different locations to the MCU, and uses precise data processing algorithms to perform real-time analysis to achieve comprehensive data monitoring.
[0130] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. An intelligent data acquisition device, characterized in that: The intelligent data acquisition device comprises: A main acquisition module and a plurality of auxiliary acquisition modules connected to the main acquisition module, wherein the main acquisition module and the auxiliary acquisition modules are arranged in a one-to-one correspondence with the sampling points; The main acquisition module includes a host system and a first data acquisition system connected to the host system; the auxiliary acquisition module includes an auxiliary system and a second data acquisition system connected to the auxiliary system; the auxiliary systems in each auxiliary acquisition module are connected to the host system.
2. The intelligent data acquisition device according to claim 1, characterized in that: The intelligent data acquisition device also includes: a display system connected to the host system; the data collected by the second data acquisition system in each auxiliary acquisition module and the system status of each auxiliary system are transmitted to the host system, and the host system displays the data collected by the first data acquisition system, the system status of the host system, the system status of each auxiliary system, and the data collected by the second data acquisition system in each auxiliary acquisition module through the display system.
3. The intelligent data acquisition device according to claim 2, characterized in that: The intelligent data acquisition device also includes: a cloud server and an Internet of Things module, and the cloud server is connected to the host system through the Internet of Things module.
4. The intelligent data acquisition device according to claim 3, characterized in that: The intelligent data acquisition device further includes a wireless transmission system, and the auxiliary system is connected to the host system via the wireless transmission system.
5. The intelligent data acquisition device according to claim 4, characterized in that: The first data acquisition system includes: a first sensor module and a first protocol module connected in sequence, and the first sensor module is connected to the host system through the first protocol module; the second data acquisition system includes: a second sensor module and a second protocol module connected in sequence, and the second sensor module is connected to the auxiliary system through the second protocol module.
6. The intelligent data acquisition device according to claim 5, characterized in that: The first protocol module and the second protocol module both include: I2C protocol, single bus protocol and MODBUS protocol.
7. The intelligent data acquisition device according to claim 2, characterized in that: The display system includes: a homepage module, an export module, a display module corresponding to the host system and display modules corresponding to each auxiliary system; the homepage module is used to display the system status of the host system and the system status of each auxiliary system; the display module corresponding to the host system is used to display the system status of the host system and the data collected by the first data acquisition system; the display module corresponding to the auxiliary system is used to display the system status of the auxiliary system and the data collected by the second data acquisition system corresponding to the auxiliary system; the export module is used to export the data collected by the first data acquisition system and the data collected by the second data acquisition system according to preset conditions.
8. The intelligent data acquisition device according to claim 5, characterized in that: The first sensor module and the second sensor module each include: a humidity sensor, a pressure sensor, a temperature sensor, a wind speed sensor, a wind direction sensor, and a light sensor; the intelligent data acquisition device also includes: a DC boost voltage regulator circuit, a first DC buck voltage regulator circuit, and a second DC buck voltage regulator circuit; The wireless transmission system and the Internet of Things module are both connected to a 12V DC battery via the first DC step-down voltage stabilizing circuit; the first DC step-down voltage stabilizing circuit is used to reduce the voltage of the 12V DC battery to DC5V; The display system, the wind speed sensor, the wind direction sensor and the light sensor are all connected to a 12V DC battery via the DC boost voltage stabilizing circuit; the DC boost voltage stabilizing circuit is used to boost the voltage of the 12V DC battery to DC24V; The humidity sensor, the pressure sensor, the temperature sensor, the host system and the auxiliary system are all connected to the output end of the first DC buck voltage stabilizing circuit through a second DC buck voltage stabilizing circuit, and the second DC buck voltage stabilizing circuit is used to reduce the DC5V voltage to DC3.3V.
9. The intelligent data acquisition device according to claim 8, characterized in that: The 12V DC battery uses mains electricity or photovoltaic power to supplement electricity.
10. The intelligent data acquisition device according to claim 1, characterized in that: The host system and the auxiliary system both use STM32 series MCU as the main control chip.