Temperature acquisition device and temperature acquisition system

By combining a hardware pulse-triggered interrupt mechanism with a serial peripheral interface, the problem of limited response speed in existing temperature acquisition schemes is solved, achieving efficient and real-time temperature acquisition and data transmission, and improving the system's acquisition efficiency and accuracy.

CN122306247APending Publication Date: 2026-06-30SHENZHEN JICE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN JICE TECH CO LTD
Filing Date
2026-04-23
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

In existing temperature acquisition solutions, the microcontroller needs to reserve a fixed maximum sampling delay for each channel, resulting in low sampling efficiency, limited response speed, and inability to meet real-time requirements.

Method used

The microcontroller adopts a hardware pulse-triggered interrupt mechanism. When the sampling chip completes sampling, the microcontroller generates a hardware pulse, directly reads the sampled data and switches channels, avoiding continuous polling and fixed delay waiting. Combined with the serial peripheral interface, it establishes communication connections with multiple sampling chips to achieve real-time response and efficient data transmission.

Benefits of technology

It improves the response speed of temperature acquisition, reduces invalid waiting time, enhances acquisition efficiency and system real-time performance, strengthens the fault tolerance and anti-interference capabilities of the device, and ensures high-precision temperature measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122306247A_ABST
    Figure CN122306247A_ABST
Patent Text Reader

Abstract

This application provides a temperature acquisition device and system. The device includes a microcontroller and multiple sampling chips, each corresponding to multiple sampling channels. The microcontroller sequentially controls each sampling chip to sample each of the corresponding multiple sampling channels. When the first sampling chip completes sampling in the first sampling channel and obtains sampling data, it generates a hardware pulse. The microcontroller triggers an interrupt based on the hardware pulse, reads the sampling data, performs temperature conversion on the sampling data, and switches to the next sampling channel. This device can improve the temperature acquisition response speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of temperature acquisition technology, and in particular to a temperature acquisition device and a temperature acquisition system. Background Technology

[0002] Temperature acquisition refers to the technical process of using various sensors or temperature measuring devices to detect and acquire temperature parameters of a specific environment, object or medium in real time. By converting physical temperature signals into recognizable electrical signals or digital information, it enables accurate perception and quantitative recording of temperature status.

[0003] The current temperature acquisition scheme uses a microcontroller to uniformly schedule multiple sampling chips. Each sampling chip manages multiple corresponding sampling channels. It traverses all sampling chips and all sampling channels in a preset order. After completing one round of acquisition, it enters the next cycle. The microcontroller actively polls the status register of the sampling chip to read the sampling data. However, the microcontroller needs to reserve a fixed maximum sampling delay for each channel before reading the sampling data, resulting in low sampling efficiency and limited response speed. Summary of the Invention

[0004] The main purpose of this application is to propose a temperature acquisition device and temperature acquisition system to improve the temperature acquisition response speed.

[0005] To achieve the above objectives, this application proposes a temperature acquisition device, including a microcontroller and multiple sampling chips, each sampling chip corresponding to multiple sampling channels; The microcontroller sequentially controls each sampling chip to sample the corresponding multiple sampling channels one by one. When the first sampling chip completes sampling and obtains sampled data in the first sampling channel, it generates a hardware pulse; The microcontroller reads the sampled data based on hardware pulse-triggered interrupts, performs temperature conversion on the sampled data, and switches to the next sampling channel.

[0006] Alternatively, in one embodiment, the microcontroller is further configured to forcibly switch the sampling channel if no hardware pulse is received within a preset time.

[0007] Optionally, in one embodiment, the microcontroller is further configured to set the channel flag of the current sampling channel before switching the sampling channel, and when multiple sampling channels corresponding to the first sampling chip are set, control the second sampling chip to perform channel-by-channel sampling.

[0008] Optionally, in one embodiment, the microcontroller is further used to calibrate the sampled data based on preset calibration parameters and to perform temperature conversion on the calibrated sampled data.

[0009] Optionally, in one embodiment, the sampling target is a thermocouple, and the sampling data includes the digital voltage and cold junction temperature of the thermocouple; The microcontroller is also used to compensate digital voltages based on cold junction temperature to obtain a compensated voltage, and to perform temperature conversion based on the compensated voltage.

[0010] Alternatively, in one embodiment, the microcontroller is further used for: Obtain the cold junction compensation deviation value and calibrate the cold junction temperature based on the cold junction compensation deviation value; The calibrated cold junction temperature is converted into an equivalent voltage, and the compensation voltage is obtained based on the equivalent voltage and the digital voltage.

[0011] Optionally, in one embodiment, the sampling target is a thermistor, and the sampling data includes the sampling voltage of the thermistor; Microcontrollers are also used for: The measured resistance value of the thermal resistor is determined based on the sampling voltage; Obtain the resistance calibration deviation value, and calibrate the measured resistance value based on the resistance calibration deviation value to obtain the actual resistance value; Based on the temperature range corresponding to the actual resistance value, the actual resistance value is converted to a temperature value.

[0012] Alternatively, in one embodiment, the microcontroller is further used for: Obtain a reference resistance value, and determine the temperature range of the actual resistance value based on the comparison between the reference resistance value and the actual resistance value.

[0013] Optionally, in one embodiment, the microcontroller establishes a communication connection with multiple sampling chips through a serial peripheral interface to send channel switching instructions and sampling start instructions to the sampling chips, and read the sampling data output by the sampling chips.

[0014] Another aspect of this application provides a temperature acquisition system, including a host computer and multiple temperature acquisition devices as described above; The host computer is used to send configuration information to the temperature acquisition device; The temperature acquisition device is used to acquire temperature data based on configuration information and send the acquired temperature data to the host computer.

[0015] The temperature acquisition device provided in this application directly obtains sampling data from the sampling chip by driving the microcontroller to switch to the interrupt handling process through hardware pulses. The microcontroller does not need to continuously poll or wait for a fixed delay, realizing an instant response to the sampling completion event, effectively reducing invalid waiting time and improving the response speed of temperature acquisition. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the temperature acquisition device provided in the embodiments of this application; Figure 2 This is a schematic diagram of the serial port data transmission control process between a microcontroller and a multi-sampling chip provided in an embodiment of this application; Figure 3 This is a schematic diagram of the temperature acquisition system provided in the embodiments of this application; Figure 4 This is a schematic diagram of the temperature acquisition and processing flow provided in the embodiments of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0019] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0020] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0021] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0023] Current traditional temperature acquisition solutions typically employ a microcontroller-based centralized scheduling architecture. The microcontroller controls multiple sampling chips, each managing multiple independent sampling channels to achieve synchronous acquisition of temperature signals from multiple points. The system sequentially traverses all sampling chips and their subordinate sampling channels according to a preset fixed order, acquiring temperature signals channel by channel. Only after one round of full-channel acquisition is complete does the next cycle begin. For data reading, the microcontroller uses an active polling method, continuously querying the status registers of each sampling chip to determine if sampling is complete. To accommodate sampling differences between channels and hardware conversion delays, the microcontroller needs to reserve a uniform and fixed maximum sampling delay for each sampling channel before performing data reading. This approach results in significant wasted waiting time, low data acquisition frequency, and slow data upload cycles, thus impacting the real-time performance of the entire system.

[0024] Based on this, the present application provides a temperature acquisition device that can solve the above-mentioned technical problems.

[0025] Please see Figure 1 ,like Figure 1 The diagram shown is a structural schematic of a temperature acquisition device 10 provided in an embodiment of this application. The device includes a microcontroller 11 and multiple sampling chips 12, each sampling chip 12 corresponding to multiple sampling channels. The microcontroller 11 sequentially controls each sampling chip 12 to sample the corresponding multiple sampling channels 13 one by one; When the first sampling chip 12 completes sampling and obtains the sampled data in the first sampling channel 13, it generates a hardware pulse; The microcontroller 11 reads the sampled data based on the hardware pulse trigger interrupt, performs temperature conversion on the sampled data, and switches to the next sampling channel 13.

[0026] Specifically, a microcontroller can be an embedded controller that integrates a processor, memory, and peripheral interfaces. It has logic control, data operation, interrupt response, peripheral scheduling, and data processing functions, and can execute instruction scheduling, signal reading, and numerical calculation according to a preset program.

[0027] The sampling chip can be a processing chip with multi-channel analog signal acquisition and analog-to-digital conversion functions. It can sample, quantize and digitize external analog electrical signals, while supporting channel selection and status signal output, and can convert analog temperature signals into digital signals.

[0028] The sampling channel can be an independent acquisition path on the sampling chip for receiving signals from external sensors. Each channel corresponds to a temperature measurement point, which is used to achieve independent acquisition of multiple temperature signals and ensure that the acquisition of each signal does not interfere with each other.

[0029] The microcontroller controls multiple sampling chips. First, it controls the first sampling chip (the first sampling chip) to sample its corresponding multiple sampling channels one by one. After all channels of the chip have been sampled, it controls the next sampling chip and its corresponding channels to sample. Through this hierarchical and sequential scheduling method, the working sequence of each sampling channel is controlled in a coordinated manner to ensure that each channel can complete sampling in an orderly manner, while avoiding sampling conflicts in multi-chip and multi-channel scenarios.

[0030] A hardware pulse can be an instantaneous level transition signal output by the sampling chip, used to indicate the completion of an event, and can be used as an external trigger signal for the controller to recognize. After the first sampling chip completes sampling of the temperature signal and obtains the corresponding sampled data in its first sampling channel, it immediately outputs a hardware pulse signal. This hardware pulse is actively generated by the sampling chip at the moment of sampling completion, used to indicate that the current sampling channel has completed analog-to-digital conversion and has valid data.

[0031] Interrupts can be a hardware response mechanism for microcontrollers. When a specified trigger signal is detected, the current main program is paused, and a pre-defined interrupt service routine is executed first to handle urgent tasks. Here, upon receiving a hardware pulse generated by the sampling chip, the microcontroller immediately triggers the interrupt response mechanism, pausing the current main program flow and executing the pre-defined interrupt service routine. In the interrupt service routine, the microcontroller directly reads the sampling data provided by the first sampling chip and performs temperature conversion processing on the sampled data to obtain an accurate temperature value. After completing the data reading and temperature conversion, the microcontroller continues to control the first sampling chip to switch to the next sampling channel and continues to wait for the next hardware pulse generated when that channel completes sampling.

[0032] By using this interrupt-driven processing method powered by hardware pulse events, the microcontroller does not need to continuously poll or wait for a fixed delay, thus achieving an instant response to the sampling completion event, effectively reducing invalid waiting time, and improving acquisition efficiency and system real-time performance.

[0033] In one example, a schematic diagram of the serial port data transmission control flow between the microcontroller and the multi-sampling chip can be found by referring to... Figure 2As shown, the system first performs initialization, configuring basic hardware such as the microcontroller clock, I / O ports, and interrupt system. Then, the Direct Memory Access (DMA) controller is configured, setting the source address of the transmitted data to the serial port receive register and the destination address to the microcontroller's memory buffer. Simultaneously, parameters such as the data length and transmission direction are configured to prepare the DMA controller for reading sampled data from the sampling chips. Next, the serial port (including serial peripheral interfaces such as SPI) is configured, setting communication parameters such as baud rate, data bits, parity bits, and stop bits to establish a stable communication link between the microcontroller and multiple sampling chips, ensuring that the sampled data output by the sampling chips can be correctly received by the serial port. After configuration, the DMA controller is triggered to start data transmission. The DMA then autonomously completes the entire process of reading the sampled data output from the sampling chips from the serial port and transferring it to memory without microcontroller intervention, achieving parallel execution of data transmission and the main program. During the autonomous transfer of sampled data by the DMA controller, the process enters a waiting state until the preset length of sampled chip data transfer is completed. Upon completion, the DMA controller triggers a transfer completion interrupt, notifying the microcontroller that the current sampled chip data transfer task has ended. The microcontroller responds to the DMA interrupt and executes the interrupt service routine, reading the sampled data from the DMA controller and completing the temperature conversion of the sampled data. After interrupt handling, the system determines whether to continue the loop of sampling chip data acquisition. If yes, the process jumps back to the DMA start step, restarts the DMA controller, and enters the next round of sampled chip data reading and transfer loop; if no, the process ends, and the data transfer task exits.

[0034] In one embodiment, the microcontroller is also used to forcibly switch the sampling channel if it does not receive a hardware pulse within a preset time.

[0035] In this implementation, during actual multi-channel temperature acquisition, if a sampling channel experiences abnormal conditions such as sensor disconnection, poor contact, or signal interference, the sampling chip may fail to complete sampling normally, thus failing to generate the corresponding hardware pulse. If the microcontroller continuously waits for this pulse, it will cause the entire acquisition process to be blocked, preventing subsequent channels from sampling normally and severely affecting the continuity of system operation.

[0036] The microcontroller here can force a switch of the sampling channel when it does not receive a hardware pulse within a preset time. That is, by introducing a timeout judgment and forced switching mechanism, it can automatically identify abnormal channels and quickly skip them, so as to avoid the failure of a single channel dragging down the entire acquisition system and improve the fault tolerance and anti-interference capability of the device.

[0037] In one embodiment, the microcontroller is also used to set the channel flag of the current sampling channel before switching the sampling channel. When multiple sampling channels corresponding to the first sampling chip are set, the microcontroller controls the second sampling chip to perform channel-by-channel sampling.

[0038] In this implementation, in a multi-chip, multi-channel temperature acquisition scenario, the microcontroller needs to monitor the sampling status of each sampling chip and each sampling channel. To avoid issues such as missed sampling, duplicate sampling, or chaotic scheduling of multiple sampling chips, when the microcontroller completes the reading of sampling data and temperature conversion for the current sampling channel and prepares to switch to the next channel, it can set a dedicated flag bit for the currently sampled channel (i.e., set the channel flag). This flag bit is used to record that the channel has successfully completed sampling, avoiding subsequent duplicate scheduling or missed sampling. When all sampling channels corresponding to the first sampling chip have completed sampling and are set, the microcontroller can confirm that all channels of the sampling chip have been acquired by identifying the flag bit status of each sampling channel. At this time, it controls the second sampling chip to start working and sequentially perform channel-by-channel sampling operations on its corresponding multiple sampling channels.

[0039] The sampling status is accurately recorded and identified by setting the channel flag, avoiding problems such as missed sampling, duplicate sampling, and chaotic chip scheduling.

[0040] In one embodiment, the microcontroller is also used to calibrate the sampled data based on preset calibration parameters and to perform temperature conversion on the calibrated sampled data.

[0041] In this implementation, there are inherent errors in the sampling chip, signal conditioning circuit, sensor itself, and line transmission. If the raw sampling data is used directly for temperature conversion, the calculated temperature value will deviate significantly from the actual temperature, which cannot meet the requirements for high-precision temperature acquisition.

[0042] After the microcontroller obtains the raw sampling data output by the sampling chip, it can first call the pre-stored calibration parameters to correct the raw data, offsetting the system errors caused by the hardware circuit, sensor and transmission path, so that the processed data is closer to the real signal; then, based on the calibrated data, it performs temperature conversion calculation to obtain an accurate and reliable temperature value.

[0043] By using a calibration-then-conversion process, the overall accuracy of temperature acquisition can be significantly improved, and the impact of system errors on measurement results can be reduced.

[0044] In one embodiment, the sampling target is a thermocouple, and the sampling data includes the digital voltage and cold junction temperature of the thermocouple. The microcontroller is also used to compensate digital voltages based on cold junction temperature to obtain a compensated voltage, and to perform temperature conversion based on the compensated voltage.

[0045] In this embodiment, the thermocouple is a temperature sensing element based on the Seebeck effect, consisting of two conductors of different materials connected end-to-end to form a closed loop. When there is a temperature difference between the two connection ends (measuring end and reference end), a thermoelectric potential signal corresponding to the temperature difference will be generated in the loop.

[0046] Digital voltage refers to the digital voltage value obtained after the analog thermoelectric potential signal output by the thermocouple is converted from analog to digital by a sampling chip. It is used to characterize the magnitude of the thermoelectric potential generated between the thermocouple measuring end and the cold end due to the temperature difference.

[0047] The cold junction temperature can refer to the ambient temperature of the thermocouple reference junction.

[0048] When using thermocouples for temperature acquisition, the thermoelectric potential signal output by the thermocouple reflects the temperature difference potential between the measuring end and the cold end, rather than the potential corresponding to the absolute temperature. Directly using this digital voltage will result in a significant deviation in the final calculated temperature, making it difficult to meet the requirements of high-precision temperature measurement.

[0049] Here, the microcontroller can perform compensation calculations on the digital voltage based on the cold junction temperature, correcting the thermoelectric potential to a compensation voltage corresponding to the absolute temperature. Then, based on this compensation voltage, a temperature conversion is performed to obtain the accurate actual temperature value. By introducing cold junction temperature compensation, measurement errors caused by changes in the cold junction environment can be effectively eliminated, improving the accuracy and stability of thermocouple temperature measurement.

[0050] In one example, in a thermocouple temperature measurement scenario, after sampling the analog temperature signal and performing analog-to-digital conversion, an algorithm is needed to convert the digital voltage signal into the actual temperature value. Since the thermocouple's thermoelectric potential has a non-linear relationship with temperature, a polynomial fitting algorithm based on Horner's rule can be used to achieve the temperature conversion. First, the cold junction temperature is converted into its corresponding equivalent voltage, which is then superimposed with the sampled thermoelectric potential (digital voltage) at the measuring junction to obtain the total compensation voltage x. The formula for calculating the thermocouple temperature P(x) can be: P(x) = (((a) n x+a n-1 )x+a n-2 )x+…+a1)x+a0) Among them, a n ,a n 1,…,a1,a0 are polynomial coefficients, determined by the thermocouple's calibration number (such as type K, type T, type S, etc.), and are industry standard calibration table fitting coefficients, which are pre-stored in the microcontroller.

[0051] In one implementation, the microcontroller is also used for: Obtain the cold junction compensation deviation value and calibrate the cold junction temperature based on the cold junction compensation deviation value; The calibrated cold junction temperature is converted into an equivalent voltage, and the compensation voltage is obtained based on the equivalent voltage and the digital voltage.

[0052] In this embodiment, in practical applications, the cold junction temperature is easily affected by factors such as ambient temperature fluctuations and device errors. Directly using the measured cold junction temperature will introduce calculation deviations, which will lead to inaccurate temperature results after compensation.

[0053] The cold junction compensation deviation value can be obtained by placing the cold junction of the thermocouple in a high-precision constant temperature environment, using a standard temperature source as a reference, and comparing the difference between the actual collected cold junction temperature and the standard temperature value. The result is obtained through statistical analysis and fitting. This deviation value is pre-stored in the microcontroller's memory area to eliminate systematic errors caused by the discreteness of the cold junction temperature acquisition circuit and components, as well as environmental interference.

[0054] Here, the microcontroller can first obtain a pre-configured cold junction compensation deviation value, and use this deviation value to calibrate the measured cold junction temperature to eliminate measurement errors and obtain a cold junction temperature that is closer to the actual situation. Subsequently, the microcontroller converts the calibrated cold junction temperature into its corresponding equivalent voltage, and then superimposes this equivalent voltage with the digital voltage collected by the thermocouple to obtain a compensation voltage that can be used to accurately calculate the temperature.

[0055] By first calibrating the cold junction temperature, then converting the equivalent voltage, and finally synthesizing the compensation voltage, the systematic error caused by cold junction temperature fluctuations can be effectively eliminated, improving the accuracy and stability of thermocouple temperature measurement and ensuring the reliability of subsequent temperature conversion results.

[0056] In one embodiment, the sampling target is a resistance temperature detector (RTD), and the sampling data includes the sampling voltage of the RTD. Microcontrollers are also used for: The measured resistance value of the thermal resistor is determined based on the sampling voltage; Obtain the resistance calibration deviation value, and calibrate the measured resistance value based on the resistance calibration deviation value to obtain the actual resistance value; Based on the temperature range corresponding to the actual resistance value, the actual resistance value is converted to a temperature value.

[0057] In this embodiment, the resistance temperature detector (RTD) is a temperature sensor based on the thermal resistance effect of metals. Its resistance value changes regularly with the measured temperature; the higher the temperature, the greater the resistance value. As a temperature sensing front-end, the RTD converts temperature changes into an analog voltage signal that can be acquired by a sampling chip, and then converts this signal into a sampling voltage after analog-to-digital conversion. The resistance value can usually be indirectly reflected by acquiring the corresponding sampling voltage. However, in actual acquisition, factors such as lead resistance, device variability, and signal attenuation can cause deviations between the measured resistance value and the true resistance value. Directly using the measured resistance value for temperature conversion will lead to inaccurate temperature results. Furthermore, the resistance value of the RTD varies across different temperature ranges, making it difficult to guarantee full-range accuracy with a uniform conversion method.

[0058] The resistance calibration deviation value can be obtained by pre-connecting a high-precision standard resistor to the sampling channel, acquiring the corresponding sampling voltage through the sampling circuit, calculating the measured resistance value, comparing the measured resistance value with the actual resistance value of the standard resistor, obtaining the difference between the two, and then performing data fitting and error correction to form the resistance calibration deviation value. This deviation value is pre-stored in the microcontroller's memory unit.

[0059] Here, the microcontroller first calculates the measured resistance value of the RTD based on the sampling voltage and the constant current value inside the sampling chip. Then, it obtains a preset resistance calibration deviation value and corrects the measured resistance value, eliminating system errors introduced by the hardware and obtaining an actual resistance value close to the true value. Subsequently, the microcontroller performs temperature conversion according to the temperature range in which the actual resistance value is located, using the corresponding conversion relationship to match the characteristic curves of the RTD in different ranges. Through resistance calibration and zone-based temperature conversion, measurement errors can be effectively reduced, improving the accuracy and consistency of RTD temperature measurement across the entire temperature range.

[0060] In one example, in a resistance temperature detector (RTD) scenario, the resistance of the RTD has a non-linear relationship with temperature, requiring different algorithms to be used for the positive and negative temperature ranges to convert the resistance to temperature: Positive temperature range (t ≥ 0℃): Using the Callendar-VanDusen quadratic equation, substitute the calibrated actual resistance R into the formula R(t) = R0(1 + At + Bt). 2 Rearranging them into a quadratic equation By using the quadratic formula Calculate the temperature value directly; Negative temperature range (t < 0℃): The Callendar-Van Dusen quartic equation R(t) = R0[1 + At + Bt] is used. 2 +C(t 100)t 3 Define the objective function f(t) = R0[1 + At + Bt] 2+C(t 100)t 3 ] R is solved using Newton's iteration method: First, the derivative is obtained as f′(t) = R0[A + 2Bt + C(4t)]. 3 300t 2 Then, through iterative formulas... This continues until a high-precision temperature value is obtained through convergence.

[0061] Wherein, R0 is the reference resistance value of the RTD at 0℃, and A, B, and C are the standard coefficients for the corresponding scale number, which are pre-stored in the microcontroller. This interval calculation method can accurately match the resistance-temperature characteristics of the RTD across its entire range, ensuring temperature measurement accuracy. At the same time, the algorithm has low computational load, making it suitable for the real-time requirements of multi-channel high-speed temperature acquisition.

[0062] In one implementation, the microcontroller is also used for: Obtain a reference resistance value, and determine the temperature range of the actual resistance value based on the comparison between the reference resistance value and the actual resistance value.

[0063] In this implementation, the reference resistance value can refer to the standard theoretical resistance value of the thermal resistor at various standard and typical temperature points. The microcontroller can pre-store the reference resistance values ​​of the corresponding thermal resistors at various typical temperature points, compare the calibrated actual resistance value with each reference resistance value in turn, determine the temperature range in which the current resistance value falls based on the magnitude relationship, and then select the conversion relationship corresponding to that range for calculation in subsequent temperature conversions.

[0064] By using a reference resistance value-based partitioning method, the characteristic curves of the RTD can be accurately matched in different temperature ranges, reducing nonlinear errors and making the temperature conversion results more consistent with the actual temperature, thereby further improving the full-range accuracy and reliability of RTD temperature measurement.

[0065] In one implementation, the microcontroller establishes a communication connection with multiple sampling chips through a serial peripheral interface to send channel switching instructions and sampling start instructions to the sampling chips, and read the sampling data output by the sampling chips.

[0066] In this implementation, the Serial Peripheral Interface (SPI) is a high-speed, full-duplex, synchronous serial communication bus. The microcontroller establishes communication connections with multiple sampling chips through the SPI. As a high-speed synchronous serial communication bus, the SPI allows the microcontroller to act as a master, centrally controlling multiple sampling chips, sending channel switching commands and sampling start commands, and simultaneously reading the sampled data after analog-to-digital conversion from each chip in real time. Using the SPI simplifies hardware wiring, reduces pin usage, and ensures high-speed command issuance and data transmission with consistent timing.

[0067] Please see Figure 3 ,like Figure 3 The diagram shown is a structural schematic of a temperature acquisition system provided in an embodiment of this application, including a host computer 31 and multiple [other components]. Figure 1 Temperature acquisition device 10 shown; The host computer is used to send configuration information to the temperature acquisition device; The temperature acquisition device is used to acquire temperature data based on configuration information and send the acquired temperature data to the host computer.

[0068] Specifically, the host computer can refer to a computer or embedded control device with data management, human-computer interaction, and control functions. As the system management and data receiving end, the host computer sends configuration information such as sampling rate, calibration parameters, and operating mode to each temperature acquisition device, achieving unified scheduling and parameter configuration for multiple acquisition devices. Each temperature acquisition device, based on the received configuration information and set parameters, independently completes multi-channel temperature acquisition, calibration, and conversion, and uploads the final real temperature data to the host computer for centralized storage, display, and analysis. Through this distributed acquisition and centralized management architecture, large-scale, multi-point synchronous and reliable temperature monitoring can be achieved, improving system scalability and management efficiency, and meeting the needs of high-precision, multi-channel temperature monitoring in complex scenarios.

[0069] In one example, a schematic diagram of the temperature acquisition and processing flow can be found here. Figure 4 As shown, the sampling target is first sampled. The sampling chip performs analog-to-digital conversion on the temperature analog signal output by the RTD or thermocouple, completing the acquisition of raw sampling data. After sampling, the sampled data is calibrated. For the RTD, the resistance calibration deviation value is used to correct the measured resistance value; for the thermocouple, the cold junction compensation deviation value is used to correct the cold junction sampling temperature, resulting in calibrated sampled values. The calibrated sampled values ​​are then converted into temperatures. Corresponding algorithms are used for the RTD and thermocouple: for the RTD, the actual resistance value after calibration is converted into a temperature value using a resistance-temperature conversion formula; for the thermocouple, the calibrated voltage signal is converted into a temperature value using cold junction compensation and Horner's rule polynomial fitting. After conversion, the temperature values ​​are uploaded to the host computer for centralized data monitoring and management.

[0070] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

Claims

1. A temperature acquisition device, characterized in that, It includes a microcontroller and multiple sampling chips, with each sampling chip corresponding to multiple sampling channels; The microcontroller sequentially controls each sampling chip to sample the corresponding multiple sampling channels one by one. When the first sampling chip completes sampling and obtains sampled data in the first sampling channel, it generates a hardware pulse; The microcontroller reads the sampled data based on the hardware pulse-triggered interrupt, performs temperature conversion on the sampled data, and switches to the next sampling channel.

2. The apparatus according to claim 1, characterized in that, The microcontroller is also used to forcibly switch the sampling channel if it does not receive the hardware pulse within a preset time.

3. The apparatus according to claim 1, characterized in that, The microcontroller is also used to set the channel flag of the current sampling channel before switching the sampling channel. When multiple sampling channels corresponding to the first sampling chip are set, the second sampling chip is controlled to perform channel-by-channel sampling.

4. The apparatus according to claim 1, characterized in that, The microcontroller is also used to calibrate the sampled data based on preset calibration parameters and to perform temperature conversion on the calibrated sampled data.

5. The apparatus according to claim 4, characterized in that, The sampling target is a thermocouple, and the sampling data includes the digital voltage and cold junction temperature of the thermocouple. The microcontroller is also used to compensate the digital voltage based on the cold junction temperature to obtain a compensated voltage, and to perform temperature conversion based on the compensated voltage.

6. The apparatus according to claim 5, characterized in that, The microcontroller is also used for: Obtain the cold junction compensation deviation value, and calibrate the cold junction temperature based on the cold junction compensation deviation value; The calibrated cold junction temperature is converted into an equivalent voltage, and the compensation voltage is obtained based on the equivalent voltage and the digital voltage.

7. The apparatus according to claim 4, characterized in that, The sampling target is a resistance temperature detector (RTD), and the sampling data includes the sampling voltage of the RTD. The microcontroller is also used for: The measured resistance value of the thermal resistor is determined based on the sampling voltage; Obtain the resistance calibration deviation value, and calibrate the measured resistance value based on the resistance calibration deviation value to obtain the actual resistance value; Based on the temperature range corresponding to the actual resistance value, the actual resistance value is converted to a temperature value.

8. The apparatus according to claim 7, characterized in that, The microcontroller is also used for: Obtain a reference resistance value, and determine the temperature range of the actual resistance value based on the comparison between the reference resistance value and the actual resistance value.

9. The apparatus according to claim 1, characterized in that, The microcontroller establishes a communication connection with the multiple sampling chips through a serial peripheral interface to send channel switching commands and sampling start commands to the sampling chips, and read the sampling data output by the sampling chips.

10. A temperature acquisition system, characterized in that, Includes a host computer and multiple temperature acquisition devices as described in any one of claims 1-9; The host computer is used to send configuration information to the temperature acquisition device; The temperature acquisition device is used to acquire temperature based on the configuration information and send the acquired temperature to the host computer.