Abstract:
A circuit and method to compensate for thermal effects on potentionmeter based sensors by presenting two input signals at different times to a comparator; the first utilizing one leg of the potentiometer and the second utilizing both legs. The comparator output will change states after receiving each input signal. The time periods between the receipt of the input signal and the outputs&#39; change of state are stored. 
     The quotient of the time periods cancels out most of the thermal effects on the potentiometer and is still a representative of the original potentiometer signal.

Description:
BACKGROUND AND SUMMARY OF THE INVENTION 
     This invention relates to a circuit and method to reduce the effects of temperature on potentiometer based position sensors. 
     For devices which sense the position of a movable mechanical device or portion thereof, a potentiometer or variable resistor is often used. The wiper arm of the potentiometer is connected to the movable portion of the mechanical device such that motion of the device results in motion of the wiper arm. The changed resistance results in a signal which corresponds to the amount of motion of the mechanical device. 
     When this type of position sensor is employed in a high temperature environment, the potentiometer may exhibit a drop in resistance with increasing temperature. This change in resistance could be interpreted by the electronic monitor as a change in the position of the mechanical device. This false reading may result in an improper or untimely command being processed by the control circuitry. 
     The subject invention is designed to minimize the thermal effects on the position sensor. The scheme involves measuring the time needed for a comparator to change states given different input signals. The change-of-state time period under one input condition is divided by the time period under a second input condition. The quotient of the time periods is a function of resistance values which translates to a measure of the actuator&#39;s position. Both sides of the potentiometer are subject to the effects of temperature. These effects are cancelled out by taking the quotient of the time periods. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     Other objects, features and advantages of the present invention will become more fully apparent from the following detailed description of the preferred embodiment, the appended claims and the accompanying drawings in which 
     FIG. 1 is a schematic of an electronic circuit used to practice the preferred embodiment of the temperature compensation method described herein. 
     FIG. 2 is an alternative embodiment of the circuit shown in FIG. 1. 
     FIG. 3 is a voltage vs. time graph of selected points in the circuit shown in FIG. 1. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, the subject invention includes comparator means with the non-inverting input V +  set to a value of 1/3 of the supply voltage Vcc. The inverting input V -  to the comparator is presented with a fluctuating signal, the time of the fluctuation being determined by the presence or absence of a control signal at nodes A and B. The fluctuation of the signal to the inverting input V -  to comparator U 1  is also affected by the position of the wiper arm on a potentiometer R. The potentiometer&#39;s wiper arm is connected physically to the movable portion of a mechanical device. The motion of the movable portion of the mechanical device will then reflect itself in changing resistance values of R 1  and R 2 . 
     The preferred embodiment shown in the FIG. 1 sets up comparator U 1  with its output being sent to a controller such as a microprocessor. The controller is able to store the output curve for comparator U 1 . The non-inverting input V +  to comparator U 1  is set as a reference level. In this case the reference level is 1/3 Vcc. The inverting input V -  to U 1  receives its voltage level from a network which is made up of resistor R 4  connected between the supply voltage Vcc and the inverting input V - , resistor R 3 , and a discharging loop connected to node D. Resistor R 3  is connected between the inverting input V -  to U 1  and the discharging loop at node D. 
     The discharging loop is made up of a switching transistor Q 1  which receives its input command from the controller at node A, a potentiometer R and a capacitor C which receives its stimulus from the controller at node B. The capacitor C AC couples node B and node D. The potentiometer R is made up of two resistance portions R 1  and R 2  which vary in value depending on the location of the wiper arm. Also to be accounted for is the wiper arm contact resistance which is represented as a resistance R w  connected between the wiper arm contact point to potentiometer R and node D. The wiper arm is electronically connected to node D and physically connected to the movable portion of the mechanical device. The R 1  portion of potentiometer R is connected between ground and the wiper arm; the R 2  portion of potentiometer R is connected between the wiper arm and the collector of switching transistor Q 1 . The emitter of switching transistor Q 1  is connected to ground and the ihput signal from the controller to switching transistor Q 1  is made at node A to the base of the transistor. 
     The operation of the circuit is as follows: 
     Referring to FIG. 2 and FIG. 3, with the voltage V A  at node A in a low state, transistor Q 1  is turned off and the discharging loop includes R 1  but not R 2 . This is the case since transistor Q 1  blocks current flow from R 2  through Q 1  to ground. The voltage V A  at node A is a controlled event, preferably from a control microprocessor. 
     The voltage V B  at node B is also a controlled event. With transistor Q 1  turned off, and with the voltage V B  at node B turned off, voltage V D  at node D and at the inverting input V -  to U 1  is held low resulting in the output voltage V 0  of comparator U 1  being on. 
     The above described events all have occurred between time zero and time t 1  on the voltage vs. time curves in FIG. 3. 
     At time t 1 , the controller raises the voltage V B  at node B to Vcc. Since capacitor C AC couples nodes B to node D the voltage V D  will spike to Vcc (with a slight overshoot). The duration of this control pulse is unimportant so long as it resets to zero before time t 4 . 
     Immediately after time t 1 , the voltage at the inverting input V -  crosses the fixed threshold voltage (1/3 Vcc) at the non-inverting input V + , turning comparator U 1  off. The voltage at node D will peak at approximately Vcc and then begin to discharge through resistor R 1 . This is the R 1  discharge path. 
     At time t 2 , the voltage at the inverting input V -  discharges down to the threshold voltage of 1/3 Vcc turning comparator U 1  on. 
     The discharge time t 2  -t 1  is stored by the controller as the representation of the R 1  path discharge time. 
     At time t 3 , the controller changes the voltage V A  at node A to a high state turning transistor Q 1  on and bringing R 2  in parallel with R 1  in the discharge path. This is the &#34;R 1 , R 2  path&#34;. 
     At time t 4 , the controller pulses node B again, repeating the discharge events but this time utilizing the &#34;R 1 , R 2  path&#34; for discharge. 
     The output V o  of comparator U 1  turns off at time t 4  when the threshold voltage is exceeded at the V -  input to U 1  and the comparator U 1  turns back on at time t 5  when V -  drops below the threshold voltage 1/3 Vcc. 
     The time period (t 5  -t 4 ) is stored by the controller and represents the &#34;R 1 , R 2  path&#34; discharge time. 
     The charging times are: 
     (t 2  -t 1 )=-R 1  C×ln (1/3) and 
     (t 5  -t 4 )=-[R 1  R 2  /(R 1  +R 2 )] C ln (1/3). 
     The quotient of the times is: 
     (t 2  -t 1 )/(t 5  -t 4 )=R 2  /(R 1  +R 2 ) and is a measure of the position of the movable mechanical device. 
     The quotient of the discharge times can be inverted and still be a measure of the position of the movable portion of the mechanical device. The quotient or its inverse must be used consistently throughout the analysis. 
     It can be seen that the error due to temperature effects is a function of the position of the wiper arm on potentiometer R. The error will be reflected unevenly in the numerator and denominator of the quotient. The temperature affects both arms of the potentiometer and the arm with the largest resistance will have a largest error. This affects the quotient since only one arm (R 2 ) is affected in the numerator of the quotient (or the denominator if the inverse quotient is used). Although this effect should be noted, it is not always significant; the temperature compensation provided by the circuit and method described above often provides enough compensation. 
     For some situations temperature effects can be dealt with more effectively by using the alternative embodiment shown in FIG. 2. 
     In this embodiment an additional transistor Q 2  is placed into the circuit between R 1  and ground, the collector of Q 2  connected to R 1  and the emitter of Q 2  to ground. The base of Q 2  is available for control signals from the controller at A&#39;. 
     The method is then changed to measure the (t 2  -t 1 ) time by keeping Q 1  off and turning Q 2  on, placing R 1  in the discharge path. The discharge time (t 2  -t 1 ) is measured as before. 
     Then Q 2  is turned off and Q 1  is turned on placing only R 2  in the discharge path. The discharge time (t 5  -t 4 ) is measured as before. 
     The result generates (t 2  -t 1 ) as a function of R 1  and (t 5  -t 4 ) as a function of R 2 . The resulting quotient (R 2  /R 1 ) will still contain an error which is a function of the resistance of each arm of potentiometer R; the larger the resistance, the larger the error. 
     While the present invention has been disclosed in connection with the preferred embodiment thereof, it should be understood that there may be other embodiments which fall within the spirit and scope of the invention and that the invention is susceptible to modification, variation and change without departing from the proper scope or fair meaning of the following claims.