A temperature sensor based on voltage-frequency conversion and a compensation method

By using a voltage-frequency conversion-based temperature sensor, a dual-channel chopper module and a process corner signal output module, combined with an error compensation module, the temperature measurement error caused by process corner changes is solved, improving measurement accuracy and stability, and reducing chip manufacturing deviations and compensation costs.

CN121898641BActive Publication Date: 2026-05-26SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
Filing Date
2026-03-25
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing temperature sensors exhibit digital code deviations at different process angles, leading to reduced temperature measurement accuracy and increased costs, and making it difficult to effectively avoid errors caused by process angle changes.

Method used

A temperature sensor based on voltage-frequency conversion is used. By setting up a dual-channel chopper module and a process angle signal output module, combined with an error compensation module, accurate compensation is achieved for different process angles, reducing matching errors and loop delay deviations.

Benefits of technology

It significantly improves the measurement accuracy and stability of temperature sensors under different process angles, avoids digital code deviation caused by process angle changes, and reduces performance loss and off-chip compensation overhead caused by chip manufacturing deviations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121898641B_ABST
    Figure CN121898641B_ABST
Patent Text Reader

Abstract

This invention provides a temperature sensor and compensation method based on voltage-frequency conversion, belonging to the field of electronic circuit technology. It includes: a temperature front-end module, a first chopper module, a frequency converter module, a second chopper module, a first counter module, a second counter module, an error compensation module, a process corner signal output module, a full-scale detection module, and an output latch module. This invention reduces matching errors through a dual-channel chopper structure and effectively suppresses measurement deviations caused by different loop delays and comparator offsets of the voltage-frequency converter at different process corners by combining process corner compensation technology. This significantly improves the temperature measurement accuracy and stability of the sensor at different process corners.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electronic circuit technology, and particularly relates to a temperature sensor based on voltage-frequency conversion and a compensation method. Background Technology

[0002] Temperature is one of the most ubiquitous physical quantities in nature, having a significant impact on production and daily life. Temperature sensors convert this physical signal into an electrical signal, making it easy to observe and measure; today, they are widely used in various fields such as healthcare, agriculture, wearable devices, and industrial control.

[0003] Current voltage-to-frequency digital temperature detection solutions can significantly reduce the complexity of analog circuits and help to reduce chip size and system power consumption; however, they also often face some challenges, such as the high sensitivity of the chip to process angle changes and limited accuracy.

[0004] In the field of integrated circuits, process corner refers to the deviation in circuit performance and characteristics caused by changes in material properties, process parameters, and environmental conditions during chip manufacturing. Process corners are typically categorized into several different types based on performance differences and process conditions:

[0005] TT (Typical) Typical): Indicates performance under typical process conditions;

[0006] FF (Fast) Fast): This indicates that the transistor switches at a relatively fast speed under optimal process conditions;

[0007] SS (Slow) Slow): This indicates that under worst-case process conditions, the switching speed of the transistor is relatively slow.

[0008] Under different process angles, the digital code containing temperature information output by traditional time-domain temperature sensors has a large deviation, which reduces the accuracy of temperature measurement and increases the cost of fitting the digital code to the temperature curve during temperature conversion.

[0009] In summary, avoiding temperature measurement errors caused by digital code deviations due to process angle changes is a technical problem that urgently needs to be solved in the design of temperature sensors. Summary of the Invention

[0010] To address the aforementioned shortcomings in the prior art, this invention provides a temperature sensor and compensation method based on voltage-frequency conversion, which solves the problems of existing temperature sensors being unable to avoid temperature measurement errors caused by digital code deviations due to process angle changes, and the difficulty in accurately compensating for these errors.

[0011] To achieve the above objectives, the technical solution adopted by the present invention is as follows: On one hand, a temperature sensor based on voltage-frequency conversion is provided, comprising:

[0012] Temperature front-end module, first chopper module, frequency converter module, second chopper module, first counter module, second counter module, error compensation module, process corner signal output module, full scale detection module, and output latch module;

[0013] The temperature front-end module, the first chopper module, the frequency converter module, and the second chopper module are connected in sequence; the second chopper module is connected to the first counter module and the second counter module respectively; the first counter module is connected to the error compensation module and the output latch module respectively; the error compensation module is connected to the process corner signal output module and the output latch module respectively; the second counter module is connected to the first chopper module, the second chopper module, the full-scale detection module, and the output latch module respectively; the full-scale detection module is connected to the output latch module.

[0014] Furthermore, the temperature front-end module is used to generate a first voltage signal and a second voltage signal by utilizing the characteristic that the voltage difference between the base and the emitter is proportional to the current density.

[0015] The first chopper module is used to switch, establish a path for the first voltage signal and the second voltage signal to be input to the frequency converter module, and perform periodic switching.

[0016] The frequency converter module, based on the path established by the first chopper module, is used to convert the first voltage signal and the second voltage signal into corresponding first frequency signal and second frequency signal.

[0017] The second chopper module is used to switch, establish a path for the first frequency signal input to the first counter module, and a path for the second frequency signal input to the second counter module, and perform periodic switching.

[0018] The first counter module is used to count the first frequency signal and obtain a first counting result;

[0019] The second counter module is used to count the second frequency signal to obtain a second counting result;

[0020] The process angle signal output module, in response to the activation of the trigger signal, is used to obtain the current process angle signal based on the status of a preset number of control signals, combined with the current level, and using a preset process angle judgment rule.

[0021] The error compensation module is used to compensate the first counting result by writing the pre-calculated process angle compensation value according to the current process angle signal, so as to obtain the compensated counting result.

[0022] The full-scale detection module, in response to the second counting result reaching full scale, is used to output a latch signal;

[0023] The output latch module, in response to a valid trigger signal, is used to latch and output a compensated count result according to the latch signal, and to clear the first count result of the first counter to zero.

[0024] The beneficial effects of this invention are as follows: By setting up a dual-channel chopper module structure based on voltage-frequency conversion, this invention reduces matching error. Combined with the process angle signal output module, it suppresses the measurement deviation caused by the different loop delay and comparator offset of the voltage-frequency converter under different process angles. This significantly improves the temperature measurement accuracy and stability of the sensor under different process angles and avoids temperature measurement errors caused by digital code deviation due to process angle changes.

[0025] Furthermore, the frequency converter module includes a first frequency converter and a second frequency converter;

[0026] The first frequency converter is used to convert the first voltage signal into a first frequency signal;

[0027] The second frequency converter is used to convert the second voltage signal into a second frequency signal.

[0028] Furthermore, the process corner signal output module is specifically a process corner signal output circuit, including: a first PMOS transistor MP1, a second PMOS transistor MP2, a first NMOS transistor MN1, a second NMOS transistor MN2, a first inverter I1, a second inverter I2, a third inverter I3, a fourth inverter I4, a fifth inverter I5, a sixth inverter I6, a seventh inverter I7, a first NOR gate O1, a second NOR gate O2, and a third NOR gate O3;

[0029] The source of the first PMOS transistor MP1 is connected to the source of the second PMOS transistor MP2 and the power supply, respectively. The drain of the first PMOS transistor MP1 is connected to the gate of the first PMOS transistor MP1, the drain of the first NMOS transistor MN1, the gate of the first NMOS transistor MN1, and the input terminal of the first inverter I1, respectively.

[0030] The drain of the second PMOS transistor MP2 is connected to the gate of the second PMOS transistor MP2, the drain of the second NMOS transistor MN2, the gate of the second NMOS transistor MN2, and the input terminal of the fourth inverter I4, respectively; the source of the first NMOS transistor MN1 is connected to the source of the second NMOS transistor MN2 and grounded.

[0031] The output terminal of the first inverter I1 is connected to the input terminal of the second inverter I2, the output terminal of the second inverter I2 is connected to the input terminal of the third inverter I3, and the output terminal of the third inverter I3 is connected to the input terminal of the sixth inverter I6, the A input terminal of the second NOR gate O2, and the A input terminal of the third NOR gate O3, respectively.

[0032] The output terminal of the fourth inverter I4 is connected to the input terminal of the fifth inverter I5, and the output terminal of the fifth inverter I5 is connected to the input terminal of the seventh inverter I7, the B input terminal of the first NOR gate O1, and the B input terminal of the second NOR gate O2, respectively.

[0033] The output of the sixth inverter I6 is connected to the A input of the first NOR gate O1, and the output of the seventh inverter I7 is connected to the B input of the third NOR gate O3.

[0034] The output terminal of the first NOR gate O1 is the second output signal K2, the output terminal of the second NOR gate O2 is the first output signal K1, and the output terminal of the third NOR gate O3 is the third output signal K3. The first output signal K1, the second output signal K2, and the third output signal K3 are connected to the error compensation module.

[0035] The beneficial effects of the above-mentioned further solution are as follows: By setting the width-to-length ratio of the MOS transistor in the process corner signal output module, the present invention enables the output voltage to change according to the process corner, and amplifies the changing voltage through an inverter, thereby realizing the digitization of the process corner and improving the controllability of the circuit.

[0036] Furthermore, the error compensation module is specifically an error compensation circuit, including: a 14-bit adder, a 14-bit subtractor, an eighth inverter I8, an AND gate A1, a first 2-to-1 selector, and a second 2-to-1 selector.

[0037] The input of the 14-bit adder is connected to the input of the 14-bit subtractor, the second input of the second 2-to-1 selector, and the first counter module, respectively.

[0038] The output of the 14-bit adder is connected to the first input of the first 2-to-1 multiplexer; the output of the 14-bit subtractor is connected to the second input of the first 2-to-1 multiplexer.

[0039] The input terminal of the eighth inverter I8 is connected to the second output signal K2 of the process corner signal output circuit. The output terminal of the eighth inverter I8 is connected to the first input terminal of the AND gate A1. The second input terminal of the AND gate A1 is connected to the third output signal K3 of the process corner signal output circuit. The output terminal of the AND gate A1 is connected to the control terminal of the first two-to-one selector.

[0040] The control terminal of the second 2-to-1 selector is connected to the first output signal K1 of the process corner signal output circuit, the output terminal of the first 2-to-1 selector is connected to the first input terminal of the second 2-to-1 selector, and the output terminal of the second 2-to-1 selector is connected to the output latch module.

[0041] The beneficial effects of the above-mentioned further solutions are as follows: By combining the process output signal module and the error compensation module, the present invention realizes on-chip compensation technology, reduces the performance loss of the chip caused by manufacturing process deviation, and reduces the additional overhead caused by traditional off-chip compensation, thereby improving yield and manufacturing robustness.

[0042] On the other hand, a temperature sensor compensation method based on voltage-frequency conversion is provided, including the following steps:

[0043] S1. Based on the temperature front-end module, the first voltage signal and the second voltage signal are obtained by utilizing the characteristic that the voltage difference between the base and the emitter is proportional to the current density. The first chopper module is then used to input the first voltage signal and the second voltage signal to the frequency converter module for frequency conversion to obtain the first frequency signal and the second frequency signal.

[0044] S2. Using the second chopper module, the first frequency signal is input to the first counter module for counting, and the second frequency signal is input to the second counter module for counting, to obtain the first counting result and the second counting result respectively;

[0045] S3. Based on the temperature sensor, obtain the delay offset voltage set, and according to the preset process angle, use the process angle signal output module to obtain the compensation value, the actual first ratio expression and the temperature linear fitting formula by distinguishing the current process angle.

[0046] S4. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result. Based on the second counting result, the full-scale detection module is used to obtain the latch signal and latch it. Based on the compensated counting result, the actual output temperature is calculated through the actual first ratio expression and the temperature linear fitting formula, thus completing the temperature sensor compensation.

[0047] The beneficial effects of the above-mentioned further solution are as follows: The present invention connects the first counting result to the error compensation module, writes the compensation value calculated after simulation into the error compensation module, and then performs directional compensation and outputs the result through the process corner selection signal; specifically it is aimed at and applicable to temperature sensors based on voltage-frequency converters. By establishing an error model related to process corner and loop delay, and combining it with the process corner compensation circuit, the measurement accuracy, stability and process robustness of the temperature sensor in the whole temperature range are significantly improved.

[0048] Further, S3 includes the following steps:

[0049] S301. Based on the counting error of the temperature sensor measurement process, obtain a set of delay offset voltages, including the offset voltage of the comparator and the overcharge voltage caused by the delay.

[0050] S302. Based on the first voltage signal and the second voltage signal, a first ratio value is obtained by comparing the first voltage signal and the second voltage signal;

[0051] S303. Based on the second voltage signal and the difference between the first voltage signal and the second voltage signal, and combined with the correction coefficient, a temperature-independent reference signal and a temperature-approximately linearly negatively correlated signal are obtained.

[0052] S304. By comparing the temperature-independent reference signal with the temperature-approximately linearly negatively correlated signal, a second ratio is obtained, and a temperature linear fitting formula is obtained through linear fitting.

[0053] S305. Based on the delay offset voltage set, design the actual first ratio expression;

[0054] S306. Based on the preset process angle, the current process angle signal is obtained using the process angle signal output module. The compensation value is calculated by obtaining the difference in delay error between each process angle other than the current process angle and the current process angle.

[0055] Furthermore, the expression for the second ratio is as follows:

[0056] ;

[0057] in, This represents the second ratio. This indicates a temperature-independent reference signal. This indicates a signal with an approximately linear negative correlation to temperature. This represents the correction factor. Indicates the second voltage signal. This represents the base-collector voltage. Indicates the first ratio;

[0058] The expression for the compensation value is as follows:

[0059] ;

[0060] in, Indicates the compensation value. This represents the difference in delay error between each process angle and the current process angle. This indicates the time of one temperature measurement cycle.

[0061] The beneficial effects of the above-mentioned further solutions are as follows: the present invention calculates the value that needs to be compensated in advance through simulation, realizes error pre-writing, and reduces the probability of rework due to errors in the future.

[0062] Furthermore, step S4 includes the following steps:

[0063] S401. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result;

[0064] S402. In response to the second counting result reaching full scale, a latch signal is obtained using the full scale detection module.

[0065] S403. In response to the trigger signal being valid, latch the data according to the latch signal, output the compensation counting result, and clear the first counting result to zero.

[0066] S404. The actual first ratio is calculated based on the formula for the actual first ratio and the compensation counting results.

[0067] S405. Substitute the actual first ratio into the temperature linear fitting formula to calculate the actual output temperature, thus completing the temperature sensor compensation.

[0068] Furthermore, the temperature linear fitting formula is as follows:

[0069] ;

[0070] ;

[0071] ;

[0072] in, This indicates the actual output temperature. This represents the second ratio. Indicates the gain coefficient. Indicates the offset coefficient. This represents the correction factor. This represents the actual first ratio. This indicates the result of the compensation count. This indicates the first counting result. This represents the compensation value.

[0073] The beneficial effects of the above-mentioned further solutions are as follows: By deeply integrating the compensation technology with the temperature linear fitting formula on-chip, the present invention not only eliminates the off-chip compensation link, but also achieves triple optimization of accuracy, cost and integration at the system architecture level. Attached Figure Description

[0074] Figure 1 This is a topological diagram of the temperature sensor structure of the present invention.

[0075] Figure 2 This is a schematic block diagram of the temperature sensor in this embodiment.

[0076] Figure 3 This is a schematic diagram of the process corner signal output circuit in this embodiment.

[0077] Figure 4 This is a schematic diagram of the error compensation circuit in this embodiment.

[0078] Figure 5 This is a flowchart of the method in this embodiment.

[0079] Figure 6 This is a schematic diagram illustrating the sources of error in this embodiment. Detailed Implementation

[0080] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.

[0081] Before describing this embodiment, the following terms will be explained:

[0082] BJT: Bipolar Junction Transistor;

[0083] RS flip-flop: Reset set flip-flop;

[0084] CMOS: Complementary Metal-Oxide-Semiconductor.

[0085] Example 1

[0086] like Figure 1 As shown, the present invention provides a temperature sensor based on voltage-frequency conversion, comprising:

[0087] Temperature front-end module, first chopper module, frequency converter module, second chopper module, first counter module, second counter module, error compensation module, process corner signal output module, full scale detection module, and output latch module;

[0088] The temperature front-end module, the first chopper module, the frequency converter module, and the second chopper module are connected in sequence; the second chopper module is connected to the first counter module and the second counter module respectively; the first counter module is connected to the error compensation module and the output latch module respectively; the error compensation module is connected to the process corner signal output module and the output latch module respectively; the second counter module is connected to the first chopper module, the second chopper module, the full-scale detection module, and the output latch module respectively; the full-scale detection module is connected to the output latch module.

[0089] In this embodiment, as Figure 2 As shown, the temperature front-end module specifically adopts a temperature sensing front-end, which utilizes the characteristic that the voltage difference between the base and emitter is proportional to the current density to generate a first voltage signal and a second voltage signal related to temperature, thereby converting temperature information into a voltage signal.

[0090] The frequency converter module includes a first voltage-frequency converter and a second voltage-frequency converter. Its input terminal is connected to the first voltage signal and the second voltage signal respectively through a first chopper circuit, and is used to convert the voltage signal into the corresponding first frequency signal and the second frequency signal.

[0091] The first counter module and the second counter module have their input terminals connected to the first frequency signal and the second frequency signal respectively through the second chopper circuit, and are used to count the frequency signals.

[0092] The first chopper module is used to switch the path of the first voltage signal and the second voltage signal input to the first voltage-frequency converter and the second voltage-frequency converter periodically.

[0093] The second chopper module is used to switch the switch, establish the path from the first frequency signal input to the first counter module, and the path from the second frequency signal input to the second counter module, and perform periodic switching.

[0094] The error compensation module is used to perform compensation calculations on the results of the first counter.

[0095] A process corner signal output module is used to connect the input terminal of the error compensation circuit to the output terminal of the first counter, the output terminal of the full-scale detection circuit, and the output terminal of the process signal output circuit, and is used to perform compensation calculation on the current count value of the first counter when the trigger signal is valid.

[0096] The full-scale detection module has its input terminal connected to the output terminal of the second counter, and outputs a latch signal when the second counter reaches full scale.

[0097] The output latch module has its input connected to the output of the error compensation module and the output of the full-scale detection module. It is used to latch and output the compensated count value when the trigger signal is valid. At the same time, the trigger signal is also used to clear the first counter.

[0098] In this embodiment, as Figure 2 As shown, the highest bit Q13 of the second counter module needs to be connected to the second chopper module to transmit the half-range signal to the first chopper module and the second chopper module.

[0099] When Q13=0, the chopper circuits of the first chopper module and the second chopper module do not switch input and output;

[0100] When Q13=1, the chopper circuits of the first chopper module and the second chopper module switch input and output;

[0101] Figure 2 In the circuit, VBE1 and VBE2 are temperature-sensitive front-end output voltages with temperature characteristics, F1 and F2 are frequency signals output by the voltage-to-frequency converter, Q0~Q13 in the first counter module and the second counter module are counting signal input terminals, Reset is the reset signal input terminal, and D in the output latch module is the data input terminal, CLK is the clock input terminal, and R is the reset signal input terminal.

[0102] In this embodiment, the process corner signal output module is specifically a process corner signal output circuit, such as... Figure 3 As shown, it includes:

[0103] The first PMOS transistor MP1, the second PMOS transistor MP2, the first NMOS transistor MN1, the second NMOS transistor MN2, the first inverter I1, the second inverter I2, the third inverter I3, the fourth inverter I4, the fifth inverter I5, the sixth inverter I6, the seventh inverter I7, the first NOR gate O1, the second NOR gate O2, and the third NOR gate O3;

[0104] The source of the first PMOS transistor MP1 is connected to the source of the second PMOS transistor MP2 and the power supply, respectively. The drain of the first PMOS transistor MP1 is connected to the gate of the first PMOS transistor MP1, the drain of the first NMOS transistor MN1, the gate of the first NMOS transistor MN1, and the input terminal of the first inverter I1, respectively.

[0105] The drain of the second PMOS transistor MP2 is connected to the gate of the second PMOS transistor MP2, the drain of the second NMOS transistor MN2, the gate of the second NMOS transistor MN2, and the input terminal of the fourth inverter I4, respectively; the source of the first NMOS transistor MN1 is connected to the source of the second NMOS transistor MN2 and grounded.

[0106] The output terminal of the first inverter I1 is connected to the input terminal of the second inverter I2, the output terminal of the second inverter I2 is connected to the input terminal of the third inverter I3, and the output terminal of the third inverter I3 is connected to the input terminal of the sixth inverter I6, the A input terminal of the second NOR gate O2, and the A input terminal of the third NOR gate O3, respectively.

[0107] The output terminal of the fourth inverter I4 is connected to the input terminal of the fifth inverter I5, and the output terminal of the fifth inverter I5 is connected to the input terminal of the seventh inverter I7, the B input terminal of the first NOR gate O1, and the B input terminal of the second NOR gate O2, respectively.

[0108] The output of the sixth inverter I6 is connected to the A input of the first NOR gate O1, and the output of the seventh inverter I7 is connected to the B input of the third NOR gate O3.

[0109] The output terminal of the first NOR gate O1 is the second output signal K2, the output terminal of the second NOR gate O2 is the first output signal K1, and the output terminal of the third NOR gate O3 is the third output signal K3. The first output signal K1, the second output signal K2, and the third output signal K3 are connected to the error compensation module.

[0110] In this embodiment, the process effect is utilized, as slow NMOS and fast PMOS transistors cause an increase in current, while fast NMOS and slow PMOS devices cause a decrease in current.

[0111] Because the aspect ratio of the first PMOS transistor is smaller than that of the first NMOS transistor, and the aspect ratio of the second PMOS transistor is equal to that of the first NMOS transistor, and the aspect ratio of the second PMOS transistor is smaller than that of the second NMOS transistor; crucially, the aspect ratio of the second PMOS transistor is equal to that of the first NMOS transistor, and this aspect ratio can be adjusted between the aspect ratio of the first PMOS transistor and the aspect ratio of the second NMOS transistor, so that the output voltages of both channels carry process corner signals;

[0112] When the circuit is in the TT process corner, the outputs of input terminals A and B are low level.

[0113] When the circuit is in the FF process corner, due to the different width-to-length ratio, the current reduction of the first NMOS transistor is smaller than that of the first PMOS transistor. Therefore, it is necessary to increase the gate-source voltage of the first NMOS transistor. After processing by the first inverter, the second inverter, and the third inverter, the output of input A is high level. At the same time, due to the limitation of the width-to-length ratio, the output of input B is low level.

[0114] Similarly, when the circuit is in the SS process corner, due to the different width-to-length ratio, the current increase of the first NMOS transistor is greater than that of the first PMOS transistor. Therefore, it is necessary to reduce the gate-source voltage of the first NMOS transistor. After processing by the fourth and fifth inverters, the output of the B input terminal is high level. At the same time, due to the limitation of the width-to-length ratio, the output of the A input terminal is low level.

[0115] The states of input terminals A and B are output. After combinational logic operations of NOR gates and inverters, only K1 is high at the TT process corner, only K2 is high at the FF process corner, and only K3 is high at the SS process corner.

[0116] In this embodiment, the error compensation module is specifically an error compensation circuit, such as... Figure 4 As shown, it includes: a 14-bit adder, a 14-bit subtractor, an eighth inverter I8, an AND gate A1, a first 2-to-1 selector, and a second 2-to-1 selector;

[0117] The input of the 14-bit adder is connected to the input of the 14-bit subtractor, the second input of the second 2-to-1 selector, and the first counter module, respectively.

[0118] The output of the 14-bit adder is connected to the first input of the first 2-to-1 multiplexer; the output of the 14-bit subtractor is connected to the second input of the first 2-to-1 multiplexer.

[0119] The input terminal of the eighth inverter I8 is connected to the second output signal K2 of the process corner signal output circuit. The output terminal of the eighth inverter I8 is connected to the first input terminal of the AND gate A1. The second input terminal of the AND gate A1 is connected to the third output signal K3 of the process corner signal output circuit. The output terminal of the AND gate A1 is connected to the control terminal of the first two-to-one selector.

[0120] The control terminal of the second 2-to-1 selector is connected to the first output signal K1 of the process corner signal output circuit; the output terminal of the first 2-to-1 selector is connected to the first input terminal of the second 2-to-1 selector; the output terminal of the second 2-to-1 selector is connected to the output latch module.

[0121] The error compensation circuit is designed to compensate the output of the first counter. First, the voltage waveform during the charging phase of the voltage-frequency converter is simulated and analyzed to obtain the difference in peak pulse time under different process angles and the TT process angle, and then the compensation value is obtained by substituting it into the compensation value expression.

[0122] The expression for the compensation value is as follows:

[0123] ;

[0124] in, Indicates the compensation value. This represents the time of one temperature measurement cycle. This represents the compensation count result, which is the first count result. The value after compensation This represents the difference in delay error between each process angle and the current process angle;

[0125] Figure 4 middle This is the compensation value under the FF process angle. This is the compensation value under the SS process angle.

[0126] In this embodiment, the voltage-to-frequency converter converts the voltage signal containing temperature information into a frequency signal; the counter converts the frequency signal into a digital signal; since the voltage-to-frequency signal deviates at different process angles, the process angle compensation circuit in the temperature sensor adjusts the digital code affected by the process angle change, so that the digital code at different process angles has consistency.

[0127] In this embodiment, the temperature front-end module preferably uses a PNP bipolar transistor as the temperature sensing core, the first chopper module preferably uses a CMOS analog switch array, the frequency converter module preferably uses a voltage-frequency conversion circuit with a voltage-type dual comparator structure, the second chopper module preferably uses a CMOS analog switch array, the first counter module preferably uses a 14-bit binary counter, the second counter module preferably uses a 14-bit binary counter, the full-scale detection module preferably uses a 14-bit AND gate array, and the output latch module preferably uses a 14-bit D-type latch. Tables 1 and 2 are the main wiring tables between the modules.

[0128] Table 1

[0129]

[0130] Table 2

[0131]

[0132] In this embodiment, the temperature sensing front-end module outputs analog signals VBE1 and VBE2 under the influence of temperature. These signals are input to the first chopper module for signal exchange, and then output to two frequency converter modules. The generated frequency signals F1 and F2 are exchanged through the second chopper module and output to the first and second counter modules for frequency counting. The first counter module inputs the counting result Q1<0:13> of the F1 frequency signal to the error compensation module. The process corner signal output module sends the process corner information to the error compensation module through K1, K2, and K3. After compensation calculation, the error compensation module outputs P<0:13> to the output latch module. Simultaneously, the second counter module counts the F2 frequency signal and sends the result Q2<0:13> to the full-scale detection module. The full-scale detection module generates a latch signal to control the output latch module to latch and output the compensated signal. Finally, the output latch module outputs the D<0:13> digital signal, thus completing the entire signal acquisition, conversion, compensation, and output process.

[0133] Example 2

[0134] like Figure 5 As shown, the present invention provides a temperature sensor compensation method based on voltage-frequency conversion, applied to a temperature sensor based on voltage-frequency conversion as described in Example 1, and its implementation method is as follows:

[0135] S1. Based on the temperature front-end module, the first voltage signal and the second voltage signal are obtained by utilizing the characteristic that the voltage difference between the base and the emitter is proportional to the current density. The first chopper module is then used to input the first voltage signal and the second voltage signal to the frequency converter module for frequency conversion to obtain the first frequency signal and the second frequency signal.

[0136] In this embodiment, based on the temperature front-end module, utilizing the characteristic that the voltage difference between the base and emitter is proportional to the current density, a temperature-related voltage is output at the temperature sensing front-end: a first voltage signal. Second voltage signal Specifically:

[0137] The temperature sensing front end uses a PNP bipolar transistor as the temperature sensing element. Temperature detection is achieved by utilizing the characteristic that the base-emitter voltage difference is proportional to the current density. The calculation expression for the base-emitter voltage of the bipolar transistor is as follows:

[0138] ;

[0139] in, This represents the base-collector voltage. This represents the thermal voltage, which is 26mV at room temperature and is positively correlated with temperature. Represents collector current, Indicates saturation current;

[0140] Obtain the first voltage signal Second voltage signal ;

[0141] When the emitter junction of a BJT is forward biased and the collector junction is reverse biased, the BJT operates in the forward amplification region, and the collector current of the BJT... With base-collector voltage The collector current exhibits an exponential relationship. The calculation expression is as follows:

[0142] ;

[0143] in, Represents the non-ideal coefficient, in It can take values ​​between these ranges.

[0144] S2. Using the second chopper module, the first frequency signal is input to the first counter module for counting, and the second frequency signal is input to the second counter module for counting, to obtain the first counting result and the second counting result respectively.

[0145] S3. Based on the temperature sensor, obtain the delay offset voltage set, and according to the preset process angle, use the process angle signal output module to obtain the compensation value, the actual first ratio expression, and the temperature linear fitting formula by distinguishing the current process angle. The specific steps are as follows:

[0146] S301. Based on the counting error of the temperature sensor measurement process, obtain a set of delay offset voltages, including the offset voltage of the comparator and the overcharge voltage caused by the delay.

[0147] In this embodiment, the counting error of the temperature sensor originates from the different loop delays of the voltage-frequency converter at different process corners and the different comparator offsets; assuming that the loop delay from the comparator to the RS trigger path is the first loop delay. The comparator input is the first voltage signal. The delay relative to the comparator input to the second voltage signal The delay is the second loop delay. The comparator's offset voltage is And calculate the overcharge voltage caused by the delay. The expression is as follows:

[0148] ;

[0149] in, Indicates the capacitance value of the charging capacitor; the offset voltage of the integrated comparator. and overcharge voltage caused by delay This yields the delayed offset voltage set.

[0150] S302. Based on the first voltage signal and the second voltage signal, a first ratio value is obtained by comparing the first voltage signal and the second voltage signal;

[0151] S303. Based on the second voltage signal and the difference between the first voltage signal and the second voltage signal, and combined with the correction coefficient, a temperature-independent reference signal and a temperature-approximately linearly negatively correlated signal are obtained.

[0152] S304. By comparing the temperature-independent reference signal with the temperature-approximately linearly negatively correlated signal, a second ratio is obtained, and a temperature linear fitting formula is obtained through linear fitting.

[0153] S305. Based on the delay offset voltage set, design the actual first ratio expression.

[0154] In this embodiment, the first voltage signal With the second voltage signal By making a comparison, we obtain the first ratio. ;

[0155] When the BJT is connected in diode form, the non-ideal factor A value of 1 is obtained, thus the first voltage signal is received. With the second voltage signal The ratio is expressed as follows:

[0156] ;

[0157] in, This indicates the current ratio of the transistors used to generate two voltages at the temperature sensing front end; in this embodiment, it is used... ;

[0158] In this case, the first ratio It can counteract saturation current The introduced nonlinearity ensures that the mismatch between the two BJTs and their bias current sources is small, thereby improving chip consistency and reducing the nonlinearity of the voltage-temperature characteristic curve.

[0159] In this embodiment, temperature measurement requires two different signals: a temperature-independent reference signal that is independent of temperature. The difference between the first voltage signal and the second voltage signal can be used. Second voltage signal The linear combination of these is obtained, i.e., the bandgap reference voltage. The first voltage signal With the second voltage signal The difference is approximately linearly negatively correlated with temperature. It can be made by a PNP transistor. Generate a temperature-independent reference signal. Second reference signal The calculation expression is shown below:

[0160] ;

[0161] ;

[0162] in, This represents the correction factor. This represents the difference between the first voltage signal and the second voltage signal;

[0163] Temperature-independent reference signal The signal is approximately linearly negatively correlated with temperature. The ratio is defined as the second ratio. The second ratio is obtained. The calculation expression is as follows:

[0164] ;

[0165] Due to the first ratio Since it has a linear relationship with temperature, a linear fitting formula for temperature can be obtained through linear fitting, as shown in the following expression:

[0166] ;

[0167] in, This represents the fitted output temperature. Indicates the gain coefficient. This represents the offset coefficient.

[0168] In this embodiment, the actual first voltage signal is designed based on the delay offset voltage set. and the actual second voltage signal The actual first ratio The expression is as follows:

[0169] ;

[0170] ;

[0171] in, This indicates the overcharge voltage caused by the delay. This represents the offset voltage of the comparator. This indicates the first counting result. This represents the compensation value.

[0172] S306. Based on the preset process angle, the current process angle signal is obtained using the process angle signal output module. The compensation value is calculated by obtaining the difference in delay error between each process angle other than the current process angle and the current process angle.

[0173] In this embodiment, as Figure 6 As shown, The input voltage for the voltage-to-frequency converter. This refers to the charging capacitor voltage at the TT process corner. This refers to the charging capacitor voltage at the FF process corner. This refers to the charging capacitor voltage at the SS process corner. Based on preset process corners, including FF, SS, and TT process corners, this is due to the comparator offset voltage. With overcharge voltage The presence of this will affect the peak time of capacitor charging. Therefore, the peak time under the FF process angle Peak time smaller than TT process angle The first counting result of the FF process angle The value must be increased;

[0174] Peak time under SS process corner Larger than TT process angle The first count result of the SS process angle The value must be reduced;

[0175] Let the difference in delay error between each process angle other than the current process angle and the current process angle be... Substitute the values ​​into the compensation value expression to obtain the compensation value. The expression is as follows:

[0176] ;

[0177] in, Indicates the compensation value. This represents the time of one temperature measurement cycle. This represents the compensation count result, which is the first count result. The compensated value; calculated, the compensated value in this embodiment is at the FF process angle. The value is 12, under the SS process angle. -14;

[0178] Due to the special structure of the process corner signal output circuit and the precise transistor aspect ratio setting, the state values ​​of the three control signals will change with the process. Only the first output signal K1 is high at the TT process corner, the second output signal K2 is high at the FF process corner, and the third output signal K3 is high at the SS process corner. The three signals distinguish the current process corner and obtain the current process corner signal.

[0179] S4. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result. Based on the second counting result, the full-scale detection module is used to obtain and latch the latching signal. Based on the compensated counting result, the actual output temperature is calculated using the actual first ratio expression and the temperature linear fitting formula, thus completing the temperature sensor compensation. The specific steps are as follows:

[0180] S401. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result;

[0181] S402. In response to the second counting result reaching full scale, a latch signal is obtained using the full scale detection module.

[0182] S403. In response to the trigger signal being valid, latch the data according to the latch signal, output the compensation counting result, and clear the first counting result to zero.

[0183] S404. The actual first ratio is calculated based on the formula for the actual first ratio and the compensation counting results.

[0184] S405. Substitute the actual first ratio into the temperature linear fitting formula to calculate the actual output temperature, thus completing the temperature sensor compensation.

[0185] In this embodiment, based on the compensation value Using the current process angle signal, the error compensation module compensates for the first counting result to obtain the compensated counting result, as shown in the following expression:

[0186] ;

[0187] in, This indicates the result of the compensation count. This indicates the first counting result. Indicates compensation value

[0188] Specifically, compensation is performed through an error compensation module. The pre-calculated compensation value from the process corner signal output module is written into the compensation circuit, and the actual first ratio without error is output. The expression is as follows:

[0189] ;

[0190] By combining the temperature linear fitting formula, an approximation of the actual output temperature is obtained, as shown in the following expression:

[0191] ;

[0192] in, Indicates the actual output temperature;

[0193] In this embodiment, the gain coefficient is selected. Offset coefficient Correction factor ;

[0194] Without the compensation circuit connected, the sensor's error is... The measurement results after compensation are in to Within the temperature range, the error of this sensor is... The average conversion time is 3.5ms, and the power consumption is 46. The area is 0.065 ;

[0195] In summary, the digital code output under different process angles has a large error. After compensation by the process compensation circuit, the deviation of the digital code caused by the change of process angle is corrected, so that the digital code output under different process angles achieves a high degree of consistency, reducing the temperature measurement error of the temperature sensor, and reducing the fitting cost during temperature conversion.

Claims

1. A temperature sensor based on voltage-frequency conversion, characterized in that, include: Temperature front-end module, first chopper module, frequency converter module, second chopper module, first counter module, second counter module, error compensation module, process corner signal output module, full scale detection module, and output latch module; The temperature front-end module, the first chopper module, the frequency converter module, and the second chopper module are connected in sequence; the second chopper module is connected to the first counter module and the second counter module respectively; the first counter module is connected to the error compensation module and the output latch module respectively; the error compensation module is connected to the process corner signal output module and the output latch module respectively; the second counter module is connected to the first chopper module, the second chopper module, the full-scale detection module, and the output latch module respectively; the full-scale detection module is connected to the output latch module. The temperature front-end module is used to generate a first voltage signal and a second voltage signal by utilizing the characteristic that the voltage difference between the base and the emitter is proportional to the current density. A first ratio is obtained by comparing the first voltage signal and the second voltage signal, and a second ratio is then acquired. The expression for the second ratio is as follows: in, This represents the second ratio. This indicates a temperature-independent reference signal. This indicates a signal with an approximately linear negative correlation to temperature. This represents the correction factor. Indicates the second voltage signal. This represents the base-collector voltage. Indicates the first ratio; The compensation value is calculated as follows: in, Indicates the compensation value. This represents the difference in delay error between each process angle and the current process angle. Indicates the time of one temperature measurement cycle; The first counter module is used to count the first frequency signal and obtain a first counting result; The second counter module is used to count the second frequency signal to obtain a second counting result; The actual output temperature is calculated using the temperature linear fitting formula, thus completing the temperature sensor compensation. The temperature linear fitting formula is shown below: in, This indicates the actual output temperature. This represents the second ratio. Indicates the gain coefficient. Indicates the offset coefficient. This represents the correction factor. This represents the actual first ratio. This indicates the result of the compensation count. This indicates the first counting result. This represents the compensation value.

2. The temperature sensor based on voltage-frequency conversion according to claim 1, characterized in that, The first chopper module is used to switch, establish a path for the first voltage signal and the second voltage signal to be input to the frequency converter module, and perform periodic switching. The frequency converter module is used to convert the first voltage signal and the second voltage signal into corresponding first frequency signal and second frequency signal based on the path established by the first chopper module. The second chopper module is used to switch, establish a path for the first frequency signal input to the first counter module, and a path for the second frequency signal input to the second counter module, and perform periodic switching. The process angle signal output module, in response to the activation of the trigger signal, is used to obtain the current process angle signal based on the status of a preset number of control signals, combined with the current level, and using a preset process angle judgment rule. The error compensation module is used to compensate the first counting result by writing the pre-calculated process angle compensation value according to the current process angle signal, so as to obtain the compensated counting result. The full-scale detection module, in response to the second counting result reaching full scale, is used to output a latch signal; The output latch module, in response to a valid trigger signal, is used to latch and output a compensated count result according to the latch signal, and to clear the first count result of the first counter to zero.

3. The temperature sensor based on voltage-frequency conversion according to claim 2, characterized in that, The frequency converter module includes a first frequency converter and a second frequency converter; The first frequency converter is used to convert the first voltage signal into a first frequency signal; The second frequency converter is used to convert the second voltage signal into a second frequency signal.

4. The temperature sensor based on voltage-frequency conversion according to claim 2, characterized in that, The process corner signal output module is specifically a process corner signal output circuit, including: a first PMOS transistor MP1, a second PMOS transistor MP2, a first NMOS transistor MN1, a second NMOS transistor MN2, a first inverter I1, a second inverter I2, a third inverter I3, a fourth inverter I4, a fifth inverter I5, a sixth inverter I6, a seventh inverter I7, a first NOR gate O1, a second NOR gate O2, and a third NOR gate O3; The source of the first PMOS transistor MP1 is connected to the source of the second PMOS transistor MP2 and the power supply, respectively. The drain of the first PMOS transistor MP1 is connected to the gate of the first PMOS transistor MP1, the drain of the first NMOS transistor MN1, the gate of the first NMOS transistor MN1, and the input terminal of the first inverter I1, respectively. The drain of the second PMOS transistor MP2 is connected to the gate of the second PMOS transistor MP2, the drain of the second NMOS transistor MN2, the gate of the second NMOS transistor MN2, and the input terminal of the fourth inverter I4, respectively; the source of the first NMOS transistor MN1 is connected to the source of the second NMOS transistor MN2 and grounded. The output terminal of the first inverter I1 is connected to the input terminal of the second inverter I2, the output terminal of the second inverter I2 is connected to the input terminal of the third inverter I3, and the output terminal of the third inverter I3 is connected to the input terminal of the sixth inverter I6, the A input terminal of the second NOR gate O2, and the A input terminal of the third NOR gate O3, respectively. The output terminal of the fourth inverter I4 is connected to the input terminal of the fifth inverter I5, and the output terminal of the fifth inverter I5 is connected to the input terminal of the seventh inverter I7, the B input terminal of the first NOR gate O1, and the B input terminal of the second NOR gate O2, respectively. The output of the sixth inverter I6 is connected to the A input of the first NOR gate O1, and the output of the seventh inverter I7 is connected to the B input of the third NOR gate O3. The output terminal of the first NOR gate O1 is the second output signal K2, the output terminal of the second NOR gate O2 is the first output signal K1, and the output terminal of the third NOR gate O3 is the third output signal K3. The first output signal K1, the second output signal K2, and the third output signal K3 are connected to the error compensation module.

5. The temperature sensor based on voltage-frequency conversion according to claim 4, characterized in that, The error compensation module is specifically an error compensation circuit, including: a 14-bit adder, a 14-bit subtractor, an eighth inverter I8, an AND gate A1, a first 2-to-1 selector, and a second 2-to-1 selector. The input of the 14-bit adder is connected to the input of the 14-bit subtractor, the second input of the second 2-to-1 selector, and the first counter module, respectively. The output of the 14-bit adder is connected to the first input of the first 2-to-1 multiplexer; the output of the 14-bit subtractor is connected to the second input of the first 2-to-1 multiplexer. The input terminal of the eighth inverter I8 is connected to the second output signal K2 of the process corner signal output circuit. The output terminal of the eighth inverter I8 is connected to the first input terminal of the AND gate A1. The second input terminal of the AND gate A1 is connected to the third output signal K3 of the process corner signal output circuit. The output terminal of the AND gate A1 is connected to the control terminal of the first two-to-one selector. The control terminal of the second 2-to-1 selector is connected to the first output signal K1 of the process corner signal output circuit, the output terminal of the first 2-to-1 selector is connected to the first input terminal of the second 2-to-1 selector, and the output terminal of the second 2-to-1 selector is connected to the output latch module.

6. A temperature sensor compensation method based on voltage-frequency conversion, applied to the temperature sensor based on voltage-frequency conversion as described in any one of claims 1-5, characterized in that, Includes the following steps: S1. Based on the temperature front-end module, the first voltage signal and the second voltage signal are obtained by utilizing the characteristic that the voltage difference between the base and the emitter is proportional to the current density. The first chopper module is then used to input the first voltage signal and the second voltage signal to the frequency converter module for frequency conversion to obtain the first frequency signal and the second frequency signal. S2. Using the second chopper module, the first frequency signal is input to the first counter module for counting, and the second frequency signal is input to the second counter module for counting, to obtain the first counting result and the second counting result respectively; S3. Based on the temperature sensor, obtain the delay offset voltage set, and according to the preset process angle, use the process angle signal output module to obtain the compensation value, the actual first ratio expression and the temperature linear fitting formula by distinguishing the current process angle. S4. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result. Based on the second counting result, the full-scale detection module is used to obtain the latch signal and latch it. Based on the compensated counting result, the actual output temperature is calculated through the actual first ratio expression and the temperature linear fitting formula, thus completing the temperature sensor compensation.

7. The temperature sensor compensation method based on voltage-frequency conversion according to claim 6, characterized in that, S3 includes the following steps: S301. Based on the counting error of the temperature sensor measurement process, obtain a set of delay offset voltages, including the offset voltage of the comparator and the overcharge voltage caused by the delay. S302. Based on the first voltage signal and the second voltage signal, a first ratio value is obtained by comparing the first voltage signal and the second voltage signal; S303. Based on the second voltage signal and the difference between the first voltage signal and the second voltage signal, and combined with the correction coefficient, a temperature-independent reference signal and a temperature-approximately linearly negatively correlated signal are obtained. S304. By comparing the temperature-independent reference signal with the temperature-approximately linearly negatively correlated signal, a second ratio is obtained, and a temperature linear fitting formula is obtained through linear fitting. S305. Based on the delay offset voltage set, design the actual first ratio expression; S306. Based on the preset process angle, the current process angle signal is obtained using the process angle signal output module. The compensation value is calculated by obtaining the difference in delay error between each process angle other than the current process angle and the current process angle.

8. The temperature sensor compensation method based on voltage-frequency conversion according to claim 6, characterized in that, S4 includes the following steps: S401. Based on the compensation value and the current process angle signal, the error compensation module is used to compensate the first counting result to obtain the compensated counting result; S402. In response to the second counting result reaching full scale, a latch signal is obtained using the full scale detection module. S403. In response to the trigger signal being valid, latch the data according to the latch signal, output the compensation counting result, and clear the first counting result to zero. S404. The actual first ratio is calculated based on the formula for the actual first ratio and the compensation counting results. S405. Substitute the actual first ratio into the temperature linear fitting formula to calculate the actual output temperature, thus completing the temperature sensor compensation.