Temperature detection circuit, method, chip and electronic device
By using a temperature sensor combining NPN and PNP transistors, and combining it with a digital comparator to determine the temperature difference, the problem of inaccurate temperature detection caused by bias current source failure was solved, and reliable temperature detection was achieved when the current generation module was fault-free.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHIPSEA TECH SHENZHEN CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-09
AI Technical Summary
In existing temperature detection solutions, the reliability of temperature detection is difficult to guarantee when the bias current source fails, and subsequent multiplication cancellation and single-point calibration are ineffective.
A set of NPN transistors and a set of PNP transistors are used as temperature sensors. A digital comparator is used to determine the difference between the temperatures measured by the two sets of sensors to determine whether the system has malfunctioned. When the difference is less than a preset temperature, the temperature of one set is selected as the detection result. When the difference is greater than the preset temperature, the current generation unit is switched to ensure reliability.
This improves the reliability of temperature detection results, ensuring accurate temperature detection results when the current generation module is fault-free.
Smart Images

Figure CN122171044A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic circuit technology, specifically to a temperature detection circuit, method, chip, and electronic device. Background Technology
[0002] Temperature sensors can use a bias current source to generate a voltage difference through a single set of N-type or P-type transistors, and then directly calculate the temperature based on this voltage difference.
[0003] However, the temperatures obtained by using a single N-type or P-type tube may not always match the actual temperature in some cases, which reduces the reliability of temperature detection. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a temperature detection circuit, method, chip, and electronic device to alleviate the above technical problems.
[0005] In a first aspect, embodiments of this application provide a temperature detection circuit, which includes a current generation module, a temperature detection module, and a control module. The current generation module generates a first current and a second current. The temperature detection module generates a first voltage difference and a second voltage difference based on the first current and the second current, wherein the first voltage difference and the second voltage difference have positive temperature coefficients. The control module converts the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
[0006] Secondly, embodiments of this application also provide a temperature detection method, which includes: generating a first current and a second current; generating a first voltage difference and a second voltage difference based on the first current and the second current, wherein the first voltage difference and the second voltage difference have positive temperature coefficients; converting the first voltage difference and the second voltage difference into a first temperature and a second temperature respectively, and calculating the temperature difference between the first temperature and the second temperature; when the temperature difference is less than or equal to a preset temperature value, selecting the first temperature or the second temperature as the temperature detection result.
[0007] Thirdly, embodiments of this application also provide a chip that includes the temperature detection circuit described above or performs the temperature detection method described above.
[0008] Fourthly, embodiments of this application also provide an electronic device, which includes the temperature detection circuit or chip described above. The temperature detection circuit, method, chip, and electronic device provided in this application generate a first current and a second current through a current generation module. The temperature detection module generates a first voltage difference and a second voltage difference based on the first current and the second current. The first voltage difference and the second voltage difference have positive temperature coefficients. A control module converts the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result. This allows for obtaining the temperature detection result when the current generation module is functioning correctly, thereby improving the reliability of the temperature detection result.
[0009] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A schematic block diagram of the temperature detection circuit provided in an embodiment of this application is shown.
[0012] Figure 2 The schematic diagram of the current generation module is shown.
[0013] Figure 3 The circuit diagram of the current generating unit is shown.
[0014] Figure 4 The circuit diagram of the temperature detection module is shown.
[0015] Figure 5 The schematic diagram of the control module is shown.
[0016] Figure 6 The circuit schematic of the comparator unit is shown.
[0017] Figure 7 A schematic diagram illustrating the working process of the temperature detection circuit provided in an embodiment of this application is shown.
[0018] Figure 8 A schematic diagram of the chip structure provided in an embodiment of this application is shown.
[0019] Figure 9A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0020] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0021] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0022] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0023] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0024] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.
[0025] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0026] It should be noted that in the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. In addition, the character " / ", unless otherwise specified, generally indicates that the associated objects before and after it are in an "or" relationship.
[0027] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0028] In the embodiments of this application, the first terminal / first end of each transistor is one of the source and the drain, and the second terminal / second end of each transistor is the other of the source and the drain. Since the source and drain of a transistor can be structurally symmetrical, they can be structurally indistinguishable. That is, the first terminal / first end and the second terminal / second end of the transistor in the embodiments of this application can be structurally indistinguishable. For example, when the transistor is a P-type transistor, the first terminal / first end is the source, and the second terminal / second end is the drain; for example, when the transistor is an N-type transistor, the first terminal / first end is the drain, and the second terminal / second end is the source.
[0029] The drawback of the traditional approach is that if the bias current source in the temperature detection scheme fails, the reliability of the temperature value measured by the temperature detection scheme cannot be guaranteed, and subsequent multiplication offset offset and single-point calibration are meaningless.
[0030] In view of this, this application uses one set of NPN transistors and one set of PNP transistors as two sets of temperature sensors to measure temperature separately, and uses a digital comparator to determine the difference between the temperatures measured by the two sets of sensors to determine whether the temperature sensing system has malfunctioned: when the temperature difference corresponding to the two sets of ΔVBE is <2℃, the temperature corresponding to the ΔVBE of the NPN set of sensors is taken as the overall temperature detection result of the sensor, and the PNP set of sensors does not work and is used as a backup; when the temperature difference corresponding to the two sets of ΔVBE is >2℃, it indicates that the current source providing the bias current has malfunctioned, the output of the digital comparator flips, the register configuration is switched to replace the bias current, so that it can work normally and ensure the reliability of the temperature measured by the temperature sensor.
[0031] like Figure 1 As shown in the figure, this application embodiment provides a temperature detection circuit 100, which includes a current generation module 10, a temperature detection module 20, and a control module 30. The current generation module 10 is used to generate a first current and a second current. The temperature detection module 20 is used to generate a first voltage difference and a second voltage difference based on the first current and the second current. The first voltage difference and the second voltage difference have positive temperature coefficients. The control module 30 is used to convert the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculate the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
[0032] It is understood that the temperature detection circuit 100 provided in this application embodiment generates a first current and a second current through the current generation module 10. The temperature detection module 20 generates a first voltage difference and a second voltage difference based on the first current and the second current. The control module 30 converts the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result. The temperature detection result can be obtained when the current generation module 10 is fault-free, thereby improving the reliability of the temperature detection result.
[0033] It should be noted that ΔV BE1 Represents the first voltage difference, ΔV BE2 This indicates the second voltage difference.
[0034] In some embodiments, such as Figure 2 As shown, the current generating module 10 includes multiple current generating units 11, each current generating unit 11 being used to generate a first current and a second current; the control module 30 is also used to control the current generating module 10 to switch different current generating units 11 when the temperature difference is greater than a preset temperature value.
[0035] It should be noted that when the temperature difference is less than or equal to the preset temperature value, it indicates that the current generating module 10 is not malfunctioning, and the provided first and second currents are normal. In this case, the temperature detection result is reliable. When the temperature difference is greater than the preset temperature value, it indicates that the current generating unit 11 in the current generating module 10, which currently provides the first and second currents, is malfunctioning, and the provided first and second currents are abnormal. In this case, the temperature detection result is unreliable. Therefore, when the temperature difference is greater than the preset temperature value, the current generating module 10 should use a different current generating unit 11, such as another current generating unit 11, to provide the first and second currents until the provided first and second currents are normal.
[0036] The preset temperature value is generally set relatively small; for example, the preset temperature value is 2 degrees Celsius. In some embodiments, when the temperature difference is small, such as 3 degrees Celsius, the issue is generally considered to be related to the accuracy of the current source in the current generation module 10. If the temperature difference is large, such as 10 degrees Celsius, it may be due to poor contact in the transistor or other circuits, which is not within the scope of this application.
[0037] In some embodiments, such as Figure 3 As shown, the current generating unit 11 includes a first current source A1, a first switch S31, a second current source A2, and a second switch S32. The first current source A1 is used to generate a first current. The first switch S31 is connected in series with the first current source A1 and is used to select the first current output by different current generating units 11 to the temperature detection module 20 according to the control of the control module 30. The second current source A2 is used to generate a second current. The second switch S32 is connected in series with the second current source A2 and is used to select the second current output by different current generating units 11 to the temperature detection module 20 according to the control of the control module 30.
[0038] It should be noted that the first switch S31 can control whether the first current from the first current source A1 is supplied to the temperature detection module 20. When the first switch S31 is open, it can control that the first current is not supplied to the temperature detection module 20; or, when the first switch S31 is closed, it can control that the first current is supplied to the temperature detection module 20. The second switch S32 can control whether the second current from the second current source A2 is supplied to the temperature detection module 20. When the second switch S32 is open, it can control that the second current is not supplied to the temperature detection module 20; or, when the second switch S32 is closed, it can control that the second current is supplied to the temperature detection module 20. In this way, by controlling the first switch S31 and the second switch S32, different current generating units 11 can be switched to change the supplied first current and second current until the first current and second current are normal.
[0039] Where VCCD represents the power supply voltage, I2 represents the first current, and I1 represents the second current. I2:I1=N:1, N≥1.
[0040] In some embodiments, such as Figure 4 As shown, the temperature detection module 20 includes a third current source A3, a third switch S11, a first transistor Q1, a fourth current source A4, a fourth switch S12, and a second transistor Q2. The third current source A3 is used to generate a third current based on the first current. The first terminal of the third switch S11 is connected to the third current source A3. The first electrode of the first transistor Q1 is connected to the control electrode of the first transistor Q1 and the second terminal of the third switch S11. The second electrode of the first transistor Q1 is connected to the ground terminal GND. The first transistor Q1 is an NPN transistor. The fourth current source A4 is used to generate a fourth current based on the second current. The first terminal of the fourth switch S12 is connected to the fourth current source A4. The first electrode of the second transistor Q2 is connected to the control electrode of the second transistor Q2 and the second terminal of the fourth switch S12. The second electrode of the second transistor Q2 is connected to the ground terminal GND. The second transistor Q2 is an NPN transistor.
[0041] It should be noted that the first terminal of the first transistor Q1 and the first terminal of the second transistor Q2 output a first voltage difference. The upper terminals of the third current source A3 and the fourth current source A4 are also connected to a power supply voltage, such as a VCCD or other power supply terminal. I4 represents the third current, which can be the same as or proportional to the first current. I3 represents the fourth current, which can be the same as or proportional to the second current. The voltage at the first terminal of the first transistor Q1 is the voltage difference between the base and emitter of the first transistor Q1, and the voltage at the first terminal of the second transistor Q2 is the voltage difference between the base and emitter of the second transistor Q2. The third current can be obtained by mirroring the first current, and the fourth current can be obtained by mirroring the second current. The third switch S11 controls the flow of the third current through the first transistor Q1, and the fourth switch S12 controls the flow of the fourth current through the second transistor Q2.
[0042] When both the third switch S11 and the fourth switch S12 are turned on, the first temperature detection unit 21 can perform temperature measurement; or, when at least one of the third switch S11 and the fourth switch S12 is turned off, the first temperature detection unit 21 stops measuring the temperature.
[0043] When the current generation module 10 is not faulty, since both the first transistor Q1 and the second transistor Q2 are NPN transistors, the first temperature corresponding to the first voltage difference, i.e., ΔVBE1, is more accurate than the second temperature. Therefore, the first temperature can be used as the temperature detection result output by the temperature detection circuit 100.
[0044] In some embodiments, such as Figure 4 As shown, the temperature detection module 20 also includes a fifth current source A5, a fifth switch S21, a third transistor Q3, a sixth current source A6, a sixth switch S22, and a fourth transistor Q4. The fifth current source A5 is used to generate a fifth current based on the first current. The first terminal of the fifth switch S21 is connected to the fifth current source A5. The first terminal of the third transistor Q3 is connected to the second terminal of the fifth switch S21, and the second terminal of the third transistor Q3 is connected to the control terminal and ground terminal GND of the third transistor Q3. The third transistor Q3 is a PNP type transistor. The sixth current source A6 is used to generate a sixth current based on the second current. The first terminal of the sixth switch S22 is connected to the sixth current source A6. The first terminal of the fourth transistor Q4 is connected to the second terminal of the sixth switch S22, and the second terminal of the fourth transistor Q4 is connected to the control terminal and ground terminal GND of the fourth transistor Q4. The fourth transistor Q4 is a PNP type transistor.
[0045] It should be noted that the first terminal of the third transistor Q3 and the first terminal of the fourth transistor Q4 output a second voltage difference. The upper terminals of the fifth current source A5 and the sixth current source A6 are also connected to a power supply voltage, such as VCCD or other power supply terminals. I6 represents the fifth current, which can be the same as or proportional to the first current. I5 represents the sixth current, which can be the same as or proportional to the second current. The voltage at the first terminal of the third transistor Q3 is the voltage difference between the emitter and base of the third transistor Q3, and the voltage at the first terminal of the fourth transistor Q4 is the voltage difference between the emitter and base of the fourth transistor Q4. The fifth current can be obtained by mirroring the first current, and the sixth current can be obtained by mirroring the second current. The fifth switch S21 controls the flow of the fifth current through the third transistor Q3, and the sixth switch S22 controls the flow of the sixth current through the fourth transistor Q4.
[0046] When both the fifth switch S21 and the sixth switch S22 are turned on, the second temperature detection unit 22 can perform temperature measurement; or, when at least one of the fifth switch S21 and the sixth switch S22 is turned off, the second temperature detection unit 22 stops measuring the temperature.
[0047] In some embodiments, such as Figure 5 As shown, the control module 30 includes a conversion unit 31, a comparison unit 32, and a register 33. The conversion unit 31 is used to convert the first voltage difference and the second voltage difference into the first temperature and the second temperature, respectively. The comparison unit 32 is used to calculate the temperature difference between the first temperature and the second temperature and compare the magnitude of the temperature difference with the preset temperature value. The register 33 is used to control the current generation module 10 to switch the output of the first current and / or the second current according to the magnitude relationship.
[0048] It should be noted that the first voltage difference is the difference between the first terminal voltage of the first transistor Q1 and the first terminal voltage of the second transistor Q2. The second voltage difference is the difference between the first terminal voltage of the third transistor Q3 and the first terminal voltage of the fourth transistor Q4. The conversion unit 31 receives the first voltage difference and the second voltage difference, and converts the received first voltage difference and the second voltage difference to obtain the first temperature and the second temperature. The comparison unit 32 can be connected to the conversion unit 31 to receive the first temperature and the second temperature, compare the received first temperature and the second temperature to obtain the temperature difference value, and then compare the temperature difference value with a preset temperature value to obtain the magnitude relationship. This magnitude relationship can trigger the configuration of the change register 33. For example, when the temperature difference value is less than or equal to the preset temperature value, the configuration of the change register 33 is not triggered; or, when the temperature difference value is greater than the preset temperature value, the configuration of the change register 33 is triggered.
[0049] The configuration of register 33 can control the current generation module 10 to use the corresponding current generation unit 11. For example, when the configuration of register 33 has not changed, the current generation module 10 continues to use the previous current generation unit 11 to provide the first current and the second current, and does not switch the current generation unit 11; or, when the configuration of register 33 changes, the current generation module 10 switches the current generation unit 11 to use another current generation unit 11 to provide the normal first current and the second current.
[0050] In some embodiments, such as Figure 6 As shown, the conversion unit 31 includes a first analog-to-digital converter (ADC1) and a second analog-to-digital converter (ADC2). The first ADC1 is used to convert a first voltage difference into a first temperature; the second ADC2 is used to convert a second voltage difference into a second temperature.
[0051] It should be noted that the first analog-to-digital converter (ADC1) can be connected to the first temperature detection unit 21 to perform analog-to-digital conversion on the received first voltage difference to obtain the first temperature. The second analog-to-digital converter (ADC2) can be connected to the second temperature detection unit 22 to perform analog-to-digital conversion on the received second voltage difference to obtain the second temperature.
[0052] In some embodiments, such as Figure 6 As shown, the comparison unit 32 includes a comparator CMP, which is used to compare the first temperature with the second temperature to obtain the temperature difference; and to compare the temperature difference with a preset temperature value to obtain the magnitude relationship.
[0053] It should be noted that the comparator CMP can be, for example, a digital comparator, or other applicable comparator circuits. T1 represents the first temperature, and T2 represents the second temperature. ΔT represents the temperature difference, and Tset represents the preset temperature value. The preset temperature value can be a non-zero temperature, for example, one of 0.1℃ to 5℃. This application uses a preset temperature value of 2℃ as an example for illustration.
[0054] This application embodiment also provides a temperature detection method, which includes: The first current and the second current are generated.
[0055] A first voltage difference and a second voltage difference are generated based on a first current and a second current, and the first voltage difference and the second voltage difference have positive temperature coefficients.
[0056] The first voltage difference and the second voltage difference are converted into the first temperature and the second temperature, respectively. The temperature difference between the first temperature and the second temperature is calculated. When the temperature difference is less than or equal to the preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
[0057] It is understood that the temperature detection method provided in this application generates a first current and a second current, generates a first voltage difference and a second voltage difference based on the first current and the second current, converts the first voltage difference and the second voltage difference into a first temperature and a second temperature respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result. The temperature detection result can be obtained without faults, thereby improving the reliability of the temperature detection result.
[0058] In some embodiments, the temperature detection method further includes: When the temperature difference exceeds the preset temperature value, the configuration data of the switching register is switched.
[0059] Switch between the first current and the second current based on the configuration data.
[0060] The first voltage difference and the second voltage difference are generated based on the first current and the second current after the switch, and the first voltage difference and the second voltage difference have positive temperature coefficients.
[0061] Convert the first voltage difference and the second voltage difference into the first temperature and the second temperature respectively, and calculate the temperature difference between the first temperature and the second temperature.
[0062] When the temperature difference is less than or equal to the preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
[0063] It should be noted that each current source (current generation unit 11) can generate a first current and a second current. Multiple current sources are controlled by the configuration data of the register, causing one of the current sources to output the first and second currents to the temperature detection module. When the configuration data of the register is switched, the configuration data will switch another current source to output the first and second currents to the temperature detection module.
[0064] When the temperature difference is greater than the preset temperature value, it indicates that the current source (current generation unit 11) has malfunctioned. At this time, by switching the current source through configuration data, it can be ensured that the temperature detection result is obtained under fault-free conditions.
[0065] like Figure 7 As shown, the working process of the temperature detection circuit 100 of this application is as follows: Start the measurement cycle.
[0066] The NPN sensor group measures the temperature and obtains ΔVBE1. Here, the NPN sensor group is the first temperature detection unit 21, and ΔVBE1 represents the first voltage difference.
[0067] △VBE1 is converted into the corresponding temperature value T1 by the ADC. The first analog-to-digital converter ADC1 performs analog-to-digital conversion on the first voltage difference to obtain the first temperature.
[0068] The PNP sensor group measures the temperature and obtains ΔVBE2. Here, the PNP sensor group is the second temperature detection unit 22, and ΔVBE2 represents the second voltage difference.
[0069] △VBE2 is converted into the corresponding temperature value T2 by the ADC. The second analog-to-digital converter ADC2 performs analog-to-digital conversion on the second voltage difference to obtain the second temperature.
[0070] Compare the difference ΔT between T1 and T2. Compare T1 and T2 to obtain ΔT, and then compare the magnitude of ΔT with 2℃.
[0071] When ΔT is less than or equal to 2℃, it indicates that the current source and measurement path are normal (or that the current generation module 10 has not malfunctioned).
[0072] The NPN group outputs the temperature value measured by the PNP group, while the PNP group remains inactive and is kept as a backup. The first temperature measured by the first temperature detection unit 21 is output as the temperature detection result, while the second temperature detection unit 22 remains inactive and can be stopped to reduce power consumption.
[0073] Complete this measurement.
[0074] When ΔT is greater than 2℃, it indicates a fault in the bias current source (current generation module 10).
[0075] Switch register 33 configuration. Change the configuration of register 33 to control the switching of the current source (current generation module 10), change the bias current source (current generation unit 11 that provides the first current and the second current), and then go to the step "start measurement cycle" until the first temperature is taken as the temperature detection result when ΔT is less than or equal to 2℃.
[0076] In summary, this application uses one set of NPN transistors and one set of PNP transistors to measure the temperature. The measured voltage values ΔVBE1 and ΔVBE2 are converted into temperatures by ADCs, and the difference between the temperatures measured by the two sets of sensors is determined by a digital comparator in the MCU to determine whether the sensor system has malfunctioned.
[0077] First, control S11 and S12 to connect to the NPN group sensor, and disconnect S21 and S22 to measure the temperature and obtain ΔVBE1. Then, convert ΔVBE1 into the corresponding T1 through the ADC and store T1 in the MCU.
[0078] Then, disconnect S11 and S12, control S21 and S22 to connect to the PNP group sensor, measure the temperature and obtain ΔVBE2, convert ΔVBE2 into the corresponding T2 through ADC, and then store T2 into MCU.
[0079] The digital comparator within the MCU compares the two measurements, T1 and T2. When ΔT < 2℃, the ΔVBE1 of the NPN group temperature sensor is taken as the overall temperature sensor result, and the PNP group sensor is not used and is kept as a backup. When ΔT > 2℃, it indicates that the current source providing bias current to the temperature sensor has failed, and the output of the digital comparator flips. By configuring the switching register 33, the S31 and S32 connections between the current source and the sensor are switched, thereby changing the bias current source connected to the temperature sensor.
[0080] After replacing the bias current source, repeat the above detection process until ΔT corresponding to both sets of ΔVBE is less than 2℃, indicating that the temperature sensor is working normally. Take T1 corresponding to ΔVBE of the NPN group as the measurement result. This helps ensure the reliability of the temperature measured by the temperature sensor.
[0081] like Figure 8 As shown, this application embodiment also provides a chip 200, which includes the temperature detection circuit 100 described above or performs the temperature detection method described above. The chip 200 is also called an integrated circuit (IC), and the chip 200 can be, but is not limited to, a SOC (System on Chip) or SIP (System in Package) chip.
[0082] It is understood that since the chip 200 provided in this application embodiment includes the temperature detection circuit 100 or performs the temperature detection method described above, it can also generate a first current and a second current through the current generation module 10. The temperature detection module 20 generates a first voltage difference and a second voltage difference based on the first current and the second current. The control module 30 converts the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result. The temperature detection result can be obtained when the current generation module 10 is fault-free, thereby improving the reliability of the temperature detection result.
[0083] like Figure 9 As shown in the illustration, this application also provides an electronic device 300, which includes a device body and the aforementioned temperature detection circuit 100 or chip 200 disposed within the device body. The electronic device 300 may be, but is not limited to, a weight scale, body fat scale, nutrition scale, infrared electronic thermometer, pulse oximeter, body composition analyzer, power bank, wireless charger, fast charger, car charger, adapter, display, USB (Universal Serial Bus) docking station, stylus, true wireless earphones, car infotainment screen, automobile, smart wearable device, mobile terminal, and smart home device. Smart wearable devices include, but are not limited to, smartwatches, smart bracelets, and neck massagers. Mobile terminals include, but are not limited to, smartphones, laptops, tablets, and POS (point of sales terminal) machines. Smart home devices include, but are not limited to, smart sockets, smart rice cookers, smart robot vacuums, and smart lights.
[0084] It is understood that since the electronic device 300 provided in this application embodiment includes the temperature detection circuit 100 or chip 200, it can also generate a first current and a second current through the current generation module 10. The temperature detection module 20 generates a first voltage difference and a second voltage difference based on the first current and the second current. The control module 30 converts the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and calculates the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result. The temperature detection result can be obtained when the current generation module 10 is fault-free, thereby improving the reliability of the temperature detection result.
[0085] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A temperature detection circuit, characterized in that, The temperature detection circuit includes: A current generation module is used to generate a first current and a second current. The temperature detection module is used to generate a first voltage difference and a second voltage difference based on the first current and the second current, wherein the first voltage difference and the second voltage difference have a positive temperature coefficient. The control module is used to convert the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively, and to calculate the temperature difference between the first temperature and the second temperature. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
2. The temperature detection circuit as described in claim 1, characterized in that, The current generation module includes multiple current generation units, each of which is used to generate the first current and the second current. The control module is also used to control the current generating module to switch different current generating units when the temperature difference is greater than the preset temperature value.
3. The temperature detection circuit as described in claim 2, characterized in that, The current generating unit includes: A first current source is used to generate the first current; A first switch, connected in series with the first current source, is used to select the first current output by different current generating units to the temperature detection module according to the control of the control module. A second current source is used to generate the second current; The second switch, connected in series with the second current source, is used to select the second current output by different current generating units to the temperature detection module according to the control of the control module.
4. The temperature detection circuit as described in claim 1, characterized in that, The temperature detection module includes: A third current source is used to generate a third current based on the first current; A third switch, the first end of which is connected to the third current source; The first transistor has its first terminal connected to the control terminal of the first transistor and the second terminal of the third switch, and its second terminal connected to the ground terminal. The first transistor is an NPN transistor. A fourth current source is used to generate a fourth current based on the second current; The fourth switch, the first end of which is connected to the fourth current source; The second transistor has its first terminal connected to the control terminal of the second transistor and the second terminal of the fourth switch, and its second terminal connected to the ground terminal. The second transistor is an NPN transistor. The first terminal of the first transistor and the first terminal of the second transistor output the first voltage difference.
5. The temperature detection circuit as described in claim 4, characterized in that, The temperature detection module also includes: A fifth current source is used to generate a fifth current based on the first current; The fifth switch, the first end of which is connected to the fifth current source; The third transistor has its first terminal connected to the second terminal of the fifth switch and the control module, and its second terminal connected to the control terminal and ground terminal. The third transistor is a PNP type transistor. A sixth current source is used to generate a sixth current based on the second current; The sixth switch, the first end of which is connected to the sixth current source; The fourth transistor has its first terminal connected to the second terminal of the sixth switch, and its second terminal connected to the control terminal and ground terminal. The fourth transistor is a PNP type transistor. The first terminal of the third transistor and the first terminal of the fourth transistor output the second voltage difference.
6. The temperature detection circuit as described in any one of claims 1 to 5, characterized in that, The control module includes: The conversion unit is used to convert the first voltage difference and the second voltage difference into a first temperature and a second temperature, respectively. The comparison unit is used to calculate the temperature difference between the first temperature and the second temperature, and to compare the magnitude of the temperature difference with the preset temperature value. A register is used to control the current generation module to switch the output of the first current and / or the second current according to the size relationship.
7. A temperature detection method, characterized in that, The temperature detection method includes: Generate the first current and the second current; A first voltage difference and a second voltage difference are generated based on the first current and the second current, and the first voltage difference and the second voltage difference have positive temperature coefficients. The first voltage difference and the second voltage difference are converted into a first temperature and a second temperature, respectively, and the temperature difference between the first temperature and the second temperature is calculated. When the temperature difference is less than or equal to a preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
8. The temperature detection method as described in claim 7, characterized in that, The temperature detection method further includes: When the temperature difference is greater than the preset temperature value, the configuration data of the switching register is changed; Switch the first current and the second current according to the configuration data; A first voltage difference and a second voltage difference are generated based on the switched first current and second current, and the first voltage difference and the second voltage difference have positive temperature coefficients; The first voltage difference and the second voltage difference are converted into a first temperature and a second temperature, respectively, and the temperature difference between the first temperature and the second temperature is calculated. Until the temperature difference is less than or equal to the preset temperature value, the first temperature or the second temperature is selected as the temperature detection result.
9. A chip, characterized in that, The chip includes a temperature detection circuit as described in any one of claims 1 to 6, or the chip performs a temperature detection method as described in any one of claims 7 to 8.
10. An electronic device, characterized in that, The electronic device includes a device body and a chip as described in claim 9 disposed on the device body.