METHOD AND APPARATUS FOR MEASURING FLUID LEVELS IN VESSELS
TECHNICAL FIELD
This invention relates to methods and apparatus for measuring fluid levels in containers, and more particularly to methods and apparatus for measuring and controlling fluid levels in storage and process vessels containing multiple levels of components having different dielectric constants, such as water and hydrocarbons.
BACKGROUND
Determining the level of fluids (i.e., liquids or liquid-like materials such as gels, foams, emulsions, slurries, fine powders, etc.) in vessels has been a long-standing problem. For example, such a need has existed for hydrocarbon storage tanks and for fuel tanks on air, water, and surface vehicles. Even today, most such tanks have simple, relatively inaccurate level gauges, if they have any level sensor at all. A related problem is detecting the presence in a vessel of multiple levels of components having different dielectric constants, such as water and hydrocarbons
Fuel tanks have an additional problem of needing to detect accumulation of water at the bottom of such tanks. Water accumulates in fuel storage tanks over time and is typically manually removed with a pump when there is too much accumulation, usually determined with a manually inserted and read dip stick. A related problem is the detection and measurement of the presence and amount of water admixed with hydrocarbons in emulsion form. Additional problems arise when measuring fluid levels having elevated temperatures and/or pressures, as often occurs in processes used in the petroleum, polymer, and food industries. Such problems include corrosion and breach of sensor integrity.
Reliance on manual methods stems largely from past experience which has shown that most available level gauges are either expensive or unreliable, or are considered to be more trouble than they are worth due to ongoing maintenance and calibration requirements.  A variety of level-sensing technologies have been developed to address these problems. In particular, a number of attempts have been made to develop successful capacitive level sensors, meaning sensors which rely on sensing a change in capacitance resulting from the presence or absence of the fluid to be measured between capacitor plates. Typically, a sensor probe is inserted into a tank and the change in capacitance with fluid level is detected by electronic detection circuitry. The probe may be, for example, a rod. plate or other electrically isolated electrode and a ground reference electrode, which could be the tank itself or another electrode. As the fluid fills the space between the isolated electrode and the reference electrode, the capacitance changes. This change in capacitance is correlated with the fluid level and the dielectric constant of the fluid, which is also a function of temperature.
The measured capacitance is determined by the electrode spacing., the fluid level and dielectric constant, changes in the temperature, and the probe dimensions. Thus, changes in any of these factors affect the capacitance and hence the interpretation of changes in capacitance in terms of fluid level. Further, calibration of such a probe is problematic, due to continual changes in the environment. In addition, many of the fluids to be measured are corrosive, and sensor probe life has been a continuing problem, particularly when active electronic devices (e.g., integrated circuits) are immersed in the fluids.
Furthermore, because the magnitude of the capacitance and its change may be small, sensitive electronics are needed to measure the capacitance change. In the past this has lead to various approaches to measuring the capacitance change. These various techniques, such as use of RC time constants, bridge techniques, PLL (phase lock loop) and other techniques commonly suffered from the fact that the cabling between the electronics and the sensor probe introduced a source of additional and variable capacitance of the same order of magnitude as the probe capacitance, which introduced calibration and stability problems. Moreover, the sensitivity of the measurement methods frequently made them susceptible to noise interference problems, which are variable and especially severe in industrial environments.
Accordingly, there is a need for a sensitive, low-cost, reliable, and accurate level sensing probe that overcomes these problems.  SUMMARY
The invention includes methods and apparatus for measuring fluid levels in containers, and more particularly to methods and apparatus for measuring and controlling fluid levels in storage and process vessels containing multiple levels of components having different dielectric constants, such as water and hydrocarbons.
In one aspect, the invention includes a probe including a capacitance cell whose capacitance varies with the level and composition of a fluid in the capacitance cell, the capacitance cell including at least two electrodes configured to self-shield at least one of such electrodes; detection and measurement electronics, coupled to the probe, including: a charging circuit for charging the capacitance of the probe to a known voltage, a transfer circuit for transferring charge from the probe during a short duration period to a reference capacitance, a measuring circuit for measuring the amount of charge transferred by measuring the voltage of the reference capacitance, a processor for calculating the level of the fluid in the capacitance cell based on the measured voltage and pre-set calibration parameters, and an output for indicating the calculated fluid level. The level detection and measurement electronics detects the level of a first fluid within the capacitance cell as a measured capacitance of the probe, and the presence of a second fluid within the capacitance cell, the second fluid having a dielectric constant substantially different from the dielectric constant of the first fluid, as a significant change in the measured capacitance of the probe. An optional temperature sensor may be included for measuring the temperature of the fluid and, if necessary, the pressure to which the fluid is subjected. The detection and measurement electronics may include a communication interface for transferring the calculated level to either a local or remote display and/or data storage means.
The capacitance probe in its preferred embodiment has at least two capacitor electrodes in the form of either concentric cylinders or arrayed rods and/or cylinders or plates.
The detection and measurement electronics in its preferred embodiment incorporates charge transfer detection. The detection and measurement electronics are coupled with additional circuitry such as microprocessor, data storage, and telecommunications circuitry to perform data processing, storage, and data transfer functions required for level sensing and  controlling other elements, such as pumps or output displays. In another aspect of the invention, the invention includes an integral automatic calibration circuit.
In one embodiment, the probe is inserted in a tank to a fixed distance from the bottom of the tank equal to the maximum allowable level of a denser fluid (e.g., water) having a dielectric constant different from a less dense fluid (e.g., a hydrocarbon). In the absence of the denser fluid, the capacitance of the probe is constant until the level of the less dense fluid reaches the probe tip, at which point the capacitance of the probe begins to increase as that fluid is interposed between the capacitor electrodes. For probes of fixed cross sectional dimensions along the length of the probe, the increase of capacitance is proportional to the dielectric constant of the fluid and to the height of the fluid in the tank. When the denser fluid reaches the probe tip, a sharp change in capacitance can be sensed, indicating the present of the denser fluid.
The fluid level of the tank 1 is calculated from a calibration curve obtained and stored for the particular tank and the particular fluid (i.e., the less dense fluid in the case of tanks with multiple levels of fluids). The dielectric constant of the fluid may be either assumed from known standard reference values, or may be measured. The dielectric constant may be measured, for example, by measuring the capacitance of a probe of fixed dimensions. Such a measuring probe may also incorporate a heating element and temperature sensor placed into the fluid to enable heating of a portion of the fluid in contact with the probe. Such heating allows determination of the temperature dependence of the dielectric constant, thereby allowing for correction of measurements as a function of changes in the tank temperature. Depending on the degree of accuracy required, the probe can be calibrated using procedures such as those applied above, with the microprocessor utilizing the calibration parameters to correct the capacitance data to fluid height, fluid volume, or other information as required. In the case of measuring hydrocarbon levels and detecting the presence of water, when water displaces the hydrocarbon fluid being measured and reaches the bottom of the probe, the much higher dielectric constant and conductivity of the water compared to hydrocarbons results in a large increase in apparent capacitance. Such a reading may be used, for example, to turn on a pump to reduce the water level to an acceptable level. This function does not significantly increase circuitry other than that required to control a pump.  If the level of the denser fluid is required to be known explicitly, then a dual probe can be used. The preferred dual probe embodiment includes three concentric cylinders, two of which extend essentially to the bottom of the tank for the purpose of measuring the level of the denser fluid. A single detection and measurement electronic circuit can be used to measure both probes by providing switching means to alternately connect and disconnect the inner and outer electrode pairs from the detection and measurement electronics.
For very large or deep tanks, the coaxial cylindrical probes may be fabricated in sections which would be connected together to provide a desired length, possibly with at least one telescoping section to allow for length adjustment in the field. In an alternative embodiment, the capacitance probe includes a central wire electrode and a surrounding coil electrode, such that the capacitance probe may be stored in a compact, compressed state and deployed in an expanded state of variable length.
By appropriate design, probes in accordance with the invention can be constructed to operate at elevated pressures and temperatures for the purpose of measuring and controlling the level of fluids in harsh environment process vessels and reactors, such as the type used in petrochemical processing applications. It is also understood that the probe electrodes or portions thereof may be coated with either an insulated coating or semi-conductive coating as required by the electrical conductivities of the fluids in the tank.
The details of one or more embodiments of the invention are set forth in the accompa- nying drawings and the description below. Other features, objects, and advantages of the invention will be apparent from the description and drawings, and from the claims.
DESCRIPTION OF DRAWINGS
FIG. 1 is a diagram of a fluid-containing tank having a probe in accordance with the invention.
FIG. 2 is a diagram of a first embodiment of a probe in accordance with the invention. along with associated measurement electronics.
FIG. 3 A is a diagram of a second embodiment of a probe in accordance with the invention.
FIG. 3B is a diagram of a third embodiment of a probe in accordance with the invention. FIG. 4 is a diagram of an externally mounted probe in accordance with the invention.
FIG. 5 is a diagram of a dual probe in accordance with the invention. FIG. 6 is a diagram of a dynamically calibrated probe configured in accordance with one aspect of the invention.
FIG. 7A is a graph showing a ramping voltage; FIG. 7B shows the resulting current versus voltage curve for the probe of FIG. 6.
FIG. 8A is a graph of charge versus time, showing stepped charges. FIG. 8B is a graph of the corresponding capacitor discharge times.
FIG. 9 is a preferred waveform for dynamically calibrating the probe of FIG. 6. Like reference numbers and designations in the various drawings indicate like elements.
DETAILED DESCRIPTION
FIG. 1 is a diagram of a fluid-containing tank 1 in which a probe 2 in accordance with the present invention is inserted into a fluid 3. The probe 2 may be situated so that it extends part or all the way from the top of the tank to essentially the bottom of the tank. The probe 2 is coupled to a measurement circuit 4, which measures the capacitance of the probe 2 as the fluid 3 raises and lowers in the tank 1. Varying levels of the fluid 3 will cause varying amounts of the fluid to affect the capacitance of the probe 2, which can be calibrated to provide a readout of fluid level as a function of capacitance. Although FIG. 1 shows that the probe 2 is hung vertically near the top of tank, an alternative configuration would be to have the probe normally immersed near the bottom of a tank so as to measure decreases in fluid level rather than increases in fluid level.
FIG. 2 is a diagram of a first embodiment of a probe in accordance with the invention, along with the associated measurement electronics. The probe 2 is preferably coupled to the electronics measurement circuitry by a cable 20, which provides a signal path between the probe 2 and the measurement circuitry. The cable 20 may be, for example, a shielded coaxial cable, but need not be shielded.
The detection and measurement electronics 22 is based upon charge transfer detection circuitry. In a charge transfer circuit, a charging circuit charges a probe capacitance to a known voltage. The probe capacitance is principally a function of the probe geometry, the amount of fluid that affects the probe capacitance, the dielectric constant of the fluid, and the temperature of the fluid. A transfer circuit within the detection and measurement electronics 22 transfers charge from the probe capacitance during a short duration period to a known reference capacitance. A measuring circuit then measures the amount of charge transferred by measuring the voltage on the reference capacitance. Charge transfer circuits of the type described above are extremely sensitive, with femtofarad resolution and excellent linearity. Importantly, charge transfer circuits are relatively unaffected by the capacitance of interconnection wiring and external noise. Once such charge detection circuit that is suitable  for the detection measurement electronics 22 is the commercially available QPROX integrated circuit from Quantum Research Group Ltd.
The detection measurement electronics 22 also preferably includes a processor (e.g., a microprocessor) for receiving the output of the charge transfer circuit, calculating the level of fluid stored in a tank from stored calibration parameters, and displaying the fluid level in
(e.g. , in standard units) for a user or transmitting the measured level to other electronic equipment for the purpose of recording or utilization in process control. For example, during the calibration procedure, the capacitance of an installed probe 2 would be measured periodically as fluid is introduced into a tank. Each measurement would be correlated with the level of the fluid, measured by other means (e.g., by dipstick, or by calculating level from the geometry of the tank and the known amount of fluid introduced into the tank). Thereafter, a simple mapping of the calibration values against measured values would generate a fluid level. The detection and measurement electronics 22 may be coupled to a display 24 for indicating the fluid level. The display 24 may be, for example, an LCD display with a readout in any desired units. The display 24 may be local to the fluid level measurement unit, or may be remote. Communication between the detection and measurement electronics 22 and the display 24 may be by any desired means, including wired (e.g., optical or electrical cable) and wireless (e.g., infrared, RF, etc.) communication. The output information may also be transmitted to a storage device for later retrieval, or for logging in a data recorder. The detection and measurement electronics 22 is coupled to any suitable power supply, although preferably a low voltage DC power supply is desirable in order to avoid or minimize the possibility of sparks near hydrocarbon tanks. In a field installation, the power supply might include a solar panel and battery so that the unit is essentially self-powered. The detection and measurement electronics 22 may also be configured to activate a pump 26 that is in fluid communication with the tank 1 , in order to increase or reduce the amount of fluid in the tank 1 as a function of the measured fluid level. For example, as described below, the probe 2 of the present invention can detect the presence of water in a tank nominally containing a non- water fluid, such as a hydrocarbon. Detection of the water can be used to control pumping of water from the bottom of the tank by means of the pump  26. However, the pump 26 may also be activated based on the measured level of a single fluid type within a tank.
The probe 2 shown in FIG. 2 is preferably constructed of one or more inner electrodes 30 surrounded by one or more outer electrodes 32 that are configured in a generally parallel spaced-apart configuration with respect to the inner electrodes 30. as shown in FIG. 2.
Insulating spacers 34 may be used to maintain the spacing of the outer electrodes 32 from the inner electrodes 30. The outer electrodes 32 are preferably arranged with respect to the inner electrodes 30 and connected to ground in order to provide adequate shielding of the inner electrodes 30 from extraneous electrical fields that might affect the capacitance measurement. In the case of only three outer electrodes 32, the outer electrodes 32 are preferably in a triangular configuration, with the inner electrodes 30 approximately at the center of the triangular configuration. Better shielding may be accomplished by having more than three outer electrodes 32. The inner electrodes 30 are coupled to the detection and measurement electronics 22 as described above. The electrodes 30, 32 should be made of a conductive material, and are preferably robust enough to withstand a harsh environment. An example of suitable material for the electrodes 30, 32 would be stainless steel (e.g., type 316 stainless steel). The electrodes 30, 32 may be wholly or partially coated by a protective material, such as Teflon®. The spacers 34 are preferably made of a relatively inert, electrically insulating material, such as Teflon® or a ceramic.
Advantages of the probe configuration shown in FIG. 2 include ease of access of the fluid to be measured to the space separating the inner electrodes 30 and the outer electrodes 32; ease of cleaning the probe; ease of manufacture; and simple electrical geometry. Probes of the type shown in FIG. 2 can be manufactured in standard lengths and configured with end couplers so that sections can be coupled together to provide a probe of any desired length. Thus, for example, a standard length for such probes might be 60 inches. A series of such sections can be readily coupled together to custom fit storage tanks of any desired depth.
The fluid level of the tank is calculated from a calibration curve obtained and stored for the particular tank and the particular fluid (i.e., the less dense fluid in the case of tanks with multiple levels of fluids). The dielectric constant of the fluid may be either assumed  from known standard reference values, or may be measured. The dielectric constant may be measured, for example, by measuring the capacitance of a probe of fixed dimensions. Such a measuring probe may also incorporate a heating element placed into the fluid to enable heating of a portion of the fluid in contact with the probe. Such heating allows determination of the temperature dependence of the dielectric constant, thereby allowing for correction of measurements as a function of changes in the tank temperature. Depending on the degree of accuracy required, the probe can be calibrated using procedures such as those applied above, with the microprocessor utilizing the calibration parameters to correct the capacitance data to fluid height, fluid volume, or other information as required.
FIG. 3 A is the diagram of a second embodiment of a probe in accordance with the invention. One or more inner electrodes 40 are surrounded by an outer electrode 42 that comprises a cylinder. The inner electrode 40 may comprise one or more solid conductive rods or hollow pipes. For example, for a small tank, the inner electrode 42 may comprise a single rod or pipe having, for example, an outer diameter of '/-- inch. The outer electrode 42 in such a configuration may comprise a pipe having, for example, an inner diameter of 'A inch.
Insulating spacers 44 may be used to provide structural stability between the inner electrodes 40 and outer electrode 42. The outer electrode 42 need not be completely continuous, but may contain slots or holes 46 to improve drainage of fluid from the space between the inner electrodes 40 and the surrounding outer electrode 42. Although solid disks or cones are shown for the spacers 44, other shapes may be used, such as triangular, cruciform, spoked, etc. , to allow fluid passage along the length of the probe 2. Similarly, the inner electrodes 40 and outer electrodes 42 may have a cross- sectional shape other than round, such as oval, square, or triangular.
FIG. 3B is the diagram of a third embodiment of a probe in accordance with the invention. One or more inner electrodes 47 are surrounded by an outer coil electrode 48 that comprises a compressible coil of conductive material, such as wire. The coil is preferably cylindrical with constant pitch when extended, but may be cylindrical with a variable pitch, or helical with a constant or variable pitch, or have a different cross-sectional shape. The inner electrode 47 preferably comprises one or more flexible wires. When in a stored state,  the electrodes 47, 48 can be compressed to a compact form. When in a deployed state, the electrodes 47, 48 are allowed to stretch out, possibly with the assistance of weights 49.
FIG. 4 is a diagram of an externally mounted probe in accordance with the invention. An exterior vertical housing 6, in fluid communication at the top and bottom with the tank 1. houses a probe 2, which may be attached to a weight or anchor 7 to hold the probe approximately centered within the housing 6. This "side arm" arrangement is particularly useful for installation on large vessels or tanks, and can be easily implemented on a vessel or tank having a drain valve or clean out port at or near its bottom and a vent pipe at or near its top. Retrofitting such a tank with a level sensor would be relatively simple by using a couple of "T" fittings and an external vertical pipe as the housing 6.
Another advantage of this embodiment is that the tank 1 is filled through the top of the sensor housing 6, thus filling the pipe with fluid during the operation, the dielectric properties of the fluid could be monitored concurrently for quality parameters, such as uniformity, absolute dielectric constant, etc., during the filling operation.
An important aspect of the probe configurations shown above is that they allow detection of a higher density fluid having a different dielectric constant from a lower density fluid, such as water within a tank of immiscible fluid (e.g., hydrocarbons). For example, in one embodiment, a probe 2 is inserted to a fixed distance from the bottom of a tank 1 equal to the maximum allowable level of a denser fluid (e.g., water) having a dielectric constant different from a less dense fluid (e.g., a hydrocarbon). In the absence of the denser fluid, the capacitance of the probe 2 is constant until the level of the less dense fluid reaches the probe tip, at which point the capacitance of the probe 2 begins to increase as that fluid is interposed between the capacitor electrodes. For probes of fixed cross sectional dimensions along the length of the probe, the increase of capacitance is proportional to the dielectric constant of the fluid and to the height of the fluid in the tank. When the denser fluid reaches the probe tip, a sharp change in capacitance can be sensed, indicating the present of the denser fluid. Thus, for example, the electrical conductivity and dielectric constant of water is sufficiently different from hydrocarbons that immersion of the bottom of the tip of the probe 2 in water will cause a sharp change in the capacitance measured by the probe 2. (Either characteristic -  electrical conductivity or dielectric constant - may produce this effect. Experiments are ongoing to determine which characteristic, if any, predominates). This dramatic change in signal from the probe 2 is easily detectable by the charge transfer-based detection and measurement electronics 22. Detection of water in this fashion can be used as described above to activate a pump 26 to pump water from the bottom of such a tank. This principal can be applied to multiple levels of fluids of different densities and dielectric constants. Thus, probes of the type described above provide simple structures that not only accurately detect fluid level, but can detect the presence of multiple levels of components having different dielectric constants.
FIG. 5 is a diagram of a dual probe embodiment in accordance with the invention. If the level of the denser fluid (e.g., water) is required to be known explicitly (as opposed to simply being detected as present), then a dual probe can be used. The preferred dual probe embodiment includes three concentric cylinder electrodes 50, 52, 54. Two of the electrodes 52, 54 extend essentially to the bottom of the tank for the purpose of measuring the denser fluid level. Electrode 52 is an inner electrode and electrode 54 is an outer electrode of a first probe. Electrode 52 is an outer electrode and electrode 50 is an inner electrode of a second probe. A single detection and measurement electronic circuit 22 can be used to measure both probes by providing switching means to alternately couple the respective inner and outer electrode pairs to the detection and measurement electronics. This configuration can actually measure the level of two fluids, and detect the presence of a third dense fluid.
Any of the probes described above may be configured with a temperature sensing device in order to measure the temperature of the fluid being measured. Since dielectric constant typically changes with temperature, knowing the fluid temperature allows for automatic calibration of the signal output from the detection and measurement electronics 22. Such a sensor may be, for example, a solid state thermistor or a thermocouple. The temperature sensor would preferably be located near the lower end of the probe 2 when situated within a tank 1.  Two-wire Feed Through
The probe 2 requires only two wires, which minimizes the size of the wire opening (and pressure seals, in a high pressure system) required in any tank 1 in which the probe 2 is installed. For practical application of level sensors, some accommodation must be made for inserting a sensing probe through a fluid container wall and passing electrical signals between the sensing probe and monitoring electronics while maintaining a fluid and sometimes hermetic dielectric seal between the electrical conductors and the container wall. The device which accomplishes this task is normally called a "feed through*'. The design and function of a feed through becomes more complex and expensive to accomplish as the number of conductors required increases, as the geometry becomes more constrained, as the electrical properties (especially frequency dependent electrical properties) become more constrained, and as the use temperatures and pressures increase. Deficiencies in the feed through design often result in degraded sensor performance and sensitivity, along with increased electrical noise, reduced reliability and increased safety concerns. Many prior sensors use probe schemes which rely on multiple electrical probe elements, necessitating feed through with a multiplicity of electrical conductors. Others use sensing schemes which rely on the frequency dependence of circuits or probe element and fluid properties. These sensors require feed throughs with constrained frequency dependent electrical properties, and must accommodate or tolerate inaccuracies induced by temperature dependent drift of the feed through dielectric properties and geometrical tolerances in the feed through manufacture. At high temperatures and pressures, few choices of dielectric materials remain, with ceramic being the most obvious for its good dielectric characteristics and high strength and creep resistance at temperature. However, ceramic feed throughs are expensive and difficult to fabricate, requiring metal/ceramic bonding which raises reliability issues, and the required custom fabricated ceramic feed throughs are not well suited to high volume production. Thus, many prior art capacitive level sensors have limited application due to the need for a multi-wire feed through to accommodate multi-element probes.
The level sensor of the invention requires only a single DC signal lead plus ground, hence simple and commercially available coaxial feed throughs are perfectly suitable. Such coaxial feed throughs are also readily available, at high volume, with high temperature and  pressure capability, with capacity to several thousand PSI and close to 1,000°F. An ordinary spark plug is an excellent example of such a feed through. Since no special frequency dependent electrical properties are required, and because signals are DC, level sensors in accordance with the invention can be readily constructed with high sensitivity and resolution at a lower cost while operating in processes that require high temperature and pressure using simple coaxial ceramic feed throughs. Note that it may be desirable to include an automatic switching element to reverse the DC polarity of the electrodes in order to avoid galvanic corrosion or plating effects.
Automatic Calibration Adjustment A charge transfer-based fluid level sensor would have much greater utility if the user did not have to adjust the gain of the measuring circuit for each fluid detected and if the circuit also automatically detected changes in the properties of the fluid being detected. A present manual process involves immersing a probe of the type described above completely and then not at all, taking measurements in both cases, then selecting one of several possible gain settings and loading the selected gain setting into the charge transfer circuit. This process essentially establishes the dielectric constant of the fluid, which sets the detectable range at a specific gain of the measuring circuit.
If a probe could be devised that would do this function automatically, then the system would be automatically self-calibrating for gain, and allow the probe to be used in processes where it could detect the levels of various fluids, without user intervention and while maintaining the accuracy of level detection. An effective way to do this would be to create a section of the probe which is known to be immersed, and use its known dimensions and measured capacitance to create the needed data input to the measuring circuit. The problem in doing so is isolating a section of probe without adding any more wires to the probe feed through. In addition, if the temperature of the fluid could also be known, its effects could be included in generating the calibration data, providing a further increase in accuracy and sensitivity.
These benefits can be realized by incorporating one or more passive electronic devices (specifically, one or more diodes or zener diodes) into a capacitive probe so that the voltage to charge the lower part or a reference segment of the probe would have to be delivered through this device. Hence, a difference between sections of the probe structure could be distinguished and extracted as a reference capacitance. Use of a diode-like device accomplishes the isolation function and detects temperature, thus providing both needed functions with one additional component and no additional wires. However, if desired, a separate reference capacitor may be used to determine the capacitance of a surrounding fluid.
FIG. 6 is a diagram of an automatically calibrated probe 60 configured in accordance with a preferred embodiment of this aspect of the invention. A sensing electrode 62 includes a measurement section 63 coupled to a reference section 64 by means of a diode 66. The sensing electrode 62 forms one plate of a capacitor structure. A counter electrode 68 forms the opposing plate of the capacitor structure.
An important aspect of using this arrangement is that the energy stored in the capacitor through the material between the two electrodes 62, 68 can be evaluated by a modification of a charge transfer circuit by applying a positive (+) charge to the sensing electrode 62 and a negative (-) charge to the counter electrode 68 and measuring voltage levels during the charge cycle. The total charge stored is proportional to the length of the electrodes immersed in fluid, with or without the diode in place (less the charge lost due to the forward voltage drop across the diode 66 for the reference section 64). Adding the diode 66 allows for additional measurements and adjustments to be made in the following ways: (1) Temperature can be measured because the diode forward breakdown (or zener diode reverse breakdown) voltage is proportional to temperature due to the negative temperature coefficient of the diode material (i.e., silicon for most diodes). Though this effect is small, it is repeatable, linear, and measurable. For example, if the probe is charged by ramping the voltage (i.e., by supplying a saw tooth wave form), across the electrodes 62, 68, at least in the region below 1-2 volts, there will be an inflection point in the current versus voltage curve (I V relationship or charge rate curve), the voltage of which is characteristic of the temperature of the fluid in which the probe is immersed. FIG. 7A is a graph showing a ramping voltage, and FIG. 7B shows the resulting current versus voltage curve for the probe of FIG. 6. The charge curve for [A] is for the measurement section 63; the charge curve for [A+B] is for the combination of the measurement section 63 and the reference section 64, once the diode 66 enters a breakdown mode.
(a) Once the detection and measurement electronics 22 are calibrated by measuring the ambient temperature of the probe and feeding that information to the microprocessor, the temperature of the probe can be determined and an appropriate compensation factor applied to correct for temperature dependent measurement errors for the fluid being measured. Since the effect is linear, little additional computation is required. (b) Another way to measure the temperature using this technique without the need to calibrate to the probe is to provide a calibration circuit within the detection and measurement electronics 22. The calibration circuit includes a matching diode (or zener diode) thermally coupled to an appropriate temperature sensor (e.g.. thermistor, thermocouple, or platinum RTD). The microprocessor can "test" the calibration circuit by applying a ramped voltage and, knowing the temperature from the temperature sensor, determine the I/V versus temperature relationship for the diode used. This relationship may then be applied to characterize the inflection point data the detection and measurement electronics 22 reads for the probe diode 66.
(2) If the diode 66 is a zener diode, then charge stored in the reference section 64 can be measured during each discharge cycle separately from the charge stored in the measurement section 63. This allows measurement of the dielectric constant of the fluid, and allows the system to have an automatic gain adjustment, as follows:
(a) If the circuit receiving the charge back from the probe receives the charge in 2 steps, separated in time, where the first step sets the ground state above the breakdown voltage of the zener diode 66, and the second step lowers the ground state back to the system ground which was used for charging the probe originally, the total charge transferred back will represent the fluid level. The difference between step 1 and step 2 will be related to the reference capacitor as illustrated in FIGS. 7 A and 7B. FIG. 8A is a graph of charge versus time, showing stepped charges. FIG. 8B is a  graph of the corresponding capacitor discharge times (illustrated using approximate decay curve, though this will vary with the circuit and capacitance values used). The discharge curve for [A] is for the measurement section 63; the discharge curve for [B] is for the reference section 64. In particular, when charge is transferred back to the charge transfer circuit, the ground level is first lowered to a point slightly above the breakdown voltage of the zener diode (ground level 1 in FIG. 8A). This allows current to flow from the measurement section 63 [A] of the probe back to the charge transfer circuit, where the charge is captured and its value stored. This stored charge permits measurement of the effective capacity of the measurement section 63. The ground level is then lowered to system ground (ground level 0 in FIG. 8A). Since this is below the reverse breakdown voltage of the zener diode 66, the balance of the charge is transferred back, which includes the remaining charge on the measurement section 63 [A] plus the charge from the reference section 64 [B]. Since the I/V characteristic is now known for the measurement section 63 [A] at its current fluid level, this value can be subtracted from the total, leaving the I/V contribution for the reference section 64 [B], the total energy of which gives the capacitance of the reference section 64. Since the geometry for the reference section 64 [B] is known from the details of its construction, the dielectric constant of the fluid being measured may be calculated and used to program the appropriate gain for the detection and measurement electronics 22.
(b) In actuality, it is not necessary to calculate the dielectric constant, and only the capacitance of the reference section 64 need be found. From the capacitance, the microprocessor can specify its needed gain, given the length of the probe involved, by using a reference such as effective capacitance per unit length.
Thus, in accordance with this aspect of the invention, the critical parameters of temperature and the capacitance of a known reference capacitor can be measured in a probe of the type disclosed in FIG. 6. This measurement may be most readily accomplished by changing the cyclic voltage input/output for a charge transfer circuit coupled to the sensing probe from a typical square wave to the waveform shown in FIG. 9. The necessary waveform can be generated by appropriate digital circuitry driving, for instance, a digital to analog (D/A) converter to generate the ramp (which can be an analog voltage ramp or an appropriate stepped ramp), and a level shifter or other circuit to move the ground level up for discharge step 1 and return it to normal ground state for discharge step 2. Analog to digital (A/D) converters in conjunction with current sensing resistors and amplifiers as required can provide the microprocessor with the needed feedback information in digital form for all necessary calculations.
A number of embodiments of the present invention have been described. Neverthe- less, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. For example, the invention may be used to detect the boundary between any immiscible fluids having measurably distinct conductivities. Further, it should be understood that while concentric cylinders have been described for one embodiment, non-concentric cylinders may be used. Similarly, while a symmetric arrangement of electrodes have been shown for another embodiment, asymmetric arrangements of electrodes may also be used effectively. Accordingly, other embodiments are within the scope of the following claims.
-I .