CN116046202A - Ambient temperature detection circuit and detection method - Google Patents

Ambient temperature detection circuit and detection method Download PDF

Info

Publication number
CN116046202A
CN116046202A CN202310063267.4A CN202310063267A CN116046202A CN 116046202 A CN116046202 A CN 116046202A CN 202310063267 A CN202310063267 A CN 202310063267A CN 116046202 A CN116046202 A CN 116046202A
Authority
CN
China
Prior art keywords
switch
signal
temperature coefficient
module
capacitor cint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310063267.4A
Other languages
Chinese (zh)
Inventor
俞超群
陈强
岳兆强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Zhizhi Electronic Technology Co ltd
Original Assignee
Zhejiang Zhizhi Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Zhizhi Electronic Technology Co ltd filed Critical Zhejiang Zhizhi Electronic Technology Co ltd
Priority to CN202310063267.4A priority Critical patent/CN116046202A/en
Publication of CN116046202A publication Critical patent/CN116046202A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K7/00Measuring temperature based on the use of electric or magnetic elements directly sensitive to heat ; Power supply therefor, e.g. using thermoelectric elements
    • G01K7/34Measuring temperature based on the use of electric or magnetic elements directly sensitive to heat ; Power supply therefor, e.g. using thermoelectric elements using capacitative elements
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K5/00Manipulating of pulses not covered by one of the other main groups of this subclass
    • H03K5/22Circuits having more than one input and one output for comparing pulses or pulse trains with each other according to input signal characteristics, e.g. slope, integral
    • H03K5/24Circuits having more than one input and one output for comparing pulses or pulse trains with each other according to input signal characteristics, e.g. slope, integral the characteristic being amplitude

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • General Physics & Mathematics (AREA)
  • Nonlinear Science (AREA)
  • Manipulation Of Pulses (AREA)

Abstract

The invention discloses an ambient temperature detection circuit and a detection method. The charge or discharge of the integral capacitor Cint is realized through a pair of positive temperature coefficient modules and negative temperature coefficient modules, the integral capacitor Cint is turned over through a comparator COMP_HS, the voltage on the integral capacitor Cint is kept in a dynamic balance mode, the charge times of the positive temperature coefficient current to the integral capacitor Cint are gradually reduced in the same time, and the discharge times of the negative temperature coefficient current to the integral capacitor Cint are gradually increased. Because the pulse width of the current switch is controlled by a fixed clock, the total number of charging and discharging times of the integration capacitor Cint is fixed in a fixed time, and the corresponding temperature variation can be found by counting the pulse number variation in the fixed time, so that the measurement of the ambient temperature is realized. The invention eliminates redundant interference by simplifying the circuit structure, thereby improving the precision of ambient temperature detection.

Description

Ambient temperature detection circuit and detection method
Technical Field
The application relates to the technical field of environmental temperature detection, in particular to an environmental temperature detection circuit and an environmental temperature detection method.
Background
The detection method of the ambient temperature is various, one of which is to firstly adopt the ambient temperature and preset voltage to generate useful voltage signals, then process the voltage by means of compensation and the like, and then send the voltage to a quantization comparison and conversion module to finish temperature conversion.
The method for detecting the ambient temperature mainly has two problems: on the one hand, the preset voltage setting is difficult to determine with precision, because the voltage of the VBE of the diode (three) can reach-2 mV/DEG C along with the temperature change, and the preset voltage setting precision is difficult to set to be less than 2 mV. On the other hand, the detection circuit is complex, and mainly direct current removal, offset compensation and the like can be introduced to errors and interferences with other circuit structures, so that the accuracy of ambient temperature detection is affected.
Disclosure of Invention
The purpose of the application is to provide an ambient temperature detection circuit and a detection method, by simplifying a circuit structure, a temperature-related signal is directly derived from PTAT positive temperature coefficient current and VBE negative temperature following current related to a triode device, and redundant interference can be eliminated due to the fact that the temperature-related signal is directly derived from the device, so that the ambient temperature detection precision is improved.
The application provides an environment temperature detection circuit, which comprises a positive temperature coefficient module, a negative temperature coefficient module, a comparison module and an output module;
the positive temperature coefficient module is connected with the external sensor and used for receiving the positive temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
the negative temperature coefficient module is connected with the external sensor and used for receiving a negative temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
and the output module sends out a control signal to control the positive temperature coefficient module or the negative temperature coefficient module according to the comparison result, and meanwhile, carries out temperature detection quantization and outputs a detection result.
Optionally, the positive temperature coefficient module includes: PMOS tube MP1, PMOS tube MP2, switch SW1;
the drain electrode and the grid electrode of the PMOS tube MP1 are connected with an external sensor and are used for receiving positive temperature coefficient current IP sent by the external sensor;
the source electrode of the PMOS tube MP1 is connected with the source electrode of the PMOS tube MP 2;
the source electrode of the PMOS tube MP2 is connected with a direct current power supply;
the grid electrode of the PMOS tube MP2 is connected with the grid electrode of the PMOS tube MP 1;
the drain electrode of the PMOS tube MP2 is connected with one end of the switch SW1, and the other end of the switch SW1 is connected with the comparison module.
Optionally, the negative temperature coefficient module includes: NMOS tube MN1, NMOS tube MN2 and switch SW2;
the drain electrode and the grid electrode of the NMOS tube MN1 are connected with an external sensor and used for receiving negative temperature coefficient current IN sent by the external sensor;
the source electrode of the NMOS tube MN1 is connected with the source electrode of the NMOS tube MN 2;
the source electrode of the NMOS tube MN2 is grounded;
the grid electrode of the NMOS tube MN2 is connected with the grid electrode of the NMOS tube MN 1;
the drain electrode of the NMOS tube MN2 is connected with one end of a switch SW2, and the other end of the switch SW2 is connected with a comparison module.
Optionally, the switch SW1 and the switch SW2 are controlled by adopting a non-falling control mode.
Optionally, the comparison module includes an integrating capacitor Cint, a comparator comp_hs;
the inverting terminal of the comparator comp_hs is respectively connected with one end of the integrating capacitor Cint, the other end of the switch SW1 and the other end of the switch SW2;
the other end of the integrating capacitor Cint is grounded;
the same phase end of the comparator COMP_HS is connected with a reference voltage end;
the output end of the comparator COMP_HS is connected with the output module.
Optionally, the comparator comp_hs is a hysteresis comparator.
Optionally, the output module includes: trigger DFT, pulse control circuit NO_CROSS, signal enhancement circuit Buff1, signal enhancement circuit Buff2 and Delay circuit Delay;
the data input end of the trigger DFT is connected with the output end of the comparator COMP_HS;
the clock signal of the trigger DFT is connected with a preset clock signal CLK;
the output end of the comparator DFT is connected with the input end of the pulse control circuit NO_CROSS;
the pulse control circuit NO_CROSS outputs two paths of switch signals SN and SP;
the switch signal SN is used to control the switch state of the switch SW2;
the switch signal SP is used to control the switch state of the switch SW1;
the input end of the Delay circuit Delay is connected with the clock signal end of the trigger DFT;
the output end of the Delay circuit Delay is connected with the input end of the signal enhancement circuit Buff 2;
the output end of the signal enhancement circuit Buff2 is connected with an external sensor and is used for collecting a clock signal BS_CLK of sensor output data;
the input end of the signal enhancing circuit Buff1 is connected with the output end of the pulse control circuit NO_CROSS, receives the switch signal SN, processes the switch signal SN, and outputs a wide and narrow pulse signal BS related to the clock signal BS_CLK.
Optionally, the switching signal SN and the switching signal SP are non-falling control signals.
Optionally, the flip-flop DFT is a D flip-flop.
A second aspect of the present application provides an ambient temperature detection method, the method comprising the steps of:
charging the integral capacitor Cint through the positive temperature coefficient module, or discharging the integral capacitor Cint through the negative temperature coefficient module;
comparing the voltage at two ends of the integrating capacitor Cint with a reference voltage through a comparator comp_hs;
judging whether the voltage at two ends of the integrating capacitor Cint is larger than a reference voltage or not;
if yes, sending the comparison result to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send a switch signal SN to control the switch SW2 to be closed, and the negative temperature coefficient circuit is switched on to discharge the integrating capacitor Cint;
if not, the comparison result is sent to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send out a switch signal SP to control the switch SW1 to be closed, and the positive temperature coefficient circuit is connected to charge the integrating capacitor Cint;
the corresponding temperature variation is found by counting the pulse number variation of the switch SW1 in a fixed time, so that the measurement of the ambient temperature is realized.
Therefore, the environmental temperature detection circuit and the detection method are provided. According to the method, the integrated capacitor Cint is charged or discharged through the pair of positive temperature coefficient modules and the pair of negative temperature coefficient modules, the comparator COMP_HS is used for overturning, the voltage on the integrated capacitor Cint is kept in a dynamic balance mode, the charging frequency of the positive temperature coefficient current to the integrated capacitor Cint is gradually reduced in the same time, and the discharging frequency of the negative temperature coefficient current to the integrated capacitor Cint is gradually increased. Because the pulse width of the current switch is controlled by a fixed clock, the total number of charging and discharging times of the integration capacitor Cint is fixed in a fixed time, and the corresponding temperature variation can be found by counting the pulse number variation in the fixed time, so that the measurement of the ambient temperature is realized.
According to the temperature-related signal detection circuit, the circuit structure is simplified, so that the temperature-related signal is directly derived from PTAT positive temperature coefficient current and VBE negative temperature following current related to the triode device, and redundant interference can be eliminated due to the fact that the temperature-related signal is directly derived from the device, and therefore the accuracy of ambient temperature detection is improved.
The positive and negative temperature coefficient currents IP and IN are directly related to triodes, namely PMOS (P-channel metal oxide semiconductor) transistors, NMOS (N-channel metal oxide semiconductor) transistors and resistors of the same type, so that devices are few, and the influence of the temperature coefficient of the resistor on the positive and negative temperature coefficient currents is the same IN proportion and can be ignored.
The integration capacitor Cint is charged and discharged by directly using the positive and negative temperature coefficient currents, and the integration capacitor Cint mainly accumulates the difference value between the positive and negative temperature coefficient currents, so that the influence of the temperature change of the integration capacitor Cint on an output result is negligible. And the respective times of charge and discharge realize quantized output through a hysteresis comparator and a D trigger controlled by a clock, and the more the discharge times are, the higher the temperature is.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an environmental temperature detection circuit according to an embodiment of the present application;
fig. 2 is a diagram of input signals, switch control timings and output signals of the detection circuit according to the embodiment of the present application.
Fig. 3 is a data change trend chart of the detection circuit according to the embodiment of the present application after sampling and sorting the data width pulse signal BS by the clock signal bs_clk.
Fig. 4 is a flowchart of an environmental temperature detection method according to an embodiment of the present application.
Description of the embodiments
The following description of the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, a schematic diagram of an ambient temperature detection circuit according to some embodiments of the present application is shown.
The detection circuit comprises a positive temperature coefficient module, a negative temperature coefficient module, a comparison module and an output module;
the positive temperature coefficient module is connected with the external sensor and used for receiving the positive temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
the negative temperature coefficient module is connected with the external sensor and used for receiving a negative temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
the comparison module compares the voltage signal sent by the positive temperature coefficient module or the negative temperature coefficient module with the reference voltage and sends the comparison result to the output module;
and the output module sends out a control signal to control the positive temperature coefficient module or the negative temperature coefficient module according to the comparison result, and meanwhile, carries out temperature detection quantization and outputs a detection result.
It should be noted that, in order to overcome the problem that the current ambient temperature detection circuit is complex, and errors and interferences between the current ambient temperature detection circuit and other circuit structures are caused by direct current removal, offset compensation and the like, thereby influencing the accuracy of ambient temperature detection, the current signal of the sensor is converted into a voltage signal by adopting a pair of positive temperature coefficient and negative temperature coefficient modules, and the voltage signal is compared by a comparator. And then the comparison result is sent to an output module for quantization output, and the output module sends a control signal to control the positive temperature coefficient module or the negative temperature coefficient module according to the comparison result while the comparison result is quantitatively output so as to realize the adjustment of the input voltage of the input end of the comparator, and then in the dynamic process, the quantization of the temperature change is realized by counting the frequency of the voltage change in a fixed time, so that the measurement of the ambient temperature is realized.
According to an embodiment of the present invention, the positive temperature coefficient module includes: PMOS tube MP1, PMOS tube MP2, switch SW1;
the drain electrode and the grid electrode of the PMOS tube MP1 are connected with an external sensor and are used for receiving positive temperature coefficient current IP sent by the external sensor;
the source electrode of the PMOS tube MP1 is connected with the source electrode of the PMOS tube MP 2;
the source electrode of the PMOS tube MP2 is connected with a direct current power supply;
the grid electrode of the PMOS tube MP2 is connected with the grid electrode of the PMOS tube MP 1;
the drain electrode of the PMOS tube MP2 is connected with one end of the switch SW1, and the other end of the switch SW1 is connected with the comparison module.
It should be noted that, the positive temperature coefficient module is connected with an external sensor and a voltage source through a PMOS tube, and the positive temperature coefficient module is combined with the comparator module to realize that a current signal sent by the sensor is converted into a voltage signal, and meanwhile, the input voltage of the comparator is improved through the control of the switch SW 1. In other words, the grid electrode of the PMOS tube is controlled by the current of the external sensor so as to control the PMOS tube, and the power supply voltage is connected or disconnected by the PMOS tube so as to regulate the input voltage of the comparator module. In addition, the positive temperature coefficient current IP is a current related to the characteristics and resistance of the transistor itself.
According to an embodiment of the present invention, the negative temperature coefficient module includes: NMOS tube MN1, NMOS tube MN2 and switch SW2;
the drain electrode and the grid electrode of the NMOS tube MN1 are connected with an external sensor and used for receiving negative temperature coefficient current IN sent by the external sensor;
the source electrode of the NMOS tube MN1 is connected with the source electrode of the NMOS tube MN 2;
the source electrode of the NMOS tube MN2 is grounded;
the grid electrode of the NMOS tube MN2 is connected with the grid electrode of the NMOS tube MN 1;
the drain electrode of the NMOS tube MN2 is connected with one end of a switch SW2, and the other end of the switch SW2 is connected with a comparison module.
It should be noted that, the negative temperature coefficient module is connected with an external sensor or ground level through an NMOS tube, and the negative temperature coefficient module is combined with the comparator module to convert a current signal sent by the sensor into a voltage signal, and meanwhile, the input voltage of the comparator is improved through controlling the switch SW 2. In other words, the NMOS tube controls the grid electrode thereof through the current of the external sensor so as to control the NMOS tube, the grounding control of the comparator module is realized through the NMOS tube, and the input voltage of the comparator module is lowered through grounding, so that the adjustment of the input voltage of the comparator module is realized. IN addition, the negative temperature coefficient current IN is a current related to the characteristics and resistance of the transistor itself.
According to the embodiment of the invention, the switch SW1 and the switch SW2 are controlled in a non-falling control mode.
It should be noted that, the switch SW1 may implement connection between the comparator module and the voltage source, so as to implement charging of the voltage at the input end of the comparator module, so as to increase the voltage at the input end of the comparator. The switch SW2 may be used to connect the comparator module to ground, thereby discharging the voltage at the input of the comparator module to reduce the voltage at the input of the comparator. The switch SW1 and the switch SW2 adopt a non-falling control mode, namely when the switch SW1 is closed, the switch SW2 is opened, and when the switch SW2 is closed, the switch SW1 is opened, and the switch SW1 and the switch SW cannot be in the same state, namely cannot be simultaneously closed or simultaneously opened, if the switch SW1 and the switch SW2 are simultaneously opened, the input of the comparator module is possibly abnormal, the measurement result is not changed, and therefore the measurement effect is not achieved; if both are closed at the same time, direct grounding of the DC power supply may be caused, and the comparator module is always in a single discharge module, so that a measurement effect is not achieved.
According to the embodiment of the invention, the comparison module comprises an integration capacitor Cint and a comparator comp_hs;
the inverting terminal of the comparator comp_hs is respectively connected with one end of the integrating capacitor Cint, the other end of the switch SW1 and the other end of the switch SW2;
the other end of the integrating capacitor Cint is grounded;
the same phase end of the comparator COMP_HS is connected with a reference voltage end;
the output end of the comparator COMP_HS is connected with the output module.
It should be noted that, the integrating capacitor Cint is an input voltage provided by the comparator module, and the positive temperature coefficient module and the negative temperature coefficient module are used for realizing charging and discharging of the integrating capacitor Cint, specifically, when the switch SW1 is closed, the switch SW2 is opened, which is equivalent to directly applying the voltage of the direct current power supply to two ends of the integrating capacitor Cint, so as to realize charging of the integrating capacitor Cint by using the direct current power supply, thereby improving the voltage of the integrating capacitor Cint, that is, improving the input voltage of the inverting end of the comparator comp_hs. When the switch SW2 is closed and the switch SW1 is opened, the two ends of the integrating capacitor Cint are directly grounded, and at this time, the integrating capacitor Cint discharges, so as to reduce the voltage at the two ends of the integrating capacitor Cint, that is, the input voltage at the inverting end of the comparator comp_hs. The reference voltage is input to the non-inverting input terminal of the comparator comp_hs.
In addition, the integrating capacitor Cint is a differential integrating capacitor and is used for storing differential charges of positive and negative temperature coefficient current charge and discharge.
According to an embodiment of the present invention, the comparator comp_hs is a hysteresis comparator.
It should be noted that, the comparator comp_hs is a hysteresis comparator, and compares the integrated voltage signal of the positive and negative temperature difference value on the integrating capacitor Cint with the reference voltage VREF, and then outputs the quantized data of the wide and narrow pulse signal BS representing the charge and discharge times of the positive and negative temperature coefficient current by combining with the DFT trigger controlled by the clock in the output module.
According to an embodiment of the present invention, the output module includes: trigger DFT, pulse control circuit NO_CROSS, signal enhancement circuit Buff1, signal enhancement circuit Buff2 and Delay circuit Delay;
the data input end of the trigger DFT is connected with the output end of the comparator COMP_HS;
the clock signal of the trigger DFT is connected with a preset clock signal CLK;
the output end of the comparator DFT is connected with the input end of the pulse control circuit NO_CROSS;
the pulse control circuit NO_CROSS outputs two paths of switch signals SN and SP;
the switch signal SN is used to control the switch state of the switch SW2;
the switch signal SP is used to control the switch state of the switch SW1;
the input end of the Delay circuit Delay is connected with the clock signal end of the trigger DFT;
the output end of the Delay circuit Delay is connected with the input end of the signal enhancement circuit Buff 2;
the output end of the signal enhancement circuit Buff2 is connected with an external sensor and is used for collecting a clock signal BS_CLK of sensor output data;
the input end of the signal enhancing circuit Buff1 is connected with the output end of the pulse control circuit NO_CROSS, receives the switch signal SN, processes the switch signal SN, and outputs a wide and narrow pulse signal BS related to the clock signal BS_CLK.
It should be noted that, the output module analyzes the preset clock information CLK and the information output by the comparator, and outputs the switch signal SN and the switch signal SP through the pulse control circuit no_cross, so as to control the switch SW1 and the switch SW2, and controls the switch SW1 and the switch SW2 to charge and discharge the integrating capacitor Cint, so that the terminal voltage of the integrating capacitor Cint maintains a dynamic balance. Specifically, the application realizes the charge or discharge of the integral capacitor Cint through a pair of positive temperature coefficient modules and negative temperature coefficient modules, compares the voltage on the integral capacitor Cint with a preset reference voltage VREF through a comparator COMP_HS, and after the detection circuit is started, when the voltage value on the integral capacitor Cint is greater than the preset reference voltage VREF, the comparator COMP_HS turns over and is switched into a negative temperature coefficient current discharge mode; when the voltage on the integrating capacitor Cint is smaller than the preset reference voltage VREF, the comparator COMP_HS turns over again and is switched to a positive temperature coefficient charging mode; this is repeated, and as the temperature changes from low to high, the number of times the positive temperature coefficient current charges the integrating capacitor Cint gradually decreases and the number of times the negative temperature coefficient current discharges the integrating capacitor Cint gradually increases in the same time in order to maintain a dynamic balance of the voltage across the integrating capacitor Cint. Because the pulse width of the current switch is controlled by a fixed clock, the total number of charging and discharging times of the integration capacitor Cint is fixed in a fixed time, and the corresponding temperature variation can be found by counting the pulse number variation in the fixed time, so that the measurement of the ambient temperature is realized.
As a specific example, the present application is described below in connection with fig. 2-3. In this embodiment, the input signal, the switch control timing and the output signal are as shown in fig. 2. In actual detection operation, the data of the output data width pulse signal BS sampled and collated by the clock signal bs_clk is shown in fig. 3. In fig. 3, T1> T2> T3 is an ambient temperature gradual rise process; the Data processed at the temperature T1 is data_t1, the Data processed at the temperature T2 is data_t2, the Data processed at the temperature T3 is data_t3, and according to fig. 2 and 3, the following conclusion can be drawn: with the rise of temperature, the high-level duty ratio of the output Data width pulse signal BS is gradually increased, the output after the sampling Data processing is also increased along with the increase, and the temperature can be quantitatively output through the quantization output at different temperatures of data_t1, data_t2, data_t3 and the like.
According to the embodiment of the invention, the switch signal SN and the switch signal SP are non-falling control signals.
It should be noted that, the comparator no_cross is a non-falling switch controller, so that the switch SW1 and the switch SW2 are not turned on simultaneously, charging and discharging are ensured to be performed independently, NO interference is caused between the charging and discharging, and the difference charges of charging and discharging of the positive and negative temperature coefficient currents are left in the integrating capacitor Cint.
The switch signal SN and the switch signal SP are pulse control signals, wherein the switch signal SN is used for controlling the switch SW2 to be turned on and turned off, the switch signal SP is used for controlling the switch SW1 to be turned on and turned off, and the switch signal SN and the switch signal SP are control signals which do not fall off, namely when the pulse switch signal SN controls the switch SW2 to be turned on, the pulse switch signal SP controls the switch SW1 to be turned off; when the pulse switch signal SP controls the switch SW1 to be closed, the pulse switch signal SN controls the switch SW2 to be opened. The switch signal SN and the switch signal SP cannot simultaneously control the switch SW1 and the switch SW2 to be simultaneously turned on or turned off, so as to prevent direct grounding of the dc power supply, or inaccurate input voltage of the comparator comp_hs, and cannot truly reflect the measurement situation.
According to the embodiment of the invention, the trigger DFT is a D trigger.
It should be noted that, the D flip-flop (data flip-flop or delay flip-flop) is an information storage device with a memory function and two stable states, and is a most basic logic unit forming various timing circuits, and is also an important unit circuit in a digital logic circuit. Thus, D flip-flops have wide application in digital systems and computers. The flip-flop has two stable states, namely "0" and "1", and can flip from one stable state to the other under the action of a certain external signal. The D flip-flop has a flip-flop composed of an integrated flip-flop and a gate circuit. The triggering mode includes level triggering and edge triggering, the former can be triggered when CP (clock pulse) =1, and the latter is triggered at the front edge (positive jump 0→1) of CP. The minor state of the D flip-flop depends on the state of the D-terminal before triggering, i.e., the minor state=d. Therefore, it has two functions of setting 0 and setting 1. For an edge D flip-flop, since the circuit has a hold blocking effect during cp=1, the data state change at the D terminal during cp=1 does not affect the output state of the flip-flop.
In the present application, the flip-flop DFT completes the temperature detection quantized output by the clock signal CLK.
Referring to fig. 4, a flowchart of an environmental temperature detection method according to some embodiments of the present application is shown. The method comprises the following steps:
s101: charging the integral capacitor Cint through the positive temperature coefficient module, or discharging the integral capacitor Cint through the negative temperature coefficient module;
s102: comparing the voltage at two ends of the integrating capacitor Cint with a reference voltage through a comparator comp_hs;
s103: judging whether the voltage at two ends of the integrating capacitor Cint is larger than a reference voltage or not;
if yes, sending the comparison result to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send a switch signal SN to control the switch SW2 to be closed, and the negative temperature coefficient circuit is switched on to discharge the integrating capacitor Cint;
if not, the comparison result is sent to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send out a switch signal SP to control the switch SW1 to be closed, and the positive temperature coefficient circuit is connected to charge the integrating capacitor Cint;
s104: the corresponding temperature variation is found by counting the pulse number variation of the switch SW1 in a fixed time, so that the measurement of the ambient temperature is realized.
It should be noted that, in the present application, charging or discharging of the integrating capacitor Cint is implemented by a pair of positive temperature coefficient modules and negative temperature coefficient modules, and the voltage on the integrating capacitor Cint is compared with the preset reference voltage VREF by the comparator comp_hs, and after the detection circuit is started, when the voltage value on the integrating capacitor Cint is greater than the preset reference voltage VREF, the comparator comp_hs is turned over, and is switched to the negative temperature coefficient current discharging mode; when the voltage on the integrating capacitor Cint is smaller than the preset reference voltage VREF, the comparator COMP_HS turns over again and is switched to a positive temperature coefficient charging mode; this is repeated, and as the temperature changes from low to high, the number of times the positive temperature coefficient current charges the integrating capacitor Cint gradually decreases and the number of times the negative temperature coefficient current discharges the integrating capacitor Cint gradually increases in the same time in order to maintain a dynamic balance of the voltage across the integrating capacitor Cint. Because the pulse width of the current switch is controlled by a fixed clock, the total number of charging and discharging times of the integration capacitor Cint is fixed in a fixed time, and the corresponding temperature variation can be found by counting the pulse number variation in the fixed time, so that the measurement of the ambient temperature is realized.
Therefore, the environmental temperature detection circuit and the detection method are provided. By simplifying the circuit structure, the temperature-related signal is directly derived from PTAT positive temperature coefficient current and VBE negative temperature following current related to the triode device, and redundant interference can be eliminated due to the fact that the temperature-related signal is directly derived from the device, so that the precision of ambient temperature detection is improved.
The positive and negative temperature coefficient currents IP and IN are directly related to triodes, namely PMOS (P-channel metal oxide semiconductor) transistors, NMOS (N-channel metal oxide semiconductor) transistors and resistors of the same type, so that devices are few, and the influence of the temperature coefficient of the resistor on the positive and negative temperature coefficient currents is the same IN proportion and can be ignored.
The integration capacitor Cint is charged and discharged by directly using the positive and negative temperature coefficient currents, and the integration capacitor Cint mainly accumulates the difference value between the positive and negative temperature coefficient currents, so that the influence of the temperature change of the integration capacitor Cint on an output result is negligible. And the respective times of charge and discharge realize quantized output through a hysteresis comparator and a D trigger controlled by a clock, and the more the discharge times are, the higher the temperature is.
In addition, the output result of the method is not affected by the change of the frequency of the using clock along with the temperature drift. All the sub-circuits in the detection circuit do not become interference feedback to the detection system relative to temperature changes. The detection circuit system is simple, can closely follow the temperature change, and directly quantizes and outputs the chip environment temperature change detected by the triode.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above described device embodiments are only illustrative, e.g. the division of the units is only one logical function division, and there may be other divisions in practice, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present invention may be stored in a readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in essence or a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, ROM, RAM, magnetic or optical disk, or other medium capable of storing program code.

Claims (10)

1. The environment temperature detection circuit is characterized by comprising a positive temperature coefficient module, a negative temperature coefficient module, a comparison module and an output module;
the positive temperature coefficient module is connected with the external sensor and used for receiving the positive temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
the negative temperature coefficient module is connected with the external sensor and used for receiving a negative temperature coefficient current signal sent by the external sensor, converting the positive temperature coefficient current signal into a voltage signal and sending the voltage signal to the comparison module;
and the output module sends out a control signal to control the positive temperature coefficient module or the negative temperature coefficient module according to the comparison result, and meanwhile, carries out temperature detection quantization and outputs a detection result.
2. An ambient temperature sensing circuit according to claim 1, wherein the positive temperature coefficient module comprises: PMOS tube MP1, PMOS tube MP2, switch SW1;
the drain electrode and the grid electrode of the PMOS tube MP1 are connected with an external sensor and are used for receiving positive temperature coefficient current IP sent by the external sensor;
the source electrode of the PMOS tube MP1 is connected with the source electrode of the PMOS tube MP 2;
the source electrode of the PMOS tube MP2 is connected with a direct current power supply;
the grid electrode of the PMOS tube MP2 is connected with the grid electrode of the PMOS tube MP 1;
the drain electrode of the PMOS tube MP2 is connected with one end of the switch SW1, and the other end of the switch SW1 is connected with the comparison module.
3. An ambient temperature sensing circuit according to claim 2, wherein the negative temperature coefficient module comprises: NMOS tube MN1, NMOS tube MN2 and switch SW2;
the drain electrode and the grid electrode of the NMOS tube MN1 are connected with an external sensor and used for receiving negative temperature coefficient current IN sent by the external sensor;
the source electrode of the NMOS tube MN1 is connected with the source electrode of the NMOS tube MN 2;
the source electrode of the NMOS tube MN2 is grounded;
the grid electrode of the NMOS tube MN2 is connected with the grid electrode of the NMOS tube MN 1;
the drain electrode of the NMOS tube MN2 is connected with one end of a switch SW2, and the other end of the switch SW2 is connected with a comparison module.
4. An ambient temperature sensing circuit according to claim 3, wherein the switches SW1 and SW2 are controlled in a non-falling control manner.
5. An ambient temperature sensing circuit according to claim 4, wherein the comparison module comprises an integrating capacitor Cint, a comparator comp_hs;
the inverting terminal of the comparator comp_hs is respectively connected with one end of the integrating capacitor Cint, the other end of the switch SW1 and the other end of the switch SW2;
the other end of the integrating capacitor Cint is grounded;
the same phase end of the comparator COMP_HS is connected with a reference voltage end;
the output end of the comparator COMP_HS is connected with the output module.
6. An ambient temperature sensing circuit according to claim 5, wherein the comparator comp_hs is a hysteresis comparator.
7. An ambient temperature sensing circuit according to claim 5 or 6, wherein the output module comprises: trigger DFT, pulse control circuit NO_CROSS, signal enhancement circuit Buff1, signal enhancement circuit Buff2 and Delay circuit Delay;
the data input end of the trigger DFT is connected with the output end of the comparator COMP_HS;
the clock signal of the trigger DFT is connected with a preset clock signal CLK;
the output end of the comparator DFT is connected with the input end of the pulse control circuit NO_CROSS;
the pulse control circuit NO_CROSS outputs two paths of switch signals SN and SP;
the switch signal SN is used to control the switch state of the switch SW2;
the switch signal SP is used to control the switch state of the switch SW1;
the input end of the Delay circuit Delay is connected with the clock signal end of the trigger DFT;
the output end of the Delay circuit Delay is connected with the input end of the signal enhancement circuit Buff 2;
the output end of the signal enhancement circuit Buff2 is connected with an external sensor and is used for collecting a clock signal BS_CLK of sensor output data;
the input end of the signal enhancing circuit Buff1 is connected with the output end of the pulse control circuit NO_CROSS, receives the switch signal SN, processes the switch signal SN, and outputs a wide and narrow pulse signal BS related to the clock signal BS_CLK.
8. An ambient temperature sensing circuit according to claim 7, wherein the switching signal SN and the switching signal SP are non-falling control signals.
9. An ambient temperature sensing circuit according to claim 7 or 8, wherein the trigger DFT is a D-trigger.
10. An ambient temperature detection method, comprising the steps of:
charging the integral capacitor Cint through the positive temperature coefficient module, or discharging the integral capacitor Cint through the negative temperature coefficient module;
comparing the voltage at two ends of the integrating capacitor Cint with a reference voltage through a comparator comp_hs;
judging whether the voltage at two ends of the integrating capacitor Cint is larger than a reference voltage or not;
if yes, sending the comparison result to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send a switch signal SN to control the switch SW2 to be closed, and the negative temperature coefficient circuit is switched on to discharge the integrating capacitor Cint;
if not, the comparison result is sent to a trigger DFT; the trigger DFT triggers the pulse control circuit NO_CROSS to send out a switch signal SP to control the switch SW1 to be closed, and the positive temperature coefficient circuit is connected to charge the integrating capacitor Cint;
the corresponding temperature variation is found by counting the pulse number variation of the switch SW1 in a fixed time, so that the measurement of the ambient temperature is realized.
CN202310063267.4A 2023-01-16 2023-01-16 Ambient temperature detection circuit and detection method Pending CN116046202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310063267.4A CN116046202A (en) 2023-01-16 2023-01-16 Ambient temperature detection circuit and detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310063267.4A CN116046202A (en) 2023-01-16 2023-01-16 Ambient temperature detection circuit and detection method

Publications (1)

Publication Number Publication Date
CN116046202A true CN116046202A (en) 2023-05-02

Family

ID=86123538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310063267.4A Pending CN116046202A (en) 2023-01-16 2023-01-16 Ambient temperature detection circuit and detection method

Country Status (1)

Country Link
CN (1) CN116046202A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118054688A (en) * 2024-04-12 2024-05-17 深圳力高新能技术有限公司 Circuit and method for regulating and balancing positive and negative bus voltage

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118054688A (en) * 2024-04-12 2024-05-17 深圳力高新能技术有限公司 Circuit and method for regulating and balancing positive and negative bus voltage

Similar Documents

Publication Publication Date Title
US8749224B2 (en) Voltage detection circuit and method for controlling the same
US7884679B2 (en) Process, voltage, temperature compensated oscillator
CN110858086B (en) Dual-loop low dropout regulator system
JP3807381B2 (en) A / D conversion circuit, temperature sensor circuit, integrated circuit, and method of adjusting temperature sensor circuit
US7459983B2 (en) Temperature detecting semiconductor device
US8692623B2 (en) Relaxation oscillator circuit including two clock generator subcircuits having same configuration operating alternately
US8710913B2 (en) Circuit arrangement and method for operating a circuit arrangement
US7279941B2 (en) Voltage-frequency conversion apparatus and method of changing reference voltage thereof
KR101790943B1 (en) Digital low drop-out regulator using technique of detecting multi-mode
CN116046202A (en) Ambient temperature detection circuit and detection method
CN111934395B (en) Switching control circuit, charging chip and electronic device
JP2002164770A (en) Semiconductor integrated circuit
CN101331402A (en) Current measurement circuit and method
CN110068401B (en) Temperature sensing device and temperature-voltage converter
CN117492503A (en) Low-dropout linear voltage regulator, control method, battery management system and electronic equipment
WO2023250234A2 (en) Integrated circuit package with internal circuitry to detect external component parameters and parasitics
US11747846B2 (en) Digital LDO regulator for performing asynchronous binary search using binary-weighted PMOS array and operation method thereof
CN105680863B (en) Circuit and method for equalizing impedance of PMOS device and NMOS device
US7839183B2 (en) Circuit for discriminating output of squelch circuit and circuit for regulating sensivity of the same
US9030246B2 (en) Semiconductor device
US20200118607A1 (en) Timing calibration system and a method thereof
JP2001036008A (en) Semiconductor integrated circuit
CN114337258B (en) High-precision voltage conversion ratio searching circuit of reconfigurable charge pump and charge pump system
US20220360256A1 (en) Ramp signal calibration device
CN117478145A (en) Signal detection circuit, signal detection method, image sensor and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination