Summary of the invention
According to above the deficiencies in the prior art, the technical problem to be solved in the present invention is: provide a kind of temperature measurement accuracy high and
The simple thermistor temperature sensor of temp measuring method.
The present invention solves the scheme that its technical problem used: the present invention uses critesistor as temperature sensitivity unit
Part, this critesistor and capacitances in series, transient process based on single order resistance-capacitance circuit, uses intervalometer only to this resistance-capacitance circuit
Charging process or discharge process carry out a timing, according to intervalometer timing result now, by searching in memory
The resistivity-temperature characteristics data of the critesistor of comparison storage, and then determine the temperature value of measurement.
The invention provides a kind of thermistor temperature sensor, it includes critesistor RT, electric capacity C, alternative electricity
Son switch K, electrical switch KD, controller, memorizer, digital clock, comparator CMP, serial ports and reference voltage V r, wherein two
Selecting an electrical switch K to include two inputs and a common port, this common port of a certain moment can only input with one of them
Termination is logical, and disconnects with another input, and critesistor RT, as the sensing element of measurement temperature, stores temperature-sensitive in memorizer
The resistivity-temperature characteristics data of resistance RT, comparator CMP realizes the critesistor RT to input or the terminal voltage of electric capacity C and reference voltage
Vr compares, serial ports realization and exogenous data or the input of order or output, and controller, as the core of whole system, is responsible for
The control of whole system operation and computing, it is characterised in that: one end of critesistor RT connects one end of electric capacity C, electrical switch
One end of KD and of comparator CMP compare input, and the other end of critesistor RT connects the other end of electrical switch KD
The common port of rear reconnection alternative electrical switch K or ground connection, the other end of electric capacity C connects the public of alternative electrical switch K
End or ground connection, an input of alternative electrical switch K connects power supply V, another input end grounding, electric capacity C and temperature-sensitive electricity
Resistance RT composition composition single order resistance-capacitance circuit, by the charge or discharge process of electric capacity C is realized thermometric process, this thermometric process base
Zero state response in single order resistance-capacitance circuit transient response or zero input response, digital clock is to the charging of electric capacity C or puts
Electric process carries out timing, when digital clock overflows or the output result of comparator CMP shows critesistor RT's or electric capacity C
When terminal voltage reaches reference voltage V r, digital clock stop timing, controller according to the timing result of now digital clock,
By searching the resistivity-temperature characteristics data of the critesistor RT of comparison storage in memory, and then determine the temperature value of measurement, should
Temperature value is the most extraneous by serial ports output.
Described reference voltage V r is fixed reference voltage or adjustable reference voltage.
When realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, hardware circuit connects can
Have two schemes available:
1, a comparison of connection one end of electric capacity C, one end, one end of electrical switch KD and the comparator CMP of critesistor RT is defeated
Entering end, the other end of critesistor RT connects after the other end of electrical switch KD ground connection again, and the other end of electric capacity C connects alternative
The common port of electrical switch K, an input of alternative electrical switch K connects power supply V, another input end grounding.
2, one end of critesistor RT connects a ratio of one end of electric capacity C, one end of electrical switch KD and comparator CMP
Relatively input, reconnects the public affairs of alternative electrical switch K after the other end of the other end connection electrical switch KD of critesistor RT
End altogether, the other end ground connection of electric capacity C, an input of alternative electrical switch K connects power supply V, another input end grounding.
When realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, described critesistor
The thermometric program of formula temperature sensor is: first electrical switch KD closes, the common port of alternative electrical switch K and its ground connection
Input is connected, and after suitable time-delay, to realize the electric discharge completely of electric capacity C, then opens electrical switch KD, then makes digital timing
Device resets, and arranges digital clock and the duty of comparator CMP, removes digital clock and the interruption mark of comparator CMP
Will position, open digital clock and the interruption of comparator CMP, open total interrupt, then the common port of alternative electrical switch K with
Its input meeting power supply V is connected, and starts digital clock and comparator CMP, then waits transformation result, is waiting Change-over knot
During Guo, when before overflowing at digital clock, the terminal voltage of critesistor RT or electric capacity C reaches reference voltage V r, compare
Device CMP sends interruption application to controller, and controller responds this interruption application, and controller stops digital clock and comparator
CMP, controller is according to the clocking value of now digital clock, by searching the critesistor RT's of comparison storage in memory
Resistivity-temperature characteristics data, and then determine the temperature value of measurement.
When realizing thermometric process based on the zero input response in single order resistance-capacitance circuit transient response, the one of critesistor RT
One of end connection one end of electric capacity C, one end of electrical switch KD and comparator CMP is compared input, and critesistor RT's is another
The common port of reconnection alternative electrical switch K after the other end of one end connection electrical switch KD, the other end ground connection of electric capacity C,
One input of alternative electrical switch K connects power supply V, another input end grounding.
When realizing thermometric process based on the zero input response in single order resistance-capacitance circuit transient response, described critesistor
The thermometric program of formula temperature sensor is: first electrical switch KD closes, and the common port of alternative electrical switch K connects power supply with it
Input connect, after suitable time-delay, to realize the fully charged of electric capacity C, then open electrical switch KD, then make numeral fixed
Time device reset, digital clock and the duty of comparator CMP be set, remove digital clock and the interruption of comparator CMP
Flag bit, open digital clock and the interruption of comparator CMP, open total interruption, then the common port alternative electrical switch K
Connect with the input of its ground connection, start digital clock and comparator CMP, then wait transformation result, waiting Change-over knot
During Guo, when before overflowing at digital clock, the terminal voltage of electric capacity C reaches reference voltage V r, comparator CMP is to control
Device sends interruption application, and controller responds this interruption application, and controller stops digital clock and comparator CMP, controller root
The clocking value of digital clock time accordingly, by searching the resistivity-temperature characteristics number of the critesistor RT of comparison storage in memory
According to, and then determine the temperature value of measurement.
The method of described thermistor temperature sensor calibration measurement temperature value is regulation reference voltage V r or software
Revise.
Thermistor temperature sensor of the present invention is had the beneficial effect that employing intervalometer carries out numeral
Coding, temperature measurement accuracy is high;Temperature measurement accuracy is unrelated with reference voltage, adapts to voltage range width, can be applicable to make battery-powered
Occasion;Thermometric process is simple, and the thermometric time is short;Hardware circuit is simple, it is easy to accomplish;Little by the electric current of critesistor, continue
Time is short, will not produce heat interference;In conjunction with integrated circuit technique, it is easy to be fabricated to cheap integrated temperature sensor.
Detailed description of the invention
The present invention is described in further detail below in conjunction with the accompanying drawings.
The invention provides a kind of thermistor temperature sensor, it includes critesistor RT, electric capacity C, alternative electricity
Son switch K, electrical switch KD, controller, memorizer, digital clock, comparator CMP, serial ports and reference voltage V r, wherein two
Selecting an electrical switch K to include two inputs and a common port, this common port of a certain moment can only input with one of them
Termination is logical, and disconnects with another input, and critesistor RT, as the sensing element of measurement temperature, stores temperature-sensitive in memorizer
The resistivity-temperature characteristics data of resistance RT, comparator CMP realizes the critesistor RT to input or the terminal voltage of electric capacity C and reference voltage
Vr compares, serial ports realization and exogenous data or the input of order or output, and controller, as the core of whole system, is responsible for
The control of whole system operation and computing, it is characterised in that: one end of critesistor RT connects one end of electric capacity C, electrical switch
One end of KD and of comparator CMP compare input, and the other end of critesistor RT connects the other end of electrical switch KD
The common port of rear reconnection alternative electrical switch K or ground connection, the other end of electric capacity C connects the public of alternative electrical switch K
End or ground connection, an input of alternative electrical switch K connects power supply V, another input end grounding, electric capacity C and temperature-sensitive electricity
Resistance RT composition composition single order resistance-capacitance circuit, by the charge or discharge process of electric capacity C is realized thermometric process, this thermometric process base
Zero state response in single order resistance-capacitance circuit transient response or zero input response, digital clock is to the charging of electric capacity C or puts
Electric process carries out timing, when digital clock overflows or the output result of comparator CMP shows critesistor RT's or electric capacity C
When terminal voltage reaches reference voltage V r, digital clock stop timing, controller according to the timing result of now digital clock,
By searching the resistivity-temperature characteristics data of the critesistor RT of comparison storage in memory, and then determine the temperature value of measurement, should
Temperature value is the most extraneous by serial ports output.
Described reference voltage V r is fixed reference voltage or adjustable reference voltage.
When realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, hardware circuit connects can
Have two schemes available:
As shown in Figure 1, one end of critesistor RT connects one end of electric capacity C, one end of electrical switch KD and comparator CMP
One is compared input, and the other end of critesistor RT connects after the other end of electrical switch KD ground connection, the other end of electric capacity C again
Connecting the common port of alternative electrical switch K, an input of alternative electrical switch K connects power supply V, another input
Ground connection.
As shown in Figure 2, one end of critesistor RT connects one end of electric capacity C, one end of electrical switch KD and comparator
One of CMP compares input, reconnects alternative electricity after the other end of the other end connection electrical switch KD of critesistor RT
The common port of son switch K, the other end ground connection of electric capacity C, an input of alternative electrical switch K connects power supply V, another
Input end grounding.
Before thermometric starts, need first electrical switch KD to be closed, and the common port of alternative electrical switch K and its ground connection
Input is connected, and so that electric capacity C is discharged to zero completely, when thermometric starts, disconnects electrical switch KD, and alternative electrical switch
The common port of K connects the input of power supply V and connects with it, and circuit enters the transient response process of zero state.
In FIG, based on the zero state response in single order resistance-capacitance circuit transient response, during electric capacity C charges, heat
The terminal voltage of quick resistance RT is, wherein τ is time constant, i.e. τ=RT C.
U when at t=t0RTT () reaches reference voltage V r, i.e. uRT(t)=Vr, making Vr=α V(α is the positive number less than 1), then, thus t0=-τ ln α.
Making t0=NT, wherein N is the clocking value of digital clock, and T is the count pulse cycle of digital clock, then NT=-τ
Ln α, so。
Owing to capacitance C, pulse period T and factor alpha are definite value, so order, then N=A RT.Temperature-sensitive
The resistance of resistance RT is linked together by certain functional relationship with dut temperature value, i.e. tw=f(RT), wherein tw represents tested
Temperature value.
Opening up continuous print memory space in memory, the first address of memory space is B, and wherein B is whole not less than zero
Number, carries out discrete processes temperature value tw, i.e. represents dut temperature value with memory unit address in memorizer, deposit in memory element
The content of storage is (A RT), then in memorizer address be the memory cell data of (B+N) be (A RT), so in memorizer
Memory unit address and memory cell data define the resistivity-temperature characteristics of critesistor RT.
Visible, the resistivity-temperature characteristics of the critesistor RT stored in memory is not the resistance of producer's offer of critesistor RT
Temperature characteristics, but the data after converting according to formula N=A RT.
The clocking value N of digital clock is linear and unrelated with voltage, according to numeral with the resistance of critesistor RT
The resistivity-temperature characteristics of the clocking value N and critesistor RT of intervalometer is assured that the temperature value of measurement.
When realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, described critesistor
The thermometric program of formula temperature sensor is: first electrical switch KD closes, the common port of alternative electrical switch K and its ground connection
Input is connected, and after suitable time-delay, to realize the electric discharge completely of electric capacity C, then opens electrical switch KD, then makes digital timing
Device resets, and arranges digital clock and the duty of comparator CMP, removes digital clock and the interruption mark of comparator CMP
Will position, open digital clock and the interruption of comparator CMP, open total interrupt, then the common port of alternative electrical switch K with
Its input meeting power supply V is connected, and starts digital clock and comparator CMP, then waits transformation result, is waiting Change-over knot
During Guo, when before overflowing at digital clock, the terminal voltage of critesistor RT reaches reference voltage V r, comparator CMP to
Controller sends interruption application, and controller responds this interruption application, and controller stops digital clock and comparator CMP, controls
Device is according to the clocking value of now digital clock, by searching the resistivity-temperature characteristics of the critesistor RT of comparison storage in memory
Data, and then determine the temperature value of measurement.
In fig. 2, based on the zero state response in single order resistance-capacitance circuit transient response, during electric capacity C charges, electricity
The terminal voltage holding C is, wherein τ is time constant, i.e. τ=RT C.
U when at t=t0cT () reaches reference voltage V r, i.e. uc(t)=Vr, making Vr=α V(α is the positive number less than 1), then, thus t0=-τ ln (1-α).
Making t0=NT, wherein N is the clocking value of digital clock, and T is the count pulse cycle of digital clock, then NT=-τ
Ln (1-α), so。
Owing to capacitance C, pulse period T and factor alpha are definite value, so order, then N=A
RT.The resistance of critesistor RT is linked together by certain functional relationship with dut temperature value, i.e. tw=f(RT), wherein tw
Represent dut temperature value.
Opening up continuous print memory space in memory, the first address of memory space is B, and wherein B is whole not less than zero
Number, carries out discrete processes temperature value tw, i.e. represents dut temperature value with memory unit address in memorizer, deposit in memory element
The content of storage is (A RT), then in memorizer address be the data of the memory element of (B+N) be (A RT), so in memorizer
Memory unit address and memory cell data define the resistivity-temperature characteristics of critesistor RT.
Visible, the resistivity-temperature characteristics of the critesistor RT stored in memory is not the resistance of producer's offer of critesistor RT
Temperature characteristics, but the data after converting according to formula N=A RT.
The clocking value N of digital clock is linear and unrelated with voltage, according to numeral with the resistance of critesistor RT
The resistivity-temperature characteristics of the clocking value N and critesistor RT of intervalometer is assured that the temperature value of measurement.
When realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, described critesistor
The thermometric program of formula temperature sensor is: first electrical switch KD closes, the common port of alternative electrical switch K and its ground connection
Input is connected, and after suitable time-delay, to realize the electric discharge completely of electric capacity C, then opens electrical switch KD, then makes digital timing
Device resets, and arranges digital clock and the duty of comparator CMP, removes digital clock and the interruption mark of comparator CMP
Will position, open digital clock and the interruption of comparator CMP, open total interrupt, then the common port of alternative electrical switch K with
Its input meeting power supply V is connected, and starts digital clock and comparator CMP, then waits transformation result, is waiting Change-over knot
During Guo, when before overflowing at digital clock, the terminal voltage of electric capacity C reaches reference voltage V r, comparator CMP is to control
Device sends interruption application, and controller responds this interruption application, and controller stops digital clock and comparator CMP, controller root
The clocking value of digital clock time accordingly, by searching the resistivity-temperature characteristics number of the critesistor RT of comparison storage in memory
According to, and then determine the temperature value of measurement.
It is above when the embodiment realizing thermometric process based on the zero state response in single order resistance-capacitance circuit transient response.
As shown in Figure 2, when realizing thermometric process based on the zero input response in single order resistance-capacitance circuit transient response, heat
One of connection one end of electric capacity C, one end, one end of electrical switch KD and the comparator CMP of quick resistance RT is compared input, heat
The common port of alternative electrical switch K is reconnected after the other end of the other end connection electrical switch KD of quick resistance RT, electric capacity C's
Other end ground connection, an input of alternative electrical switch K connects power supply V, another input end grounding.
Before thermometric starts, need first electrical switch KD to be closed, and the common port of alternative electrical switch K connects power supply with it
Input connect, with fully charged for electric capacity C to voltage V, when thermometric starts, disconnect electrical switch KD, and electric for alternative
The common port of son switch K is connected with the input of its ground connection, and circuit enters the transient response process of zero input.
In fig. 2, based on the zero input response in single order resistance-capacitance circuit transient response, during electric capacity C discharges, electricity
The terminal voltage holding C is, wherein τ is time constant, i.e. τ=RT C.
U when at t=t0cT () reaches reference voltage V r, i.e. uc(t)=Vr, making Vr=α V(α is the positive number less than 1), then, thus t0=-τ ln α.
Making t0=NT, wherein N is the clocking value of digital clock, and T is the count pulse cycle of digital clock, then NT=-τ
Ln α, so。
Owing to capacitance C, pulse period T and factor alpha are definite value, so order, then N=A RT.
The resistance of critesistor RT is linked together by certain functional relationship with dut temperature value, i.e. tw=f(RT), wherein tw represents
Dut temperature value.
Opening up continuous print memory space in memory, the first address of memory space is B, and wherein B is whole not less than zero
Number, carries out discrete processes temperature value tw, i.e. represents dut temperature value with memory unit address in memorizer, deposit in memory element
The content of storage is (A RT), then in memorizer address be the data of the memory element of (B+N) be (A RT), so in memorizer
Memory unit address and memory cell data define the resistivity-temperature characteristics of critesistor RT.
Visible, the resistivity-temperature characteristics of the critesistor RT stored in memory is not the resistance of producer's offer of critesistor RT
Temperature characteristics, but the data after converting according to formula N=A RT.
The clocking value N of digital clock is linear and unrelated with voltage, according to numeral with the resistance of critesistor RT
The resistivity-temperature characteristics of the clocking value N and critesistor RT of intervalometer is assured that the temperature value of measurement.
When realizing thermometric process based on the zero input response in single order resistance-capacitance circuit transient response, described critesistor
The thermometric program of formula temperature sensor is: first electrical switch KD closes, and the common port of alternative electrical switch K connects power supply with it
Input connect, after suitable time-delay, to realize the fully charged of electric capacity C, then open electrical switch KD, then make numeral fixed
Time device reset, digital clock and the duty of comparator CMP be set, remove digital clock and the interruption of comparator CMP
Flag bit, open digital clock and the interruption of comparator CMP, open total interruption, then the common port alternative electrical switch K
Connect with the input of its ground connection, start digital clock and comparator CMP, then wait transformation result, waiting Change-over knot
During Guo, when before overflowing at digital clock, the terminal voltage of electric capacity C reaches reference voltage V r, comparator CMP is to control
Device sends interruption application, and controller responds this interruption application, and controller stops digital clock and comparator CMP, controller root
The clocking value of digital clock time accordingly, by searching the resistivity-temperature characteristics number of the critesistor RT of comparison storage in memory
According to, and then determine the temperature value of measurement.
At the initial stage of electric capacity C charge or discharge, electrical switch KD and alternative electrical switch K may flow through certain rushing
Hit electric current, but the electrical switch of reality all has certain internal resistance, as a example by electrical switch KD, as it is shown on figure 3, the electronics of reality
Switch KD can be equivalent to an equivalent resistance Rd and the series connection of a perfect switch Kd, and this equivalent resistance Rd is exactly electrical switch KD
Internal resistance, it has good metering function, the least due to the capacity of electric capacity C again, so relying on electrical switch KD and alternative
The internal resistance metering function of electrical switch K will not produce harmful current impulse.
The method of described thermistor temperature sensor calibration measurement temperature value is regulation reference voltage V r or software
Revise.
Understanding according to above-mentioned, charge or discharge time t0 and reference voltage V r have direct relation, and regulation reference voltage V r is just
Time t0 value can be changed, namely change NT value, and pulse period T value is certain, so regulation reference voltage V r is the most permissible
Change count value N of digit counter, be finally reached the purpose of calibration measurement temperature value.
Also can use the method calibration measurement temperature value of software correction, the counting to digit counter the most in software
After value N is revised again, just can obtain final required measurement temperature value.
The measurement of multi way temperature can be easily carried out according to thermistor temperature sensor of the present invention, as
Shown in accompanying drawing 4, this example realizes thermometric process based on the zero state response in single order resistance-capacitance circuit transient response, its thermometric input electricity
Pressure takes from critesistor RT terminal voltage, i.e. uses the terminal voltage of critesistor RT compared with reference voltage V r.
In figure 4, single-chip microprocessor MCU has been internally integrated comparator CMP, CMP-and a CMP+ is this comparator respectively
Inverting input and in-phase input end, resistance R1, adjustable resistance R2 and resistance R3 be sequentially connected in series, another termination power of resistance R1
The other end ground connection of V, resistance R3, the adjustable tap of adjustable resistance R2 is connected to after the junction point of resistance R1 and adjustable resistance R2 again
Connect the inverting input CMP-of comparator CMP, provide reference voltage V r, the one of critesistor RT1~RTn for comparator CMP
The negative pole of end, one end of electric capacity C and switching diode D is connected to the in-phase input end CMP+ of comparator CMP after linking together,
The other end ground connection of switching diode D, the other end of electric capacity C connects the I/O port I/O0 of single-chip microprocessor MCU, critesistor
The other end of RT1~RTn connects I/O port I/O1~I/On of single-chip microprocessor MCU respectively, and switching diode D plays accompanying drawing 1
The effect of middle electrical switch KD.
In figure 4, as a example by the thermometric of critesistor RT1, its basic thermometric process is: make single-chip microprocessor MCU
I/O port I/O1~I/On is high-impedance state or is output low level state, and the I/O port I/O0 of single-chip microprocessor MCU is
Recommend by force output state, and output low level, after suitable time-delay, so that electric capacity C is discharged to zero completely;When thermometric starts, temperature-sensitive
One I/O port I/O1 of the single-chip microprocessor MCU that resistance RT1 is connected for recommend output state, and output low level by force, other
Other I/O port of the single-chip microprocessor MCU that critesistor is connected is high-impedance state, then makes digital clock reset, and arranges number
Word intervalometer and the duty of comparator CMP, remove digital clock and the interrupt flag bit of comparator CMP, open numeral
Intervalometer and the interruption of comparator CMP, open total interruption, then the I/O port I/O0 of single-chip microprocessor MCU for recommending by force output
State, and output high level, start digital clock and comparator CMP, then wait transformation result, in the mistake waiting transformation result
Cheng Zhong, when before overflowing at digital clock, the terminal voltage of critesistor RT reaches reference voltage V r, comparator CMP is to single-chip microcomputer
Controller in MCU sends interruption application, and the controller plc in single-chip microprocessor MCU responds this interruption application, in single-chip microprocessor MCU
Controller plc stop digital clock and comparator CMP, the controller plc in single-chip microprocessor MCU is according to now counting
The clocking value of word intervalometer, by searching the resistivity-temperature characteristics data of the critesistor RT of comparison storage in memory, and then really
The temperature value of location survey amount.
The thermometric process of other critesistor is same as described above.
Certainly, in the case of without departing from the framework of the present invention, it is also possible to have other selection and development and our energy
Enough it is envisioned that equivalent device.