Background of the Invention
The present invention relates to a method and an apparatus for establishing a calibrated reference value representing a threshold and for comparing the reference value with a signal representing a variable parameter to determine the variable parameter's condition.
A wide variety of methods exist for calibrating a reference value which can be used to determine when a signal representing a variable parameter increases past a predetermined threshold. In a typical method using an electronic system, a transducer of a sensor circuit detects a variable physical parameter and produces a corresponding sensor voltage signal (or current signal) that represents the condition of the physical parameter. The sensor voltage signal is then compared with a reference voltage representing the reference value. Typically, the reference voltage is provided by an electronic calibration circuit that includes a precision potentiometer having an adjustable wiper that divides a supply voltage. The reference voltage is established by directing the physical parameter to the desired level and adjusting the potentiometer until the output voltage from the potentiometer equals the sensor voltage signal when the physical parameter is at the desired level. Typically, a comparator circuit is used to compare the reference voltage with the sensor voltage signal.
The method for setting a reference voltage described briefly above requires directing the physical parameter to assume the desired threshold. Sometimes, however, this may not be possible. For example, an accurate determination of the physical parameter may not be available or may be available only for two extreme conditions of the physical parameter. Alternatively, setting and holding the physical parameter at the threshold may be burdensome, inefficient, or otherwise uneconomical. When the physical parameter cannot be held at the threshold, then the reference voltage must be otherwise determined in order for the circuit to be able to indicate when the physical parameter has achieved the calibrated threshold.
Therefore, there is a need to develop a simple method and apparatus to accurately establish a calibrated reference voltage representing a threshold without requiring the physical parameter to be at the corresponding threshold before the reference can be calibrated. In addition, there is a need to develop a method and apparatus to monitor the physical parameter and indicate whether the threshold has been overcome.
Summary of the Invention
The present invention is embodied in an apparatus, and related method, for selecting a calibrated threshold and comparing a variable parameter with the selected threshold without preliminarily requiring the parameter to be at the corresponding threshold when the threshold is selected. The apparatus includes a measuring circuit for providing a measurement signal representing the variable parameter and a calibration circuit for providing a reference value representing the threshold. The measuring circuit monitors the variable parameter and compares it with the selected threshold by comparing the measurement signal with the reference value. The variable parameter can vary in a range between a predetermined low and high value.
To calibrate the reference value, the variable parameter is caused to assume a first condition at the predetermined high value of the range, whereupon the measuring circuit provides a first signal representative of the first condition. With the variable parameter at the first condition, the calibration circuit is adjusted to provide a first calibration value equal to the first signal. The variable parameter is then caused to assume a second condition at a predetermined low value of the range, whereupon the measuring circuit provides a second signal representative of the second condition. With the variable parameter at the second condition, the calibration circuit is adjusted to provide a second calibration value equal to the second signal. The calibration circuit is then set to average the first and second calibration value to provide a reference value midway between the first and second signals that represents the selected threshold. After the reference value is set, the measuring circuit monitors the variable parameter and compares the measurement signal with the reference value to determine the condition of the variable parameter.
In a more detailed feature of the invention, the measurement signal, the first and second signals, and the reference value are voltage levels. The calibration circuit includes two potentiometers and two isolation resistors. One potentiometer has its wiper set to provide a first calibration voltage equal to the voltage of the first signal. The other potentiometer has its wiper set to provide a second calibration voltage equal to the voltage of the second signal. The isolation resistors are used to combine the first and second calibration voltages to produce a reference voltage having a value midway between the first and second calibration voltages without using an active circuit element.
The embodiment of the invention can be used, for example, in a system for measuring the level of liquid in a tank in which the variable parameter discussed above represents the level of liquid in the tank. A capacitance sensor having first and second conductors detects the level in the tank. The first conductor is a conductive plate placed on the tank wall. The tank wall at the location of the plate is insulating. The second conductor is either the liquid, if the liquid is conducting, or the ground, if the liquid is not conducting. The first condition is a full tank and the second condition is an empty tank. The selected threshold represents a liquid level in the tank which is midway between a full tank and an empty tank.
In another more detailed feature of the invention, the measuring circuit includes a threshold detection circuit that uses an oscillator and a sensor amplifier to detect the capacitance of the capacitance sensor and a comparator circuit. The capacitance sensor and the oscillator are connected to the sensor amplifier. The sensor amplifies an oscillating signal from the oscillator to provide a sensor signal, the gain of the sensor amplifier varying in proportion to the capacitance of the sensor. The sensor signal is compared with the reference voltage by the comparator circuit. The comparator circuit switches on a light emitting diode (LED) coupled to the output of the comparator circuit whenever the sensor signal is greater than the reference voltage from the calibration circuit. The LED, when switched on, significantly increases the current draw of the apparatus. This increase in current draw can be used to indicate the condition of the variable parameter.
Other features and advantages of the present invention should become apparent from the following description of the preferred embodiment, taken in conjunction with the accompanying drawings, which illustrate, by way of example, the principles of the invention.
Brief Description of the Drawings
FIG. 1 is a block diagram of the calibration and threshold monitoring system embodying the invention.
FIG. 2 is a schematic diagram of a power regulation circuit for supplying power to the calibration and threshold monitoring system shown in FIG. 1.
Description of the Preferred Embodiment
With reference now to the drawings and, more particularly to FIG. 1, there is shown a threshold level detection system 10 for determining whether a physical parameter has reached a threshold value. In the detection system, the physical parameter to be measured is the level of liquid 12 in a tank. Attached to the tank 14 is a capacitance sensor having a capacitor plate 16 that provides a capacitance value that varies with the level of the liquid in the tank. The capacitance value is converted into a voltage signal by a measuring circuit having an oscillator 18, a sensor amplifier 20 and a peak detector 22. A comparator 24 compares the voltage signal with a reference voltage provided by a calibration circuit 26. The output of the comparator 24 controls the state of an LED circuit 28.
The typical capacitance sensor includes two conductors separated by an insulating layer. The tank 14 is typically made of an insulating non-metallic material and forms the insulating layer of the capacitance sensor. In some embodiments, only the portion of the tank wall that has the sensor may be insulating while the rest of the tank wall is metal. Secured to the outside of the insulated tank wall in a vertical fashion is a capacitor plate 16. The capacitance plate is a conductor and forms one of the conductors of the capacitance sensor. Inside the tank 14 is a liquid 12 that if conductive, can be grounded to form the other conductor of the capacitance sensor. Alternatively, the liquid, if non-conductive, forms part of the dielectric of the capacitance sensor along with the insulating tank wall. The capacitance of the sensor increases as the liquid level in the tank increases. The change of capacitance is measured and indicated by an electronic circuit.
The inputs of the sensor amplifier 20 are coupled to the oscillator 18 and the capacitor plate 16. The sensor amplifier amplifies an oscillating signal from the oscillator with a gain that varies in proportion to the capacitance at the capacitor plate. The amplitude of the signal from the sensor amplifier is detected by the peak detector 22. A voltage from the peak detector, which represents the peak amplitude of the detected voltage signal, is compared by the comparator 24 with the calibration voltage from the calibration circuit 26. If the voltage signal from the peak detector falls below the level of the calibration voltage, the comparator causes the LED circuit 28 to indicate that the liquid level in the tank is below a midpoint threshold of the tank 14.
The calibration circuit 26 includes two variable resistors R1 and R2, two isolation resistors R3 and R4 and a three-positioned switch SW1. The variable resistors R1 and R2 preferably take the form of a potentiometer having a wiper.
The first variable resistor R1 is connected to two bias resistors R5 and R6 which maintain a certain voltage between the power supply voltage and the output voltage provided at the wiper of the first variable resistor. The first isolation resistor R3 is connected between the wiper of the first variable resistor and the output of the calibration circuit 26. The second variable resistor R2 is connected to two bias resistors R7 and R8, which maintain a certain voltage between the power supply voltage and the output voltage provided at the wiper of the second variable resistor. The second isolation resistor R4 is connected between the wiper of the second variable resistor and the output of the calibration circuit.
The isolation resistors R3 and R4 are of equal value and of a larger resistance value than the two variable resistors R1 and R2. The output of the calibration circuit 26 is coupled to a high impedance input of the comparator 24. The output voltage of the calibration circuit (the output voltage is the voltage at the connection between isolation resistors R3 and R4) is the reference voltage and is generally the average of the voltage representing an empty tank and the voltage representing a full tank voltage.
The three-position switch SW1 is coupled between the output of the calibration circuit 26 and the wipers of the first and second variable resistors R1 and R2. The middle position of the switch SW1 is the normal operating position of the switch and has no connection. The empty position of the switch is used to calibrate the voltage representing an empty tank. The full position of the switch is used to calibrate the voltage representing a full tank.
To calibrate the reference voltage, the tank 14 is emptied and the switch SW1 is set to the empty position, which bypasses resistor R3 and connects the output of the calibration circuit 26 directly to the wiper of the first variable resistor R1. The wiper of the first variable resistor R1 is then adjusted such that the voltage from the output of calibration circuit 26 is equal to the empty voltage signal present at the other input of the comparator 24.
Continuing the calibration sequence, the tank 14 is filled with liquid and switch SW1 is set to the full position, which bypasses resistor R4 and connects the output of the calibration circuit 26 directly to the wiper of the second variable resistor R2. The wiper of the second variable resistor R2 is then adjusted until the voltage at the output of the calibration circuit is equal to the full voltage signal at the other input of the comparator 24. The order of calibrating the reference voltage is not critical. Thus, the calibration sequence can first fill the tank and then empty the tank in setting the full voltage signal and the empty to voltage signal.
After the empty and full liquid level calibrations are performed, the switch SW1 is set to the middle position having no connection. The isolation resistors R3 and R4 are chosen to have a resistance such that the voltage from the wiper of variable resistor R1 and the voltage from the variable resistor R7 are combined when the switch is set to the middle position to produce at the output of the calibration circuit 26 a reference voltage that is substantially an average value midway between the first and second calibration voltages. In the preferred embodiment, the resistance value of the bias resistors R5 and R7 is 10 kilohms, the resistance value of the bias resistors R6 and R8 is 17.8 kilohms, the resistance value of the isolation resistors R3 and R4 is 100 kilohms and the resistance value of the variable resistors R1 and R2 is 10 kilohms.
The output of the oscillator 18 is connected to the non-inverting input of the operational amplifier U1 of amplifier 20. The capacitor plate 16, which capacitively senses the level of liquid 12 in the tank 14, is connected to the inverting input of the operational amplifier U1. A feedback impedance is coupled between the output of the amplifier U1 and its inverting input. The output of the operational amplifier U1 is coupled to the peak detector 22 through a coupling capacitor (not shown). The feedback impedance consists of a resistor R9 and a capacitor C1. In the preferred embodiment, the resistance value of the resistor R9 is 10 megohm and the capacitance value of the capacitor C1 is 8 picofarads.
The output of the peak detector 22 is connected through a resistor R10 to the non-inverting input of an operational amplifier U2 of the comparator 24. The operational amplifier U2 has positive feedback from its output through a resistor R11 into its noninverting input. The reference voltage from the calibration circuit 26 is fed into the inverting input of the operational amplifier U2. Therefore, when the voltage signal applied at the non-inverting input of the operational amplifier exceeds the reference voltage applied at the inverting input, the output of the operation amplifier is driven positive until the output reaches the saturation voltage of the operational amplifier. The preferred embodiment, the resistance value of resistor R10 is 33 kilohms and of resistor R11 is 15 megohms.
The output voltage of the operational amplifier U2 is coupled through a resistor R12 to the base of a transistor Q1 of the LED circuit 28. When the output of operational amplifier is positive, the transistor is switched on allowing a current to flow from the positive power source through the bias resistor R13 to turn on the light-emitting diode LED1. The preferred value of resistors R12 is 10 kilohms and R13 is 470 ohms.
With reference now to FIG. 2, a power supply 30 provides a voltage V+to the detection system 10 and provides a current signal indicating the condition of the liquid level. An unregulated supply voltage of 36 volt dc passes through a connector J1 to the power supply. A diode D1 prevents a reverse current flow. The unregulated supply voltage is applied to the input of a voltage regulator U3. Two resistors R14 and R15 bias the voltage regulator to provide a power supply voltage V+of 9 volts. In the preferred embodiment, the resistance value of the resistor R14 is 6.98 kilohms and of the resistor R15 is 1.2 kilohms. The capacitors C2 and C3 function to smooth voltage ripples. The preferred capacitance value of the capacitor C2 is 0.1 microfarads and of the capacitor C3 is 1 microfarad.
The current from the power supply 30 also functions as a threshold indication. When the light-emitting diode LED1 is off, the current draw through the power supply for all of the circuitry of the detection system 10 is approximately 4 milliamps. When the light-emitting diode LED1 is on, the current draw through the power supply increases to approximately 20 milliamps. This variation in supply current through the power supply can be used to indicate that the threshold level has been obtained without the need for an additional conversion circuit.
From the foregoing, it will be appreciated that the threshold level detection system of the preferred embodiment of the invention allows a threshold to be established without requiring a physical parameter to be preliminarily held at a level corresponding to the threshold. The system also provides a reference voltage representing the threshold by using merely passive resistive components and a three position switch. Further, the system provides a current signal indicating the condition of the physical parameter without requiring an additional voltage-to-current conversion circuit.
Although the foregoing discloses preferred embodiments of the present invention, it is understood that those skilled in the art may make various changes to the preferred embodiment shown without departing from the scope of the invention. The invention is defined only by the following claims.