Background
Temperature is one of the most common physical quantities in nature, and temperature sensors are widely applied to the fields of modern industry, medical treatment, transportation, intelligent home furnishing and the like. The temperature sensor (TemPerature Sensor, TPS) may be divided into discrete and integrated types according to the degree of integration. The discrete sensor uses discrete devices such as a thermocouple, a thermistor, a resistance type temperature detector and the like, and an external analog-to-digital converter (Analog to Digital Converter, an ADC) is needed to realize the digitization of temperature data, so that the discrete sensor has large volume and high cost and is not suitable for scenes with higher requirements on integration level.
With the development of integrated circuit technology, the integrated complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor, CMOS) temperature sensor has small volume, easy system integration, low cost, and can be integrated with an ADC to directly output digital signals, thus being widely applied to the scenes of system on chip, industrial Internet of things, wireless sensing network and the like.
With the shrinking of process nodes of integrated circuits, the integration level of the circuits is continuously improved, so that the self-heating problem of chips is increasingly serious. Therefore, on-chip temperature sensors are required to detect the temperature in real time in many chip designs, and feedback frequency and voltage are regulated, so that dynamic regulation of chip performance and overheat protection are realized.
Among CMOS temperature sensors, bipolar transistor (Bipolar Junction Transistor, BJT) temperature sensors are the most widely used sensors because of their advantages of good linearity, low power consumption, simple structure, etc. The integrated CMOS temperature sensor includes, in addition to the temperature sensing device, a bias circuit required by the temperature sensing device, and an analog-to-digital converter for further digitizing the electrical signal. In practical chip designs, the area and power consumption of the readout circuit is typically much larger than the temperature sensing device itself, so the performance and cost of CMOS temperature sensors is largely dependent on the design of the sensor interface circuit.
Fig. 1 shows a schematic diagram of a TPS analog-to-digital conversion scheme in a conventional scheme. TPS analog signals generated by TPS are sent into an ADC, and digital output codes are obtained after analog-to-digital conversion in the ADC.
The ADC operation requires a temperature independent reference voltage V ref, which can be obtained by bandgap reference voltage V bg and reference voltage generation circuitry, in which the digital output code is quantized after passing through the universal voltage domain ADC.
At the same time, since the ADC is also used to convert the sensing signals 1,2 output by other sensors, such as detecting battery voltage, other off-chip signals of low measurement frequency. The multiplexer takes the multipath sensing signals as the input of the ADC, so that the chip area can be reduced, and the cost can be reduced.
Fig. 2 shows a schematic diagram of a TPS analog-to-digital conversion scheme based on a dedicated high-precision triode. The scheme generally adopts a customized special voltage domain ADC interface, and is different from the traditional scheme for generating a reference voltage V ref irrelevant to temperature, the customized special voltage domain ADC needs an equivalent reference voltage V ref_ptat with a slightly positive temperature coefficient characteristic for realizing curvature compensation of the output voltage of the sensor.
The equivalent reference voltage V ref_ptat is typically generated using the difference Δv be between the base and emitter voltage differences V be and the base and emitter voltage differences V be of the two transistors in TPS. But this limits the versatility of the ADC, and if the ADC also processes the sensing signals of other channels, the signal processing of other channels is more difficult.
Disclosure of Invention
In order to alleviate or partially alleviate the above technical problem, the solution of the present invention is as follows:
A TPS digital-to-analog conversion circuit comprises TPS, a multiplexer, a hysteresis comparator, a reference voltage generation circuit, an ADC and a digital output code, wherein the TPS outputs TPS analog signals as one of input signals of the multiplexer, the multiplexer receives multi-channel sensing signals, the output signals of the multiplexer serve as input signals of the ADC, the hysteresis comparator receives TPS analog signals and first comparison voltages output by a reference voltage generation circuit and sends the output signals of the hysteresis comparator to the reference voltage generation circuit, the reference voltage generation circuit receives band-gap reference voltages and output signals of the hysteresis comparator, generates first comparison voltages and serves as one of input signals of the hysteresis comparator and generates reference voltages, and the ADC receives the reference voltages and outputs the digital output code according to the reference voltages.
Further, when the multiplexer is configured to select the TPS analog signal as the output signal of the multiplexer, a target first comparison voltage closest to the voltage of the TPS analog signal is obtained by outputting a different first comparison voltage by the reference voltage generating circuit, and the reference voltage is determined according to the target first comparison voltage.
Further, the reference voltage generating circuit obtains the different first comparison voltages by applying the different first comparison voltage control codes.
Further, when a target first comparison voltage closest to the voltage of the TPS analog signal is obtained, the first comparison voltage control code which is being applied by the reference voltage generating circuit is a first comparison voltage target control code, the reference voltage target control code is obtained according to the first comparison voltage target control code, and the reference voltage generating circuit generates the reference voltage by applying the reference voltage target control code.
Further, when the multiplexer is configured to select the non-TPS analog signal as the output signal of the multiplexer, the reference voltage generation circuit fixes the reference voltage by applying the fixed reference voltage control code.
Further, the first comparison voltage control code is used for controlling the size of the adjustable resistor in the reference voltage generation circuit.
Further, a reference voltage target control code is obtained according to the first comparison voltage target control code, specifically, the reference voltage target control code is obtained by inquiring in a reference voltage generating circuit according to the first comparison voltage target control code.
Further, a correspondence relationship between the first comparison voltage target control code and the reference voltage target control code is stored in a digital circuit in the reference voltage generation circuit.
Further, the bandgap reference voltage is generated by TPS.
Further, the reference voltage generating circuit outputs different first comparison voltages to obtain a target first comparison voltage closest to the voltage of the TPS analog signal, which is achieved through a successive approximation step.
The technical scheme of the invention has the following beneficial technical effects:
The curvature compensation of TPS output voltage is realized, so that the digital output precision of TPS is higher, the information processing difficulty after the ADC converts the sensing signals of other input channels is reduced, the ADC has good universality, the waste of silicon cost is avoided, and the power consumption is reduced.
Furthermore, other advantageous effects that the present invention has will be mentioned in the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to clearly describe the technical solution of the embodiments of the present invention, in the embodiments of the present invention, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. Those skilled in the art will appreciate that the words "first," "second," and the like do not limit the number and order of execution.
Fig. 3 is a block diagram of TPS digital to analog conversion circuitry. The TPS digital-to-analog conversion circuit comprises TPS, a hysteresis comparator, a reference voltage generation circuit, a multiplexer and an ADC, wherein the reference voltage generation circuit comprises an analog circuit and a digital circuit, and the digital circuit is designed according to control logic.
The multiplexer may receive multiple input signals, such as sensor signal 1, sensor signal 2, which may not be sensor signals from TPS, but other types of sensors.
Further, the multiplexer receives the TPS analog signal of the TPS output. The TPS analog signal may be the base and emitter voltage difference V be in TPS, the difference Δv be between the base and emitter voltage differences V be of two transistors, or other temperature dependent voltage signals.
Optionally, TPS also outputs a bandgap reference voltage V bg to the reference voltage generation circuit.
The hysteresis comparator receives the TPS analog signal and the first comparison voltage COMP output by the reference voltage generation circuit.
Illustratively, the TPS analog signal is coupled to the non-inverting input of the hysteresis comparator and the first comparison voltage COMP is coupled to the inverting input of the hysteresis comparator. The output signal of the hysteresis comparator is transmitted to a reference voltage generating circuit, in particular a digital circuit in the reference voltage generating circuit.
The reference voltage V ref output by the reference voltage generating circuit is transmitted to the ADC and used as the reference voltage of the ADC. The ADC receives the output signal of the multiplexer, which may be an TPS analog signal, or may be a sense signal 1, a sense signal 2, or other sense signals. The ADC quantizes the multiplexer output signal into a digital output code.
Fig. 4 is an analog circuit diagram in the reference voltage generation circuit. P-channel metal oxide semiconductor (PMOS) transistors P1 and P2 each have sources connected to a device operating Voltage (VDD).
The grid electrodes of the PMOS tube P1 and the PMOS tube P2 are connected to the output end of the first comparator, and the non-inverting input end of the first comparator is connected to the band gap reference voltage V bg.
The drain electrode of the PMOS tube P1 is connected with the first end of the third resistor R3, and the second end of the third resistor R3 is connected with the first end of the second resistor R2.
The drain electrode of the PMOS tube P2 is connected with the first end of the fourth resistor R4, and the second end of the fourth resistor R4 is connected with the first end of the first resistor R1. The second end of the second resistor R2 and the second end of the first resistor R1 are commonly grounded.
In addition, the first resistor R1 and the third resistor R3 are adjustable resistors respectively controlled by a first comparison voltage control code COMP_CTL < M:0> and a reference voltage control code VREF_CTL < N:0>, wherein M, N are positive integers.
The first end of the third resistor R3 serves as an output node for the reference voltage V ref. The second end of the third resistor R3 is connected with the inverting input end of the first comparator. The second end of the fourth resistor R4 serves as the output node of the first comparison voltage COMP.
When the multiplexer selects TPS analog signals as output signals of the multiplexer, in the invention, the value of the first resistor R1 is adjusted by adjusting and controlling the first comparison voltage control code COMP_CTL < M:0> by utilizing a successive approximation (Successive Approximation, SA) method, so as to obtain different first comparison voltages COMP.
The different analog signals of the first comparison voltages COMP and TPS are compared in a hysteresis comparator, and a corresponding comparison result is obtained.
For example, if the hysteresis comparator outputs a high level when the first comparison voltage control code comp_ctl < M:0> is "13", and the hysteresis comparator outputs a low level when the first comparison voltage control code comp_ctl < M:0> is "14", that is, the output signal of the hysteresis comparator is inverted, then the first comparison voltage COMP corresponding to the first comparison voltage control code comp_ctl < M:0> being "14" can be considered as the target first comparison voltage, and the first comparison voltage control code comp_ctl < M:0> is "14" can be fixed as the target first comparison voltage control code. The value of the TPS analog signal voltage may be represented by a first comparison voltage target control code obtained by a successive approximation step.
According to the invention, the reference voltage generating circuit outputs different first comparison voltages to obtain the target first comparison voltage or/and the first comparison voltage target control code which is closest to the voltage of the TPS analog signal.
Further, in the successive approximation step, the output result of the hysteresis comparator is stored into a register.
Further, a digital circuit in the reference voltage generating circuit includes the register.
FIG. 5 is a schematic diagram of TPS analog signal voltage versus temperature. For a batch of chips containing TPS, considered in the present invention to have the same TPS analog signal voltage versus temperature profile, this TPS analog signal voltage versus temperature profile can be obtained by actual measurement of one or several chips. For example, the temperature may range from-40 degrees to 125 degrees.
Illustratively, in a first temperature interval, the TPS analog signal voltage has a slope k 1 with respect to temperature, in a second temperature interval, the TPS analog signal voltage has a slope k 2 with respect to temperature, in a third temperature interval, the TPS analog signal voltage has a slope k 3 with respect to temperature, and in a fourth temperature interval, the TPS analog signal voltage has a slope k 4 with respect to temperature.
For different slopes of the TPS analog signal voltage with respect to temperature, different reference voltages V ref are corresponding. In other words, the aforementioned successive approximation method can obtain the value of the TPS analog signal voltage. Thanks to the actual measurement described above, after obtaining the value of the TPS analog signal voltage, a temperature value can be obtained, which corresponds to the slope of the different TPS analog signal voltages with respect to temperature. That is, after the value of the TPS analog signal voltage is obtained through the successive approximation step, the corresponding reference voltage V ref can be obtained.
In order to generate the corresponding reference voltage V ref in the analog circuit in the reference voltage generation circuit, a corresponding reference voltage control code vref_ctl < N:0> can be generated by the digital circuit in the reference voltage generation circuit and acts on the third resistor R3.
In other words, if the successive approximation step is performed, a first comparison voltage target control code corresponding to the value of the TPS analog signal voltage is obtained, and the first comparison voltage target control code corresponds to a reference voltage control code vref_ctl < N:0>, i.e., the reference voltage target control code. By means of a lookup table, an array and the like, the corresponding reference voltage target control code can be obtained (for example, by a query step) after the first comparison voltage target control code is obtained in a digital circuit in the reference voltage generation circuit, and the reference voltage target control code is acted on the third resistor R3.
Alternatively, the correspondence between the first comparison voltage target control code and the reference voltage target control code may be stored in a digital circuit in the reference voltage generation circuit, so as to facilitate the execution of the foregoing inquiry step.
The first end of the third resistor R3 serves as an output node of the reference voltage V ref, and outputs a corresponding reference voltage V ref.
Therefore, the invention realizes the matching of the reference voltage V ref of the ADC and TPS or TPS analog signals through the method, and the obtained reference voltage V ref adjusts the digital output code of the ADC to realize the curvature compensation of TPS analog signals.
When the non-TPS analog signal such as the sensing signal 1 or the sensing signal 2 is used as the output signal of the multiplexer, the reference voltage V ref is fixed by the fixed reference voltage control code VREF_CTL < N:0>, so that the ADC can be used as a general ADC.
Numerous specific details are set forth in the above description in order to provide a better illustration of the invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, well known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present invention.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.