CN110954248B - Temperature sensor with automatic calibration function and calibration method - Google Patents

Temperature sensor with automatic calibration function and calibration method Download PDF

Info

Publication number
CN110954248B
CN110954248B CN201911362923.0A CN201911362923A CN110954248B CN 110954248 B CN110954248 B CN 110954248B CN 201911362923 A CN201911362923 A CN 201911362923A CN 110954248 B CN110954248 B CN 110954248B
Authority
CN
China
Prior art keywords
temperature
temperature sensors
calibration
value
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911362923.0A
Other languages
Chinese (zh)
Other versions
CN110954248A (en
Inventor
王红美
袁文师
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Beiling Co Ltd
Original Assignee
Shanghai Beiling Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Beiling Co Ltd filed Critical Shanghai Beiling Co Ltd
Priority to CN201911362923.0A priority Critical patent/CN110954248B/en
Publication of CN110954248A publication Critical patent/CN110954248A/en
Application granted granted Critical
Publication of CN110954248B publication Critical patent/CN110954248B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K15/00Testing or calibrating of thermometers
    • G01K15/005Calibration

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Temperature Or Quantity Of Heat (AREA)

Abstract

The invention discloses a temperature sensor with an automatic calibration function and a calibration method. According to the invention, the calibration coefficient calculation module and the programmable nonvolatile memory are added in the existing sensor, so that the calibration calculation and the temperature compensation are completed in the temperature sensor chip when the temperature sensor is tested, and the external part only needs to send a test command to the temperature sensor, thereby greatly reducing the participation of manpower and a test machine, improving the simultaneous measurement number of the temperature sensor and shortening the test time.

Description

Temperature sensor with automatic calibration function and calibration method
Technical Field
The invention relates to the field of temperature sensors and integrated circuits, in particular to a temperature sensor with an automatic calibration function and a calibration method.
Background
With the increasing application demand and the rapid development of the semiconductor industry in recent years, the temperature sensor is one of the most conventional devices in electronic equipment, and people have higher and higher requirements on the temperature sensor, and the temperature sensor not only has high precision and good performance, but also has low cost. Some non-ideal factors, such as PVT (process, voltage, temperature) effect, and user readable requirements, make the temperature measurement result deviate from the true required read temperature value linearly and non-linearly, and the calibration compensation is to correct and reduce the deviation.
The temperature sensor, whether as a single chip or an ip (interactive performance) module, basically includes an on-chip or off-chip temperature sensitive device, an analog-to-digital converter, temperature calibration compensation and digital signal processing. The temperature calibration compensation algorithm directly affects the accuracy and cost of the sensor, and high-accuracy calibration algorithms such as function fitting, segmented table look-up, simulation parameter adjustment and the like are very complex, and the hardware consumption and the test cost are very high.
At present, because the temperature rise and the temperature reduction of the test board and the temperature measurement of the chip need long enough time to be stable, the calibration process of the temperature sensors needs to consume a large amount of time, and in addition, because the calibration coefficients of each temperature sensor are different, a test machine needs to test each temperature sensor and calculate the calibration coefficient, the requirement on the test machine is high, the synchronous measurement performance is poor, and the test time of the sensors is long.
Disclosure of Invention
The invention provides a temperature sensor with an automatic calibration function and a calibration method, aiming at overcoming the defects of long test time and poor synchronous measurement performance when the temperature sensor is tested in the prior art.
The invention solves the technical problems through the following technical scheme:
the invention provides a temperature sensor with an automatic calibration function, which comprises a temperature sensitive device, an analog-to-digital converter, a temperature value compensation module, a temperature value register, a calibration coefficient calculation module, a programmable nonvolatile memory and a calibration coefficient register, wherein the temperature sensitive device is connected with the analog-to-digital converter;
the analog-to-digital converter is connected with the temperature sensitive device and the temperature value compensation module and is used for converting an analog signal sampled by the temperature sensitive device into a digital signal and outputting the digital signal to the temperature value compensation module;
the temperature value compensation module is connected with the temperature value register and the calibration coefficient register, compensates the digital signal by using an output signal of the calibration coefficient register to obtain a compensated temperature value, and outputs the compensated temperature value to the temperature value register;
the temperature value register is connected with the calibration coefficient calculation module and the programmable nonvolatile memory and used for latching the current compensated temperature value and respectively outputting the current compensated temperature value to the calibration coefficient calculation module and the programmable nonvolatile memory;
the calibration coefficient calculation module is connected with the temperature register and the programmable nonvolatile memory and used for realizing calculation of a calibration coefficient and outputting the calibration coefficient to the programmable nonvolatile memory and the calibration coefficient register;
the programmable nonvolatile memory is used for storing the calibration coefficient and the actual temperature sampled by the temperature sensitive device before compensation;
the calibration coefficient register is connected with the calibration coefficient calculation module, the programmable nonvolatile memory and the temperature value compensation module, and is used for latching the current calibration coefficient and outputting the current calibration coefficient to the temperature value compensation module.
Preferably, the temperature value compensation module comprises a multiplier and an adder;
the multiplier is used for realizing gain compensation;
the adder is used for offset compensation;
the compensation formula is as follows:
Tpr=adc_value*gn+os
where adc _ value is the digital signal output by the analog-to-digital converter, gn is the gain coefficient, os is the offset coefficient, and Tpr is the compensated temperature value.
Preferably, when the gain coefficients of the plurality of temperature sensors are larger than a preset value, the calibration coefficient calculation module is used for calculating the gain coefficients and calculating the offset coefficients;
the gain factor gn calculation formula is as follows:
Figure BDA0002337678360000031
the temperature sensor comprises a temperature sensitive device, a temperature sensor and a controller, wherein Tpr1_ r and Tpr2_ r are theoretical temperature values at a first temperature and a second temperature sampled by the temperature sensitive device respectively, and Tpr1 and Tpr2 are actual temperature measurement values before compensation at;
the calculation formula of the bias coefficient os is as follows:
os=Tpr2_r-Tpr3
wherein Tpr3 is the actual temperature measurement value after gain compensation at the second temperature sampled by the temperature sensitive device;
when the gain coefficients of the plurality of temperature sensors are smaller than or equal to a preset value, the calibration coefficient calculation module is used for calculating a bias coefficient;
the calculation formula of the bias coefficient os is as follows:
os=Tpr3_r-Tpr4
wherein Tpr3_ r is a theoretical temperature value at the third temperature sampled by the temperature sensitive device, and Tpr4 is a gain compensated actual temperature measurement value at the third temperature sampled by the temperature sensitive device;
the calibration coefficient calculation module is further used for taking a theoretical gain coefficient in the temperature sensor design as a gain coefficient in compensation.
Preferably, the temperature sensor further comprises a communication interface module;
and the communication interface module is used for outputting the compensated temperature value to an external host and receiving a test command sent by the external host through a serial port or a parallel port.
The invention also provides a calibration method realized by adopting the temperature sensor with the automatic calibration function, and the calibration method comprises the following steps:
s1, calculating a gain coefficient and a bias coefficient based on the temperature sampled by the temperature sensitive device;
and S2, performing temperature compensation calculation based on the calculated gain coefficient and the calculated bias coefficient.
Preferably, the step of calculating the gain coefficient and the bias coefficient based on the temperature sampled by the temperature sensitive device comprises:
when the gain coefficients of the plurality of temperature sensors are larger than a preset value, the calculating step comprises:
s01, stabilizing the test board to a first temperature;
s02, taking a plurality of temperature sensors as a group, and electrifying the temperature sensors;
s03, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at the first temperature;
s04, sending a first command to the plurality of temperature sensors through a communication interface, and writing actual temperature measurement values before compensation at the first temperature into programmable nonvolatile memories corresponding to the plurality of temperature sensors;
s05, powering off the plurality of temperature sensors, and returning to the step S02 until the plurality of groups of temperature sensors are measured;
s06, stabilizing the test board to a second temperature;
s07, electrifying the plurality of temperature sensors;
s08, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at the second temperature;
s09, sending a second command to the plurality of temperature sensors through a communication interface, and reading actual temperature measurement values before compensation at the first temperature from a programmable nonvolatile memory into internal registers corresponding to the plurality of temperature sensors;
s10, sending a third command to the plurality of temperature sensors through a communication interface, and respectively writing theoretical temperature values corresponding to the first temperature and the second temperature into calibration coefficient registers of the plurality of temperature sensors;
s11, the temperature sensors perform gain coefficient calculation and bias coefficient calculation through a calibration coefficient calculation module;
s12, sending a fourth command to the plurality of temperature sensors through the communication interface, and writing gain coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
s13, obtaining an actual temperature measurement value after gain compensation at a second temperature based on the obtained corresponding gain coefficients of the plurality of temperature sensors;
s14, calculating the bias coefficients of the plurality of temperature sensors according to the bias coefficient calculation formula to obtain the bias coefficients corresponding to the plurality of temperature sensors;
s15, sending a fifth command to the plurality of temperature sensors through the communication interface, and writing bias coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
s16, powering off the plurality of temperature sensors, and returning to the step S07 until the plurality of groups of temperature sensors are measured;
when the gain coefficients of the plurality of temperature sensors are less than or equal to a preset value, the calculating step includes:
s21, stabilizing the test board to a third temperature;
s22, electrifying the plurality of temperature sensors;
s23, sending a sixth command to the plurality of temperature sensors through the communication interface, and writing theoretical gain coefficients of the plurality of temperature sensors into calibration coefficient registers and nonvolatile memories corresponding to the plurality of temperature sensors;
s24, obtaining actual temperature measurement values compensated at a third temperature of the plurality of temperature sensors based on theoretical gain coefficients of the plurality of temperature sensors;
s25, sending a seventh command to the plurality of temperature sensors through the communication interface, and writing theoretical temperature values corresponding to a third temperature into calibration coefficient registers of the plurality of temperature sensors;
s26, calculating the bias coefficients of the plurality of temperature sensors according to the calculation formula of the bias coefficients to obtain the bias coefficients corresponding to the plurality of temperature sensors;
s27, sending an eighth command to the plurality of temperature sensors through the communication interface, and writing bias coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
s28, powering off the plurality of temperature sensors, and returning to the step S22 until the plurality of groups of temperature sensors are measured;
preferably, the step of calculating the temperature compensation based on the calculated gain coefficient and the calculated bias coefficient comprises:
s31, electrifying the temperature sensors, and downloading the gain coefficients and the bias coefficients from a nonvolatile memory to calibration coefficient registers of the temperature sensors;
s32, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at a fourth temperature;
and S33, calculating according to the compensation formula based on the gain coefficients and the bias coefficients corresponding to the plurality of temperature sensors to obtain an actual temperature measurement value compensated at a fourth temperature.
The positive progress effects of the invention are as follows:
in the invention, the calibration coefficient calculation module and the programmable nonvolatile memory are added in the existing sensor, so that the calibration calculation and the temperature compensation are completed in the temperature sensor chip when the temperature sensor is tested, and the external part only needs to send a test command to the temperature sensor. Compared with the prior art, only a small number of circuits are added, the participation of manpower and a testing machine is greatly reduced, the requirement on testing conditions is reduced, the simultaneous testing number of the temperature sensors can be improved, and the testing time is shortened.
Drawings
Fig. 1 is a block diagram of a temperature sensor with an automatic calibration function according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a calibration method of a temperature sensor with an automatic calibration function when gain coefficients of a plurality of temperature sensors are greater than a preset value according to embodiment 2 of the present invention.
Fig. 3 is a flowchart of a calibration method of a temperature sensor with an automatic calibration function when gain coefficients of a plurality of temperature sensors are smaller than or equal to a preset value according to embodiment 2 of the present invention.
Fig. 4 is a flowchart of the steps of temperature sensor temperature auto-compensation according to embodiment 2 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
As shown in fig. 1, the temperature sensor with automatic calibration function of this embodiment includes a digital-to-analog converter 1, a temperature value compensation module 2, a temperature value register 3, a communication interface module 4, a calibration coefficient calculation module 5, a programmable nonvolatile memory 6, and a calibration coefficient register 7.
The analog-to-digital converter 1 is used for converting an analog signal sampled by a temperature sensitive device into a digital signal, is usually realized by an SAR-ADC (successive approximation analog-to-digital converter) and a sigma-delta ADC (integral-derivative analog-to-digital converter), and outputs the digital signal to the temperature value compensation module 2, and in addition, based on specific requirements, the analog-to-digital converter 1 can select a filter;
the temperature value compensation module 2 compensates the result of the analog-to-digital converter 1 by using the output of the calibration coefficient register 7 to obtain a compensated temperature value, and outputs the compensated temperature value to the temperature value register 3. The temperature value compensation module 2 comprises gain compensation and bias compensation, and the compensation formula is as follows:
Tpr=adc_value*gn+os
where adc _ value is the output of the analog-to-digital converter 1, the gain coefficient gn and the offset coefficient os are the outputs of the calibration coefficient register 7, and Tpr is the compensated temperature value, which is latched in the temperature value register 3.
Wherein the gain compensation is implemented by a multiplier and the offset compensation is implemented by an adder.
The temperature value register 3 is used for latching the current compensated temperature value and respectively outputting the temperature value to the communication interface module 4, the calibration coefficient calculation module 5 and the programmable nonvolatile memory 6;
the communication interface module 4 is used for realizing result output and external control, and can be realized by a serial port or a parallel port;
the calibration coefficient calculation module 5 is used for realizing the calculation of the calibration coefficient and outputting the correction coefficient to the programmable nonvolatile memory 6 and the calibration coefficient register 7.
When the gain coefficients of the batch do not meet the preset value, the calibration coefficient calculation module is used for calculating the gain coefficients and the offset coefficients;
the gain factor gn is calculated as follows:
Figure BDA0002337678360000071
wherein Tpr1_ r, Tpr2_ r are theoretical temperature values at the first temperature and the second temperature sampled by the temperature sensitive device respectively, and Tpr1, Tpr2 are actual temperature measurement values before compensation at the first temperature and the second temperature sampled by the temperature sensitive device respectively;
the calculation formula of the offset coefficient os is as follows:
os=Tpr2_r-Tpr3
wherein Tpr3 is the actual temperature measurement value after gain compensation at the second temperature sampled by the temperature sensitive device;
when the gain coefficients of the batch meet a preset value, the calibration coefficient calculation module is used for calculating the offset coefficient;
the calculation formula of the bias coefficient os is as follows:
os=Tpr3_r-Tpr4
wherein Tpr3_ r is a theoretical temperature value at the third temperature sampled by the temperature sensitive device, and Tpr4 is an actual temperature measurement value after gain compensation at the third temperature sampled by the temperature sensitive device;
the calibration coefficient calculation module is further used for taking a theoretical gain coefficient in the temperature sensor design as a gain coefficient in compensation.
The programmable non-volatile memory 6 is used to store the calibration coefficients and the actual temperature measurements before compensation at the first temperature sampled by the temperature sensitive device. Automatically downloading the calibration coefficients from the programmable nonvolatile memory 6 to the calibration coefficient register after each power-up using the calibrated temperature sensor; when the test temperature sensor is powered off every time, the actual temperature measurement value sampled by the temperature sensitive device and before compensation at the first temperature can be saved;
and the calibration coefficient register 7 is used for latching the current calibration coefficient and outputting the current calibration coefficient to the temperature value compensation module 2.
As shown in the dotted line frame in fig. 1, a block diagram for realizing the calculation of the calibration coefficient and saving the coefficient when power is off is provided, and then, the calibration coefficient calculation module 5 does not work any more, and only needs to download the calibration coefficient from the programmable nonvolatile memory 6 after each power-on, and if the calibration compensation is found to be wrong, the calculation of the secondary coefficient can be performed.
In the embodiment, the calibration coefficient calculation module and the programmable nonvolatile memory are added in the existing sensor, so that the calibration calculation and the temperature compensation are completed inside the temperature sensor chip when the temperature sensor is tested, and the external part only needs to send a test command to the temperature sensor. Compared with the prior art, only a small number of circuits are added, the participation of manpower and a testing machine is greatly reduced, the requirement on testing conditions is reduced, the simultaneous testing number of the temperature sensors can be improved, and the testing time is shortened.
Example 2
The calibration method of the temperature sensor of the present embodiment is implemented by using the temperature sensor with the automatic calibration function in embodiment 1.
As shown in fig. 2, the calibration method of the temperature sensor with the automatic calibration function when the gain coefficients of the plurality of temperature sensors are greater than the preset value includes the following steps:
s101, stabilizing the temperature of the test bench to a first temperature value (T1) DEG C; the test bench, referred to as a wafer test, generally requires a higher accuracy than the temperature sensor.
Step S102, electrifying a group of temperature sensors, and waiting for the ADC to finish at least one conversion; the group of temperature sensors specifically refers to a plurality of temperature sensors which can be simultaneously tested and calibrated during temperature sensor testing.
Step S103, sending a command CMD1 to each temperature sensor of the group through the communication interface, and internally executing to write the current temperature measurement value Tpr1 into the respective programmable nonvolatile memory. Wherein the temperature value Tpr1 is the temperature measurement value of the temperature sensor before calibration at the first temperature;
and step S104, powering off the group of temperature sensors, and returning to the step S102 until all the temperature sensors are measured.
Wherein the testing step at the second temperature is as follows:
s105, stabilizing the temperature of the test bench to a second temperature value (T2) DEG C; generally, for the purpose of measuring accuracy, (T1) DEG C and (T2) DEG C, normal temperature is not selected, and two points with high accuracy requirement in the test range are selected, such as T1 of 40 ℃ and T2 of 85 ℃.
Step S106, electrifying a group of temperature sensors, and waiting for the ADC to finish at least one conversion, wherein the current temperature measurement value Tpr2 of each temperature sensor is obtained; where Tpr2 is the temperature value before compensation.
Step S107, sending a command CMD2 to each temperature sensor of the group through the communication interface, wherein the stored Tpr1 is read out to each internal register;
step S108, sending a command CMD3 to each temperature sensor of the group through the communication interface, and writing theoretical temperature values Tpr1_ r and Tpr2_ r corresponding to (T1) DEG C and (T2) DEG C into registers of each temperature sensor;
step S109 calculates the calibration gain factor gn inside each temperature sensor. The internally executed formula is;
Figure BDA0002337678360000091
step S110, sending a command CMD4 to each temperature sensor of the group through the communication interface, and internally executing writing of the respective gain coefficients gn to the corresponding registers and nonvolatile memories;
step S111, waiting for at least one complete ADC conversion period, wherein the temperature value compensated by the respective gn is Tpr 3;
in step S112, the calibration offset coefficient os is calculated in each temperature sensor. The internally executed formula is:
os=Tpr2_r-Tpr3
step S113, sending a command CMD5 to each temperature sensor of the group through the communication interface, and internally executing writing of the respective bias coefficient os to the corresponding register and the nonvolatile memory;
and step S114, powering off the group of temperature sensors, and returning to step S106 until all the temperature sensors are measured.
As shown in fig. 3, the calibration method of the temperature sensor with the automatic calibration function when the gain coefficients of the plurality of temperature sensors are less than or equal to the preset value includes the following steps:
step S201, stabilizing the temperature of the test board to a third temperature value (T3) DEG C; in general, for the purpose of measuring accuracy, (T3) deg.C is not selected at normal temperature, for example, 40 deg.C for T3.
Step S202, electrifying a group of temperature sensors;
in this embodiment, multiple temperature sensors can be calibrated simultaneously.
Step S203, sending a command CMD6 to each temperature sensor of the group through the communication interface to realize the writing of the batch gain gn into the register and the nonvolatile memory of each temperature sensor;
step S204, waiting for the ADC to finish at least one conversion, wherein the current temperature measurement value Tpr4 of each temperature sensor; here, Tpr4 is the temperature value after compensation with the gain gn.
Step S205, sending a command CMD7 to each temperature sensor of the group through the communication interface, and writing a theoretical temperature value Tpr3_ r corresponding to (T3) DEG C into a register of each temperature sensor;
step S206, calculating a calibration offset coefficient os in each temperature sensor; the internally executed formula is:
os=Tpr3_r-Tpr4
step S207, sending a command CMD8 to each temperature sensor of the group through the communication interface, and writing each bias coefficient os into a corresponding register and a nonvolatile memory;
and S208, powering off the group of temperature sensors, and returning to S202 until all the temperature sensors are measured.
In the present embodiment, the commands CMD1 to CMD8 are batch commands, that is, identical commands are sent to each temperature sensor.
As shown in fig. 4, the step of temperature sensor temperature automatic compensation includes:
step S301, powering on, and automatically downloading calibration coefficients (gain gn and offset os) from a nonvolatile memory to respective gain and offset registers;
step S302, the ADC starts to convert once to obtain a conversion result ADC _ vault;
step S303, calibrating the ADC conversion result ADC _ value based on the respective gain and offset register values to obtain a calibrated temperature value Tpr, which is a calibration formula:
Tpr=adc_value*gn+os
where ADC _ value is the output of the analog-to-digital converter (ADC), the gain coefficient gn and the offset coefficient os are the outputs of the calibration coefficient register, and Tpr is the compensated temperature value;
and returning to the step S302 until the test is finished.
The automatic calibration method for the temperature sensor provided by the embodiment does not need manpower and a testing machine to participate in calculation in the whole calibration calculation process, only sends commands, has no requirements on the calculation capacity and the storage capacity of the testing machine, is very convenient for testing the temperature sensor, can be used for simultaneously testing more temperature sensors, and is very effective in improving the testing efficiency and saving the testing time.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (5)

1. A temperature sensor with an automatic calibration function is characterized by comprising a temperature sensitive device, an analog-to-digital converter, a temperature value compensation module, a temperature value register, a calibration coefficient calculation module, a programmable nonvolatile memory and a calibration coefficient register;
the analog-to-digital converter is connected with the temperature sensitive device and the temperature value compensation module and is used for converting an analog signal sampled by the temperature sensitive device into a digital signal and outputting the digital signal to the temperature value compensation module;
the temperature value compensation module is connected with the temperature value register and the calibration coefficient register, compensates the digital signal by using an output signal of the calibration coefficient register to obtain a compensated temperature value, and outputs the compensated temperature value to the temperature value register;
the temperature value register is connected with the calibration coefficient calculation module and the programmable nonvolatile memory and used for latching the current compensated temperature value and respectively outputting the current compensated temperature value to the calibration coefficient calculation module and the programmable nonvolatile memory;
the calibration coefficient calculation module is connected with the temperature register and the programmable nonvolatile memory and used for realizing calculation of a calibration coefficient and outputting the calibration coefficient to the programmable nonvolatile memory and the calibration coefficient register;
the programmable nonvolatile memory is used for storing the calibration coefficient and the actual temperature sampled by the temperature sensitive device before compensation;
the calibration coefficient register is connected with the calibration coefficient calculation module, the programmable nonvolatile memory and the temperature value compensation module, and is used for latching the current calibration coefficient and outputting the current calibration coefficient to the temperature value compensation module;
the temperature value compensation module comprises a multiplier and an adder;
the multiplier is used for realizing gain compensation;
the adder is used for offset compensation;
the compensation formula is as follows:
Tpr=adc_value*gn+os
wherein adc _ value is a digital signal output by the analog-to-digital converter, gn is a gain coefficient, os is a bias coefficient, and Tpr is a compensated temperature value;
when the gain coefficients of the plurality of temperature sensors are larger than a preset value, the calibration coefficient calculation module is used for calculating the gain coefficients and calculating the offset coefficients;
the gain factor gn calculation formula is as follows:
Figure FDA0002956501880000021
the temperature sensor comprises a temperature sensitive device, a temperature sensor and a controller, wherein Tpr1_ r and Tpr2_ r are theoretical temperature values at a first temperature and a second temperature sampled by the temperature sensitive device respectively, and Tpr1 and Tpr2 are actual temperature measurement values before compensation at;
the calculation formula of the bias coefficient os is as follows:
os=Tpr2_r-Tpr3
wherein Tpr3 is the actual temperature measurement value after gain compensation at the second temperature sampled by the temperature sensitive device;
when the gain coefficients of the plurality of temperature sensors are smaller than or equal to a preset value, the calibration coefficient calculation module is used for calculating a bias coefficient;
the calculation formula of the bias coefficient os is as follows:
os=Tpr3_r-Tpr4
wherein Tpr3_ r is a theoretical temperature value at the third temperature sampled by the temperature sensitive device, and Tpr4 is an actual temperature measurement value after gain compensation at the third temperature sampled by the temperature sensitive device;
the calibration coefficient calculation module is further used for taking a theoretical gain coefficient in the temperature sensor design as a gain coefficient in compensation.
2. The temperature sensor with auto-calibration function of claim 1, wherein the temperature sensor further comprises a communication interface module;
and the communication interface module is used for outputting the compensated temperature value to an external host and receiving a test command sent by the external host through a serial port or a parallel port.
3. A calibration method for a temperature sensor with an auto-calibration function, the calibration method being implemented by the temperature sensor with an auto-calibration function according to claim 1, the calibration method comprising:
s1, calculating a gain coefficient and a bias coefficient based on the temperature sampled by the temperature sensitive device;
and S2, performing temperature compensation calculation based on the calculated gain coefficient and the calculated bias coefficient.
4. The method for calibrating a temperature sensor with an auto-calibration function according to claim 3, wherein the calculating the gain factor and the offset factor based on the temperature sampled by the temperature sensitive device comprises:
when the gain coefficients of the plurality of temperature sensors are larger than a preset value, the calculating step comprises:
s01, stabilizing the test board to a first temperature;
s02, taking a plurality of temperature sensors as a group, and electrifying the temperature sensors;
s03, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at the first temperature;
s04, sending a first command to the plurality of temperature sensors through a communication interface, and writing actual temperature measurement values before compensation at the first temperature into programmable nonvolatile memories corresponding to the plurality of temperature sensors;
s05, powering off the plurality of temperature sensors, and returning to the step S02 until the plurality of groups of temperature sensors are measured;
s06, stabilizing the test board to a second temperature;
s07, electrifying the plurality of temperature sensors;
s08, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at the second temperature;
s9, sending a second command to the plurality of temperature sensors through a communication interface, and reading actual temperature measurement values before compensation at the second temperature from a programmable nonvolatile memory into internal registers corresponding to the plurality of temperature sensors;
s10, sending a third command to the plurality of temperature sensors through a communication interface, and respectively writing theoretical temperature values corresponding to the first temperature and the second temperature into calibration coefficient registers of the plurality of temperature sensors;
s11, the temperature sensors perform gain coefficient calculation and bias coefficient calculation through a calibration coefficient calculation module;
s12, sending a fourth command to the plurality of temperature sensors through the communication interface, and writing gain coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
s13, obtaining an actual temperature measurement value after gain compensation at a second temperature based on the obtained corresponding gain coefficients of the plurality of temperature sensors;
s14, calculating the bias coefficients of the plurality of temperature sensors according to the bias coefficient calculation formula to obtain the bias coefficients corresponding to the plurality of temperature sensors;
s15, sending a fifth command to the plurality of temperature sensors through the communication interface, and writing bias coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
s16, powering off the plurality of temperature sensors, and returning to the step S07 until the plurality of groups of temperature sensors are measured;
when the gain coefficients of the plurality of temperature sensors are less than or equal to a preset value, the calculating step includes:
s21, stabilizing the test board to a third temperature;
s22, electrifying the plurality of temperature sensors;
s23, sending a sixth command to the plurality of temperature sensors through the communication interface, and writing theoretical gain coefficients of the plurality of temperature sensors into calibration coefficient registers and nonvolatile memories corresponding to the plurality of temperature sensors;
s24, obtaining actual temperature measurement values compensated at a third temperature of the plurality of temperature sensors based on theoretical gain coefficients of the plurality of temperature sensors;
s25, sending a seventh command to the plurality of temperature sensors through the communication interface, and writing theoretical temperature values corresponding to a third temperature into calibration coefficient registers of the plurality of temperature sensors;
s26, calculating the bias coefficients of the plurality of temperature sensors according to the calculation formula of the bias coefficients to obtain the bias coefficients corresponding to the plurality of temperature sensors;
s27, sending an eighth command to the plurality of temperature sensors through the communication interface, and writing bias coefficients corresponding to the plurality of temperature sensors into corresponding calibration coefficient registers and nonvolatile memories;
and S28, powering down the plurality of temperature sensors, and returning to the step S22 until the plurality of groups of temperature sensors are measured.
5. The method for calibrating a temperature sensor having an automatic calibration function according to claim 3, wherein the step of calculating the temperature compensation based on the calculated gain coefficient and the calculated bias coefficient includes:
s31, electrifying a plurality of temperature sensors, and downloading the gain coefficients and the bias coefficients from a nonvolatile memory to calibration coefficient registers of the plurality of temperature sensors;
s32, the analog-to-digital converter converts a digital signal of an analog signal sampled by the temperature sensitive device to obtain an actual temperature measurement value before compensation at a fourth temperature;
and S33, calculating according to the compensation formula based on the gain coefficients and the bias coefficients corresponding to the plurality of temperature sensors to obtain an actual temperature measurement value compensated at a fourth temperature.
CN201911362923.0A 2019-12-26 2019-12-26 Temperature sensor with automatic calibration function and calibration method Active CN110954248B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911362923.0A CN110954248B (en) 2019-12-26 2019-12-26 Temperature sensor with automatic calibration function and calibration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911362923.0A CN110954248B (en) 2019-12-26 2019-12-26 Temperature sensor with automatic calibration function and calibration method

Publications (2)

Publication Number Publication Date
CN110954248A CN110954248A (en) 2020-04-03
CN110954248B true CN110954248B (en) 2021-05-07

Family

ID=69984121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911362923.0A Active CN110954248B (en) 2019-12-26 2019-12-26 Temperature sensor with automatic calibration function and calibration method

Country Status (1)

Country Link
CN (1) CN110954248B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210153240A (en) 2020-06-10 2021-12-17 에스케이하이닉스 주식회사 Temperature sensor and method for controlling the thereof
CN112462740B (en) * 2020-11-25 2022-04-22 中国兵器工业集团第二一四研究所苏州研发中心 Temperature compensation calibration method for Stirling refrigerator controller
CN113267264B (en) * 2021-05-23 2023-04-14 山东英信计算机技术有限公司 Temperature detection method, system, equipment and medium of temperature sensor
CN113503988B (en) * 2021-07-09 2022-12-23 苏州纳芯微电子股份有限公司 Temperature sensor calibration method and system and temperature sensor
CN114265376B (en) * 2021-12-07 2023-09-01 中国电子科技集团公司第四十八研究所 ZMD31050 chip debugging method and batch debugging system
CN116448264B (en) * 2023-02-01 2023-09-19 苏州聚元微电子股份有限公司 Temperature sensor, temperature measuring method and chip

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7340366B2 (en) * 2004-03-04 2008-03-04 Atmel Corporation Method and apparatus of temperature compensation for integrated circuit chip using on-chip sensor and computation means
US7102417B2 (en) * 2004-11-05 2006-09-05 International Business Machines Corporation Integrated circuit die including a temperature detection circuit, and system and methods for calibrating the temperature detection circuit
CN203241127U (en) * 2013-04-08 2013-10-16 北京农业信息技术研究中心 Electronic scale with temperature auto-compensation, and calibration system
JP2016031274A (en) * 2014-07-29 2016-03-07 日本電気株式会社 Digital temperature sensor using resistance change element, and controller
CN104935535B (en) * 2015-04-17 2019-01-18 中国电子科技集团公司第四十一研究所 A kind of adaptive modulation bandwidth I/Q modulation error digital compensation method and system greatly
CN110501094A (en) * 2019-09-05 2019-11-26 珠海格力电器股份有限公司 Fault detection and calibration method for electric appliance temperature sensor, air conditioner and computer readable storage medium

Also Published As

Publication number Publication date
CN110954248A (en) 2020-04-03

Similar Documents

Publication Publication Date Title
CN110954248B (en) Temperature sensor with automatic calibration function and calibration method
US7340366B2 (en) Method and apparatus of temperature compensation for integrated circuit chip using on-chip sensor and computation means
US7440330B2 (en) Semiconductor memory device
US7863876B2 (en) Built-in self-calibration (BISC) technique for regulation circuits used in non-volatile memory
JP6359589B2 (en) Calibration of analog to digital converter devices
US7539075B2 (en) Implementation of a fusing scheme to allow internal voltage trimming
US20050285954A1 (en) Apparatus and method for determining temperature of an active pixel imager and correcting temperature induced variations in an imager
US20070007942A1 (en) Automatic non-linear phase response calibration and compensation for a power measurement device
CN106873703A (en) Circuit and method for producing reference voltage based on temperature coefficient
US20120290236A1 (en) Battery condition detecting apparatus
TWI580194B (en) Chip having self-calibration mechanism and calibration method thereof
US11536773B2 (en) Digital correction algorithms to improve battery voltage measurement accuracy
CN114675074B (en) VDDA correction device and correction method of MCU
CN114035024B (en) Real-time clock chip testing system and method
CN114826156A (en) Method, device, equipment and storage medium for adjusting output frequency of oscillator circuit
US8922408B2 (en) Semiconductor device
CN117614449B (en) Correction method for ADC internal reference power supply, MCU chip and storage medium
US20240319280A1 (en) Calibration of circuitry parameters for current sensing
CN111934636B (en) Attenuator calibration device and method
CN114440934B (en) Temperature compensation method, device, equipment and storage medium for measurement result
US12063050B2 (en) Analog-to-digital converter and method for calibrating the same, method for calibrating a pipelined analog-to-digital converter, receiver, base station and mobile device
CN117053950A (en) Calibration of CMOS temperature sensor
CN117254811A (en) Successive approximation type analog-to-digital converter, and calibration method and medium for capacitor array of successive approximation type analog-to-digital converter
CN116106811A (en) Error calibration method and system for multichannel voltage acquisition chip
CN118584419A (en) High-low temperature precision compensation method for intelligent electric energy meter and acquisition terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant