Synchronous temperature acquisition system based on FPGA and working method thereof
Through the FPGA-based synchronous temperature acquisition system, the shortcomings in the existing technology in the application scenarios where large-scale, multi-point, multi-sensor combination and real-time requirements are solved, and data with high efficiency and high throughput efficiency are achieved Acquisition reduces system power consumption and simplifies configuration process.
Patent Information
- Application Number
- CN202410692089.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-11-15
AI Technical Summary
The existing temperature measurement data acquisition and processing systems are insufficient in large-scale, multi-point, multi-sensor combination and high real-time requirements for applications, especially the principle of time division multiplexing leads to increased system complexity, cost increase and Uncertainty is enhanced.
Adopt a synchronous temperature acquisition system based on FPGA, and receive and process data from multiple data acquisition channels through the FPGA module to realize synchronous data acquisition and processing, and support different communication protocols, simplify system complexity, and support the connection of multiple temperature sensors. enter.
It realizes efficient real-time and high throughput efficiency data acquisition, reduces system power consumption, improves system flexibility and scalability, supports a variety of temperature sensors and communication protocols, and simplifies the system configuration and deployment process.
Smart Images

Figure CN118960980A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of temperature data acquisition and data processing, and in particular to a synchronous temperature acquisition system based on FPGA and a working method thereof. Background Art
[0002] With the rapid development of modern industry, agriculture and manufacturing, wide-range, multi-point, high-density temperature measurement, data collection and data processing have become obvious in the industry. For example, in agriculture, the difference between the land and air temperature and humidity of a greenhouse test field affects the growth of crops. In manufacturing, multi-point temperature monitoring improves the product manufacturing process according to the temperature rise curve. For example, in thermal laboratories, the dynamic response spectrum of heat source and heat diffusion of heated medium is analyzed through multi-point temperature measurement. Therefore, the system design and research of temperature measurement in data collection and data processing are of great significance.
[0003] With the rapid iteration of information technology, most of the chip's communication ports have digital bus communication interfaces, whether for analog or digital quantity acquisition. The following will introduce the current common bus protocols:
[0004] Commonly used low-speed communication protocols include SPI, IIC, 1-WIRE, etc. These three types of applications are widespread.
[0005] SPI (Serial Peripheral Interface): A synchronous serial interface introduced by Motorola that communicates through four lines (CSK, MISO, MOSI, CS), can send and receive serial data at the same time, and is suitable for efficient peripheral device communication.
[0006] I2C (Inter-Integrated Circuit): A two-wire serial bus developed by PHILIPS, mainly used to connect microcontrollers and their peripherals. The I2C bus is simple and effective, supports multi-master mode, and performs bidirectional data transmission through the data line SDA and the clock SCL.
[0007] 1-WIRE: A peripheral serial expansion bus technology introduced by DALLAS that uses a single signal line to transmit data. Its features include a unique address for each slave device, strict timing requirements, a data transmission rate of generally 16.3Kbit / s to 100Kbit / s, and support for long-distance communication.
[0008] Other commonly used high-speed communication buses include Ethernet, Ethernet IP, EtherCAT, Modbus TCP, CC-LINK, PROFINET, etc. These protocols are mainly used in high-speed data transmission and industrial control systems. They can realize large-scale multi-point real-time data acquisition and processing, and are characterized by high efficiency and reliability.
[0009] FPGA (Field Programmable Gate Array) is a programmable device, an integrated circuit chip based on a general logic circuit array. Its biggest feature is that users can program and configure it through dedicated EDA software after the chip is manufactured to achieve specific functions. FPGA consists of programmable logic blocks (CLBs), programmable input / output blocks (I / OBlocks) and programmable interconnects, and can realize logical functions by loading programming data. FPGA is widely used in communications, data processing, artificial intelligence, industry and military industries, and has the characteristics of high performance, low power consumption, real-time processing and high parallelism.
[0010] In the prior art, there are roughly the following data collection and data processing solutions for temperature measurement.
[0011] MCU + decoder or selection logic circuit:
[0012] The single chip microcomputer is combined with a decoder or a N-to-one selection logic circuit, and then with an operational amplifier circuit and AD conversion to realize the analog acquisition and processing of multi-channel identical sensors or temperature probes. After the collected data is formatted, it is transmitted to the computer through the serial port or Ethernet port for further processing.
[0013] PLC+ expansion module:
[0014] Use PLC and its expansion modules to realize multi-channel temperature data acquisition, such as Mitsubishi and Siemens PLC with AD modules. However, each module supports up to 4 channels, and more modules need to be added to arrange more test points, resulting in increased costs, increased system complexity and increased uncertainty.
[0015] Dedicated temperature sensor acquisition module:
[0016] There are dedicated multi-channel high-speed temperature acquisition modules on the market. By analyzing the temperature rise settling time and the hardware system composition, it can be found that these solutions are actually optimizations of the single-chip microcomputer solution, upgrading the processor and some hardware to shorten the acquisition interval, but it is not true synchronous acquisition. Such modules usually only support a single temperature probe. If different sensors are required, additional acquisition modules are still required.
[0017] The above three solutions are currently common solutions. Whether it is a single-chip microcomputer, PLC, or a dedicated temperature acquisition module, they all use the principle of time division multiplexing. These solutions are feasible in situations where there are not many points and the requirements are not high. However, these solutions have shortcomings in large-scale, multi-point, multi-sensor combination applications and applications with high real-time requirements. Summary of the invention
[0018] In view of the defects of the prior art, the present invention provides a synchronous temperature acquisition system based on FPGA and its working method, which can meet the needs of users for access to diversified sensors, simplify the complexity of the overall system, and support access to temperature conversion chips with any protocol output.
[0019] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:
[0020] A synchronous temperature acquisition system based on FPGA, comprising: a computer, a PLC, a handheld mobile terminal, an Ethernet communication module, a Wi-Fi communication module, a data storage module, an FPGA module, a level matching module, a digital temperature sensor, an R-type thermocouple temperature conversion chip and a platinum resistance temperature conversion chip;
[0021] The digital temperature sensor, R-type thermocouple temperature conversion chip and platinum resistance temperature conversion chip all have 8 communication ports, which are connected to the corresponding data channels of the level matching module.
[0022] Each R-type thermocouple temperature conversion chip is connected to an R-type thermocouple.
[0023] Each platinum resistance temperature conversion chip is connected to a PT100 type platinum resistor.
[0024] The level matching module is connected to the bidirectional communication port of the FPGA module.
[0025] The random access memory, the FLASH ROM memory, the Ethernet communication module and the Wi-Fi communication module are all connected to the bidirectional communication port of the FPGA.
[0026] The Ethernet module is connected to the computer and PLC through a switch, and the Wi-Fi module is connected to the handheld terminal through a wireless link.
[0027] The computer is used to receive, process and store temperature data transmitted from the FPGA module, and perform data analysis and processing.
[0028] The PLC is used to control and monitor various industrial processes and transmit data to computers for processing.
[0029] The handheld mobile terminal is used to monitor and control temperature data on a mobile device.
[0030] The Ethernet communication module communicates with the computer and the PLC via Ethernet to transmit the collected temperature data.
[0031] The Wi-Fi communication module communicates with the handheld mobile terminal via a wireless link, allowing the user to monitor temperature data within the coverage of the wireless network.
[0032] The data storage module is used to store temperature data transmitted from the FPGA module.
[0033] The FPGA module is responsible for receiving data from the digital temperature sensor, the thermocouple temperature conversion chip and the platinum resistance temperature conversion chip, and processing and transmitting the data to other components.
[0034] The level matching module matches the communication port levels of different components.
[0035] The digital temperature sensor, R-type thermocouple temperature conversion chip and platinum resistance temperature conversion chip are used to measure the ambient temperature and transmit the data to the FPGA module for further processing.
[0036] The random access memory and FLASH ROM memory are used to store the temperature data processed by the FPGA module.
[0037] Furthermore, the functions of the FPGA module are as follows:
[0038] Data processing and control: The FPGA module is responsible for receiving and processing data from multiple data acquisition channels, and performs data processing and control according to predetermined algorithms and logic.
[0039] Data synchronization and timing control: Through the clock system and timing control logic inside the FPGA, ensure that the data of each data acquisition channel is synchronously collected and processed within the same clock cycle to ensure the accuracy and consistency of the data.
[0040] Communication protocol processing: The FPGA module can process different communication protocols, including the communication protocols of digital temperature sensors, thermocouple temperature conversion chips and platinum resistance temperature conversion chips, as well as the communication protocols between computers, PLCs, handheld mobile terminals and other devices.
[0041] Data caching and storage: The FPGA module has data caching and storage functions, which can temporarily store the collected data and transfer the data to the data storage module for permanent storage or to the computer or PLC device for further processing when appropriate.
[0042] Data conversion and formatting: The FPGA module can convert and format the collected raw data to meet the data processing requirements of the system.
[0043] System parameter configuration and management: The FPGA module can receive parameter configuration instructions from users or external devices, and set the working mode, sampling frequency, and data processing algorithm of each module in the FPGA module according to the configuration parameters.
[0044] Communication interface management: The FPGA module is responsible for managing the communication interface with computers, PLCs, and handheld mobile terminals, including Ethernet communication modules and Wi-Fi communication modules, to ensure stable data transmission and communication reliability.
[0045] Preferably, the FPGA module adopts EP4CE10F17C6 FPGA chip.
[0046] Preferably, the channel of the temperature acquisition port uses a digital temperature sensor DS18B20.
[0047] Preferably, the R-type thermocouple temperature conversion chip uses MCP9600.
[0048] Preferably, the platinum resistance temperature conversion chip uses MAX31865.
[0049] Preferably, the Ethernet communication module uses the RTL8211EG chip to transmit all the collected channel temperature data to the computer or PLC through the Ethernet interface.
[0050] Preferably, the Wi-Fi communication module adopts the BCM4360 chip, which transmits data to the handheld terminal through the wireless network, and monitors various temperature data at any location within the area covered by the Wi-Fi.
[0051] The present invention also discloses a working method based on the above synchronous temperature acquisition system, comprising the following steps:
[0052] Step 1, load configuration parameters:
[0053] Load the configuration parameters into the FPGA module through a computer.
[0054] Step 2, initialize the sensor:
[0055] The FPGA module calls the communication port of the multi-channel signal flow link switching module according to the read system parameters and driven by the system synchronization clock.
[0056] In the first clock cycle, the digital temperature sensors of all channels, the R-type thermocouple temperature conversion chips of all channels and the platinum resistance temperature conversion chips of all channels are synchronously initialized.
[0057] Check whether the sensors of all channels are online and feed back the results to the computer, PLC and handheld mobile terminal.
[0058] Step 3, configure the conversion chip:
[0059] When the second clock cycle arrives, the internal registers of the temperature conversion chip of each channel are configured synchronously.
[0060] Step 4, start the conversion:
[0061] When the third clock cycle arrives, the analog-to-digital conversion circuits of the temperature conversion chips of each channel are started synchronously, waiting for the temperature data conversion of all channels to be completed.
[0062] Step 5, read the temperature data:
[0063] When the temperature data of all channels are converted, the lower eight bits and the upper eight bits of the temperature data collected by the temperature sensors of each channel are read synchronously in sequence under the drive of the system synchronization clock.
[0064] At the same time, the valid data bits are extracted inside the input communication protocol module, and the separated valid data are sent to the parallel data processing module for bit-to-byte conversion, compensation, and threshold calibration operations.
[0065] The processed data is sent to the data buffer, formatted, serialized, and saved in non-volatile memory.
[0066] Step 6, data transmission:
[0067] The data in the buffer is converted from parallel to serial and then sent to the data preprocessing module for encapsulation and packaging.
[0068] The packaged data is sent to the corresponding output communication protocol selection module, Ethernet communication module and Wi-Fi communication module.
[0069] Through the parallel synchronous multi-bus module, all port data can be sent to the computer, PLC and mobile handheld terminal at one time.
[0070] Step 7, follow-up processing:
[0071] The computer or PLC completes the subsequent processing of various calibrations and overall analysis of temperature data.
[0072] Compared with the prior art, the advantages of the present invention are:
[0073] 1. High efficiency and real-time performance: By adopting the method of synchronous parallel multi-channel data acquisition, data of all channels can be obtained in one reading, which greatly shortens the data reading cycle and improves the real-time performance of data acquisition.
[0074] 2. High throughput efficiency: Using parallel data processing, each channel has a corresponding and synchronous processing process, which greatly improves the data throughput efficiency.
[0075] 3. Flexibility and scalability: The system uses a commonly used bus communication protocol data format. When in use, the required bus communication protocol can be selected through a simple system configuration and bound to the corresponding port, realizing the multi-protocol input and output functions. At the same time, users can customize system components according to actual needs, which improves the flexibility and scalability of the system.
[0076] 4. Low power design: FPGA chips have low core operating voltage, which makes the entire system extremely low power consumption. In addition, the use of optimized low power process technology and architecture design further reduces the power consumption of the system.
[0077] 5. High-performance resources: FPGA chips have rich built-in system resources, including logic blocks, user IO resources, memory resources, and multiplier resources, etc., providing powerful computing and processing capabilities to meet the high-performance requirements of the system.
[0078] 6. Comprehensive temperature sensor support: The system supports a variety of temperature sensors, including DS18B20, MCP9600 and MAX31865, and is compatible with a full range of temperature probes. Users can choose the appropriate sensor type according to their needs.
[0079] 7. Simplified system configuration: Users only need to perform simple configuration on the terminal to complete the binding of temperature sensors and the setting of system parameters without changing the hardware, which greatly simplifies the system configuration and deployment process.
[0080] 8. Multiple data transmission modes: The system supports two data transmission modes: Ethernet communication and Wi-Fi communication, which meets the data transmission requirements in different scenarios and improves the flexibility and versatility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 It is a structural schematic diagram of a synchronous temperature acquisition system based on FPGA according to an embodiment of the present invention.
[0082] Figure 2 This is a working flow chart of a synchronous temperature acquisition system based on FPGA according to an embodiment of the present invention.
[0083] Among them, computer-1, PLC-2, handheld mobile terminal-3, Ethernet communication module-4, Wi-Fi communication module-5, data storage module-6, FPGA module-7, level matching module-8, digital temperature sensor (DS18B20)-9, R-type thermocouple temperature conversion chip (MCP9600)-10, R-graded thermocouple-11, platinum resistance temperature conversion chip-12, platinum resistance temperature sensor (PT100)-13; the FPGA module also includes a multi-channel signal flow link exchange module-14; input communication protocol selection module-15; data parallel synchronization processing module-16; data synchronization cache module-17; data synchronization parallel-to-serial conversion module-18; data preprocessing module-19; input communication protocol selection module-20; system parameter setting module-21. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.
[0085] like Figure 1 As shown, it is a schematic diagram of the structure of a parallel multi-channel, multi-bus synchronous data acquisition system based on FPGA of the present invention. The figure includes a computer 1, a PLC 2, a handheld mobile terminal 3, an Ethernet communication module 4, a Wi-Fi communication module 5, a data storage module 6, an FPGA module 7, a level matching module 8, a digital temperature sensor (DS18B20) 9, an R-type thermocouple temperature conversion chip (MCP9600) 10, an R-type thermocouple 11, a PT100 platinum resistance temperature conversion chip (MAX31865) 12, and a platinum resistance temperature sensor (PT100) 13.
[0086] There are 8 communication ports of DS18B20, and the DQ end of each DS18B20 is connected to the 1-8 data channels corresponding to the level matching module; there are 8 communication ports of MCP9600, and the SCL and SDA ends of each R-type thermocouple temperature conversion chip are respectively connected to the 9-16 data channels corresponding to the level matching module, and each R-type thermocouple temperature conversion chip is connected to an R-type thermocouple; there are 8 communication ports of PT100 platinum resistor temperature conversion chip MAX31865, and the DRDY, SDI, SCLK, CS, and SDO ports of each PT100 platinum resistor temperature conversion chip are respectively connected to the 17-24 data channels corresponding to the level matching module. The control end and data end of the level matching module are connected to the bidirectional communication port of the FPGA module, the control end and data end of the random access memory are connected to the bidirectional communication port of the FPGA, the control end and data end of the FLASH ROM memory are connected to the bidirectional communication port of the FPGA, the control end and data end of the Ethernet communication module are connected to the bidirectional communication port of the FPGA, the control end and data end of the Wi-Fi communication module are connected to the bidirectional communication port of the FPGA, the Ethernet communication module is connected to the computer and the PLC through a switch, and the Wi-Fi communication module is connected to the handheld terminal through a wireless link.
[0087] The FPGA module includes: a multi-channel signal flow link switching module 14; an input communication protocol selection module 15; a data parallel synchronization processing module 16; a data synchronization cache module 17; a data synchronization parallel-to-serial conversion module 18; a data preprocessing module 19; an input communication protocol selection module 20; and a system parameter setting module 21.
[0088] Multi-channel signal stream link exchange module: responsible for grouping the data streams received from multiple bus-type data acquisition chips or sensors, grouping and exchanging them according to predetermined settings, and then passing them to the input communication protocol selection module.
[0089] Input communication protocol selection module: According to the communication protocol of the input signal, separate the valid data bits and pass them to the data parallel synchronization processing module for further processing.
[0090] Data parallel synchronization processing module: Under the synchronous drive of the system clock, the valid data stream is subjected to bit-to-byte conversion, compensation and threshold calibration to ensure the accuracy and consistency of the data.
[0091] Data synchronization cache module: saves the processed data in the data buffer and passes the data stream to the data synchronization parallel-serial conversion module.
[0092] Data synchronization parallel-serial conversion module: According to the settings, the data in the data buffer area is grouped and sorted to prepare for subsequent data processing and transmission.
[0093] Data preprocessing module: According to the preprocessing settings, encapsulate and pack the grouped and sorted data blocks, add frame header, frame footer, source address, destination address, checksum and other information, and generate one or more protocol frames.
[0094] Input communication protocol selection module: According to the output communication protocol settings, activate the corresponding bus communication protocol block and put the encapsulated data frame into the corresponding sending buffer.
[0095] Parallel synchronous multi-channel, multi-bus output module: sends the encapsulated data frame to the target device through the external port to realize data output and transmission.
[0096] System parameter setting module: configure the parameters of each module of the system through the touch screen or the host computer device, and save them to the memory data storage module in the system, so that the functions of the corresponding modules can be activated or disabled according to the configuration data when the system is running.
[0097] The FPGA module adopts EP4CE10F17C6 FPGA chip, the level matching module adopts TXS0108E as the level matching circuit, the data storage module adopts W25Q512JVFIM chip, the Ethernet communication module adopts RTL8211EG chip, and the Wi-Fi communication module adopts BCM4360 chip; the temperature acquisition port 1-8 channels use DS18B20 sensor, the R-type thermocouple temperature conversion chip uses MCP9600, and the PT100 platinum resistance temperature conversion chip uses MAX31865.
[0098] The DS18B20 digital thermometer provides 9 to 12 bit resolution temperature measurement, and can realize lower and upper temperature limit alarm through programmable non-volatile storage unit. 18B20 uses single bus protocol to communicate with the host computer, only one signal line and one ground line are needed. Its temperature measurement range is -55℃∽
[0099] +125℃. The test accuracy in the range of -10℃~+70℃ can reach ±0.4℃. In addition, it can also work in parasitic mode, directly powering the chip through the signal line, so no additional power supply is required. Each 18B20 has a globally unique 64-bit serial number, and multiple 18B20s can be connected in series on the same single bus for networking. Only one processor is needed to control multiple 18B20s distributed in a large area. This networking method is particularly suitable for application fields such as HVAC environmental control, building, equipment, grain temperature measurement and industrial temperature measurement, and process monitoring and control.
[0100] The MCP9600 has integrated cold junction compensation and can convert thermocouple EMF to Celsius. The device can correct the nonlinear error characteristics of eight types of thermocouples and then output temperature data with an accuracy of ±1.5°C for the selected thermocouple. The correction coefficients can be obtained from the ITS-90 thermocouple database of the National Institute of Standards and Technology (NIST). The MCP9600 digital temperature sensor has user-programmable registers that provide design flexibility for various temperature sensing applications. These registers support user-selectable settings such as low power mode for battery-powered applications, adjustable digital filters for fast transient temperatures, and four individually programmable temperature alarm outputs (these outputs can be used for multi-zone temperature sensing). The temperature alarm limit has multiple user-programmable configurations, such as alarm polarity (active low or active high push-pull output) and output function (comparator mode (useful for thermostat type operation) or interrupt mode (for microprocessor-based systems)). In addition, the alarm can detect temperature rise or temperature drop with a hysteresis of up to 255°C. IIC bus interface: frequency is 100kHz - each IIC bus supports eight devices.
[0101] The MAX31865 is an easy-to-use thermistor-to-digital converter optimized for platinum resistance temperature sensors (RTDs). External resistors set the sensitivity of the RTD used, and a high-precision Σ-Δ ADC converts the ratio of the RTD resistance to a reference resistance into a digital output. The MAX31865 inputs feature overvoltage protection up to ±45V and provide configurable RTD and cable open / short condition detection. Supports 100Ω to 1kΩ (at 0°C) platinum resistance RTDs (PT100 to PT1000)
[0102] Compatible with 2-wire, 3-wire and 4-wire sensor connections, with SPI bus interface, high-precision design to easily meet the error budget
[0103] 15-bit ADC resolution; nominal temperature resolution is 0.03125°C (varies with RTD nonlinearity), total accuracy is maintained at up to 0.5°C (0.05% full scale) over the entire operating condition, fully differential VREF input, conversion time: 21ms (maximum)
[0104] The FPGA chip EP4CE6F17C6 has a core operating voltage as low as 1.2V, which makes the entire system extremely low power. It contains rich system resources, including 6272 logic blocks LES resources, up to 180 user IO resources, 276480 Memory bit storage resources, 30 Embedded multiplier 9-bit elements multiplier resources, 2 PLL phase-locked loops, which can generate stable, high-quality clocks with different frequency phases, and 10 global clocks Global Clocks. Cyclone IV E FPGA is built on an optimized 60-nanometer low-power process, continuing the low-power leadership of the previous generation Cyclone III FPGA. Intel minimizes leakage current and thus reduces static power consumption by adopting the low-power (LP) process technology commonly used by leading semiconductor manufacturers for handheld components. Advanced processes reduce physical size, and combined with architectural optimization, can help Cyclone IV FPGA minimize dynamic and static power consumption. Intel has incorporated several process and architectural enhancements into Cyclone IV FPGAs, including the use of low-k materials, variable channel length and oxide thickness, and multiple transistor threshold voltages.
[0105] The Ethernet communication is to transmit the collected 1-24 channel temperature data to the computer or PLC through the Ethernet interface, and the computer or PLC completes various subsequent processing such as various calibrations and overall analysis of the temperature data; the Wi-Fi communication is to transmit the data to handheld terminals such as tablet computers and other terminal devices with Wi-Fi interfaces through wireless networks, which is convenient for monitoring various temperature data at any location within the Wi-Fi coverage area.
[0106] The working principle and implementation process of the FPGA-based parallel multi-channel, multi-bus synchronous data acquisition system described in the present invention are as follows: when collecting temperature, firstly, the configuration parameters are loaded into the FPGA module through the computer, and the FPGA reads the system parameters and calls the communication port of the multi-channel signal flow link exchange module under the drive of the system synchronization clock. In the first clock cycle, according to the selected communication protocol, the DS18B20 temperature sensors of channels 1-8, the MCP9600 temperature conversion chips of channels 9-16, and the MAX31865 temperature conversion chips of channels 17-24 are synchronously initialized. After the chip is initialized, it queries whether all the sensors of the 24 data channels are online, and feeds back the results to the computer, PLC and handheld mobile terminal. When the second clock cycle arrives, it synchronously configures the internal registers of the DS18B20 temperature sensors of channels 1-8, the MCP9600 temperature conversion chips of channels 9-16, and the MAX31865 temperature conversion chips of channels 17-24 to prepare for starting the internal analog-to-digital conversion of the temperature conversion chip. When the third clock cycle arrives, it synchronously starts the DS18B20 temperature sensors of channels 1-8, the MCP9600 temperature conversion chips of channels 9-16, and the internal registers of the MAX31865 temperature conversion chips of channels 17-24. The analog-to-digital conversion circuit of the MAX31865 temperature conversion chip of the 17-24 channel is used to change the chip, and wait for the temperature data conversion of all channels to be completed. When the temperature data conversion of all channels is completed, it enters the fourth clock cycle, and synchronously reads the temperature data collected by the DS18B20 temperature sensor of the 1-8 channel, the MCP9600 temperature conversion chip of the 9-16 channel, and the MAX31865 temperature conversion chip of the 17-24 channel. Driven by the system synchronization clock, the low eight bits and the high eight bits of the temperature data are synchronously read in turn. While reading the temperature data of all channels, the effective The data bits are separated, and then the separated valid data is sent to the parallel data processing module to perform bit-to-byte conversion, compensation, threshold calibration and other operations on the data. The processed data is then sent to the data buffer area to format and serialize the data and save it in the non-volatile memory; at the same time, the data in the buffer area is converted from parallel to serial and sent to the data preprocessing module to encapsulate and package the data, and then the packaged data is sent to the corresponding output communication protocol selection module, Ethernet communication module and Wi-Fi communication module. Finally, through the parallel synchronous multi-bus module, all port data are sent to the computer, PLC and mobile handheld terminal at one time. The computer or PLC completes various subsequent processing such as calibration and overall analysis of temperature data.
[0107] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A synchronous temperature acquisition system based on FPGA, characterized in that: include: Computer, PLC, handheld mobile terminal, Ethernet communication module, Wi-Fi communication module, data storage module, FPGA module, level matching module, digital temperature sensor, R-type thermocouple temperature conversion chip and platinum resistance temperature conversion chip; The digital temperature sensor, R-type thermocouple temperature conversion chip and platinum resistance temperature conversion chip all have 8 communication ports, which are connected to the corresponding data channels of the level matching module; Each R-type thermocouple temperature conversion chip is connected to an R-type thermocouple; Each platinum resistance temperature conversion chip is connected to a PT100 platinum resistor; The level matching module is connected to the bidirectional communication port of the FPGA module; The random access memory, FLASH ROM memory, Ethernet communication module and Wi-Fi communication module are all connected to the bidirectional communication port of FPGA; The Ethernet module is connected to the computer and PLC through a switch, and the Wi-Fi module is connected to the handheld terminal through a wireless link; The computer is used to receive, process and store temperature data transmitted from the FPGA module, and perform data analysis and processing; The PLC is used to control and monitor various industrial processes and transmit data to a computer for processing; The handheld mobile terminal is used to monitor and control temperature data on a mobile device; The Ethernet communication module communicates with the computer and PLC via Ethernet to transmit the collected temperature data; The Wi-Fi communication module communicates with the handheld mobile terminal via a wireless link, allowing the user to monitor temperature data within the coverage of the wireless network; The data storage module is used to store temperature data transmitted from the FPGA module; The FPGA module is responsible for receiving data from the digital temperature sensor, the thermocouple temperature conversion chip and the platinum resistance temperature conversion chip, and processing and transmitting the data to other components; The level matching module matches the communication port levels of different components; The digital temperature sensor, R-type thermocouple temperature conversion chip and platinum resistance temperature conversion chip are used to measure the ambient temperature and transmit the data to the FPGA module for further processing; The random access memory and FLASH ROM memory are used to store the temperature data processed by the FPGA module.
2. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The functions of the FPGA module are as follows: Data processing and control: The FPGA module is responsible for receiving and processing data from multiple data acquisition channels, and performs data processing and control according to predetermined algorithms and logic; Data synchronization and timing control: Through the clock system and timing control logic inside the FPGA, ensure that the data of each data acquisition channel is synchronously collected and processed within the same clock cycle to ensure the accuracy and consistency of the data; Communication protocol processing: FPGA modules can process different communication protocols, including communication protocols of digital temperature sensors, thermocouple temperature conversion chips and platinum resistance temperature conversion chips, as well as communication protocols with computers, PLCs, handheld mobile terminals and other devices; Data caching and storage: The FPGA module has data caching and storage functions, which can temporarily store the collected data and transfer the data to the data storage module for permanent storage or to the computer or PLC device for further processing when appropriate; Data conversion and formatting: The FPGA module can convert and format the collected raw data to meet the data processing requirements of the system; System parameter configuration and management: The FPGA module can receive parameter configuration instructions from users or external devices, and set the working mode, sampling frequency, and data processing algorithm of each module in the FPGA module according to the configuration parameters; Communication interface management: The FPGA module is responsible for managing the communication interface with computers, PLCs, and handheld mobile terminals, including Ethernet communication modules and Wi-Fi communication modules, to ensure stable data transmission and communication reliability.
3. The synchronous temperature acquisition system based on FPGA according to claim 1, characterized in that: The FPGA module adopts EP4CE10F17C6 FPGA chip.
4. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The channel of the temperature acquisition port uses the digital temperature sensor DS18B20.
5. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The R-type thermocouple temperature conversion chip uses MCP9600.
6. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The platinum resistance temperature conversion chip uses MAX31865.
7. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The Ethernet communication module uses the RTL8211EG chip to transmit all the collected channel temperature data to the computer or PLC through the Ethernet interface.
8. The FPGA-based synchronous temperature acquisition system according to claim 1, characterized in that: The Wi-Fi communication module uses the BCM4360 chip to transmit data to the handheld terminal through the wireless network, and monitor various temperature data at any location within the Wi-Fi coverage area.
9. A working method of the synchronous temperature acquisition system according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1, load configuration parameters: Load the configuration parameters into the FPGA module via a computer; Step 2, initialize the sensor: The FPGA module calls the communication port of the multi-channel signal flow link switching module according to the read system parameters and driven by the system synchronization clock; In the first clock cycle, the digital temperature sensors of all channels, the R-type thermocouple temperature conversion chips of all channels and the platinum resistance temperature conversion chips of all channels are synchronously initialized; Check whether the sensors of all channels are online and feed back the results to the computer, PLC and handheld mobile terminal; Step 3, configure the conversion chip: When the second clock cycle arrives, the internal registers of the temperature conversion chips of each channel are synchronously configured; Step 4, start the conversion: When the third clock cycle arrives, the analog-to-digital conversion circuits of the temperature conversion chips of each channel are synchronously started, waiting for the temperature data conversion of all channels to be completed; Step 5, read the temperature data: When the temperature data conversion of all channels is completed, driven by the system synchronization clock, the lower eight bits and upper eight bits of the temperature data collected by the temperature sensors of each channel are read synchronously in sequence; At the same time, the valid data bits are extracted inside the input communication protocol module, and the separated valid data are sent to the parallel data processing module for bit-to-byte conversion, compensation, and threshold calibration operations; The processed data is sent to the data buffer, formatted, serialized, and saved in non-volatile memory; Step 6, data transmission: The data in the buffer is converted from parallel to serial and then sent to the data preprocessing module for encapsulation and packaging; The packaged data is sent to the corresponding output communication protocol selection module, Ethernet communication module and Wi-Fi communication module; Through the parallel synchronous multi-bus module, all port data are sent to the computer, PLC and mobile handheld terminal at one time; Step 7, follow-up processing: The computer or PLC completes the subsequent processing of various calibrations and overall analysis of temperature data.
