LEVEL SENSOR
Technical Field
This invention relates to a fluid level sensor, especially a sensor for measuring the level of oil or fuel in a tank or sump.
It is known to measure oil level in an engine sump using two upright concentric electrodes between which the oil level is free to rise and fall. The oil acts as a dielectric and the change in oil level causes the capacitance between the electrodes to vary. However, it is also known that the oil quality and temperature effects the capacitance, and thus additional compensating electrodes have been provided in known devices to produce an error correction signal.
An object of the present invention is to provide an improved level sensor in which compensating electrodes are not necessary.
Disclosure of the Invention
This is achieved according to the invention by providing a fluid level sensor comprising a pair of upright electrodes arranged so that the fluid rises between them and assumes a level to be measured, the fluid acting as a dielectric between the electrodes to form a capacitor, the capacitor being connected in series with an output resistor to form a potential divider, an alternating input signal being applied across the divider, and the output signal across the output resistor being monitored to give an indication of the fluid level.
The output voltage across the output resistor is a function of the fluid level, but it is also a function of the dielectric constant of the fluid. If the fluid is a fluid with a changing permittivity, such as engine oil which becomes contaminated in use, then this will create a variation in the output voltage that will be seen as an error signal as far as fluid level is concerned. This output variation has a minimum value at an intermediate height level, and a maximum value at and above the maximum height level.
The output voltage signal is also influenced by the resistance of the output resistor, but it has been found that this can be set so as to minimise the error signal across the range of expected values of the complex permittivity of the fluid. Preferably, the resistance is set so as to constrain the error signal to a maximum absolute value at an intermediate height level, the maximum absolute value preferably being set equal to the maximum absolute error at the maximum height level. The maximum error signal due to variations in complex permittivity can then be kept low.
In a typical example of an engine sump oil level sensor, a maximum error occurs when the sump is over three quarters empty and when it is over filled, and can be set to about 3%.
The setting of the resistance of the output resistor in the potential divider can also serve to counteract the effect of fluid temperature changes on the output voltage.
The output voltage across the output resistor therefore produces a level function which can be converted by a microcontroller to a level measurement.
The microcontroller may also modify the level measurement using a suitable look up table or polynomial function to compensate for changes in the cross-section of a vessel containing the fluid, which would otherwise distort measurement of volume of fluid.
If the vessel has a uniform cross section then the level function will be approximately a parabola that could be generated entirely in hardware by a square law amplifier.
A higher degree of accuracy in measuring the fluid level can be achieved if required by also providing a fluid quality sensor that produces an error correction signal dependent on variation in the dielectric constant (pemiittivity) of the fluid, and which is applied to the level measurement.
Description of the Drawings
The invention will now be described by way of example with reference to the accompanying drawings in which:-
Figure 1 shows an oil level sensor according to the invention for measuring oil level in an engine sump;
Figure 2 shows a block schematic diagram of the electronics of the level sensor of Figure 1;
Figure 3 shows a basic circuit diagram with a potential divider including a capacitor representing the capacitance of the level sensor of Figure 1;
Figure 4 shows a graph of percentage error due to changes in oil permittivity with oil level in the level sensor of Figure 1;
Figure 5 shows a graph of the sensitivity of the level function to changes in permittivity with the level in the level sensor of Figure 1;
Figure 6 shows a typical complex plane plot for a liquid dielectric; and
Figure 7 is schematic diagram of an alternative form of oil level sensor comprising parallel plates.
Best Mode of Carrying out the Invention
The oil sensor shown in Figure 1 consists of a pair of concentric electrically conductive tubes (1, 2) arranged so as to act as a capacitor, whose capacitive value varies according to the level of fluid within the sump 9 and the annular space between the tubes 1 and 2. The outer tube 1 is perforated and includes drain holes 20 at its base through which fluid is allowed to pass. These tubes may be tapered for ease of manufacture, and may be injection moulded. The fluid may be lubricating oil or fuel, whose permittivity (dielectric constant)
will modify the capacitance according to the value of the permittivity and the level of the fluid. Relative permittivity is written as:
er = e'-j.e" = ε' (l-j.Tanδ)
where Tan is equivalent to a phase angle, and is a measure of the dissipation factor of the ■ dielectric, and j = V(-l).
Since the capacitance C of the sensor will vary, so also will its impedance when excited by a high frequency sinusoidal voltage. As shown in Figure 3, the capacitor C formed by the tubes (1, 2) is connected in a voltage divider circuit, the second arm of the voltage divider being a pure resistance R. An oscillator 6 generates the sinusoidal voltage. It is to be understood that the permittivity of the oil is complex, that is, it has both real and an imaginary component, and that the value of the complex permittivity will change during the life of the oil. For a typical mineral oil, this value will be around 2.3 + 0.005J at a few MHz, rising to around 2.8 + O.lj for a seriously contaminated oil.
In reality it is known that, for a given fluid, there is a causal relationship between ε' and Tan<5, the two parameters being linked to a good approximation by the so-called Havriliak Negami model, being a more general form of the Cole Davidson molecular relaxation models. In this model (Figure 6), a complex plane yields a roughly semicircular arc, with each point on the plot being measured at a different frequency, ranging from zero (DC) at the extreme right to infinity at the extreme left. As contamination increases, the arc changes shape as the concentration of charge carriers and polar components increase.
The curve also changes shape with temperature, which is therefore included in the general description of the changing characteristics of the fluid.
If the operating frequency is kept constant, experimental evidence shows that both Tanr5 and ε' increase linearly with oil age and use. In practice, an oil is considered to be seriously contaminated when the concentration of, for example, soot and polar oxidation
products, is >5%. Significant departures from linearity may occur at concentrations rather greater than this.
The complex capacitance of a straight sided concentric level element is given by:
C (s, e') = C0 (s(s'- 1) -j.s.e'.TanJ)) + 1),
where C0 is a parameter which depends on the capacitor geometry, s is the non-dimensional oil level which varies between 0 and 1,
where ε0 is the permittivity of free space, L is the length of the capacitor, and di and d2 are the diameters of the conductive elements (1, 2).
The factor 1 in the term ε' - 1 represents the relative permittivity of air, which is assumed to be wholly real, and Tan<5 is taken to be a linear function of ε'. In the case of an inverted sensor, such as might be used for example to measure fuel level, the non-dimensional height is replaced by the parameter σ = 1 -s.
The sensing elements need not be concentric, and may instead consist for example of a central flat conductive plate sandwiched between two outer flat conductive plates as shown in Figure 7. Preferably the inner plate is live, with the outer two plates connected to the ground. Preferably the outer plates are wider than the inner plate to reduce the effect of field fringing, and the ratio of the width to the gap is preferably greater than 10. To compensate for changes in the cross section of the sump, the plates need not be parallel, but may vary in shape according to the variation in the cross section of the sump. The gap may also vary with height.
To accommodate such variations in geometry, the complex capacitance as a function of level s is given more generally by an expression of the form
C(s, έ) = εoL ε fls)ds + \S f{s)ds
where f(s) is a geometric function incorporating variations in gap size and variations in width or cross section, and ε is the complex permittivity of the fluid.
As part of a voltage divider circuit, the output voltage ratio across the pure resistance is given by:
v = R/(R + Zc),
where Zc is the complex impedance given by
Zo (s, ε, vή = (j.ϊσC(s,ε))"1
It can be seen that v = v(s, ε, R) is now a function of the angular frequency ω, the non-dimensional height s, and the complex permittivity ε. It is required ideally that v should be linear in s, or if not, that any departure from linearity should be small and/or capable of compensation by means, for example of a lookup table in software, or an additive polynomial function. Note that only the amplitude (magnitude) of the output signal, and not its phase, is of interest in this application.
It is clear that the change in permittivity during the life of the oil has the potential to introduce errors in the indicated level. However, it can be shown that the output across the resistor R forming part of the potential divider is a curve whose gradient and general shape can be controlled by the choice of resistance value. The value of the function is automatically the same at s = 0 for all values of permittivity, since the capacitor is filled only with air, and the error due to differences in permittivity is therefore zero at s = 0. If the value of the function is plotted against s for each of the two extreme values of complex permittivity, that is, from a minimum of 2.2 - 0.005J to a maximum of 2.8 - O.lj, two curves are obtained, shown in Figure 5, the difference between which is the error due to variations in permittivity. This error which may be written as g s, R) = I v(s, ε i , R) | - 1 v(s, e2 , R) \ is required to be minimised in some sense.
It is known that both the real and the imaginary parts of complex permittivity increase with increasing contamination. As the real part (dielectric constant) increases, so will the capacitance, and the impedance will decrease. However, the impedance will increase as the imaginary part increases, and it can be seen that the two effects act in opposition to one another. It is known from observation that the real part changes quite slowly with increasing contamination, while the imaginary part increases at a much faster rate, so it is easy to conclude that two oils at different stages of contamination may show the same magnitude of impedance. This is explained by noting that the fresher oil may have a low dielectric constant (giving rise to a high contribution to impedance), with a low loss factor, giving rise to a low contribution to impedance. The more contaminated oil will have a higher dielectric constant (giving rise to a low contribution to impedance), with a high loss factor, giving rise to a high contribution to impedance. If the capacitor containing the oil forms part of a potential divider circuit, the objective then is to find a value of the resistance in the potential divider which will make the difference in the voltage between the two oils as small as possible.
It can be shown that provided the two extreme values of permittivity are sufficiently different, there exists an intermediate value of the oil level s between zero and 1 where the error function is zero, but continues to increase beyond this point towards s = 1. If the error is plotted against s, as shown in Figure 4, it is seen that it starts at zero, approaches a maximum negative value, and then rises to zero again before increasing monotonically towards s = 1. The sense in which it is chosen to minimise the error is to choose a value of R such that the absolute maximum error at 0 < s < 1 is the same value as the absolute error at s = L Since the error function has a turning point at this intermediate s-value, the derivative with respect to s is set to zero, with resistance R as a parameter. The error function at this point is equated with its value at s = 1, and the value of R for which all the above conditions are true is found. This is then the optimum value, the value of resistance which minimises errors due to changes in permittivity, which may themselves be due to temperature or to contamination.
Using this method, it can be shown that the maximum error using the above two representative values for complex permittivity and normalised with respect to the voltage
range is typically 3%, and occurs at two points: the first when the sump (oilpan) is over three quarters empty, and the second when the sump has been overfilled. If the sensor is inverted so that it depends from the top of the sump, these maximum errors occur at three quarters full and empty, respectively. Zero error occurs when the sump is empty and about half full respectively.
An on-board microcontroller 3, shown in Figures 1 and 2, is used to linearise the level/voltage output curve; the same microcontroller may also be used to compensate for possible changes in the cross section of the sump by means of a suitable lookup table or polynomial function.
In many applications, an accuracy of less than 3% is not required, and accuracy may be traded for a greater dynamic range by reducing the value of the resistance. For example, using the two extreme values of complex permittivity referred to, the dynamic range of the sensor is about 2% of the excitation voltage; reducing the resistance to three quarters of this value increases the maximum error to 5%, but increases the dynamic range to 4% of the input voltage. In other words, an excitation voltage of 10V will provide a working range of 400mV from empty to full. The output voltage contains a large non- varying offset which may be removed by, for example, subtracting a suitable reference voltage. This is preferably done after demodulating the sinusoidal voltage at 23 so that the reference voltage may be derived from a precision DC source.
It should be noted that it is important to take the output voltage across the resistor R, and not across the capacitor C. It can be shown that no optimisation is possible if the voltage across the capacitor is used, the errors increasing monotonically from zero at s . = 0 to a maximum at s = 1. Since from the design point of view it is convenient for one side of the capacitor to be grounded, this means that the output from the resistor cannot be referenced to 0 volts, and the following stage of amplification has to take this into account. This is conveniently done by taking the output across the resistor R into the two inputs of a differential amplifier 4, whose inputs are isolated from any DC present by means of coupling capacitors 5. The values of these capacitors are sufficiently high so as not to affect the overall impedance of the circuit.
If it is required to obtain level measurements more accurately than 3%, then an oil condition sensor 7 is provided which produces a correction signal that is fed to the microcontroller 3. A suitable oil condition sensor would be that described in PCT/GB98/01321". This particular condition sensor measures the loss factor of the oil, and shows a generally linear variation in output with contamination. It is found experimentally that as the loss factor increases, so also does the dielectric constant, and there is thus a good correlation between the real and the imaginary parts of the permittivity of the oil. This then provides a reliable means of compensating for the changes in dielectric constant which occur as the oil becomes contaminated with use, and offers the added advantage of both oil condition and level sensing within the same package.
It has been shown that the effects of variation in complex permittivity such as those due to temperature may be made negligible by careful choice of component values. However, mineral oils possess very high coefficients of thermal expansion, and one of the effects of increasing temperature is to raise the level of the oil in the container. The volume, or cubic, expansivity of a typical oil is 800 parts per million per Kelvin, so the change in level over a temperature range of 120°C is about 3%. This may be considered significant in some applications, and compensation will then be necessary with the level of the fluid being relative to some reference temperature. Since the sensor is typically combined with an oil temperature sensor 8, it is a simple matter to use this output as a signal into the microcontroller 3, which then makes a straightforward linear adjustment to the level signal.
However, if cost precludes the use of a microcontroller, there is an alternative method. As the oil level rises with increasing temperature, so will the capacitance of the sensor, and a mechanism is provided which will cause it to fall by the same amount. If the inner part 2 of the sensor comprises a tube with a lower expansion coefficient than the outer I, then the gap between the two will tend to increase with increasing temperature, and the capacitance will fall.
It can be shown that the percentage change in capacitance per Kelvin is given to a good approximation by:
δC/C = -(eta - α LnCdj di)
where α2 and i are the linear thermal expansion coefficients of the outer and inner elements respectively, and d2 and dj are the corresponding diameters. Since the percentage change in capacitance is about 0.027%/K the difference ( 2 - αi) is then -0.00027.Ln(d2/dι). If, say d2 and di are 20 and 19mm respectively, then ( 2 - αi) = 14 ppm/K. Since the expansion coefficients for many plastics are 3 to 5 times greater than those for many common metals, this approach is feasible, although it is necessary to ensure that the gap between the electrodes (1,2) is not so small that the fluid is retained by surface tension. The inner surface of the plastic outer element is required to be coated with a conductive film, while the inner electrode may be made of, for example, brass.
The oil level sensor shown in Figure 1 is mounted in a wall of the sump 9 on a mounting body 10 composed of high temperature injection moulded plastics.
The use of plastic overcomes a number of technical problems, and minimises production costs. The choice of plastic will depend on the maximum operating temperature. A glass loaded ABS, for example, would be suitable for operation up to around 120°C, with other more expensive materials being used for higher temperatures.
The plastic body provides electrical insulation between the sensor electrical elements and connections to reduce problems associated with earth loop currents. It also provides a high thermal resistance to reduce the temperature differential across the active sensing components and the outside of the sump, which may be at -30°C, for example. Excessive temperature differentials can lead to inaccurate and inconsistent measurements.
The plastic body 10 also allows the sensor to be mounted directly into the body without the need for separate insulators. Only a simple 'O' ring seal or bonded seal 11 is required to achieve support and sealing of the active elements. HNBR high temperature seals may be used up to l50°C.
Both the oil condition sensor 7 and oil level measuring circuits may, for example, use coaxial elements to form capacitors in which the oil or fluid acts as the' dielectric. The oil condition sensor and oil level sensor both use complex permittivity as the measurand, but in rather different ways. The operating frequency for the oil condition sensor may be, for example, between 10 and lOOMhz, while the oil level sensor may operate at less than 1MHz, for example, using the PIC microcontroller clock as the source of excitation.
The temperature sensor 8 may comprise a linear semiconductor temperature sensor, mounted in a thin metallic jacket as shown in Figure 1. The thin walled protective jacket surrounding the temperature sensor provides a low thermal resistance, allowing a short thermal time constant, and the jacket also provides mechanical protection of the sensing device. The active element may be held in place using, for example, a small quantity of high temperature adhesive, or it may be an interference fit.
The analogue sensor circuit board 12 is, for example, 50mm in diameter, and is held firmly in position using the same fixings that are used to hold the sensing elements in place. The board is manufactured, for example, from FR4/FR5 epoxy/glass material and is fully populated with surface mount components.
A digital and power supply board 13 is mounted off the pressed steel cover 14 as shown in Figure 1. The digital board converts the output of the sensor board into digital values, which are processed by the onboard PIC microcontroller (3). Temperature compensation, averaging and calibration procedures are all carried out by the microcontroller. The pressed steel cover 14 provides mechanical sealing of the complete sensor and also provides a mounting for, for example, an automotive style connector 15. In addition, the steel cover, which is effectively electrically connected to the engine block, provides a useful degree of attenuation of both radiated and incoming radiated emissions. In environments where corrosion may be a problem, the material may be changed to 316 stainless steel or similar.
The digital board 13 also comprises a number of filtering, regulating, and spike protection components 21 to prevent any damage from occurring to the electronics during normal
automotive use. Brown-out protection may be included in the microcontroller coding to prevent processor core ock-up' during engine cranking, or when other power supply irregularities occur.
The output protocol from the sensor assembly may be RS232 or similar, PWM (pulse width modulated), analogue, or a combination of both. Alternatively, the processing of the analogue signals may be done externally, in which case the analogue outputs direct from the sensing circuitry could be made available. A USART 22 is also included in the PIC microcontroller which enables 2-way communication between the sensor and, for example, the engine management system.
Calibration, or zeroing, of oil condition sensors is necessary because of the varying mounting configurations and wide range of oil types, e.g. mineral and synthetic or ester based lubricants.
The sensor assembly shown is capable of self calibration, or zeroing, this being automatically carried out after the oil has been changed or after initial installation. The system is capable of detecting an oil change automatically, by monitoring the oil level and ignition status. Calibration only occurs when the oil temperature has reached 55°C for engine oil lubricants, since it is known that the sensor output tends to become inconsistent across oil types at temperatures lower than this, due to differences in additive formulations. Allowing the engine to run up to temperature also allows the new oil in the engine to mix thoroughly with any old oil which may remain following an oil change. For hydraulic or gearbox applications the calibration temperature may be changed in accordance with the operating conditions.