Digital temperature sensor, SOC chip, electronic device and temperature detection method
By outputting analog signals with different slopes in the digital temperature sensor and performing period counting difference to characterize the temperature, the problem of VCO or ICO being affected by temperature is solved, and the accuracy of temperature measurement is improved.
Patent Information
- Application Number
- CN202111499089.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-12-09
AI Technical Summary
The nonlinear noise generated by the VCO or ICO in a digital temperature sensor is caused by inaccurate measurement of temperature.
By induction of the same temperature, the first and second analog signals are output with temperature-related but different slopes, and the digital oscillator converts these signals into digital clock signals. The temperature is characterized by counting the number of periods of these signals and making a difference, thereby eliminating the influence of the VCO or ICO itself by temperature.
Improves the accuracy of temperature measurement of digital temperature sensors, directly eliminating the noise generated by the temperature of the VCO or ICO itself, without the need for additional complex calibration circuits or algorithms.
Smart Images

Figure CN114235216B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of integrated circuit technology, and particularly relates to a digital temperature sensor, an SOC chip, an electronic device, and a temperature detection method. Background Art
[0002] In recent years, with the rapid development of integrated circuits, the process manufacturing level has been continuously improved, and more and more components are integrated in the chip, resulting in an increasing chip heat generation, which increases the risk of device performance degradation or even failure, making people pay more attention to chip temperature monitoring and management.
[0003] For a relatively large-scale chip such as a processor (e.g., a Central Processing Unit (CPU)), the on-chip temperature distribution range is wide, and the chip temperature needs to be detected from different places. The digital temperature sensor (DTS) has become the main part of on-chip temperature measurement due to its advantages such as small area and easy integration. The DTS usually uses a voltage control oscillator (VCO) to convert the voltage related to the temperature signal into a digital clock signal, or uses a current control oscillator (ICO) to convert the current related to the temperature signal into a digital clock signal, and counts the number of cycles of the digital clock signal output by the VCO or ICO to obtain the ambient temperature. However, the VCO or ICO itself is also affected by temperature, thereby generating a small amount of non-linear noise, making the digital clock signal output by the VCO or ICO related not only to the voltage or current but also to its own temperature influence, resulting in a certain error in the temperature detected by the DTS. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a digital temperature sensor, an SOC chip, an electronic device, and a temperature detection method to improve the problem that the non-linear noise generated by the influence of temperature on the VCO or ICO in the digital temperature sensor leads to inaccurate temperature measurement.
[0005] The embodiments of this application are implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a digital temperature sensor, including: a temperature sensing component, a digital oscillator, and a processing module; the temperature sensing component is configured to sense the ambient temperature and output a first analog signal and a second analog signal related to the temperature, where the slopes of the first analog signal and the second analog signal are different; the digital oscillator is connected to the temperature sensing component and is configured to convert the first analog signal into a first digital clock signal and convert the second analog signal into a second digital clock signal; the processing module is connected to the digital oscillator and is configured to count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time to obtain a first value and a second value; and based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature, obtain the output temperature. In the embodiment of the present application, by sensing the same temperature and outputting a first analog signal and a second analog signal related to the temperature but with different slopes, and then using a digital oscillator (VCO or ICO) to convert the first analog signal and the second analog signal into a first digital clock signal and a second digital clock signal respectively, by counting the number of cycles of the first digital clock signal and the second digital clock signal within a preset time, and then taking the difference between the two count values and using this difference to represent the temperature, the influence of the VCO or ICO itself on temperature can be directly eliminated, thereby improving the temperature measurement accuracy of the DTS.
[0007] In a possible implementation manner combining the embodiment of the first aspect, the temperature sensing component includes: a temperature sensing unit, a first output branch, and a second output branch; the temperature sensing unit is configured to sense the ambient temperature and output an initial analog signal related to the temperature; the first output branch is connected to the temperature sensing unit and the digital oscillator and is configured to output the first analog signal that is in a first ratio to the initial analog signal; the second output branch is connected to the temperature sensing unit and the digital oscillator and is configured to output the second analog signal that is in a second ratio to the initial analog signal. In the embodiment of the present application, with the temperature sensing component having the above structure, by switching between the first output branch and the second output branch, the first analog signal and the second analog signal can be output in a staggered manner.
[0008] In a possible implementation manner combining with the embodiments of the first aspect, the temperature sensing unit includes a first transistor array and a first transistor. Each transistor in the first transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the first transistor array is connected to its control end, and the second end of each transistor is also connected to the second end of the first transistor. The control end of the first transistor is connected to its first end, and the first end of the first transistor is also grounded or connected to a power supply. Correspondingly, the first output branch includes a second transistor array and a first switch. Each transistor in the second transistor array is connected in parallel, and the first end of each transistor in the second transistor array is connected to a power supply or grounded. The second end of each transistor in the second transistor array is connected to the digital oscillator through the first switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array. The second output branch includes a third transistor array and a second switch. Each transistor in the third transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the third transistor array is connected to the digital oscillator through the second switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array. In the embodiments of the present application, the components constituting the temperature sensing unit, the first output branch, and the second output branch are all common and low-cost components. The temperature sensing unit, the first output branch, and the second output branch with the above structure can save costs and reduce the circuit area while achieving their purposes.
[0009] In a possible implementation manner combining with the embodiments of the first aspect, the temperature sensing unit further includes: a clamping transistor. The second end of each transistor in the first transistor array is connected to the second end of the first transistor through the clamping transistor, and the clamping transistor is in a normally open state. In the embodiments of the present application, by further adding a clamping transistor, the initial analog signal generated by the temperature sensing unit does not change with the change of the power supply voltage and is only related to the temperature, so that the measurement error caused by the change of the power supply voltage in special cases can be eliminated.
[0010] In a possible implementation manner combining the embodiments of the first aspect, the temperature sensing unit includes a bias current source, a first PNP transistor, and a second PNP transistor. The emitter of the first PNP transistor is connected to the bias current source, the base of the first PNP transistor is connected to its collector, the emitter of the second PNP transistor is connected to the collector of the first PNP transistor, the base of the second PNP transistor is connected to its collector and grounded. The emitter of the first PNP transistor is also connected to the first output branch, and the emitter of the second PNP transistor is also connected to the second output branch. Correspondingly, the first output branch includes a first switch, and the first switch is connected to the emitter of the first PNP transistor; the second output branch includes a second switch, and the second switch is connected to the emitter of the second PNP transistor. In the embodiments of the present application, by adopting the temperature sensing unit with the above structure to output a voltage analog signal related to temperature, and the components are common and low-cost components, the cost can be reduced while achieving its invention purpose.
[0011] In a possible implementation manner combining the embodiments of the first aspect, the temperature sensing component includes: a first temperature sensing component, a second temperature sensing component; the first temperature sensing component is used to sense the ambient temperature and output the first analog signal related to temperature; the second temperature sensing component is used to sense the ambient temperature and output the second analog signal related to temperature, and the first temperature sensing component and the second temperature sensing component have the same temperature sensing unit; correspondingly, the number of digital oscillators is two, one of the digital oscillators is connected to the first temperature sensing component, and the other digital oscillator is connected to the second temperature sensing component. In the embodiments of the present application, a temperature sensing component including a first temperature sensing component and a second temperature sensing component can also be used to output the first analog signal and the second analog signal. In this way, two analog signals can be output simultaneously.
[0012] In a possible implementation manner combining the embodiments of the first aspect, the temperature sensing component includes: a first temperature sensing component, a second temperature sensing component; the first temperature sensing component is used to sense the ambient temperature and output the first analog signal related to temperature; the second temperature sensing component is used to sense the ambient temperature and output the second analog signal related to temperature, and the first temperature sensing component and the second temperature sensing component have the same temperature sensing unit; both the first temperature sensing component and the second temperature sensing component are connected to the digital oscillator, and the first temperature sensing component and the second temperature sensing component do not work simultaneously.
[0013] In a possible implementation manner combining with the embodiments of the first aspect, the processing module includes: a counter and an arithmetic unit; the counter is configured to count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time respectively, to obtain a first value and a second value; the arithmetic unit is connected to the counter and is configured to determine the difference between the first value and the second value, and obtain an output temperature based on the difference and the corresponding relationship between the preset difference and the temperature.
[0014] In a second aspect, an SOC chip provided by an embodiment of the present application further integrates a digital temperature sensor provided as in the embodiments of the first aspect and / or any possible implementation manner combining with the embodiments of the first aspect.
[0015] In a third aspect, an electronic device provided by an embodiment of the present application includes a body and a digital temperature sensor provided as in the embodiments of the first aspect and / or any possible implementation manner combining with the embodiments of the first aspect, or an SOC chip provided as in the embodiments of the second aspect.
[0016] In a fourth aspect, a temperature detection method provided by an embodiment of the present application includes: sensing the same ambient temperature and outputting a first analog signal and a second analog signal related to the temperature, where the slopes of the first analog signal and the second analog signal are different; converting the first analog signal into a first digital clock signal, and converting the second analog signal into a second digital clock signal; counting the number of cycles of the first digital clock signal and the second digital clock signal within a preset time respectively, to obtain a first value and a second value; obtaining an output temperature based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature.
[0017] In a possible implementation manner combining with the embodiments of the fourth aspect, sensing the same ambient temperature and outputting a first analog signal and a second analog signal related to the temperature includes: using the same temperature sensing component to sense the ambient temperature and output the first analog signal and the second analog signal related to the temperature simultaneously, or output the first analog signal and the second analog signal related to the temperature at intervals. In the embodiments of the present application, using one temperature sensing component to sense the ambient temperature can output the first analog signal and the second analog signal with different slopes simultaneously, or output the first analog signal and the second analog signal with different slopes at intervals, enhancing the flexibility of the solution.
[0018] In a possible implementation manner combining with the embodiments of the fourth aspect, the corresponding relationship between the preset difference and the temperature includes a temperature polynomial fitting formula. Based on the difference between the first value and the second value, and the corresponding relationship between the preset difference and the temperature, obtaining the output temperature includes: substituting the difference between the first value and the second value into the temperature polynomial fitting formula to calculate the output temperature. In the embodiments of the present application, the corresponding relationship between the preset difference and the temperature includes a temperature polynomial fitting formula. By substituting the difference into this temperature polynomial fitting formula, the output temperature can be quickly calculated.
[0019] Other features and advantages of the present application will be described in the subsequent description. And, some of them will become obvious from the description, or can be understood by implementing the embodiments of the present application. The objectives and other advantages of the present application can be achieved and obtained by the structures specifically pointed out in the written description and the drawings. Brief Description of the Drawings
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. As shown by the drawings, the above-mentioned and other objectives, features, and advantages of the present application will become clearer. The same reference numerals indicate the same parts in all the drawings. The drawings are not deliberately drawn to scale in actual size, and the focus is on showing the gist of the present application.
[0021] Figure 1 Fig. shows a schematic structural diagram of a digital temperature sensor provided by an embodiment of the present application.
[0022] Figure 2 Fig. shows a schematic principle diagram of a temperature sensing component provided by an embodiment of the present application.
[0023] Figure 3 Fig. shows a schematic principle diagram of another temperature sensing component provided by an embodiment of the present application.
[0024] Figure 4 Fig. shows a schematic principle diagram of another temperature sensing component provided by an embodiment of the present application.
[0025] Figure 5 Fig. shows a schematic principle diagram of another temperature sensing component provided by an embodiment of the present application.
[0026] Figure 6 Fig. shows a schematic principle diagram of a first temperature sensing component provided by an embodiment of the present application.
[0027] Figure 7 The schematic diagram of the principle of a second temperature sensing component provided by an embodiment of the present application is shown.
[0028] Figure 8 The schematic structural diagram of another digital temperature sensor provided by an embodiment of the present application is shown.
[0029] Figure 9 The schematic structural diagram of another digital temperature sensor provided by an embodiment of the present application is shown.
[0030] Figure 10 The schematic flowchart of a temperature detection method provided by an embodiment of the present application is shown. Detailed implementation manners
[0031] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.
[0032] It should be noted that: Similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, relational terms such as "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0033] In the description of the present application, it should also be noted that, unless otherwise clearly defined and limited, the terms "connected", "coupled" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may also be an electrical connection; it may be directly connected, or indirectly connected through an intermediate medium, and it may be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.
[0034] In order to eliminate the non - linear noise generated by the influence of temperature on the Voltage Control Oscillator (VCO) or Current Control Oscillator (ICO) in a digital temperature sensor and improve the temperature measurement accuracy of the Digital Temperature Sensor (DTS). Embodiments of this application provide a brand - new digital temperature sensor. By sensing the same temperature, it outputs a first analog signal and a second analog signal that are related to the temperature but have different slopes. Then, using a digital oscillator (VCO or ICO), the first analog signal and the second analog signal are respectively converted into a first digital clock signal and a second digital clock signal. By counting the number of cycles of the first digital clock signal and the second digital clock signal within a preset time, and then taking the difference between the two count values, this difference is used to characterize the temperature. In this way, the influence of temperature on the VCO or ICO itself can be directly eliminated, thereby improving the temperature measurement accuracy of the DTS.
[0035] The following will be combined with Figure 1 , to illustrate the digital temperature sensor provided by the embodiments of this application. The digital temperature sensor includes a temperature sensing component, a digital oscillator, and a processing module. The temperature sensing component is connected to the digital oscillator, and the digital oscillator is connected to the processing module.
[0036] Among them, the temperature sensing component is used to sense the ambient temperature and output a first analog signal and a second analog signal that are related to the temperature, and the slopes of the first analog signal and the second analog signal are different. This temperature sensing component can output a first analog signal and a second analog signal that represent the same ambient temperature but have different signal slopes. The first analog signal and the second analog signal can be analog voltage signals or analog current signals.
[0037] In an alternative embodiment, the temperature sensing component includes: a temperature sensing unit, a first output branch, and a second output branch. The temperature sensing unit is respectively connected to the first output branch and the second output branch. The temperature sensing unit is used to sense the ambient temperature and output an initial analog signal related to the temperature; the first output branch is connected to the temperature sensing unit and the digital oscillator, and is used to output a first analog signal that is in a first ratio to the initial analog signal. The second output branch is connected to the temperature sensing unit and the digital oscillator, and is used to output a second analog signal that is in a second ratio to the initial analog signal. Among them, the first ratio is different from the second ratio, so that the slopes of the first analog signal and the second analog signal are different.
[0038] In one mode, the temperature sensing unit includes: a first transistor array and a first transistor. Each transistor in the first transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the first transistor array is connected to its control end, and the second end of each transistor is also connected to the second end of the first transistor. The control end of the first transistor is connected to its first end, and the first end of the first transistor is also grounded or connected to a power supply.
[0039] Among them, the transistors in the first transistor array and the first transistor are transistors of different models. For example, if the transistors in the first transistor array are NMOS transistors, then the first transistor is a PMOS transistor. Conversely, if the transistors in the first transistor array are PMOS transistors, then the first transistor is an NMOS transistor. The models and sizes of each transistor in the first transistor array are the same, for example, they are all NMOS transistors or PMOS transistors of the same size. When the transistors in the first transistor array are NMOS transistors, at this time, the first end of each transistor is connected to a power supply; if the transistors in the first transistor array are PMOS transistors, at this time, the first end of each transistor is grounded.
[0040] Correspondingly, the first output branch includes a second transistor array and a first switch. Each transistor in the second transistor array is connected in parallel, and the first end of each transistor in the second transistor array is connected to a power supply or grounded. The second end of each transistor in the second transistor array is connected to a digital oscillator through the first switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array. Among them, the models and sizes of each transistor in the second transistor array are the same, for example, they are all NMOS transistors or PMOS transistors of the same size. When the transistors in the second transistor array are NMOS transistors, at this time, the first end of each transistor is connected to a power supply; if the transistors in the second transistor array are PMOS transistors, at this time, the first end of each transistor is grounded.
[0041] The second output branch includes a third transistor array and a second switch. Each transistor in the third transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the third transistor array is connected to a digital oscillator through the second switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array. Among them, the models and sizes of each transistor in the third transistor array are the same, for example, they are all NMOS transistors or PMOS transistors of the same size. When the transistors in the third transistor array are NMOS transistors, at this time, the first end of each transistor is connected to a power supply; if the transistors in the third transistor array are PMOS transistors, at this time, the first end of each transistor is grounded.
[0042] Among them, the first switch and the second switch can be transistor switches. For example, they can be NMOS transistors or PMOS transistors. In addition, they can also be other switches, such as single-pole single-throw switches, single-pole double-throw switches, etc.
[0043] The structures of the first transistor array, the second transistor array, and the third transistor array are similar. The difference is that the number of transistors in the three transistor arrays is different. For example, the number of transistors in the first transistor array is N1, the number of transistors in the second transistor array is N2, and the number of transistors in the third transistor array is N3.
[0044] To facilitate the understanding of the circuit structures of the above temperature sensing unit, the first output branch, and the second output branch, in one implementation, the circuit structure of the temperature sensing component is as Figure 2 shown. In this implementation, by controlling the conduction states of the first switch and the second switch, the temperature sensing component can output a first analog signal and a second analog signal at different times. For example, when the first switch is conducting and the second switch is off, the temperature sensing component outputs the first analog signal. When the first switch is off and the second switch is conducting, the temperature sensing component outputs the second analog signal.
[0045] Among them, the first analog signal = N2 / N1 * ileakage, the second analog signal = N3 / N1 * ileakage, where ileakage is the drain current of the first switching transistor. This drain current ileakage changes with the ambient temperature (the higher the temperature, the larger ileakage). In addition, this drain current also changes with the power supply voltage VDD. When the power supply voltage VDD is fixed, the drain current ileakage is only related to the ambient temperature. N2 is the number of transistors in the second transistor array, N1 is the number of transistors in the first transistor array, and N3 is the number of transistors in the third transistor array.
[0046] It should be noted that Figure 2 in the schematic diagram shown, the first transistor M0 is an NMOS transistor, and the transistors in the first transistor array M2, the second transistor array M3, and the third transistor array M4 are all PMOS transistors. In addition, it can also be the other way around, that is, the first transistor M0 is a PMOS transistor, and the transistors in the first transistor array M2, the second transistor array M3, and the third transistor array M4 are all NMOS transistors. At this time, the circuit structure of the temperature sensing component is as Figure 3 shown.
[0047] Figure 2 and Figure 3In the schematic diagram shown, the drain current ileakage changes with the change of the power supply voltage VDD. Although usually the power supply voltage is fixed, in special cases, such as when the power supply voltage is unstable, this will affect the drain current ileakage, resulting in a certain error in the final temperature. In order to eliminate the influence of the power supply voltage VDD on the drain current, in an alternative implementation, in addition to including the first transistor array and the first transistor, the temperature sensing unit may further include: a clamping transistor, denoted as M1 for example. The second end of each transistor in the first transistor array is connected to the second end of the first transistor via the clamping transistor. The clamping transistor is in an always-on state and has the same model as the first transistor. At this time, the schematic diagram of the temperature sensing component is as Figure 4 shown, where Figure 4 the dashed box part in Figure 4 is the temperature sensing unit. It should be noted that
[0048] In the schematic diagram shown, the first transistor M0 and the clamping transistor M1 are NMOS transistors, and the transistors in the first transistor array M2, the second transistor array M3, and the third transistor array M4 are all PMOS transistors.
[0048] After introducing the clamping transistor M1, the drain voltage of M0 = Vaias (the voltage applied to the gate terminal of transistor M1) - Vth (the threshold voltage of transistor M1) - Vod (the driving voltage of transistor M1), and where μ, C ox are process parameters, only related to the process of transistor M1, I1 is the current of transistor M1, and W1, L1 are the channel width and channel length of transistor M1, so that the drain voltage of M0 is independent of the power supply voltage VDD, thereby improving the accuracy of temperature detection.
[0049] In one way, the temperature sensing unit includes a bias current source, denoted as Ibias for example, a first PNP transistor, denoted as N1 for example, and a second PNP transistor, denoted as N2 for example. The emitter of the first PNP transistor is connected to the bias current source, the base of the first PNP transistor is connected to its collector, the emitter of the second PNP transistor is connected to the collector of the first PNP transistor, the base of the second PNP transistor is connected to its collector and grounded, the emitter of the first PNP transistor is also connected to the first output branch, and the emitter of the second PNP transistor is also connected to the second output branch. Correspondingly, the first output branch includes a first switch, and the first switch is connected to the emitter of the first PNP transistor.
[0050] The second output branch includes a second switch, and the second switch is connected to the emitter of the second PNP transistor. At this time, the circuit schematic diagram of the temperature sensing component is as Figure 5 shown.
[0051] Wherein, when the first switch S1 is turned on and the second switch S2 is turned off, the temperature sensing component outputs a first analog signal. At this time, Vout = 2 * vbe, where vbe is the voltage between the base and the emitter; when the first switch S1 is turned off and the second switch S2 is turned on, the temperature sensing component outputs a second analog signal. At this time, Vout = vbe.
[0052] By switching the first output branch and the second output branch in the above temperature sensing component, the temperature sensing component can output a first analog signal and a second analog signal with different slopes. In this implementation, at the same moment, the temperature sensing component will only output the first analog signal or the second analog signal. By switching the first switch and the second switch in the temperature sensing component, the first analog signal and the second analog signal can be output in a staggered manner. For example, the first analog signal is output at the first moment, the second analog signal is output at the second moment, the first analog signal is output at the third moment, and the second analog signal is output at the fourth moment.
[0053] In another implementation, the temperature sensing component includes a first temperature sensing component and a second temperature sensing component. The first temperature sensing component is used to sense the ambient temperature and output a first analog signal related to the temperature. The second temperature sensing component is used to sense the ambient temperature and output a second analog signal related to the temperature. The first temperature sensing component and the second temperature sensing component have the same temperature sensing unit. In this implementation, the temperature sensing component can output the first analog signal and the second analog signal simultaneously (at this time, the first temperature sensing component and the second temperature sensing component work simultaneously), or output the first analog signal and the second analog signal at intervals (at this time, the first temperature sensing component and the second temperature sensing component do not work simultaneously). At this time, if the first temperature sensing component and the second temperature sensing component work simultaneously, the number of digital oscillators is two. One digital oscillator is connected to the first temperature sensing component, and the other digital oscillator is connected to the second temperature sensing component. If the first temperature sensing component and the second temperature sensing component work at intervals (not simultaneously), the number of digital oscillators can be one.
[0054] In one way, the structures of the first temperature sensing component and the second temperature sensing component are the same as those of the Figures 2 to 5 temperature sensing component shown above. For example, it includes a temperature sensing unit, a first output branch, and a second output branch. By controlling the first switch S1 and the second switch S2 in the first temperature sensing component and the second temperature sensing component, the temperature sensing component can output the first analog signal and the second analog signal simultaneously, or output the first analog signal and the second analog signal at intervals.
[0055] When the temperature sensing component outputs the first analog signal and the second analog signal simultaneously, the first switch S1 of the first temperature sensing component is in the normally closed state, and the second switch S2 is in the normally open state; the first switch S1 of the second temperature sensing component is in the normally open state, and the second switch S2 is in the normally closed state. When the temperature sensing component outputs the first analog signal and the second analog signal at intervals, for example, the first analog signal is output in the first time period, and the second analog signal is output in the second time period. It can be that in the first time period, the first switch S1 of the first temperature sensing component is controlled to be in the normally closed state, the second switch S2 is in the normally open state, the first switch S1 of the second temperature sensing component is controlled to be in the normally open state, and the second switch S2 is in the normally open state. At this time, the first temperature sensing component works, and the second temperature sensing component does not work; in the second time period, the first switch S1 of the first temperature sensing component is controlled to be in the normally open state, the second switch S2 is in the normally open state, the first switch S1 of the second temperature sensing component is controlled to be in the normally closed state, and the second switch S2 is in the normally open state. At this time, the first temperature sensing component does not work, and the second temperature sensing component works.
[0056] Since in the embodiment where the temperature sensing component includes the first temperature sensing component and the second temperature sensing component, whether the temperature sensing component outputs the first analog signal and the second analog signal simultaneously or at intervals, the second switch S2 in the first temperature sensing component is always in the normally open state. At this time, the second output branch is invalid. Therefore, the second output branch can be removed; similarly, since the first switch S1 in the second temperature sensing component is always in the normally open state, at this time, the first output branch is invalid. Therefore, the first output branch can be removed. At this time, optionally, the first temperature sensing component may include the temperature sensing unit and the first output branch as described above Figures 2 to 5 shown, and the second temperature sensing component includes Figures 2 to 5 the temperature sensing unit and the second output branch shown. For the introduction of the temperature sensing unit and the first output branch and the second output branch, please refer to the corresponding content in the foregoing, and will not be elaborated here.
[0057] Similarly, if the temperature sensing component outputs the first analog signal and the second analog signal simultaneously, since the first output branch is in a continuous output state, at this time, the first switch in the above-mentioned first output branch can be removed. Similarly, since the second output branch is in a continuous output state, at this time, the second switch in the above-mentioned second output branch can be removed. It should be noted that if the temperature sensing component outputs the first analog signal and the second analog signal at intervals, the first switch of the first output branch in the first temperature sensing component needs to be retained, and the second switch of the second output branch in the second temperature sensing component needs to be retained, so as to control the first temperature sensing component and the second temperature sensing component to work at intervals. For example, in the first time period, the first temperature sensing component works and the second temperature sensing component does not work.
[0058] For the sake of easy understanding, the following is an example for illustration. Suppose the first temperature sensing component includes the temperature sensing unit and the first output branch as shown above Figure 2 After removing the first switch in the first output branch, its schematic is as shown Figure 6 Similarly, suppose the second temperature sensing component includes the temperature sensing unit and the second output branch as shown above Figure 2 After removing the second switch in the second output branch, its schematic is as shown Figure 7 shown.
[0059] Among them, the digital oscillator is connected to the temperature sensing component, and is used to convert the first analog signal into a first digital clock signal, and convert the second analog signal into a second digital clock signal. In the embodiment where the temperature sensing component includes a first temperature sensing component and a second temperature sensing component, correspondingly, the number of digital oscillators is two, one of which is connected to the first temperature sensing component, and the other is connected to the second temperature sensing component.
[0060] The digital oscillator can be a Voltage Control Oscollator (VCO) or a Current Control Oscollator (ICO). When the first analog signal and the second analog signal output by the temperature sensing component are voltage signals, the digital oscillator is a VCO, such as the first analog signal and the second analog signal output by the temperature sensing component shown above Figures 2 to 4 are current signals. When the first analog signal and the second analog signal are current signals, the digital oscillator is an ICO, such as the first analog signal and the second analog signal output by the temperature sensing component shown above Figure 5 are voltage signals.
[0061] The processing module is connected to the digital oscillator and is used to count the number of cycles of the first digital clock signal and the second digital clock signal respectively within a preset time (which can be set as needed, such as 1 minute) to obtain a first value and a second value, and based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature, obtain the output temperature. By taking the difference between the two count values and then using this difference to represent the temperature, the influence of the temperature on the VCO or ICO itself can be directly eliminated, and there is no need for an additional complex calibration circuit or algorithm to eliminate the non-linearity of the VCO or ICO, which is convenient for circuit integration.
[0062] The principle of eliminating the influence of temperature on the VCO itself is the same as that of eliminating the influence of temperature on the ICO itself. The principle of eliminating the influence of temperature on the VCO itself is described below:
[0063] Assume that the relationship between the voltage signal output by the temperature sensing component and the temperature is y = g(T), and the output function of the output clock of the VCO is f(T) = h(g(T)) + k(T), where h(g(T)) represents the relationship between voltage and frequency, and k(T) represents the relationship between the VCO itself and the temperature, that is, when the input voltage remains unchanged, the relationship between its output frequency and the temperature. Among them, h(g(T)) has good linearity and will not cause temperature errors, while k(T) has poor temperature linearity and will cause temperature errors. When using the temperature sensing component of the present invention, two different voltages, such as g1(T) and g2(T), will be output. The output clock functions of the VCO corresponding to the two different voltages are f1 = h(g1(T)) + k(T) and f2 = h(g2(T)) + k(T) respectively. Subtracting the two count values gives f1 - f2 = h(g1(T)) + k(T) - [h(g2(T)) + k(T)] = h(g1(T)) - h(g2(T)). This formula no longer contains the part k(T) that is non-linear with temperature, eliminating the influence of temperature on the VCO itself, thereby achieving the purpose of improving temperature accuracy.
[0064] In the embodiments of the present application, the difference between the first value and the second value is used to represent the temperature. After obtaining the difference between the two, based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature, the output temperature can be obtained. For example, in one way, the corresponding relationship between the preset difference and the temperature may include a temperature polynomial fitting formula, and the temperature polynomial fitting formula may be: Temp = b0 + b1·(count2 - count1)b2·(count2 - count1) 2 + b3·(count2 - count1) 3 +…+ b n ·(count2 - count1) n , where b0…b nis the polynomial fitting coefficient, count is the number of cycles of the digital clock signal, which characterizes the output frequency of the VCO or ICO. The existing corresponding relationship between the count value and the temperature is Temp = a0 + a1·count + a2·count 2 + a3·count 3 + … + a n ·count n , a0…a n are the polynomial fitting coefficients. In this application, by taking the difference between two count values and then using this difference to characterize the temperature, the influence of the VCO or ICO itself on temperature can be directly eliminated.
[0065] Among them, the above-mentioned polynomial fitting coefficients can be obtained by pre-testing different temperatures and then fitting using the test data.
[0066] The preset corresponding relationship between the difference value and the temperature, in addition to the above expressions, can also include a mapping relationship table between the count difference and the temperature, such as difference value 1 corresponding to temperature 1, difference value 2 corresponding to temperature 2, difference value 3 corresponding to temperature 3. After obtaining the difference between the first value and the second value, the temperature corresponding to the difference can be obtained by looking up the table.
[0067] In one way, the processing module may include a counter and an arithmetic unit. The counter is used to count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time respectively to obtain the first value and the second value. The arithmetic unit is connected to the counter and is used to determine the difference between the first value and the second value, and based on the difference and the preset corresponding relationship between the difference value and the temperature, obtain the output temperature.
[0068] In the embodiment where the temperature sensing component includes a first temperature sensing component and a second temperature sensing component (in this embodiment, the number of digital oscillators can be two), correspondingly, the number of counters can also be two. One counter is used to count the number of cycles of the first digital clock signal output by one of the digital oscillators, and the other counter is used to count the number of cycles of the second digital clock signal output by the other digital oscillator.
[0069] For the sake of understanding, in one embodiment, the schematic diagram of the digital temperature sensor is as Figure 8 shown, where the temperature sensing component includes a first temperature sensing component and a second temperature sensing component, the number of digital oscillators is two, and the processing module includes two calculators and an arithmetic unit.
[0070] It should be noted that in an embodiment where the temperature sensing component includes a first temperature sensing component and a second temperature sensing component, the number of digital oscillators can also be one, and correspondingly, the number of counters can also be one. Among them, both the first temperature sensing component and the second temperature sensing component are connected to the digital oscillator, and the digital oscillator is configured to convert the first analog signal output by the first temperature sensing component into a first digital clock signal within a first time period, and convert the second analog signal output by the second temperature sensing component into a second digital clock signal within a second time period.
[0071] Based on the same inventive concept, an embodiment of the present application further provides a SOC (System on Chip) chip. The SOC chip integrates the above digital temperature sensor, and the SOC chip can be a SOC chip that needs to perform temperature detection, such as a processor. A processor can be an integrated circuit chip with signal processing capabilities. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0072] In addition, the SOC chip can also be a memory, and the memory can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0073] The digital temperature sensor provided by the SOC chip embodiment of the present application has the same implementation principle and technical effects as those of the foregoing digital temperature sensor embodiment. For the sake of brief description, for the parts not mentioned in the SOC embodiment, reference may be made to the corresponding content in the foregoing digital temperature sensor embodiment.
[0074] Based on the same inventive concept, the embodiment of the present application also provides an electronic device, which at least includes a device body and the foregoing digital temperature sensor, or a SOC chip integrated with a digital temperature sensor. Among them, the electronic device may be a mobile phone, a tablet computer, a computer, etc.
[0075] The digital temperature sensor provided by the electronic device embodiment of the present application has the same implementation principle and technical effects as those of the foregoing digital temperature sensor embodiment. For the sake of brief description, for the parts not mentioned in the electronic device embodiment, reference may be made to the corresponding content in the foregoing digital temperature sensor embodiment.
[0076] Based on the same inventive concept, the embodiment of the present application also provides a temperature detection method, and the steps included therein will be described below in conjunction with Figure 9 will be described.
[0077] S1: Sense the same ambient temperature and output a first analog signal and a second analog signal related to the temperature, where the slopes of the first analog signal and the second analog signal are different.
[0078] This temperature detection method can be applied to the foregoing digital temperature sensor, and the ambient temperature can be sensed through the foregoing temperature sensing component to output a first analog signal and a second analog signal related to the temperature, where the slopes of the first analog signal and the second analog signal are different.
[0079] In one implementation manner, the temperature sensing component can output the first analog signal and the second analog signal simultaneously, or can output the first analog signal and the second analog signal at intervals. For example, when the temperature sensing component includes a temperature sensing unit, a first output branch, and a second output branch, the first analog signal and the second analog signal can be output at intervals. When the temperature sensing component includes a first temperature sensing component and a second temperature sensing component, the first analog signal and the second analog signal can be output simultaneously (or at intervals) at this time. Specifically, reference may be made to the description of the corresponding part above.
[0080] S2: Convert the first analog signal into a first digital clock signal, and convert the second analog signal into a second digital clock signal.
[0081] The foregoing digital oscillator can be used to convert the first analog signal into a first digital clock signal, and convert the second analog signal into a second digital clock signal.
[0082] S3: Count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time respectively to obtain a first value and a second value.
[0083] The above processing module can be used to count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time respectively to obtain a first value and a second value.
[0084] S4: Based on the difference between the first value and the second value, and the corresponding relationship between a preset difference and temperature, obtain the output temperature.
[0085] The above processing module can be used to obtain the output temperature based on the difference between the first value and the second value, and the corresponding relationship between a preset difference and temperature.
[0086] Optionally, the corresponding relationship between the preset difference and temperature may include a temperature polynomial fitting formula, which may be: Temp = b0 + b1·(count2 - count1) + b2·(count2 - count1) 2 + b3·(count2 - count1) 3 + … + b n ·(count2 - count1) n . At this time, the implementation process of S4 may be to substitute the difference between the first value and the second value, that is, (count2 - count1), into the temperature polynomial fitting formula to calculate and obtain the output temperature.
[0087] In addition, the temperature detection method can be implemented by using other circuit structures in addition to being applicable to the above digital temperature sensor. Therefore, the example of using the digital temperature sensor to implement the method in the above example should not be understood as a limitation to this application.
[0088] The temperature detection method provided by the embodiments of this application has the same implementation principle and the same technical effects as those of the foregoing digital temperature sensor embodiments. For the sake of brief description, for the parts not mentioned in the method embodiments, reference may be made to the corresponding content in the foregoing digital temperature sensor embodiments.
[0089] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A digital temperature sensor, characterized in that, Comprising: A temperature sensing component, configured to sense the ambient temperature and output a first analog signal and a second analog signal that are proportional to an initial analog signal related to the temperature. The waveforms of the first analog signal and the second analog signal are the same, but their slopes are different; A digital oscillator, connected to the temperature sensing component, configured to convert the first analog signal into a first digital clock signal and convert the second analog signal into a second digital clock signal; A processing module, connected to the digital oscillator, configured to count the number of cycles of the first digital clock signal and the second digital clock signal within a preset time to obtain a first value and a second value; And obtain an output temperature based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature.
2. The digital temperature sensor according to claim 1, characterized in that The temperature sensing component includes: A temperature sensing unit, configured to sense the ambient temperature and output an initial analog signal related to the temperature; A first output branch, connected to the temperature sensing unit and the digital oscillator, configured to output the first analog signal that is in a first ratio to the initial analog signal; A second output branch, connected to the temperature sensing unit and the digital oscillator, configured to output the second analog signal that is in a second ratio to the initial analog signal.
3. The digital temperature sensor according to claim 2, wherein The temperature sensing unit includes a first transistor array and a first transistor. Each transistor in the first transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the first transistor array is connected to its control end, and the second end of each transistor is also connected to the second end of the first transistor. The control end of the first transistor is connected to its first end, and the first end of the first transistor is also grounded or connected to a power supply; correspondingly, The first output branch includes a second transistor array and a first switch. Each transistor in the second transistor array is connected in parallel, and the first end of each transistor in the second transistor array is connected to a power supply or grounded. The second end of each transistor in the second transistor array is connected to the digital oscillator through the first switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array; The second output branch includes a third transistor array and a second switch. Each transistor in the third transistor array is connected in parallel, and the first end of each transistor is connected to a power supply or grounded. The second end of each transistor in the third transistor array is connected to the digital oscillator through the second switch, and the control end of each transistor is connected to the control end of each transistor in the first transistor array.
4. The digital temperature sensor according to claim 3, characterized in that, The temperature sensing unit further includes: a clamping transistor. The second end of each transistor in the first transistor array is connected to the second end of the first transistor through the clamping transistor, and the clamping transistor is in a normally open state.
5. The digital temperature sensor according to claim 2, wherein The temperature sensing unit includes a bias current source, a first PNP transistor, and a second PNP transistor. The emitter of the first PNP transistor is connected to the bias current source. The base of the first PNP transistor is connected to its collector. The emitter of the second PNP transistor is connected to the collector of the first PNP transistor. The base of the second PNP transistor is connected to its collector and grounded. The emitter of the first PNP transistor is also connected to the first output branch. The emitter of the second PNP transistor is also connected to the second output branch. Correspondingly, The first output branch includes a first switch, and the first switch is connected to the emitter of the first PNP transistor. The second output branch includes a second switch, and the second switch is connected to the emitter of the second PNP transistor.
6. The digital temperature sensor according to claim 1, wherein The temperature sensing component includes: A first temperature sensing component for sensing the ambient temperature and outputting the first analog signal related to the temperature. A second temperature sensing component for sensing the ambient temperature and outputting the second analog signal related to the temperature. The first temperature sensing component and the second temperature sensing component have the same temperature sensing unit. Correspondingly, The number of the digital oscillators is two. One of the digital oscillators is connected to the first temperature sensing component, and the other digital oscillator is connected to the second temperature sensing component.
7. The digital temperature sensor according to any one of claims 1-6, characterized in that, The processing module includes: A counter for counting the number of cycles of the first digital clock signal and the second digital clock signal respectively within a preset time to obtain a first value and a second value. An arithmetic unit connected to the counter for determining the difference between the first value and the second value, and obtaining the output temperature based on the correspondence between the difference and the preset difference and temperature.
8. A SOC chip, characterized in that, Integrating the digital temperature sensor according to any one of claims 1-7.
9. An electronic device, characterized in that, Including a body and the digital temperature sensor according to any one of claims 1-7, or the SOC chip according to claim 8.
10. A temperature detection method, applied to the digital temperature sensor according to any one of claims 1-7, characterized in that, The method includes: Sensing the same ambient temperature and outputting a first analog signal and a second analog signal that are proportional to the initial analog signal related to the temperature. The waveforms of the first analog signal and the second analog signal are the same, but the slopes are different. Converting the first analog signal into a first digital clock signal and converting the second analog signal into a second digital clock signal. Counting the number of cycles of the first digital clock signal and the second digital clock signal respectively within a preset time to obtain a first value and a second value. Obtaining the output temperature based on the difference between the first value and the second value and the correspondence between the preset difference and temperature.
11. The temperature detection method according to claim 10, characterized in that, Sensing the same ambient temperature and outputting a first analog signal and a second analog signal related to the temperature, including: Using the same temperature sensing component to sense the ambient temperature and outputting the first analog signal and the second analog signal related to the temperature simultaneously, or outputting the first analog signal and the second analog signal related to the temperature at intervals.
12. The temperature detection method according to claim 10, characterized in that, The corresponding relationship between the preset difference and the temperature includes a temperature polynomial fitting formula. Obtaining the output temperature based on the difference between the first value and the second value and the corresponding relationship between the preset difference and the temperature includes: Substituting the difference between the first value and the second value into the temperature polynomial fitting formula to calculate the output temperature.
Citation Information
Patent Citations
Frequency ratio digitizing temperature sensor with linearity correction
US7331708B2