NTC temperature detection circuit
By dynamically switching the acquisition mode and voltage divider structure through the main control unit, the problems of limited detection range and insufficient accuracy of the NTC temperature detection circuit in the full temperature range are solved, and high-precision temperature detection in a wide temperature range is achieved. It is suitable for home appliances, industrial control, automotive electronics and other fields.
Patent Information
- Application Number
- CN202510804961.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-06-17
AI Technical Summary
The existing NTC temperature detection circuit has a limited detection range within the full temperature range, insufficient accuracy, and cannot dynamically adjust the sampling structure, resulting in a significant decrease in detection accuracy in extremely cold or high temperature environments.
The main control unit is used to control the signal port to output high or low level, dynamically switch the forward or reverse acquisition mode, combine the pull-up and pull-down voltage divider structure, and collect the voltage of the NTC resistor through the analog-to-digital conversion port to achieve coordinated control of software and hardware.
It achieves high-precision temperature detection in a wide temperature range, improves the detection range and accuracy, reduces hardware costs, and adapts to extremely cold or high temperature environments. It is suitable for home appliances, industrial control, automotive electronics and other fields.
Smart Images

Figure CN120628331A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of temperature detection technology, and in particular to an NTC temperature detection circuit. Background Art
[0002] NTC (negative temperature coefficient) thermistors, whose resistance decreases as temperature increases, are widely used in temperature sensing applications such as household appliances, industrial control, and automotive electronics. Conventional NTC temperature sensing circuits typically use a fixed pull-up or pull-down voltage divider structure. A voltage divider resistor connected in series with the NTC converts temperature information into a voltage, which is then transmitted to the main control unit for processing after analog-to-digital conversion (ADC).
[0003] However, in the existing technology, this type of detection circuit can usually only adapt to a certain temperature range of the NTC resistance change curve, such as the low temperature range or the high temperature range, and it is difficult to achieve accurate voltage distribution and resolution in the entire temperature range. The defects of this structure are mainly manifested in (1) limited temperature detection range: a single pull-up or pull-down structure cannot take into account the entire temperature range, especially in extremely cold or high temperature environments. The detection accuracy is significantly reduced; (2) poor circuit flexibility: the detection mode is fixed and the sampling structure cannot be dynamically adjusted according to the actual temperature range; (3) low software control participation: most existing solutions are pure hardware architectures, and the main control unit only reads data and cannot actively optimize the sampling path.
[0004] Therefore, there is an urgent need for an improved NTC temperature detection solution that can expand the temperature detection range and improve detection accuracy through software and hardware collaboration without significantly increasing hardware costs, so as to meet the technical requirements for temperature monitoring in a wide temperature range environment. Summary of the Invention
[0005] The present application provides an NTC temperature detection circuit to solve the problems commonly found in existing NTC temperature detection circuits, such as limited detection range, insufficient sampling accuracy, and inability to dynamically switch sampling structures according to temperature ranges.
[0006] In a first aspect, the present application provides an NTC temperature detection circuit, the NTC temperature detection circuit comprising: a voltage divider unit, an NTC resistor, a conduction unit, a main control unit, and an analog-to-digital conversion port, wherein the main control unit comprises a signal port;
[0007] The first end of the voltage divider is connected to the power supply, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively;
[0008] The third end of the voltage dividing unit is connected to the first end of the conducting unit;
[0009] The second end of the NTC resistor is connected to the third end of the main control unit and the conduction unit respectively;
[0010] The second end of the conducting unit is connected to the ground;
[0011] The main control unit presets a sampling mode and a voltage threshold, wherein the sampling mode includes a forward acquisition mode and a reverse acquisition mode;
[0012] The main control unit defaults to the forward acquisition mode and detects the first voltage of the NTC resistor;
[0013] The main control unit determines whether to switch the sampling mode based on the first voltage and the voltage threshold;
[0014] The main control unit controls the signal port to output a high level or a low level based on the sampling mode, so as to switch the voltage sampling path and detect the second voltage of the NTC resistor;
[0015] The main control unit calculates the temperature of the NTC resistor according to the second voltage of the NTC resistor.
[0016] Optionally, the voltage dividing unit includes a first resistor and a second resistor, and the conducting unit is a transistor;
[0017] The first end of the first resistor is connected to the power supply, and the second end is connected to the first end of the second resistor and the collector of the transistor respectively;
[0018] The first end of the second resistor is connected to the collector of the transistor, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively;
[0019] The second end of the NTC resistor is connected to the signal port;
[0020] The base of the transistor is connected to the signal port, and the emitter of the transistor is connected to the ground;
[0021] Optionally, the main control unit defaults to the forward acquisition mode, controls the signal port to output a low level, the transistor is in a cut-off state, the voltage sampling path adopts a pull-up voltage dividing sampling path, and the analog-to-digital conversion port collects the first voltage of the NTC resistor.
[0022] Optionally, if the first voltage is greater than the voltage threshold, the forward sampling mode is continued to be used, the signal port is controlled to output a low level, the transistor is in the cut-off state, the voltage sampling path adopts a pull-up voltage divider sampling path, and the analog-to-digital conversion port collects the second voltage of the NTC resistor.
[0023] Optionally, if the first voltage is less than the voltage threshold, the reverse sampling mode is switched to control the signal port to output a high level, the transistor is in the on state, the voltage sampling path is a pull-down voltage divider sampling path, and the analog-to-digital conversion port collects the second voltage of the NTC resistor.
[0024] Optionally, the pull-up voltage-dividing sampling path includes:
[0025] The first end of the NTC resistor is connected to the analog-to-digital conversion port, the second end of the NTC resistor is connected to the ground, and the first resistor and the second resistor form a series pull-up voltage divider structure;
[0026] The analog-to-digital conversion port collects a first voltage and a second voltage across the NTC resistor.
[0027] Optionally, the pull-down voltage-dividing sampling path includes:
[0028] A first end of the NTC resistor is connected to the power supply, and a second end of the NTC resistor is connected to the ground via the second resistor, where the second resistor is a pull-down resistor;
[0029] The analog-to-digital conversion port collects a second voltage at a node where the second resistor and the NTC resistor are connected.
[0030] Optionally, the temperature detection circuit further includes a protection resistor, and the base of the transistor is connected to the signal port via the protection resistor, so as to suppress the base current and prevent the main control unit from being damaged.
[0031] Optionally, the analog-to-digital conversion port transmits the second voltage to the main control unit;
[0032] The main control unit calculates the resistance value of the NTC resistor based on the second voltage and a preset voltage division formula, and converts the resistance value of the NTC resistor into a temperature value of the NTC resistor.
[0033] Optionally, the main control unit outputs the calculated temperature value of the NTC resistor to a display module. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0036] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0037] Figure 1 A circuit diagram of a first NTC temperature detection circuit provided in an embodiment of the present application;
[0038] Figure 2 A circuit diagram of a pull-up voltage-dividing sampling path provided in an embodiment of the present application;
[0039] Figure 3 A circuit diagram of a pull-down voltage-dividing sampling path provided in an embodiment of the present application;
[0040] Figure 4 This is a circuit diagram of the second NTC temperature detection circuit provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0042] The disclosure below provides many different embodiments or examples for implementing different configurations of the present invention. To simplify the disclosure of the present invention, the components and configurations of specific examples are described below. Of course, these are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or configurations discussed.
[0043] Figure 1 This is a circuit diagram of an NTC temperature detection circuit provided in an embodiment of the present application.
[0044] The NTC temperature detection circuit includes a voltage dividing unit, an NTC resistor, a conduction unit, a main control unit and an analog-to-digital conversion port, wherein the main control unit includes a signal port;
[0045] The first end of the voltage divider is connected to the power supply, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively;
[0046] The third end of the voltage dividing unit is connected to the first end of the conducting unit;
[0047] The second end of the NTC resistor is connected to the third end of the main control unit and the conduction unit respectively;
[0048] The second end of the conducting unit is connected to the ground;
[0049] The main control unit presets a sampling mode and a voltage threshold, wherein the sampling mode includes a forward acquisition mode and a reverse acquisition mode;
[0050] The main control unit defaults to the forward acquisition mode and detects the first voltage of the NTC resistor;
[0051] The main control unit determines whether to switch the sampling mode based on the first voltage and the voltage threshold;
[0052] The main control unit controls the signal port to output a high level or a low level based on the sampling mode, so as to switch the voltage sampling path and detect the second voltage of the NTC resistor;
[0053] The main control unit calculates the temperature of the NTC resistor according to the second voltage of the NTC resistor.
[0054] NTC thermistor is a semiconductor device whose resistance decreases as the temperature increases. Its basic principle is to use the resistance-temperature characteristics of the material for temperature sensing. Specifically, the resistance value of the NTC thermistor is exponentially related to the temperature. In the temperature detection circuit, the NTC thermistor is often designed to form a voltage divider network with the voltage divider unit (R1 and R2) to convert the temperature change into a voltage change. The main control unit collects the voltage value through the ADC and infers the current temperature based on the known voltage divider relationship and the NTC resistance temperature curve. Figure 1 As shown, a first resistor R1, a second resistor R2, a transistor Q1, an analog-to-digital conversion port ADC, a signal port GPIO, a protection resistor R3, and an NTC resistor NTC1. Figure 2-Figure 4 The meaning of the marking names of all components and the division of unit modules Figure 1 The same, no further repetition will be given later.
[0055] Furthermore, the voltage dividing unit includes a first resistor and a second resistor, and the conducting unit is a transistor;
[0056] The first end of the first resistor is connected to the power supply, and the second end is connected to the first end of the second resistor and the collector of the transistor respectively;
[0057] The first end of the second resistor is connected to the collector of the transistor, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively;
[0058] The second end of the NTC resistor is connected to the signal port;
[0059] The base of the transistor is connected to the signal port, and the emitter of the transistor is connected to the ground.
[0060] In an embodiment of the present application, a sampling mode and voltage threshold are preset in the main control unit. The sampling mode includes a forward acquisition mode and a reverse acquisition mode. Based on different sampling modes, the control signal output port outputs a high level or a low level, thereby switching the voltage sampling path. The first detection is based on the default forward acquisition mode. According to the magnitude of the first voltage and the voltage threshold, the approximate range of the voltage value of the NTC resistor is detected. Based on the approximate range of the voltage value, the approximate temperature range of the NTC resistor is calculated to be within the high temperature range or the low temperature range. When the temperature of the NTC resistor is in the high temperature range, the second detection adopts the forward acquisition mode. When the temperature of the NTC resistor is in the low temperature range, the second detection adopts the negative acquisition mode. By performing two voltage detections on the NTC resistor, the temperature value of the NTC resistor can be obtained more accurately.
[0061] First, during the first test, the forward sampling mode is used by default to detect the first voltage of the NTC resistor. Then, based on the difference between the first voltage and the voltage threshold, a determination is made as to whether to switch to the reverse sampling mode for the second test or to remain in the forward sampling mode if no switch is required. Next, based on the determination, a second test is performed to detect the second voltage of the NTC resistor. Finally, the resistance value of the NTC resistor is calculated based on the second voltage of the NTC resistor, and the temperature value of the NTC resistor is then calculated based on the resistance value of the NTC resistor.
[0062] It should be noted that in this application, the resistance value, voltage value and temperature value of the NTC resistor can be converted by a formula. For example, by setting a voltage threshold, the temperature threshold corresponding to the voltage threshold can be obtained by the formula. When the first voltage is higher than the voltage threshold, it means that the temperature value of the NTC resistor is higher than the temperature threshold, and the temperature value of the NTC resistor is in the high temperature range, and the high temperature range refers to the temperature range above the temperature threshold, and the positive acquisition mode is adopted; conversely, when the first voltage is lower than the voltage threshold, it means that the temperature value of the NTC resistor is lower than the temperature threshold, and the temperature value of the NTC resistor is in the low temperature range, and the low temperature range refers to the temperature range below the temperature threshold, and the negative acquisition mode is adopted.
[0063] Furthermore, the main control unit defaults to the forward acquisition mode, controls the signal port to output a low level, the transistor is in a cut-off state, the voltage sampling path adopts a pull-up voltage dividing sampling path, and the analog-to-digital conversion port collects the first voltage of the NTC resistor.
[0064] In the embodiment of the present application, the acquisition mode corresponds to the level of the signal port output. When the acquisition mode is forward acquisition, the signal port is controlled to output a low level. At this time, the transistor is in the cut-off state, and the voltage sampling path is equivalent to a pull-up voltage sampling path. Figure 2 As shown, the first voltage of the NTC resistor is collected by the analog-to-digital conversion port.
[0065] Furthermore, if the first voltage is greater than the voltage threshold, the forward sampling mode is continued to be used, the signal port is controlled to output a low level, the transistor is in a cut-off state, the voltage sampling path adopts a pull-up voltage dividing sampling path, and the analog-to-digital conversion port collects the second voltage of the NTC resistor.
[0066] In an embodiment of the present application, a temperature threshold corresponding to the voltage threshold is obtained by a formula based on the characteristics of the thermistor. If the first voltage is greater than the voltage threshold, that is, the temperature value of the NTC resistor is greater than the temperature threshold, then the temperature value of the NTC resistor is in the high temperature range, and the forward sampling mode is continued, the control signal port outputs a low level, the transistor is in the off state, and the voltage sampling path adopts a pull-up voltage divider sampling path. At this time, the analog-to-digital conversion port measures the second voltage across the NTC resistor. The present application performs two voltage detections on the NTC resistor. The first detection obtains a first voltage and compares it with the voltage threshold. In order to determine the approximate range of the NTC resistor voltage, the temperature of the NTC resistor is judged to be in the approximate range of the high temperature range based on the characteristics of the NTC resistor. The second detection obtains a second voltage, which more accurately obtains an accurate voltage value within the approximate range, and then the accurate temperature value of the NTC resistor is calculated by the formula.
[0067] Furthermore, the pull-up voltage-dividing sampling path includes:
[0068] The first end of the NTC resistor is connected to the analog-to-digital conversion port, the second end of the NTC resistor is connected to the ground, and the first resistor and the second resistor form a series pull-up voltage divider structure;
[0069] The analog-to-digital conversion port collects a first voltage signal and a second voltage signal at both ends of the NTC resistor.
[0070] like Figure 2As shown, in the high-temperature range, the NTC resistance is small, forming an effective voltage divider with the pull-up resistor. This widens the voltage range, improving the resolution and accuracy of ADC sampling. Therefore, the pull-up voltage divider structure is often used in detection areas with relatively high temperatures. This structure requires only two voltage divider resistors (fixed resistors R1 and R2 + an NTC), does not rely on complex circuits, and is suitable for most applications with low temperature acquisition requirements or cost-sensitive applications.
[0071] The pull-up voltage divider structure is usually composed of a fixed resistor (pull-up resistor R1, R2) and an NTC thermistor in series, with both ends connected to the power supply (V DD ) and ground (GND), the middle node is connected to the analog-to-digital conversion port (ADC), which converts the resistance change of the NTC resistor (which changes with temperature) into a voltage signal that can be read by the ADC. Since the NTC resistance decreases with increasing temperature, in the pull-up structure, as the temperature increases, R NTC The decrease is shown as V ADC Decrease, forming a monotonically decreasing relationship, which makes it easier for the main control unit to convert the current temperature through table lookup or function.
[0072] Under this structure, the output voltage (i.e., the ADC sampling point voltage) is:
[0073]
[0074] Among them, V ADC The first voltage and the second voltage measured by the analog-to-digital conversion port ADC, V DD is the power supply voltage, R NTC is the resistance value of the NTC resistor, R pullup is the resistance value of the pull-up voltage divider structure (R1 resistance value + R2 resistance value).
[0075] Furthermore, if the first voltage is less than the voltage threshold, the reverse sampling mode is switched to control the signal port to output a high level, the transistor is in the on state, the voltage sampling path is a pull-down voltage dividing sampling path, and the analog-to-digital conversion port collects the second voltage signal of the NTC resistor.
[0076] like Figure 3 As shown, Figure 3A circuit diagram of a pull-down voltage-dividing sampling path provided in an embodiment of the present application. In this embodiment, a temperature threshold corresponding to the voltage threshold is obtained using a formula based on the characteristics of the thermistor. If the first voltage is less than the voltage threshold, that is, the temperature value of the NTC resistor is less than the temperature threshold, then the temperature value of the NTC resistor is in the low temperature range. The circuit then switches to a negative sampling mode, controlling the signal port to output a high level, turning on the transistor, and adopting a pull-down voltage-dividing sampling path. At this point, the analog-to-digital conversion port measures a second voltage signal at the node connecting the second resistor and the NTC resistor.
[0077] This application performs two voltage tests on the NTC resistor. The first test obtains a first voltage that is compared with a voltage threshold. In order to determine the approximate range of the NTC resistor voltage, the temperature of the NTC resistor is judged to be in the approximate range of the low temperature range based on the characteristics of the NTC resistor. The second test obtains a second voltage that more accurately obtains an accurate voltage value within the approximate range, and then the accurate temperature value of the NTC resistor is calculated through a formula.
[0078] Furthermore, the pull-down voltage-dividing sampling path includes:
[0079] A first end of the NTC resistor is connected to the power supply, and a second end of the NTC resistor is connected to the ground via the second resistor, where the second resistor is a pull-down resistor;
[0080] The analog-to-digital conversion port collects a second voltage signal at a node where the second resistor and the NTC resistor are connected.
[0081] In the embodiment of the present application, the NTC resistance is large in the low temperature range. If a pull-up structure is used, the voltage is close to V DD , the variation range is small, the ADC resolution is low, and it is not conducive to temperature measurement. When using a pull-down structure, the voltage value will be lower and the voltage change is sensitive, which is more suitable for detecting temperature changes in low temperature environments and improving resolution. The pull-down structure circuit is simple to implement, requiring only an NTC and a resistor in series with ground. It is adaptable to various host control platforms and is particularly suitable for automatic sampling path switching in hardware and software collaborative design.
[0082] In the NTC temperature detection circuit, the pull-down voltage divider structure refers to connecting the NTC thermistor and the fixed resistor R2 in series and connecting them between the power supply and the ground, where the NTC is close to the power supply end and the fixed resistor R2 is close to the ground end. The analog-to-digital conversion port (ADC) is connected to the middle node between the NTC and the fixed resistor R2, thereby realizing temperature voltage detection.
[0083] Under this structure, the output voltage (i.e., the ADC sampling point voltage) is:
[0084]
[0085] Among them, V ADC The first voltage and the second voltage measured by the analog-to-digital conversion port ADC, V DD is the power supply voltage, R NTC is the resistance value of the NTC resistor, R pulldown is the resistance value of the pull-down voltage divider structure (R2 resistance value).
[0086] Furthermore, the temperature detection circuit also includes a protection resistor, and the base of the transistor is connected to the signal port through the protection resistor, so as to suppress the base current and prevent the main control unit from being damaged.
[0087] In the embodiments of this application, Figure 1-3 As shown, the circuit further includes a protection resistor R3, and the transistor is an NPN transistor, whose base is connected to the signal port through the protection resistor to suppress the base current and prevent the main control unit from being damaged.
[0088] Furthermore, the analog-to-digital conversion port transmits the second voltage signal to the main control unit;
[0089] The main control unit calculates the resistance value of the NTC resistor based on the second voltage signal and a preset voltage division formula, and converts the resistance value of the NTC resistor into a temperature value of the NTC resistor based on the resistance value of the NTC resistor.
[0090] In the embodiment of the present application, the NTC thermistor is a semiconductor device whose resistance decreases as the temperature increases. Its basic principle is to use the resistance-temperature characteristics of the material to sense temperature. Specifically, the resistance value R of the NTC thermistor is NTC There is an exponential relationship between the temperature T and the commonly used approximate formula:
[0091]
[0092] Among them, R NTC is the NTC resistance value at the current temperature T (unit: K), R0 is the resistance value at the reference temperature T0 (usually 25°C, i.e. 298.15K), B is the B constant of the material in K, which depends on the material properties, and e is the base of the natural logarithm.
[0093] In temperature detection circuits, NTC thermistors are often designed to form a voltage divider network with fixed resistors (such as a pull-up voltage divider structure formed by R1 and R2, or a pull-down voltage divider structure formed by R2 alone). This converts temperature changes into voltage changes. The main control unit uses an ADC to collect this voltage value and infer the current temperature based on the known voltage divider relationship and the NTC resistance-temperature curve.
[0094] The preset voltage division formula is:
[0095]
[0096] Among them, V DD is the power supply voltage, R is the fixed resistor for voltage division, R NTC is the resistance of the thermistor at the current temperature. QDN The measurement of R NTC , and then obtain the temperature value by looking up the table or calculating the function.
[0097] like Figure 4 As shown, Figure 4 The circuit diagram of the second NTC temperature detection circuit provided in the embodiment of the present application includes a first resistor R1, a second resistor R2, a transistor Q1, an analog-to-digital conversion port ADC, a signal port GPIO, a protection resistor R3, and an NTC resistor NTC1. The circuit principle is as shown in FIG. Figure 1 As described in [1], the temperature detection circuit includes a voltage divider unit, an NTC resistor, a conduction unit, a main control unit, and an analog-to-digital conversion port. The main control unit includes a signal port, and the conduction unit is a transistor. The NTC thermistor and the voltage divider unit (R1 and R2) form a voltage divider network that converts temperature changes into voltage changes. The main control unit collects this voltage value through an ADC and infers the current temperature based on the known voltage divider relationship and the NTC resistance-temperature curve.
[0098] First, the main control unit defaults to the forward acquisition mode, controls the signal port to output a low level, turns the transistor off, and uses a pull-up voltage-dividing sampling path for the voltage sampling path. The analog-to-digital conversion port acquires the first voltage of the NTC resistor. If the first voltage is greater than the voltage threshold, the forward sampling mode is resumed, controls the signal port to output a low level, turns the transistor off, uses a pull-up voltage-dividing sampling path for the voltage sampling path, and uses the analog-to-digital conversion port to acquire the second voltage of the NTC resistor.
[0099] Compared with the prior art, this application has the following beneficial effects:
[0100] (1) Achieve wide temperature range coverage and improve detection accuracy: By setting the GPIO port of the main control unit to output a high level or a low level, the transistor can be controlled to be turned on or off, thereby dynamically switching the voltage divider structure where the NTC thermistor is located: in the default forward acquisition mode (GPIO output low level), the NTC and the pull-up resistor are connected in series to form a voltage divider network; if the voltage signal corresponding to the temperature is lower than the set threshold, the main control unit controls the GPIO to output a high level, turning on the transistor and switching to the reverse acquisition mode. At this time, the NTC is at the power supply end and forms a new voltage divider structure with the pull-down resistor.
[0101] This switching mechanism makes the NTC voltage distribution corresponding to different temperature ranges more uniform, effectively avoiding the problem of low sampling resolution within a certain voltage range. Technical deduction shows that for temperature ranges where the NTC resistance changes by multiple orders of magnitude, using a single voltage divider mode may result in voltage compression or an overly flat variation range, resulting in a decrease in ADC sampling accuracy. The dual-mode structure can map the NTC resistance corresponding to different temperature zones to a more reasonable voltage variation range, improving overall temperature measurement accuracy.
[0102] (2) Realize coordinated control of software and hardware and dynamically adjust the sampling structure: The present invention uses the voltage threshold set by the main control unit to determine the current NTC working range and autonomously switches the GPIO output level to achieve dynamic adjustment of the circuit structure, breaking through the limitations of the pure hardware structure of the traditional NTC detection circuit.
[0103] Specifically, the resistance of the NTC resistor changes with temperature, and its voltage division result also changes accordingly. The main control unit can determine the approximate current temperature range by comparing the sampled voltage with the preset threshold. Technically, it can be deduced that in the low temperature range (such as -40℃ to 25℃), the NTC resistance is larger, which is suitable for the pull-up voltage division method; while in the high temperature range (such as 25℃ to 250℃), the NTC resistance is reduced, which is suitable for the pull-down voltage division method. By switching the voltage division path, the sampling system can maintain an appropriate voltage dynamic range in different temperature zones. In conjunction with the ADC with a fixed reference voltage, the overall responsiveness and resolution of the circuit are effectively improved.
[0104] (3) Reduce costs and structural complexity: The present invention only introduces one transistor to achieve automatic switching of the voltage divider path, avoiding the high-cost structure of multiple NTCs in parallel and complex analog switch arrays used in traditional wide temperature range detection solutions, simplifying the overall hardware design and reducing production and maintenance costs.
[0105] (4) Enhanced environmental adaptability: This solution is suitable for complex environments such as extreme cold startup and high temperature operation. It has higher responsiveness and adaptability to temperature changes and is widely applicable to various application scenarios such as home appliances, automobiles, and industrial control.
[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0107] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0108] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0109] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0110] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0111] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0112] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product is run on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing.
[0113] The above embodiments are intended only to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the above embodiments or replace some of the technical features therein with equivalents; and such modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application and should be included within the scope of protection of the present application.
Claims
1. An NTC temperature detection circuit, characterized in that: The NTC temperature detection circuit includes: a voltage dividing unit, an NTC resistor, a conduction unit, a main control unit and an analog-to-digital conversion port, wherein the main control unit includes a signal port; The first end of the voltage divider is connected to the power supply, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively; The third end of the voltage dividing unit is connected to the first end of the conducting unit; The second end of the NTC resistor is connected to the third end of the main control unit and the conduction unit respectively; The second end of the conducting unit is connected to the ground; The main control unit presets a sampling mode and a voltage threshold, wherein the sampling mode includes a forward acquisition mode and a reverse acquisition mode; The main control unit defaults to the forward acquisition mode and detects the first voltage of the NTC resistor; The main control unit determines whether to switch the sampling mode based on the first voltage and the voltage threshold; The main control unit controls the signal port to output a high level or a low level based on the sampling mode, so as to switch the voltage sampling path and detect the second voltage of the NTC resistor; The main control unit calculates the temperature of the NTC resistor according to the second voltage of the NTC resistor.
2. The NTC temperature detection circuit according to claim 1, characterized in that: The voltage dividing unit includes a first resistor and a second resistor, and the conducting unit is a triode; The first end of the first resistor is connected to the power supply, and the second end is connected to the first end of the second resistor and the collector of the transistor respectively; The first end of the second resistor is connected to the collector of the transistor, and the second end is connected to the analog-to-digital conversion port and the first end of the NTC resistor respectively; The second end of the NTC resistor is connected to the signal port; The base of the transistor is connected to the signal port, and the emitter of the transistor is connected to the ground.
3. The NTC temperature detection circuit according to claim 1, characterized in that: The main control unit defaults to the forward acquisition mode, controls the signal port to output a low level, the transistor is in a cut-off state, the voltage sampling path adopts a pull-up voltage dividing sampling path, and the analog-to-digital conversion port acquires the first voltage of the NTC resistor.
4. The NTC temperature detection circuit according to claim 3, characterized in that: If the first voltage is greater than the voltage threshold, the forward sampling mode is continued to be used, the signal port is controlled to output a low level, the transistor is in a cut-off state, the voltage sampling path adopts a pull-up voltage dividing sampling path, and the analog-to-digital conversion port collects the second voltage of the NTC resistor.
5. The NTC temperature detection circuit according to claim 3, characterized in that: If the first voltage is less than the voltage threshold, the reverse sampling mode is switched to control the signal port to output a high level, the transistor is in the on state, the voltage sampling path is a pull-down voltage dividing sampling path, and the analog-to-digital conversion port collects the second voltage of the NTC resistor.
6. The NTC temperature detection circuit according to claim 2 and any one of claims 3 or 4, characterized in that: The pull-up voltage sampling path includes: The first end of the NTC resistor is connected to the analog-to-digital conversion port, the second end of the NTC resistor is connected to the ground, and the first resistor and the second resistor form a series pull-up voltage divider structure; The analog-to-digital conversion port collects a first voltage and a second voltage across the NTC resistor.
7. The NTC temperature detection circuit according to claims 2 and 5, characterized in that: The pull-down voltage sampling path includes: A first end of the NTC resistor is connected to the power supply, and a second end of the NTC resistor is connected to the ground via the second resistor, where the second resistor is a pull-down resistor; The analog-to-digital conversion port collects a second voltage at a node where the second resistor and the NTC resistor are connected.
8. The NTC temperature detection circuit according to claim 2, characterized in that: The temperature detection circuit further includes a protection resistor, and the base of the transistor is connected to the signal port via the protection resistor, so as to suppress the base current and prevent the main control unit from being damaged.
9. The NTC temperature detection circuit according to claim 1, characterized in that: The analog-to-digital conversion port transmits the second voltage to the main control unit; The main control unit calculates the resistance value of the NTC resistor based on the second voltage and a preset voltage division formula, and converts the resistance value of the NTC resistor into a temperature value of the NTC resistor.
10. The NTC temperature detection circuit according to claim 9, characterized in that: The main control unit outputs the calculated temperature value of the NTC resistor to the display module.
Citation Information
Patent Citations
Temperature detection circuit, temperature detection method, controller and vehicle
CN113049136A
Temperature detection circuit and method and pressure cooking utensil
CN113532679A
Temperature sampling circuit and motor equipment thereof
CN222336578U
Resistance measuring instrument, integrated circuit for measuring resistance, and method of measuring resistance
JP2005003596A
Grain manufacturing device
KR1020220164378A