Temperature measurement method, apparatus and circuit
By introducing a combination of a digital algorithm module, a digital-to-analog converter, and a comparator into the T-sensor circuit, using dichotomy to adjust the digital codeword and simplifying the circuit structure, the problems of complex structure and large area of the existing T-sensor circuit are solved, and high-stability and high-precision temperature detection is achieved.
Patent Information
- Application Number
- CN202510378254.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The existing T-sensor circuit structure is complex and includes a feedback loop, which affects stability. It has a large area but little improvement in accuracy, and the cost is not proportional to the benefit.
The combination of digital algorithm module, digital-to-analog converter and comparator is adopted to adjust the digital code word through binary division, simplify the circuit structure, reduce the area and improve the temperature detection performance.
The circuit structure is greatly simplified, the area is greatly reduced, the temperature detection performance is highly stable, and the detection accuracy is improved.
Smart Images

Figure CN120213242B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of integrated circuits, in particular to a temperature measurement method, device and circuit. BACKGROUND
[0002] The existing T-sensor circuit (i.e. temperature measurement circuit) includes a pair of 1:1 mirror current sources, a pair of triodes with a number ratio of N:1, two buffer buffers, a fully differential operational amplifier circuit and a SAR ADC successive comparison type analog-to-digital converter. The circuit structure has the following problems: 1) the circuit contains feedback, introduces an additional loop, the structure is complex, and the stability is affected; 2) the structure is complex and the workload is large; 3) the area is large, but the precision is not high, and the cost and benefit are not proportional. SUMMARY
[0003] The purpose of the present application is to provide a temperature measurement method, device and circuit, which greatly simplifies the circuit structure, greatly reduces the area, and has high stability of temperature detection performance.
[0004] In a first aspect, the present application provides a temperature measurement method, which is applied to a digital algorithm module in a temperature measurement circuit; the digital algorithm module is connected with a digital-to-analog converter and a comparator; a first input end of the comparator is grounded through a triode, a second input end is connected with the digital-to-analog converter, and an output end is connected with the digital algorithm module; the method comprises: taking a preset digital code word as a current digital code word, transmitting the current digital code word to the digital-to-analog converter to control the digital-to-analog converter to input a reference voltage to the second input end of the comparator, so that the comparator determines a current output level of the output end according to the reference voltage and a voltage difference received through the first input end; wherein the voltage difference is the voltage difference between the base and the emitter of the triode; receiving the current output level transmitted by the comparator, adjusting the current digital code word by using the bisection method according to the current output level, continuing to perform the subsequent process of controlling the reference voltage based on the adjusted current digital code word, until the current digital code word and the last digital code word correspond to decimal numbers that differ by one, and the current digital code word and the last digital code word correspond to different comparator output levels, respectively, and determining a temperature detection result of the region where the triode is located based on the current digital code word and / or the last digital code word.
[0005] Further, the step of transmitting the current digital code word to the digital-to-analog converter to control the digital-to-analog converter to input the reference voltage to the second input end of the comparator comprises: transmitting the current digital code word to the digital-to-analog converter to make the digital-to-analog converter calculate the reference voltage vref according to the following formula and input the reference voltage vref to the second input end of the comparator:
[0006] vref = decimal number corresponding to the current digital code word * vdd / 255;
[0007] wherein vdd represents a power supply voltage.
[0008] Further, the step of determining the current output level of the output end of the comparator according to the reference voltage and the voltage difference received through the first input end comprises: when the reference voltage is greater than the voltage difference, the current output level of the output end of the comparator is 1; and when the reference voltage is less than the voltage difference, the current output level of the output end of the comparator is 0.
[0009] Further, the step of adjusting the current digital code word by using the dichotomy according to the current output level comprises: if the current output level is 0, adjusting the current digital code word by using the dichotomy to be smaller; and if the current output level is 1, adjusting the current digital code word by using the dichotomy to be larger.
[0010] Further, the current digital code word is a binary number; the step of adjusting the current digital code word to be smaller by using the dichotomy comprises: detecting the lowest bit of the byte value of 1 in the current digital code word; modifying the byte value of the lowest bit to be 0 and modifying the byte value of the next bit of the lowest bit to be 1 to obtain the current digital code word adjusted to be smaller; and the step of adjusting the current digital code word to be larger by using the dichotomy comprises: detecting the lowest bit of the byte value of 1 in the current digital code word; keeping the byte value of the lowest bit unchanged and modifying the byte value of the next bit of the lowest bit to be 1 to obtain the current digital code word adjusted to be larger.
[0011] Further, the step of determining the temperature detection result of the region where the triode is located based on the current digital code word and / or the last digital code word comprises: determining the current digital code word and / or the last digital code word as a target code word; converting the target code word into a decimal value; and adding a specified value to the decimal value to obtain the temperature detection result of the region where the triode is located.
[0012] Further, the method further comprises: determining a plurality of temperature detection results through a plurality of loop detections; and determining an average value of the plurality of temperature detection results as a final temperature detection result.
[0013] In a second aspect, the application further provides a temperature measuring device, which is applied to a digital algorithm module in a temperature measuring circuit; the digital algorithm module is connected with a digital-analog converter and a comparator; a first input end of the comparator is grounded through a triode, a second input end of the comparator is connected with the digital-analog converter, and an output end of the comparator is connected with the digital algorithm module; the device comprises: a code word transmission module, which is used for transmitting a preset digital code word as a current digital code word to the digital-analog converter to control the digital-analog converter to input a reference voltage to the second input end of the comparator, so that the comparator determines a current output level of the output end according to the reference voltage and a voltage difference received through the first input end; wherein the voltage difference is a voltage difference between a base and an emitter of the triode; a level receiving and code word adjusting module, which is used for receiving the current output level transmitted by the comparator, adjusting the current digital code word by using a dichotomy method according to the current output level, and continuing to execute a subsequent process of controlling the reference voltage based on the adjusted current digital code word; and a temperature determining module, which is used for performing a cyclic process through the code word transmission module and the level receiving and code word adjusting module until a decimal number corresponding to the current digital code word and a decimal number corresponding to a last digital code word are different by one, and output levels of the comparator corresponding to the current digital code word and the last digital code word are different, and determining a temperature detection result of a region where the triode is located based on the current digital code word and / or the last digital code word.
[0014] In a third aspect, the application further provides a temperature measuring circuit, which comprises a digital algorithm module, a digital-analog converter and a comparator; a first input end of the comparator is grounded through a triode, a second input end of the comparator is connected with the digital-analog converter, and an output end of the comparator is connected with the digital algorithm module; the digital algorithm module is further connected with the digital-analog converter; and the digital algorithm module is used for executing the temperature measuring method as described in the first aspect.
[0015] Further, the base of the triode is connected with the collector, and the emitter is grounded.
[0016] The temperature measurement method, device and circuit provided in the application, the method is applied to a digital algorithm module in a temperature measurement circuit; the digital algorithm module is connected with a digital-to-analog converter and a comparator; a first input end of the comparator is grounded through a triode, a second input end is connected with the digital-to-analog converter, and an output end is connected with the digital algorithm module; the method comprises the following steps: taking a preset digital code word as a current digital code word, transmitting the current digital code word to the digital-to-analog converter, so as to control the digital-to-analog converter to input a reference voltage to the second input end of the comparator, so that the comparator determines a current output level of the output end according to the reference voltage and a voltage difference received through the first input end; wherein the voltage difference is a voltage difference between a base and an emitter of the triode; receiving the current output level transmitted by the comparator, adjusting the current digital code word by using a dichotomy method according to the current output level, continuing to perform a subsequent process of controlling the reference voltage based on the adjusted current digital code word, until the current digital code word and a decimal number corresponding to a last digital code word differ by one, and the current digital code word and the last digital code word correspond to different output levels of the comparator, and determining a temperature detection result of a region where the triode is located based on the current digital code word and / or the last digital code word. The circuit structure is greatly simplified, the area is greatly reduced, and the temperature detection performance is high in stability. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0018] Figure 1 It is a structural schematic diagram of a temperature measurement circuit in the prior art;
[0019] Figure 2 It is a structural schematic diagram of a temperature measurement circuit provided in the embodiments of the present application;
[0020] Figure 3 It is a flowchart of a temperature measurement method provided in the embodiments of the present application;
[0021] Figure 4 It is a structural block diagram of a temperature measurement device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0022] The technical solutions of the present application will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.
[0023] Referring to Figure 1 The existing T-sensor circuit (i.e. temperature measurement circuit) shown in the structural schematic diagram, which includes a pair of 1:1 mirror current sources, a pair of triodes with a number ratio of N:1, two buffer buffers, a full differential operational amplifier circuit and a SAR ADC successive comparison type analog-to-digital converter. Two same currents flow through triodes with different numbers, and the voltage difference ΔVBE=VT*ln(n) generated is proportional to the temperature. After error correction by the chopper, the differential voltage is output to the full differential operational amplifier for amplification, and the amplified differential voltage is sent to the SAR ADC for quantization output, realizing the temperature measurement function.
[0024] The circuit structure has the following problems: 1) the circuit contains feedback, introduces an additional loop, the structure is complex, and the stability is affected; 2) the structure is complex, and the workload is large; 3) the area is large, but the precision is not high, and the cost and benefit are not proportional.
[0025] Based on this, the embodiments of the present application provide a temperature measurement method, device and circuit, the circuit structure is greatly simplified, the area is greatly reduced, and the temperature detection performance is stable. In order to facilitate the understanding of the embodiments, first, a temperature measurement method disclosed by the embodiments of the present application is introduced in detail.
[0026] The temperature measurement method provided by the embodiments of the present application, the method is applied to a digital algorithm module in a temperature measurement circuit; referring to Figure 2 The temperature measurement circuit includes: a digital algorithm module DIG, a digital-to-analog converter DAC and a comparator CMP; the digital algorithm module DIG is connected with the digital-to-analog converter DAC and the comparator CMP; the first input end of the comparator CMP is grounded through a triode, the second input end is connected with the digital-to-analog converter DAC, and the output end is connected with the digital algorithm module DIG; referring to Figure 3 The temperature measurement method specifically includes the following steps:
[0027] In step S302, a preset digital code word is taken as a current digital code word, the current digital code word is transmitted to the digital-to-analog converter, the reference voltage is input to the second input end of the comparator through the digital-to-analog converter, so that the comparator determines the current output level of the output end according to the reference voltage and the voltage difference received through the first input end; wherein the voltage difference is the voltage difference between the base and the emitter of the triode.
[0028] Taking the 8-bit binary number as an example, the preset digital code word is 1000 0000, and the digital code word is used to control the digital-to-analog converter to input a reference voltage vref0 to the second input end of the comparator. At this time, the first input end of the comparator receives the voltage difference vbe fed back by the transistor. If vref0 < vbe, the output level of the comparator vout = 0, and if vref1 > vbe, the output level of the comparator vout = 1. Further, the digital algorithm module is required to make a judgment and adjustment.
[0029] In step S304, the current output level transmitted by the comparator is received, and the current digital code word is adjusted by using the dichotomy method according to the current output level. The process of controlling the reference voltage is continued based on the adjusted current digital code word until the decimal numbers corresponding to the current digital code word and the last digital code word are different by one, and the comparator output levels corresponding to the current digital code word and the last digital code word are different. The temperature detection result of the region where the transistor is located is determined based on the current digital code word and / or the last digital code word.
[0030] When the output level of the comparator vout = 0, the digital algorithm module receives this signal and increases the digital code word. For example, the first bit of 1000 0000 is unchanged, and the second bit is 1, that is, the adjusted digital code word is 1100 0000. The digital code word is used to control the digital-to-analog converter to input a reference voltage vref1 to the second input end of the comparator. Then the comparator continues to perform the comparison between the reference voltage and the voltage difference, and outputs the level to the digital algorithm module. The digital algorithm module continues to adjust the digital code word until the following conditions are met: the decimal numbers corresponding to the current digital code word and the last digital code word are different by one, and the comparator output levels corresponding to the current digital code word and the last digital code word are different. For example, the last digital code word is 10101010, the corresponding comparator output level is 0, and the current digital code word is 10101011, the corresponding comparator output level is 1. At this time, the reference voltage and the voltage difference are almost equal, and the temperature detection result of the region where the transistor is located is determined based on 10101010 and / or 10101011.
[0031] The temperature measurement method provided by the embodiment of the present application adjusts the code word based on the dichotomy method through the digital algorithm module, so that the reference voltage continuously approaches the voltage difference of the transistor, and then when the stop condition is reached, the final current digital code word and the last digital code word are converted into the temperature detection result. In this method, the circuit structure is greatly simplified, the area is greatly reduced, and the temperature detection performance is stable.
[0032] Further, the step of transmitting the current digital code word to the digital-to-analog converter to control the digital-to-analog converter to input the reference voltage to the second input terminal of the comparator comprises:
[0033] The step of transmitting the current digital code word to the digital-to-analog converter to control the digital-to-analog converter to input the reference voltage to the second input terminal of the comparator comprises:
[0034] vref = decimal value corresponding to the current digital code word * vdd / 255;
[0035] Wherein, vdd represents the supply voltage.
[0036] Assuming that the digital code word is 8 bits, there are 256 decimal numbers corresponding to it, and the interval between vref is vdd / 255; assuming that the supply voltage is 1.2V; in this case, if the current digital code word is 10100101, the corresponding decimal value is 165, and the reference voltage vref = 165*1.2 / 255 = 0.77V. Each adjustment of the digital code word can calculate a reference voltage.
[0037] Further, the step of transmitting the current digital code word to the digital-to-analog converter to control the digital-to-analog converter to input the reference voltage to the second input terminal of the comparator comprises:
[0038] When the reference voltage is greater than the voltage difference, the current output level of the output terminal of the comparator is 1; when the reference voltage is less than the voltage difference, the current output level of the output terminal of the comparator is 0. That is, when vref>vbe, the current output level of the output terminal of the comparator is 1; when vref<vbe, the current output level of the output terminal of the comparator is 0.
[0039] Further, the step of adjusting the current digital code word by using the bisection method according to the current output level comprises:
[0040] (1) If the current output level is 0, the current digital code word is adjusted smaller by using the bisection method; specifically, the lowest bit of the byte value of 1 in the current digital code word is detected; the byte value of the lowest bit is modified to 0, and the byte value of the next bit of the lowest bit is modified to 1 to obtain the current digital code word after adjustment;
[0041] For example, if the current digital code word is 1100 0000, the second bit of 1 is modified to 0 and the third bit of 0 is modified to 1 to obtain 1010 0000.
[0042] (2) If the current output level is 1, the current digital code word is adjusted larger by using the bisection method. Specifically, the lowest bit of the byte value of 1 in the current digital code word is detected; the byte value of the lowest bit remains unchanged, and the byte value of the next bit of the lowest bit is modified to 1 to obtain the current digital code word after adjustment.
[0043] For example, if the current digital codeword is 1100 0000 and needs to be increased, the 1 in the second digit remains unchanged and the 0 in the third digit is changed to 1, resulting in 1110 0000.
[0044] Furthermore, the step of determining the temperature detection result of the region where the transistor is located based on the current digital codeword and / or the previous digital codeword includes:
[0045] The current digital codeword and / or the previous digital codeword are determined as target codewords; the target codeword is converted into a decimal value; and a specified value is added to the decimal value to obtain a temperature detection result of the area where the transistor is located.
[0046] For example, 0000 0000 corresponds to -64°C and 1111 1111 corresponds to 191°C. When the target codeword is 1010 0101, the decimal value of 10100101 is 165, so the final temperature detection result is -64+165=101°C.
[0047] In order to improve the temperature detection accuracy, the above method further includes: determining multiple temperature detection results through multiple cycle detections, and determining the average value of the multiple temperature detection results as the final temperature detection result.
[0048] In the temperature measurement method provided in the embodiment of the present application, the temperature is detected by the VBE of the transistor, the digital algorithm module controls the output voltage VREF of the DAC to compare with VBE, and the output voltage VOUT of the comparator is fed back to the digital algorithm module to control the output codeword. Under the action of the binary division method, VREF will gradually approach VBE. At this time, the output codeword of the digital module is read to know the corresponding temperature at this time.
[0049] Based on the above method embodiment, the embodiment of the present application also provides a temperature measurement device, which is applied to a digital algorithm module in a temperature measurement circuit; the digital algorithm module is connected to a digital-to-analog converter and a comparator respectively; the first input terminal of the comparator is grounded through a transistor, the second input terminal is connected to the digital-to-analog converter, and the output terminal is connected to the digital algorithm module; see Figure 4As shown, the device comprises: a code word transmission module 402, configured to transmit a preset digital code word as a current digital code word to a digital-to-analog converter, to control the digital-to-analog converter to input a reference voltage to a second input end of a comparator, so that the comparator determines a current output level of an output end according to the reference voltage and a voltage difference received through a first input end; wherein the voltage difference is a voltage difference between a base and an emitter of a transistor; a level receiving and code word adjusting module 404, configured to receive the current output level transmitted by the comparator, to adjust the current digital code word by using a dichotomy method according to the current output level, and to continue to perform a subsequent process of controlling the reference voltage based on the adjusted current digital code word; and a temperature determining module 406, configured to perform cyclic processing through the code word transmission module and the level receiving and code word adjusting module until a decimal number corresponding to the current digital code word and a decimal number corresponding to a last digital code word are different by one, and the current output level of the comparator corresponding to the current digital code word and the current output level of the comparator corresponding to the last digital code word are different, and to determine a temperature detection result of a region where the transistor is located based on the current digital code word and / or the last digital code word.
[0050] Further, the code word transmission module 402 is configured to transmit the current digital code word to the digital-to-analog converter, so that the digital-to-analog converter calculates the reference voltage vref according to the following formula, and inputs the reference voltage vref to the second input end of the comparator:
[0051] vref = decimal number corresponding to the current digital code word * vdd / 255;
[0052] Wherein, vdd represents a power supply voltage.
[0053] Further, the code word transmission module 402 is configured to, when the reference voltage is greater than the voltage difference, the current output level of the output end of the comparator is 1; and when the reference voltage is less than the voltage difference, the current output level of the output end of the comparator is 0.
[0054] Further, the level receiving and code word adjusting module 404 is configured to, if the current output level is 0, adjust the current digital code word to be smaller by using the dichotomy method; and if the current output level is 1, adjust the current digital code word to be larger by using the dichotomy method.
[0055] Further, the current digital code word is a binary number; the level receiving and code word adjusting module 404 is configured to detect a lowest bit of a byte value of 1 in the current digital code word; modify the byte value of the lowest bit to be 0 and modify a next bit of the lowest bit to be 1, to obtain the current digital code word adjusted to be smaller; and the level receiving and code word adjusting module 404 is configured to detect the lowest bit of the byte value of 1 in the current digital code word; keep the byte value of the lowest bit unchanged and modify the next bit of the lowest bit to be 1, to obtain the current digital code word adjusted to be larger.
[0056] Furthermore, the temperature determination module 406 is configured to determine the current digital codeword and / or the previous digital codeword as a target codeword; convert the target codeword into a decimal value; and add a specified value to the decimal value to obtain a temperature detection result of the region where the transistor is located.
[0057] Furthermore, the temperature determination module 406 is configured to determine multiple temperature detection results through multiple cycles of detection, and determine an average value of the multiple temperature detection results as a final temperature detection result.
[0058] The device provided in the embodiment of the present application has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device, reference can be made to the corresponding content in the aforementioned method embodiment.
[0059] Based on the above method embodiment, the present application embodiment also provides a temperature measurement circuit, see Figure 2 As shown, the temperature measurement circuit includes: a digital algorithm module DIG, a digital-to-analog converter DAC and a comparator CMP; the digital algorithm module DIG is connected to the digital-to-analog converter DAC and the comparator CMP respectively; the first input end of the comparator CMP is grounded through a transistor, the second input end is connected to the digital-to-analog converter DAC, and the output end is connected to the digital algorithm module DIG; the digital algorithm module is used to execute the temperature measurement method as described in the first aspect.
[0060] Furthermore, the base of the transistor is connected to the collector, and the emitter is grounded.
[0061] The circuit provided in the embodiment of the present application has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the circuit, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0062] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the above-mentioned method. The specific implementation can be found in the above-mentioned method embodiment, which will not be repeated here.
[0063] The computer program products of the methods, devices, and electronic devices provided in the embodiments of the present application include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. For specific implementation, please refer to the method embodiments and will not be repeated here.
[0064] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0065] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a nonvolatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0066] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance.
[0067] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present application, used to illustrate the technical solutions of the present application, and are not limited thereto, the protection scope of the present application is not limited thereto, although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any skilled person familiar with the technical field can modify or easily think of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed by the present application, or make equivalent replacements to some technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A temperature measurement method, characterized in that: The method is applied to a digital algorithm module in a temperature measurement circuit; the digital algorithm module is connected to a digital-to-analog converter and a comparator respectively; a first input terminal of the comparator is grounded via a transistor, a second input terminal is connected to the digital-to-analog converter, and an output terminal is connected to the digital algorithm module; the method includes: using a preset digital codeword as a current digital codeword, and transmitting the current digital codeword to the digital-to-analog converter to control the digital-to-analog converter to input a reference voltage to the second input terminal of the comparator, so that the comparator determines a current output level of the output terminal according to the reference voltage and a voltage difference received through the first input terminal; wherein the voltage difference is a voltage difference between a base and an emitter of the transistor; receiving a current output level transmitted by the comparator, adjusting the current digital codeword using a binary search method according to the current output level, continuing to perform a subsequent reference voltage control process based on the adjusted current digital codeword until the decimal number corresponding to the current digital codeword and the previous digital codeword differ by one, and the comparator output levels corresponding to the current digital codeword and the previous digital codeword are different, and determining a temperature detection result of the region where the transistor is located based on the current digital codeword and / or the previous digital codeword; The step of transmitting the current digital codeword to the digital-to-analog converter to control the digital-to-analog converter to input a reference voltage to the second input terminal of the comparator includes: transmitting the current digital codeword to the digital-to-analog converter so that the digital-to-analog converter calculates a reference voltage Vref according to the following formula, and inputs the reference voltage Vref to the second input terminal of the comparator: Vref = decimal value corresponding to the current digital codeword * Vdd / 255; wherein Vdd represents the power supply voltage; The current digital codeword is a binary number; and the step of adjusting the current digital codeword using a binary search method according to the current output level includes: if the current output level is 0, detecting the lowest bit of the byte value of 1 in the current digital codeword, modifying the byte value of the lowest bit to 0, and modifying the byte value of the next lowest bit to 1, to obtain a current digital codeword that is adjusted down; if the current output level is 1, detecting the lowest bit of the byte value of 1 in the current digital codeword, keeping the byte value of the lowest bit unchanged, and modifying the byte value of the next lowest bit to 1, to obtain a current digital codeword that is adjusted up.
2. The method according to claim 1, characterized in that a step of enabling the comparator to determine a current output level of the output terminal according to the reference voltage and a voltage difference received through the first input terminal, When the reference voltage is greater than the voltage difference, the current output level of the comparator output terminal is 1; When the reference voltage is less than the voltage difference, the current output level of the comparator output terminal is 0.
3. The method according to claim 1, characterized in that The step of determining the temperature detection result of the area where the transistor is located based on the current digital code word and / or the previous digital code word includes: Determining the current digital codeword and / or the previous digital codeword as a target codeword; Converting the target codeword into a decimal value; A designated value is added to the decimal value to obtain a temperature detection result of the area where the transistor is located.
4. The method according to claim 1, wherein The method further comprises: Multiple temperature detection results are determined through multiple cycle detections, and the average value of the multiple temperature detection results is determined as the final temperature detection result.
5. A temperature measuring device, characterized in that: The device is applied to a digital algorithm module in a temperature measurement circuit; the digital algorithm module is connected to a digital-to-analog converter and a comparator respectively; the first input end of the comparator is grounded through a transistor, the second input end is connected to the digital-to-analog converter, and the output end is connected to the digital algorithm module; the device comprises: a codeword transmission module, configured to use a preset digital codeword as a current digital codeword and transmit the current digital codeword to the digital-to-analog converter, thereby controlling the digital-to-analog converter to input a reference voltage to the second input terminal of the comparator, so that the comparator determines a current output level of the output terminal based on the reference voltage and a voltage difference received through the first input terminal; wherein the voltage difference is a voltage difference between a base and an emitter of the transistor; a level receiving and codeword adjusting module, configured to receive the current output level transmitted by the comparator, adjust the current digital codeword using a binary method according to the current output level, and continue to perform a subsequent reference voltage control process based on the adjusted current digital codeword; a temperature determination module, configured to perform cyclic processing through the codeword transmission module and the level receiving and codeword adjustment module until the decimal number corresponding to the current digital codeword differs by one from the decimal number corresponding to the previous digital codeword, and the comparator output levels corresponding to the current digital codeword and the previous digital codeword are different, and determine the temperature detection result of the area where the transistor is located based on the current digital codeword and / or the previous digital codeword; The codeword transmission module is further configured to transmit the current digital codeword to the digital-to-analog converter, so that the digital-to-analog converter calculates a reference voltage Vref according to the following formula, and inputs the reference voltage Vref to the second input terminal of the comparator: Vref = decimal value corresponding to the current digital codeword * Vdd / 255; wherein Vdd represents a power supply voltage; The current digital codeword is a binary number; the level receiving and codeword adjustment module is further used to: if the current output level is 0, detect the lowest bit of the byte value of 1 in the current digital codeword, modify the byte value of the lowest bit to 0, and modify the byte value of the next lowest bit to 1, to obtain the current digital codeword after being adjusted down; if the current output level is 1, detect the lowest bit of the byte value of 1 in the current digital codeword, keep the byte value of the lowest bit unchanged, modify the byte value of the next lowest bit to 1, and obtain the current digital codeword after being adjusted up.
6. A temperature measurement circuit, characterized in that: The temperature measurement circuit includes: a digital algorithm module, a digital-to-analog converter and a comparator; the first input end of the comparator is grounded through a transistor, the second input end is connected to the digital-to-analog converter, and the output end is connected to the digital algorithm module; the digital algorithm module is also connected to the digital-to-analog converter; the digital algorithm module is used to execute the temperature measurement method according to any one of claims 1 to 4.
7. The circuit according to claim 6, characterized in that The base of the transistor is connected to the collector, and the emitter is grounded.
Citation Information
Patent Citations
System and method for a successive approximation analog-to-digital converter
US10790842B1
Analog-to-digital converting system
US20080143576A1