Pipeline information acquisition circuit
By designing the pipeline information acquisition circuit, using the STM32 chip and RS485 transceiver, combined with the wireless communication module, the accuracy and real-time problems of the embedded data acquisition system in complex industrial environments are solved, and the comprehensive acquisition and remote collection of pipeline parameters are realized. monitor.
Patent Information
- Application Number
- CN202420896807.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2034-04-28
AI Technical Summary
The existing embedded data acquisition systems have high complexity, stability and reliability challenges in design and implementation, especially in complex industrial environments, the accuracy and real-time nature of data acquisition are affected by interference and noise.
A pipeline information acquisition circuit is designed, including main control circuit, storage circuit, communication circuit, communication module and synchronous sampling circuit. It adopts STM32 chip as a processor, combines RS485 transceiver and analog-to-digital converter, and uses wireless communication module and cloud through wireless communication module. Server connection to realize remote data transmission and sharing.
It realizes the comprehensive acquisition of a variety of important parameters in the pipeline, including traffic, pressure, acceleration and temperature, improves the efficiency and accuracy of data acquisition, provides comprehensive data support, and realizes remote monitoring of users through cloud servers and manage.
Smart Images

Figure CN222192396U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the technical field of information collection, in particular to a pipeline information collection circuit. Background Art
[0002] In the field of industrial automation and the Internet of Things, data acquisition and processing play a vital role. With the development of technology, embedded data acquisition systems have gradually become the mainstream way of industrial field data acquisition. These systems can convert various physical quantities of industrial sites, such as temperature, pressure, displacement, acceleration, etc., into digital quantities in real time, and process, display, transmit, store or print them, thereby realizing real-time monitoring and control of industrial processes.
[0003] Embedded data acquisition systems are usually composed of microcontrollers, sensors, data acquisition circuits, communication interfaces, and power supplies. The microcontroller is the core of the entire system, responsible for data collection, processing, and communication with external devices. Sensors are used to convert physical quantities at industrial sites into electrical signals, and data acquisition circuits are responsible for converting these electrical signals into digital signals that can be processed by the microcontroller. The communication interface enables data exchange between the system and external devices, such as uploading the collected data to a server for storage and analysis.
[0004] With the popularization and application of Internet of Things technology, data acquisition systems not only need to meet basic acquisition and processing functions, but also need to have the ability of remote communication and data sharing. Therefore, data acquisition systems based on wireless communication technology have gradually become a research hotspot. These systems upload the collected data to the cloud server in real time through wireless communication modules, such as 4G modules, to achieve remote access and sharing of data.
[0005] However, there are still some problems in the design and implementation of existing embedded data acquisition systems. For example, the design complexity of hardware circuits is relatively high, requiring professional electronic engineers to design and debug; the stability and reliability of software systems also face challenges, especially in complex industrial environments, where various interferences and noises may affect the accuracy and real-time performance of data acquisition. Utility Model Content
[0006] 1. Technical issues to be resolved
[0007] In view of the deficiencies in the prior art, the utility model provides a pipeline information acquisition circuit, which solves the problems raised in the above background technology.
[0008] (II) Technical solution
[0009] To achieve the above objectives, the utility model is implemented through the following technical solutions: a pipeline information acquisition circuit, including a main control circuit, a storage circuit, a communication circuit, a communication module, a synchronous sampling circuit and a sensor, the main control circuit includes a processor, a crystal oscillator circuit, a filter component, a reset circuit and a debugging interface, the storage circuit includes a memory connected to the processor, the sensor includes a vortex flowmeter, a pressure transmitter, an acceleration sensor and a temperature sensor, the acceleration sensor is used for vibration detection, the communication circuit connects the vortex flowmeter and the processor, the communication module is connected to the processor serial port and then wirelessly connected to a cloud server, the synchronous sampling circuit includes an analog-to-digital converter, the analog-to-digital converter connects the pressure transmitter and the acceleration sensor to the processor respectively, and the temperature sensor is connected to the processor.
[0010] Preferably, the processor adopts an STM32 chip, PAO (CTS) is an input signal used to determine whether data can be sent, and a low level indicates that data can be sent; PA1 (RTS) is an output signal used to indicate whether a signal can be received, and a low level indicates that a signal can be received.
[0011] Preferably, the memory is a Flash memory supporting a standard serial peripheral interface (SPI), and the memory is connected to the processor via a standard SPI usage.
[0012] Preferably, the communication circuit is constructed using an RS485 transceiver, and a plurality of the vortex flowmeters are connected to the same bus via a bus topology structure.
[0013] Preferably, the processor is connected to a serial port screen for data display.
[0014] Preferably, the processor is connected to a relay via an IO interface.
[0015] (III) Beneficial effects
[0016] The utility model provides a pipeline information collection circuit, which has the following beneficial effects:
[0017] 1. This solution realizes the comprehensive collection of multiple important parameters in the pipeline, including flow, pressure, acceleration and temperature. Through the comprehensive application of vortex flowmeter, pressure transmitter, acceleration sensor and temperature sensor, the working status of the pipeline can be obtained in real time, providing comprehensive data support for pipeline monitoring and management;
[0018] 2. This solution uses a high-performance STM32 chip as a processor. Through its powerful data processing capabilities, it can quickly process and analyze the collected data. At the same time, through the Flash memory of the standard serial peripheral interface (SPI), reliable data storage is achieved, which facilitates the subsequent processing and analysis of the data;
[0019] 3. The communication circuit built by the RS485 transceiver in this solution realizes the connection of multiple vortex flowmeters and the parallel transmission of data, which improves the efficiency and accuracy of data collection. At the same time, through the wireless connection between the communication module and the cloud server, remote transmission and sharing of data are realized, allowing users to monitor and manage the working status of the pipeline anytime and anywhere. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a schematic diagram of the hardware structure of the utility model;
[0021] Figure 2 This is a schematic diagram of the main control circuit structure of the utility model;
[0022] Figure 3 It is a schematic diagram of the storage circuit of the utility model;
[0023] Figure 4 It is a schematic diagram of the communication circuit of the utility model;
[0024] Figure 5 This is a schematic diagram of the communication module circuit of the utility model;
[0025] Figure 6 This is a schematic diagram of a synchronous sampling circuit of the utility model;
[0026] Figure 7 It is a schematic diagram of the RS485 working process of the present utility model. DETAILED DESCRIPTION
[0027] The utility model is further described in detail below in conjunction with the accompanying drawings:
[0028] The utility model embodiment provides a pipeline information acquisition circuit, such as Figure 1 As shown, it includes a main control circuit, a storage circuit, a communication circuit, a communication module, a synchronous sampling circuit and a sensor. The main control circuit includes a processor, a crystal oscillator circuit, a filter component, a reset circuit and a debugging interface. The storage circuit includes a memory connected to the processor. The sensor includes a vortex flowmeter, a pressure transmitter, an acceleration sensor and a temperature sensor. The communication circuit connects the vortex flowmeter and the processor. The communication module is connected to the processor serial port and then wirelessly connected to the cloud server. The synchronous sampling circuit includes an analog-to-digital converter. The analog-to-digital converter connects the pressure transmitter and the acceleration sensor to the processor respectively. The temperature sensor is connected to the processor.
[0029] The processor uses STM32 chip. PAO (CTS) is the input signal, which is used to determine whether data can be sent. A low level indicates that data can be sent. PA1 (RTS) is the output signal, which is used to indicate whether a signal can be received. A low level indicates that a signal can be received.
[0030] The memory uses a Flash memory that supports a standard serial peripheral interface (SPI). The memory is connected to the processor through standard SPI usage. The communication circuit is built using an RS485 transceiver, and multiple vortex flowmeters are connected on the same bus through a bus topology structure.
[0031] The processor is connected to the serial port screen for data display, and the processor is connected to the relay through the IO interface.
[0032] In this embodiment, information of vortex flowmeter, acceleration sensor, pressure transmitter and temperature sensor is collected and uploaded to cloud server, so that cloud server can store fluid parameter information for a certain period of time. In this embodiment, a data acquisition system based on STM32f4 is designed, the hardware part designs acquisition circuit and integrated circuit board, the software part uses FreeRTOS multi-task scheduling operating system, and writes task codes including acquisition task, 4G-DTU upload task, AD conversion task, etc. based on Keil 5 programming platform, and uploads the collected information to cloud server, by embedding multiple systems in the same pipeline, real-time flow, total flow, pipeline pressure and pipeline temperature data of different positions of the same pipeline are collected at the same time and uploaded to the cloud server.
[0033] like Figure 2 As shown in the figure, the main control circuit design mainly includes the definition of crystal oscillator, SWD interface and each pin of STM32 chip, among which SG5032 is the crystal oscillator circuit, SWD interface circuit is used for debugging and programming, W25Q128JVS IQ is the storage circuit, the main pins are PAO and PA1, PA0, namely CTS, is the input signal, which is used to determine whether data can be sent. The low level indicates that the device can send data. PA1, namely RTS, is the output signal, which is used to indicate whether the device can receive signals. The low level indicates that the device can receive signals.
[0034] During the operation of the system, data needs to be stored and transmitted, so a storage circuit needs to be designed. In this embodiment, the storage circuit uses W25Q128JV SSIQ as Flash memory. W25Q128JV supports standard serial peripheral interface (SPI), supports dual / quad I / O SPI, and supports a maximum W25Q128JV SPI clock frequency of 133MHz.
[0035] In this embodiment, its standard SPI usage is used, connecting the CLK, / CS, DI, and DO pins. The main function of Flash is to store the data measured from the sensor and store the array that saves the data in the data register.
[0036] like Figure 3 As shown, pin 1 is chip select, which is valid at low level. PA4 in STM32 controls this pin; pin 2 is a data output pin, which can also be used as the data input and output pin of IO1, connected to PA6 in STM32; pin 3 is used as a write protection pin here; pin 4 is grounded; pin 5 is a data input pin, which can also be used as the data input and output pin of IO0, connected to PA7 in STM32; pin 6 is a clock pin, which is connected to PA5 in STM32 and accepts the serial clock input of the host; pin 7 is a hold input pin; pin 8 is a power supply pin.
[0037] In this embodiment, a vortex flowmeter is needed to collect flow data, and the vortex flowmeter requires RS485 communication protocol, so it is necessary to design an RS485 communication circuit. RS485 has two wirings: two-wire and four-wire. The four-wire can only realize point-to-point communication (one host connected to one slave), which is rarely used now. The two-wire wiring (A line, B line) is mostly used. This wiring method is a bus topology structure. The bus mostly uses shielded twisted pair to transmit data. A maximum of 32 nodes can be connected on the same bus, that is, one host can be connected to multiple slaves. Therefore, the connection and signal transmission of multiple flow meters can be realized.
[0038] RS-485 uses a voltage difference of +2V to +6V between the two lines to represent logic 1, and a voltage difference of -2V to -6V between the two lines to represent logic 0. The interface signal level is lower than RS-232 (RS232 is -15V to +15V), so it is less likely to damage the interface chip than RS-232. At the same time, the RS-485 level is compatible with the TTL level and can be easily connected to the TTL circuit. This ensures the stability of the flow meter during operation.
[0039] RS-485 uses differential signal transmission to reduce potential electromagnetic interference (EMI). The value of the differential signal is largely independent of the precise value of GND, so it can resist power supply interference. It can ensure that the transmission signal is not distorted. Figure 4 As shown in the figure, the main pins are No. 3 and No. 4, which are the transmitting end and the receiving end respectively. The A / B line has a pull-down resistor and a protection device. Therefore, in this embodiment, there is no need to add a protection device and it is directly connected to the port.
[0040] This embodiment uses a communication module to realize the function of transmitting data to a cloud server. Through the communication module, the data of industrial equipment can be transmitted to the cloud server via a 4G network, thereby realizing the management and monitoring of industrial equipment through the 4G network.
[0041] The communication module uses USR-LTE-7S4. Through the conventional settings of the module, the data from the serial port to the network is bidirectionally transparent. This module has three working modes, namely HTTPD mode, SMS transparent transmission mode and transparent transmission mode, and supports multi-channel Socket connection. Through the high-gain antenna of the module, the signal reception and transmission are stable, ensuring stable communication.
[0042] like Figure 5 As shown in the figure, the main functions are implemented by pins 6 and 7, which are connected to PA2 and PA3 of the STM32 module pins respectively to realize the functions of sending and receiving. Pin 1 indicates whether the network is established. If established, it outputs a high level, otherwise it outputs a low level. Therefore, LED0 is added to facilitate the judgment of whether the network is established. When the network is established, LED0 is on, otherwise it is off.
[0043] When collecting data, because it is necessary to collect high-frequency signals such as vibration signals, and there are high requirements on the collection time, the signals generated at the same time need to be collected before subsequent related processing can be performed. Therefore, the ADC processor of the STM32 chip is not used in analog-to-digital conversion, but the AD7606 chip is used. AD7606 is a 16-bit, 6-channel synchronous sampling analog-to-digital data system. Each device has built-in analog input clamp protection, second-order anti-aliasing filter, tracking and holding amplifier, 16-bit charge redistribution successive approximation analog-to-digital converter, flexible digital filter, high-speed serial and parallel interface, and these functions meet the requirements of this embodiment.
[0044] like Figure 6 As shown in the figure, the circuit design is simple, the purpose is to retain the chip's free operation as much as possible, and different oversampling values can be selected through software, parallel or serial interface can be flexibly selected, analog voltage input range, etc. From the program point of view, after the AD7606 is reset, it starts to convert the signal, and then the STM32 chip reads the data, and then CS is pulled low and high to restart the conversion.
[0045] Since the FreeRTOS operating system is used in the software layer of this embodiment, the first step is to determine how many tasks there are. Therefore, four tasks are created: RS485 interface communication task RS485_task(), AD processing conversion task AD7606_task(), 4G-mqtt data upload task MQTT_task(), and indicator light task Led_task().
[0046] After the system is powered on, if the processor can be supplied with 3.3V voltage normally, the power indicator light will light up. The workflow in the main function is HAL library initialization, system clock configuration, GPIO port initialization, FreeRTOS initialization, creation of start task and startup of task scheduler. The main function mainly includes HAL library, GPIO, FreeRTOS initialization and system clock configuration. After the configuration, create the start task Start_task(), then start the task scheduler and enter the start task.
[0047] The workflow of the start task is to initialize the watchdog, enter the task critical area, create the indicator task, create the RS485 interface communication task, create the AD processing conversion task, create the 4G-MQTT data upload task, delete the start task and exit the task critical area. FreeRTOS needs to assign priorities to each task when creating tasks. The smaller the priority value of the task, the lower the priority of the task. According to the requirements of the actual engineering indicators, the AD processing conversion task and the RS485 interface data transmission task are planned to have the same priority, which is greater than the priority of the 4G-mqtt data upload task. After the task is created in the start task, delete the start task, exit the task critical area, and the processor will enter the process of preemptive running of the program. In the indicator task, an IO port is set as an output IO port, and the high and low level changes of the pin are used to control the LED on and off, so as to determine whether the processor's IO can operate normally. In terms of code implementation, xTaskCreate is used to create tasks such as creating indicator tasks and creating 4G-MQTT tasks.
[0048] like Figure 7 As shown in the figure, the goal of the RS485 interface data transmission task is to transmit the flow parameters measured by the vortex flowmeter to the collector through the RS485 communication method, and finally store them in W25Q128. In order to enhance the connection between the processor and the flowmeter, the modbus master-slave mode protocol is adopted. The processor is the host and the flowmeter device is the slave. The host initiates any communication, and the slave does not actively send data to the host. The host will transfer to the receiving state after the data request instruction is sent. The host sends the addressing data frame according to the pre-agreed format.
[0049] In the RS485 task, after completing the initialization, the processor host sends an inquiry message containing the device ID information to the slave. When the device is in the listening bus and normal operation state, the slave device will send a reply message to the processor, and the processor can now start the subsequent operation of reading the parameter value.
[0050] When the flow meter is working normally, the physical parameters of the fluid are stored in different registers at different addresses. In theory, as long as the processor host sends a command to the slave to read the data of a specific register at a specific address, switches to the receiving state, receives the data transmitted from the slave device, and extracts the physical parameter value in the complete data format, the purpose of the processor receiving the value measured by the flow meter can be achieved. However, due to the limited content capacity of the processor, it is impossible to store the real-time increasing data, so an external memory is required. In this embodiment, the parameter value is stored in an external Flash.
[0051] The purpose of the analog-to-digital conversion task is to collect analog input, perform ADC processing, process the converted digital quantity through the processor, and finally store it in the external Flash. After performing traditional operations such as initialization and self-calibration, the ADC conversion is started, and the channel will collect analog input and convert it into digital quantity. Averaging the digital quantity, that is, reading it multiple times and taking its average, can effectively improve the stability of the data. The processor performs relevant processing on the data and stores the data in the external Flash.
[0052] The workflow of the communication module is as follows: (1) the physical parameters in the data storage register of W25Q128 are read and assigned to the array; (2) the 4G-DTU module establishes communication with the server step by step through the account and password credentials; (3) the processor packages the values in the array into the data format required by the server and sends it to the cloud server.
[0053] The synchronous sampling circuit mainly collects signals generated at the same time, including vibration signals, pressure signals, etc. Synchronous sampling is achieved through the coordination of multiple configuration functions, interrupt functions, conversion functions, reset functions and other corresponding codes.
[0054] In this embodiment, the host cloud server uses the Linux operating system. The physical parameter values of the collected fluid are checked through the server, including inlet flow, outlet flow, flow difference, inlet total, outlet total, total difference, inlet total, outlet total, total difference, inlet pressure, outlet pressure, inlet temperature and outlet temperature.
[0055] By comparing the difference between the inlet flow and the outlet flow, i.e. the flow difference, it is easy to determine whether a leak has occurred. When the pipeline is transmitting normally, the inlet flow and the outlet flow will remain consistent within the allowable error range, and the flow difference is basically stable with slight fluctuations above and below the zero scale. When a leak occurs, the flow difference will be significantly higher than the zero scale line. The moment of the leak can be seen by collecting data. In addition, when the method of judging whether a leak has occurred by judging the size of the flow difference cannot be clearly determined, it can be judged by the difference between the inlet total amount and the outlet total amount, i.e. the total amount difference.
[0056] Generally, the measurement error fluctuation range of the flowmeter on the inlet and outlet pipes is very small, and the error can be basically ignored. However, when the instrument is used for a long time, the error caused by the instrument accuracy will increase from small to large. At this time, the slope change of the total amount difference can be used to determine whether the pipeline is leaking.
[0057] When there is no leakage in the pipeline, the slope of the total difference is relatively gentle. When there is a leakage, the slope of the total difference will change significantly. In the data of the total difference, it can be seen that the slope has changed significantly within a certain period of time. Relying on these judgments, it is easy to judge whether the pipeline has a leak.
[0058] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A pipeline information collection circuit, Features: The invention comprises a main control circuit, a storage circuit, a communication circuit, a communication module, a synchronous sampling circuit and a sensor. The main control circuit comprises a processor, a crystal oscillator circuit, a filter component, a reset circuit and a debugging interface. The storage circuit comprises a memory connected to the processor. The sensor comprises a vortex flowmeter, a pressure transmitter, an acceleration sensor and a temperature sensor. The communication circuit connects the vortex flowmeter and the processor. The communication module is connected to the processor serial port and then wirelessly connected to a cloud server. The synchronous sampling circuit comprises an analog-to-digital converter. The analog-to-digital converter connects the pressure transmitter and the acceleration sensor to the processor respectively. The temperature sensor is connected to the processor.
2. A pipeline information acquisition circuit according to claim 1, Features: The processor adopts STM32 chip, PAO CTS is an input signal used to determine whether data can be sent, and a low level indicates that data can be sent; PA1RTS is an output signal used to indicate whether a signal can be received, and a low level indicates that a signal can be received.
3. A pipeline information acquisition circuit according to claim 1, Features: The memory adopts a Flash memory supporting a standard serial peripheral interface SPI, and the memory is connected to the processor through a standard SPI usage.
4. A pipeline information acquisition circuit according to claim 1, Features: The communication circuit is constructed by using an RS485 transceiver, and a plurality of vortex flowmeters are connected on the same bus through a bus topology structure.
5. A pipeline information acquisition circuit according to claim 1, Features: The processor is connected to a serial port screen for data display.
6. A pipeline information acquisition circuit according to claim 1, Features: The processor is connected with the relay via an IO interface.
