Temperature sensing circuit and method for detecting temperature
Through the combined circuit of the current source, capacitor, switch, induction amplifier, XOR gate and counter, the problems of large area and large power consumption of traditional temperature sensing circuits are solved, and accurate and efficient temperature measurement is achieved.
Patent Information
- Application Number
- CN202410753966.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-24
- Filing Date
- 2024-06-12
- Publication Date
- 2025-07-25
AI Technical Summary
Traditional temperature sensing circuits require analog-digital converters, occupying a large area and consuming a lot of power.
Using a combined circuit including a current source, a capacitor, a switch, an induction amplifier, an XOR gate and a counter, through the charging and discharging process of the capacitor, a current source and a constant current source proportional to the absolute temperature are used to measure the voltage changes caused by temperature changes, and the temperature is determined by combining an XOR gate and a counter.
This enables accurate measurement of temperature without the need for an analog-to-digital converter, reducing circuit area and power consumption.
Smart Images

Figure CN120369133A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a temperature sensing circuit and a method for detecting temperature, and more particularly to a voltage comparison circuit and a voltage comparison method applicable to temperature detection. Background Art
[0002] Temperature sensing circuits are used to measure the temperature of an object or environment. They are widely used in various applications and scenarios, including industrial manufacturing processes, medical devices, and consumer electronics. Conventional temperature sensing circuits require an analog-to-digital converter (ADC), which occupies a large area and consumes a large amount of power. Summary of the Invention
[0003] An embodiment of the present invention provides a temperature sensing circuit, which includes a first current source, a second current source, a third current source, a first capacitor, a second capacitor, a third capacitor, a first switch, a second switch, a third switch, a first sense amplifier, a second sense amplifier, an exclusive-OR gate, and a counter. The first current source is used to provide a first current, and the first current remains constant within the temperature detection range of the temperature sensing circuit. The second current source is used to provide a second current, and the second current is proportional to the absolute temperature within the temperature detection range. The third current source is used to provide a third current, and the third current remains constant within the temperature detection range. The first capacitor is coupled to the first current source and a reference voltage source. The second capacitor is coupled to the second current source and the reference voltage source. The third capacitor is coupled to the third current source and the reference voltage source. The first switch is in parallel with the first capacitor. The second switch is in parallel with the second capacitor. The third switch is in parallel with the third capacitor. The first input terminal of the first sense amplifier is coupled to the second current source and the second capacitor, and the second input terminal of the first sense amplifier is coupled to the third current source and the third capacitor. The first input terminal of the second sense amplifier is coupled to the first current source and the first capacitor, and the second input terminal of the second sense amplifier is coupled to the third current source and the third capacitor. The first input terminal of the exclusive-OR gate is coupled to the output terminal of the first sense amplifier, and the second input terminal of the exclusive-OR gate is coupled to the output terminal of the second sense amplifier. The counter samples the output signal output by the exclusive-OR gate according to a clock signal.
[0004] Another embodiment of the present invention provides a method for detecting temperature, which includes charging a first capacitor with a first charging current within a first time period to provide a first voltage at one end of the first capacitor at the end of the first time period; charging a second capacitor with a second charging current within the first time period to provide a second voltage at one end of the second capacitor at the end of the first time period; charging a third capacitor with a third charging current within a second time period after the first time period to raise a third voltage at one end of the third capacitor; measuring a time period between a time point when the third voltage exceeds the first voltage and a time point when the third voltage exceeds the second voltage; and outputting a detected temperature according to the time period. The first charging current remains constant within a temperature range, the second charging current is proportional to the absolute temperature within the temperature range, and the third charging current remains constant within the temperature range. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Figure 1 is a schematic diagram of a temperature sensing circuit according to an embodiment of the present invention;
[0006] Figure 2 is Figure 1 a timing diagram of related signals of the shown temperature sensing circuit;
[0007] Figure 3 is a schematic diagram of a temperature sensing circuit according to another embodiment of the present invention;
[0008] Figure 4 is Figure 3 a timing diagram of related signals of the shown temperature sensing circuit;
[0009] Figure 5 is a schematic diagram of a temperature sensing circuit according to another embodiment of the present invention;
[0010] Figure 6 is a schematic diagram of a temperature sensing circuit according to another embodiment of the present invention.
[0011] Wherein, the reference numerals are explained as follows:
[0012] 11, 12, 13 - current sources;
[0013] 21, 22, 23 - sinking current sources;
[0014] 31, 32 - sense amplifiers;
[0015] 40 - exclusive OR gate;
[0016] 50 - counter;
[0017] 60 - microcontroller;
[0018] 70 to 77, 81 to 83, 91 to 93 - curves;
[0019] 100, 200, 300, 400 - Temperature sensing circuits;
[0020] C1, C2 - Comparison results;
[0021] CLK - Clock signal;
[0022] Cnom, Cpt, Cct, Cn1, Cn2 - Capacitors;
[0023] Ct - Sample count;
[0024] EN - Enable signal;
[0025] Inom, Ipt, Ict, In1', In2', Ipt', ΔIn1, ΔIpt, ΔIn2 - Currents;
[0026] Isub - Sinking current;
[0027] SW1, SW2, SW3 - Switches;
[0028] TS - Output signal;
[0029] T - Temperature;
[0030] T0, T1 to T7, Ta - Times;
[0031] Δt1, Δt2, Δt3, ΔT1, ΔT2, ΔT3 - Time periods;
[0032] Vcc, Vss - Reference voltage sources;
[0033] Vnom, Vpt, Vct, Vn1, Vn2 - Voltages. Detailed implementation
[0034] Please refer to Figure 1 . Figure 1FIG. 0 is a schematic diagram of a temperature sensing circuit 100 according to an embodiment of the present invention. The temperature sensing circuit 100 is a differential sensing temperature sensor, and includes three current sources 11, 12, and 13, three capacitors Cct, Cpt, and Cnom, three switches SW1, SW2, and SW3, two sense amplifiers 31 and 32, an exclusive-OR gate 40, a counter 50, and a microcontroller 60. The three current sources 11, 12, and 13 are all coupled to a reference voltage source Vcc for providing a positive voltage. The current source 11 has a negative temperature coefficient and is used to provide a current Ict. In other words, the current Ict decreases as the temperature increases. The current source 12 has a positive temperature coefficient and is used to provide a current Ipt. In other words, within the temperature range detected by the temperature sensing circuit 100, the current Ipt is proportional to the absolute temperature. For example, the temperature range detected by the temperature sensing circuit 100 may be from -50 degrees Celsius to 150 degrees Celsius (i.e., -50°C to 150°C), and the current Ipt is proportional to the absolute temperature within the temperature range from -50 degrees Celsius to 150 degrees Celsius. The current source 13 is used to provide a current Inom, and within the temperature range detected by the temperature sensing circuit 100, the current Inom remains constant. The capacitors Cct, Cpt, and Cnom are respectively coupled to the current sources 11, 12, and 13 and are coupled to a reference voltage source Vss, and the reference voltage source Vss can provide a ground voltage. The switches SW1, SW2, and SW3 are respectively in parallel with the capacitors Cct, Cpt, and Cnom. A first input terminal of the sense amplifier 31 is coupled to the current source 12 and the capacitor Cpt, and a second input terminal of the sense amplifier 31 is coupled to the current source 13 and the capacitor Cnom. The sense amplifier 31 compares a voltage Vpt at a first end of the capacitor Cpt and a voltage Vnom at a first end of the capacitor Cnom, and outputs a comparison result C1 according to the voltages Vpt and Vnom. A first input terminal of the sense amplifier 32 is coupled to the current source 11 and the capacitor Cct, and a second input terminal of the sense amplifier 32 is coupled to the current source 13 and the capacitor Cnom. The sense amplifier 32 compares a voltage Vct at a first end of the capacitor Cct and a voltage Vnom at a first end of the capacitor Cnom, and outputs a comparison result C2 according to the voltages Vct and Vnom. A first input terminal of an exclusive-OR gate 40 is coupled to an output terminal of the sense amplifier 31, and a second input terminal of the exclusive-OR gate 40 is coupled to an output terminal of the sense amplifier 32. The exclusive-OR gate 40 performs an exclusive-OR (XOR) operation on the comparison result C1 and the comparison result C2 to output an output signal TS. The counter 50 can be enabled or disabled according to an enable signal EN from the microcontroller 60. The counter 50 is used to sample the output signal TS according to a clock signal CLK.The microcontroller 60 determines the temperature based on the sample count Ct obtained by sampling the output signal TS during the time period between the time when the voltage Vnom exceeds the voltage Vct and the time when the voltage Vnom exceeds the voltage Vpt by the counter 50.
[0035] Please refer to Figure 1 and Figure 2 . Figure 2 is Figure 1 the timing diagram of the relevant signals of the temperature sensing circuit 100 shown. Before time T0, the microcontroller 60 uses the switches SW1, SW2, and SW3 to reset the voltage differences between the capacitors Cct, Cpt, and Cnom to zero. In other words, before time T0, the switches SW1, SW2, and SW3 are turned on to reset the voltage differences across the capacitors Cct, Cpt, and Cnom respectively. In an embodiment of the present invention, the reference voltage source Vss can provide a ground voltage, and the voltage differences between the capacitors Cct, Cpt, and Cnom are equal to the voltages Vct, Vpt, and Vnom respectively. In this case, when the switches SW1, SW2, and SW3 are turned on, the voltages Vct, Vpt, and Vnom are all equal to the ground voltage. In addition, before time T0, the microcontroller 60 turns off the current sources 11, 12, and 13 and the sense amplifiers 31 and 32, and resets the sample count Ct to 0. At time T0, the microcontroller 60 simultaneously turns off the switches SW1 and SW2, and turns on the current sources 11 and 12, while keeping the switch SW3 on and the current source 13 off. Therefore, after time T0, the capacitors Cct and Cpt are charged by the currents Ict and Ipt respectively. At time T1, the microcontroller 60 simultaneously turns off the switches SW1, SW2, and SW3, turns off the current sources 11 and 12, and turns on the current source 13. Therefore, after time T1, the voltages Vct and Vpt remain constant, and the voltage Vnom starts to rise from zero. The curve 70 represents the relationship between the voltage Vnom and time at different temperatures (-40 °C, 25 °C, and 125 °C). The curve 71 represents the relationship between the voltage Vpt and time at 125 °C. The curve 72 represents the relationship between the voltage Vpt and time at 25 °C. The curve 73 represents the relationship between the voltage Vpt and time at -40 °C. The curve 74 represents the relationship between the voltage Vct and time at -40 °C. The curve 75 represents the relationship between the voltage Vct and time at 25 °C. The curve 76 represents the relationship between the voltage Vct and time at 125 °C.
[0036] The sense amplifier 31 compares the voltage Vpt and the voltage Vnom to output a comparison result C1. The sense amplifier 32 compares the voltage Vct and the voltage Vnom to output a comparison result C2. The exclusive-OR gate 40 performs an exclusive-OR operation on the comparison result C1 and the comparison result C2 to output an output signal TS. The curves 81, 82, and 83 respectively represent the waveforms of the output signal TS at different temperatures (125 °C, 25 °C, and -40 °C). When the voltage Vnom exceeds the voltage Vct, the output signal TS rises from a low potential to a high potential. When the voltage Vnom exceeds the voltage Vpt, the output signal TS drops from a high potential to a low potential. As Figure 2 shown, when the temperature is 125 °C, the output signal TS rises from a low potential to a high potential at time T2 and drops from a high potential to a low potential at time T7 (as shown by curve 81). When the temperature is 25 °C, the output signal TS rises from a low potential to a high potential at time T3 and drops from a high potential to a low potential at time T6 (as shown by curve 82). When the temperature is -40 °C, the output signal TS rises from a low potential to a high potential at time T4 and drops from a high potential to a low potential at time T5 (as shown by curve 83). The time period between time T2 and T7 is Δt3, the time period between time T3 and T6 is Δt2, and the time period between time T4 and T5 is Δt1. The microcontroller 60 determines that the temperature is -40 °C based on the time period Δt1, determines that the temperature is 25 °C based on the time period Δt2, and determines that the temperature is 125 °C based on the time period Δt3.
[0037] After time T1, counter 50 can be enabled by enable signal EN. When counter 50 is enabled, counter 50 samples output signal TS according to clock signal CLK to output sample count Ct. In one embodiment of the present invention, when the voltage level of output signal TS is high, sample count Ct increases by 1 at each rising edge of clock signal CLK. Microcontroller 60 can measure time periods Δt1, Δt2, and Δt3 according to sample count Ct obtained by sampling output signal TS by counter 50 during the time period between the time when voltage Vnom exceeds voltage Vct and the time when voltage Vnom exceeds voltage Vpt. Therefore, sample count Ct can represent the length of time periods Δt1, Δt2, or Δt3. Since microcontroller 60 can determine temperature according to measured time periods Δt1, Δt2, and Δt3, microcontroller 60 can determine the temperature to be -40 °C according to sample count Ct obtained by sampling output signal TS by counter 50 between times T4 and T5; determine the temperature to be 25 °C according to sample count Ct obtained by sampling output signal TS by counter 50 between times T3 and T6; and determine the temperature to be 125 °C according to sample count Ct obtained by sampling output signal TS by counter 50 between times T2 and T7. After microcontroller 60 determines the temperature according to time periods Δt1, Δt2, or Δt3, microcontroller 60 can output the detected temperature T.
[0038] Please refer to Figure 3 。 Figure 3FIG. 0 is a schematic diagram of a temperature sensing circuit 200 according to another embodiment of the present invention. The temperature sensing circuit 200 is a differential inductive temperature sensor, including three current sources 11, 12, and 13, three sinking current sources 21, 22, and 23, three capacitors Cn1, Cpt, and Cn2, three switches SW1, SW2, and SW3, two sense amplifiers 31 and 32, an exclusive OR gate 40, a counter 50, and a microcontroller 60. In this embodiment, the current source 11 is used to provide a current In1, and the current In1 remains constant within the temperature range detected by the temperature sensing circuit 200. For example, the temperature range detected by the temperature sensing circuit 200 may be from minus 50 degrees Celsius to 150 degrees Celsius (i.e., -50°C to 150°C). However, the present invention is not limited thereto. The current source 12 has a positive temperature coefficient and is used to provide a current Ipt, and the current Ipt is proportional to the absolute temperature within the temperature range detected by the temperature sensing circuit 200. The current source 13 is used to provide a current In2, and the current In2 remains constant within the temperature range detected by the temperature sensing circuit 200. Each of the sinking current sources 21, 22, and 23 provides a sinking current Isub, and the sinking current Isub is less than the currents In1, Ipt, and In2 and remains constant within the temperature range detected by the temperature sensing circuit 200. The sinking current Isub may be used to remove DC information from the currents In1, Ipt, and In2. Further, the sinking current source 21 is used to divert the sinking current Isub from the current In1 to provide a current ΔIn1 to the capacitor Cn1 to charge the capacitor Cn1; the sinking current source 22 is used to divert the sinking current Isub from the current Ipt to provide a current ΔIpt to the capacitor Cpt to charge the capacitor Cpt; and the sinking current source 23 is used to divert the sinking current Isub from the current In2 to provide a current ΔIn2 to the capacitor Cn2 to charge the capacitor Cn2. Therefore, the capacitors Cn1, Cpt, and Cn2 will be charged by the currents ΔIn1, ΔIpt, and ΔIn2, respectively. The current ΔIn1 is equal to (In1 - Isub), the current ΔIpt is equal to (Ipt - Isub), and the current ΔIn2 is equal to (In2 - Isub). Since the currents In1, In2, and Isub remain constant within the temperature range detected by the temperature sensing circuit 200, the currents ΔIn1 and ΔIn2 also remain constant within the temperature range detected by the temperature sensing circuit 200. The sense amplifier 31 compares the voltage Vpt and the voltage Vn2 at the first terminal of the capacitor Cn2 and outputs a comparison result C1 based on the voltages Vpt and Vn2. The sense amplifier 32 compares the voltage Vn2 and the voltage Vn1 at the first terminal of the capacitor Cn1 and outputs a comparison result C2 based on the voltages Vn2 and Vn1.Since the DC components of the currents In1, Ipt, and In2 are eliminated by the sink current Isub, the alternating current (AC) components of the currents In1, Ipt, and In2 exist in the currents ΔIn1, ΔIpt, and ΔIn2, which do not contain DC components. Therefore, the voltages Vn1, Vpt, and Vn2 will be within the input common-mode range of the sense amplifiers 31 and 32. The microcontroller 60 determines the temperature based on the sample count Ct obtained by sampling the output signal TS during the time period between when the voltage Vn2 exceeds the voltage Vn1 and when the voltage Vn2 exceeds the voltage Vpt by the counter 50.
[0039] Please refer to Figure 3 and Figure 4 . Figure 4 is Figure 3 the timing diagram of the relevant signals of the temperature sensing circuit 200 shown. Before time T0, the microcontroller 60 resets the voltage difference between the capacitors Cn1, Cpt, and Cn2 to zero using the switches SW1, SW2, and SW3. In other words, before time T0, the switches SW1, SW2, and SW3 are turned on to reset the voltage difference between the capacitors Cn1, Cpt, and Cn2. In an embodiment of the present invention, the reference voltage source Vss can provide a ground voltage, and the voltage differences between the capacitors Cn1, Cpt, and Cn2 are equal to Vn1, Vpt, and Vn2, respectively. In addition, before time T0, the microcontroller 60 turns off the current sources 11 to 13, the sink current sources 21 to 23, and the sense amplifiers 31 and 32, and resets the sample count Ct of the counter 50 to 0. At time T0, the microcontroller 60 simultaneously turns off the switches SW1 and SW2, turns on the current sources 11 and 12, and the sink current sources 21 and 22, while keeping the switch SW3 on, the current source 13 off, and the sink current source 23 off. Therefore, after time T0, the capacitors Cn1 and Cpt are charged by the currents ΔIn1 and ΔIpt, respectively. At time T1, the microcontroller 60 simultaneously turns off the switches SW1, SW2, and SW3, the current sources 11 and 12, and the sink current sources 21 and 22, and turns on the current source 13 and the sink source 23. Therefore, after time T1, the voltages Vn1 and Vpt remain constant, and the voltage Vn2 starts to rise from zero. Curve 70 also represents the relationship between the voltage Vn2 and time at different temperatures (-40 °C, 25 °C, and 125 °C). Curve 77 represents the relationship between the voltage Vn1 and time at different temperatures (-40 °C, 25 °C, and 125 °C).
[0040] Please refer to Figure 3 and Figure 4。The sense amplifier 31 compares the voltage Vpt and the voltage Vn2 to output a comparison result C1. The sense amplifier 32 compares the voltage Vn1 and the voltage Vn2 to output a comparison result C2. The curves 91, 92, and 93 respectively represent the waveforms of the output signal TS at different temperatures (125 °C, 25 °C, and -40 °C). When the voltage Vn2 exceeds the voltage Vn1, the output signal TS rises from a low potential to a high potential. When the voltage Vn2 exceeds the voltage Vpt, the output signal TS is pulled from a high potential to a low potential. As Figure 4 shown, when the temperature is -40 °C, 25 °C, or 125 °C, the output signal TS rises from a low potential to a high potential at the time Ta after the time T3. When the temperature is 125 °C, the output signal TS is pulled from a high potential to a low potential at the time T7 (as shown by the curve 91). When the temperature is 25 °C, the output signal TS is pulled from a high potential to a low potential at the time T6 (as shown by the curve 92). When the temperature is -40 °C, the output signal TS is pulled from a high potential to a low potential at the time T5 (as shown by the curve 93). The time period between the time T7 and Ta is ΔT3, the time period between the time T6 and Ta is ΔT2, and the time period between the time T5 and Ta is ΔT1. The microcontroller 60 determines that the temperature is -40 °C based on the time period ΔT1, determines that the temperature is 25 °C based on the time period ΔT2, and determines that the temperature is 125 °C based on the time period ΔT3.
[0041] In one embodiment, the microcontroller 60 activates the counter 50 at the time T1. In another embodiment, the microcontroller 60 activates the counter 50 at the time T3 or at any time between T1 and Ta to minimize the power consumption of the counter 50.
[0042] The microcontroller 60 can determine the temperature based on the sample count Ct obtained by sampling the output signal TS by the counter 50 within the time period between the time when the voltage Vn2 exceeds the voltage Vn1 and the time when the voltage Vn2 exceeds the voltage Vpt. Specifically, the microcontroller 60 determines that the temperature is -40 °C based on the sample count Ct obtained by sampling the output signal TS by the counter 50 within the time period between the time Ta and the time T5; determines that the temperature is 25 °C based on the sample count Ct obtained by sampling the output signal TS by the counter 50 within the time period between the time Ta and the time T6; and determines that the temperature is 125 °C based on the sample count Ct obtained by sampling the output signal TS by the counter 50 within the time period between the time Ta and the time T7.
[0043] In one embodiment of the present invention, the microcontroller 60 can adjust the slope of the curve 70 by adjusting the current ΔIn2, thereby changing the time lengths of the time periods ΔT1, ΔT2, and ΔT3. When the microcontroller 60 increases the current ΔIn2, the capacitor Cn2 charges faster, causing the voltage Vn2 to rise faster and the slope of the curve 70 to become steeper. Consequently, the time periods ΔT1, ΔT2, and ΔT3 are shortened. Conversely, when the microcontroller 60 decreases the current ΔIn2, the capacitor Cn2 charges slower, causing the voltage Vn2 to rise slower and the slope of the curve 70 to become flatter. Therefore, the time periods ΔT1, ΔT2, and ΔT3 are extended. The microcontroller 60 can adjust the current ΔIn2 by adjusting the current Ipt and / or the sinking current Isub. As the time periods ΔT1, ΔT2, and / or ΔT3 are extended, the sample count Ct obtained by sampling the output signal TS by the counter 50 increases accordingly, thereby improving the accuracy of the detected temperature T output by the microcontroller 60.
[0044] Please refer to Figure 5 。 Figure 5 FIG. 300 is a schematic diagram of a temperature sensing circuit 300 according to another embodiment of the present invention. The temperature sensing circuit 300 is a differential inductive temperature sensor, including three current sources 11, 12, and 13, a sinking current source 22, three capacitors Cn1, Cpt, and Cn2, three switches SW1, SW2, and SW3, two sense amplifiers 31 and 32, an exclusive OR gate 40, a counter 50, and a microcontroller 60. In this embodiment, the current source 11 is used to provide a current In1', and the current In1' is equal to the aforementioned current ΔIn1. The current source 13 is used to provide a current In2', and the current In2' is equal to the aforementioned current ΔIn2. Therefore, the currents In1', In2', ΔIn1, and ΔIn2 remain constant within the temperature range detected by the temperature sensing circuit 300. Also, Figure 5 the capacitors Cn1, Cpt, and Cn2, the three switches SW1, SW2, and SW3, the two sense amplifiers 31 and 32, the exclusive OR gate 40, the counter 50, and the microcontroller 60 in the temperature sensing circuit 300 in Figure 3 operate in the same manner as the capacitors Cn1, Cpt, and Cn2, the three switches SW1, SW2, and SW3, the two sense amplifiers 31 and 32, the exclusive OR gate 40, the counter 50, and the microcontroller 60 in the temperature sensing circuit 200 in
[0045] Please refer to Figure 6 。 Figure 6Schematic diagram of a temperature sensing circuit 400 according to another embodiment of the present invention. The temperature sensing circuit 400 is a differential inductive temperature sensor, including three current sources 11, 12, and 13, three capacitors Cn1, Cpt, and Cn2, three switches SW1, SW2, and SW3, two sense amplifiers 31 and 32, an exclusive OR gate 40, a counter 50, and a microcontroller 60. In this embodiment, the current source 11 is used to provide a current In1', and the current In1' is equal to the aforementioned current ΔIn1. The current source 12 is used to provide a current Ipt', and the current Ipt' is equal to the aforementioned current ΔIpt. The current source 13 is used to provide a current In2', and the current In2' is equal to the aforementioned current ΔIn2. Therefore, the currents In1', In2', ΔIn1, and ΔIn2 remain constant within the temperature range detected by the temperature sensing circuit 400. Thus, Figure 6 the operations of the capacitors Cn1, Cpt, and Cn2, the three switches SW1, SW2, and SW3, the two sense amplifiers 31 and 32, the exclusive OR gate 40, the counter 50, and the microcontroller 60 in the temperature sensing circuit 400 of Figure 3 are the same as those of the capacitors Cn1, Cpt, and Cn2, the three switches SW1, SW2, and SW3, the two sense amplifiers 31 and 32, the exclusive OR gate 40, the counter 50, and the microcontroller 60 in the temperature sensing circuit 200 of
[0046] Embodiments of the present invention provide a temperature sensing circuit that uses a combination of current sources, capacitors, switches, two sense amplifiers, an exclusive OR gate, and a counter to accurately measure the temperature within a specific range. The temperature sensing circuit uses three current sources and three capacitors for storing voltage. The switches are used to reset the voltages at the inputs of the two sense amplifiers. The two sense amplifiers compare the terminal voltages of the three capacitors to determine two time points. The exclusive OR gate processes the outputs from the two sense amplifiers to determine the time period between the two time points. The counter samples the output of the exclusive OR gate during the time period using a clock signal. Each switch is used to reset the terminal voltage of the corresponding capacitor. The two sense amplifiers compare the terminal voltages of the three capacitors to determine two time points. The exclusive OR gate processes the outputs from the two sense amplifiers to determine the time period between the two time points. The counter samples the output signal output by the exclusive OR gate using a clock signal, and the sample count obtained by sampling the output signal during the above time period can be used as a basis for determining the temperature. The temperature output by the temperature sensing circuit can be presented in digital form.
[0047] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A temperature sensing circuit, characterized in that, The temperature sensing circuit includes: A first current source for providing a first current that remains constant within the temperature detection range of the temperature sensing circuit; A second current source for providing a second current that is proportional to the absolute temperature within the temperature detection range; A third current source for providing a third current that remains constant within the temperature detection range; A first capacitor coupled to the first current source and a reference voltage source; A second capacitor coupled to the second current source and the reference voltage source; A third capacitor coupled to the third current source and the reference voltage source; A first switch in parallel with the first capacitor; A second switch in parallel with the second capacitor; A third switch in parallel with the third capacitor; A first sense amplifier having: A first input terminal coupled to the second current source and the second capacitor; and A second input terminal coupled to the third current source and the third capacitor; A second sense amplifier having: A first input terminal coupled to the first current source and the first capacitor; and A second input terminal coupled to the third current source and the third capacitor; An exclusive-OR gate having: A first input terminal coupled to the output terminal of the first sense amplifier; and A second input terminal coupled to the output terminal of the second sense amplifier; and A counter for sampling the output signal output by the exclusive-OR gate according to a clock signal.
2. The temperature sensing circuit according to claim 1, wherein The first capacitor is charged within a first time period to provide a first voltage at one end of the first capacitor at the end of the first time period; Wherein, the second capacitor is charged within the first time period to provide a second voltage at one end of the second capacitor at the end of the first time period; and Wherein, the third capacitor is charged within a second time period after the first time period to raise a third voltage at one end of the third capacitor.
3. The temperature sensing circuit according to claim 1, wherein, It further includes a microcontroller for determining the temperature according to the sample count of sampling the output signal by the counter within the time period between the time point when the third voltage exceeds the first voltage and the time point when the third voltage exceeds the second voltage.
4. The temperature sensing circuit according to claim 1, characterized in that, It further includes: A first sinking current source coupled to the first current source for diverting a first sinking current from the first current to provide a first charging current to the first capacitor, wherein both the first sinking current and the first charging current are less than the first current; A second sinking current source coupled to the second current source for diverting a second sinking current from the second current to provide a second charging current to the second capacitor, wherein both the second sinking current and the second charging current are less than the second current; And A third sinking current source coupled to the third current source for diverting a third sinking current from the third current to provide a third charging current to the third capacitor, wherein both the third sinking current and the third charging current are less than the third current.
5. The temperature sensing circuit according to claim 4, wherein The first charging current charges the first capacitor within a first time period to provide a first voltage at one end of the first capacitor at the end of the first time period; Wherein, the second charging current charges the second capacitor within the first time period, so as to provide a second voltage at one end of the second capacitor at the end of the first time period; and Wherein, the third charging current charges the third capacitor within the second time period, so as to raise the third voltage at one end of the third capacitor.
6. The temperature sensing circuit according to claim 5, characterized in that It further includes a microcontroller, which is configured to determine the temperature according to the sample count of sampling the output signal by the counter within the time period between the time point when the third voltage exceeds the first voltage and the time point when the third voltage exceeds the second voltage.
7. The temperature sensing circuit according to claim 5, wherein Within the first time period, the first current source, the second current source, the first sinking current source, and the second sinking current source are turned on, while the third current source and the third sinking current source are turned off; and Wherein, within the second time period, the first current source, the second current source, the first sinking current source, and the second sinking current source are turned off, while the third current source and the third sinking current source are turned on.
8. The temperature sensing circuit according to claim 4, wherein, The first sinking current, the second sinking current, and the third sinking current are equal.
9. The temperature sensing circuit according to claim 4, characterized in that, The first sinking current source, the second sinking current source, and the third sinking current source form a current mirror.
10. The temperature sensing circuit according to claim 1, characterized in that, It further includes a sinking current source, coupled to the second current source, for diverting a sinking current from the second current to provide a charging current to the second capacitor, wherein both the sinking current and the charging current are less than the second current.
11. The temperature sensing circuit according to claim 10, wherein, The first current charges the first capacitor within the first time period, so as to provide a first voltage at one end of the first capacitor at the end of the first time period; Wherein, the charging current charges the second capacitor within the first time period, so as to provide a second voltage at one end of the second capacitor at the end of the first time period; and Wherein, the third current charges the third capacitor within the second time period, so as to raise the third voltage at one end of the third capacitor.
12. The temperature sensing circuit according to claim 11, wherein It further includes a microcontroller, which is configured to determine the temperature according to the sample count of sampling the output signal by the counter within the time period between the time point when the third voltage exceeds the first voltage and the time point when the third voltage exceeds the second voltage.
13. The temperature sensing circuit according to claim 11, wherein Within the first time period, the first current source, the second current source, and the sinking current source are turned on, while the third current source is turned off; and Wherein, within the second time period, the first current source, the second current source, and the sinking current source are turned off, while the third current source is turned on.
14. The temperature sensing circuit according to claim 1, characterized in that, The first current charges the first capacitor within the first time period, so as to provide a first voltage at one end of the first capacitor at the end of the first time period; Wherein, the second current charges the second capacitor within the first time period, so as to provide a second voltage at one end of the second capacitor at the end of the first time period; and Wherein, the third current charges the third capacitor within the second time period, so as to raise the third voltage at one end of the third capacitor.
15. The temperature sensing circuit according to claim 14, wherein Further comprising a microcontroller, configured to determine a temperature according to a sample count of sampling the output signal by the counter within a time period between a time point when the third voltage exceeds the first voltage and a time point when the third voltage exceeds the second voltage.
16. The temperature sensing circuit according to claim 1, wherein Further comprising a microcontroller, configured to determine a temperature according to a sample count of sampling the output signal by the counter.
17. The temperature sensing circuit according to claim 1, wherein The first current is equal to the third current.
18. The temperature sensing circuit according to claim 1, wherein The capacitance values of the first capacitor, the second capacitor, and the third capacitor are equal.
19. A method for detecting temperature, characterized in that, The method includes: Charging a first capacitor with a first charging current within a first time period to provide a first voltage at one end of the first capacitor at the end of the first time period, wherein the first charging current remains constant within a temperature range; Charging a second capacitor with a second charging current within the first time period to provide a second voltage at one end of the second capacitor at the end of the first time period, wherein the second charging current is proportional to the absolute temperature within the temperature range; Charging a third capacitor with a third charging current within a second time period after the first time period to raise a third voltage at one end of the third capacitor, wherein the third charging current remains constant within the temperature range; Measuring a time period between a time point when the third voltage exceeds the first voltage and a time point when the third voltage exceeds the second voltage; and Outputting a detected temperature according to the time period.
20. The method according to claim 19, wherein, The first charging current is equal to the third charging current.