Liquid Level Sensing Part 2: Optical, Gravitational, and Sonic Techniques

By Jon Gabay

Contributed By Electronic Products

In a previous article on liquid level sensing we discussed techniques and products that can be used to sense fluid levels and limits through electromechanical switches, Hall-effect switches, resistive voltage divider sensing, and capacitive timing based sensing techniques and approaches.

This article explores liquid level detection via optical, gravitational, and sonic techniques. All devices/sensors mentioned here are available on the Digi-Key website.

Isolated step detecting

While resistive and capacitive techniques are effective and easy to implement, they are not the best choice for sensing volatile and toxic liquids. Here, you want to eliminate any exposure to electricity and even the potential for an arc that could explosively ignite the liquid.

Similar to the discrete step sensor technique described in Part 1, isolated step detecting, rather than using individually mounted electromechanical switches, uses a single vertical column that is transparent or translucent at a desired optical wavelength.

Several optical-slot-type sensors can be employed. For industrial designers, well- engineered off-the-shelf solutions such as the Omron EE-SPX613 should be considered. This is a sealed and self-contained optical slot sensor that can use 6 to 13-mm tube diameters with a wall thickness up to 1 mm.

These 12 to 24-V parts are more than just emitters and detectors. They contain a bit of intelligence. The sensitivity is adjustable, and there is a mode select option as well. There is also a built-in amplifier with an open collector 100-mA npn transistor output capable of driving a load relay directly (Figure 1).

Omron EE-SPX613

Figure 1: The active circuitry in the Omron EE-SPX613 is mode selectable and can drive an output relay directly.

These devices work by detecting a change in the refractive index of the optical path. If there is no liquid in the pipe, the light reaches the receiver by transiting through the pipe. If filled, the light passes through the liquid and doesn’t get to the receiver.

Off-the-shelf optical

Cost-sensitive designs may influence engineers to select one of the many good off- the- shelf slot sensors that can be used. For example, the TT Electronics/Optex OPB350 is a slot-type photo sensor with a 1/8-in. sensing gap. A built-in 50-mA emitter aims at the 30-V 50-mA-capable photo transistor to create a photo-interrupter-style detector.

It works as follows: by searching for contrast variations, the optical sensor can detect the presence of the meniscus as it passes by the optical receiver (Figure 2). These transitions are “latching” so to say as the level fills or drains because there is a different transmisivity between an empty and a filled tube.

Transistor switch output

Figure 2: As the meniscus passes through the optical slot, the change in transmisivity can be detected to trip a transistor switch output.

For example, if the tube is empty, the light passes through rather easily and trips the photo transistor in the receiver section. This causes the output to go to a logic 0 level (in a typical npn open-collector output), and provides a sink path for the current.

When the liquid fills the tube, the transmisivity is reduced and the photo transistor no longer gets enough light to switch. In this case, it floats and is pulled up externally by a pullup resistor to present a logic 1 to the control circuitry.

Note, for best results, that the liquid should be opaque to the wavelength of light being used. Also, similar to the float based step detector mentioned in part 1, several of these will need to be used at different points along the same tube to get the desired liquid level resolution.

In addition the intensity of the driver should be adjustable so the sense level is maximized to the highest sensitivity. Too much drive strength and the receiver will still pick up signals when filled. A PWM or D/A output from your micro can bias this as needed and even provide a software based calibration routine.

For engineers involved in medical applications, there is a helpful training module for the TT Electronics/Optek OPB350. A design and development kit is also available to aid in the prototyping, characterizing, and development of level, flow, and bubble types of detectors. Note that there is also a training module for auto calibration as has been discussed.

Linear strain gauges use gravity

One of the most obvious, but often overlooked techniques to determine fluid level is to weigh the tank. Gravity is a constant so this will always provide a reliable, resolute, and accurate indication of liquid levels. In addition, weighing the tank allows precise level measurements to be made without exposing the tank contents to potential electrical spark hazards.

It is important to note that the density range should remain somewhat constant here for this technique to work. For example, the same system would need to be calibrated differently if it were filled with alcohol, and then filled with mercury because the densities are different. But, if the same liquid is always to be used, or, if a selector switch were designed in to bias it to the different ranges, then the same design can handle whatever you throw at it.

Strain gauges can be used effectively here to measure the weights. A good single axis part (Figure 3a) is the Micro Measurements CEA-06-125UN-350. This 350 Ω linear transducer has a 1/8-in. active area and 0.3 percent resistance tolerance.

Strain gauges

Figure 3: (a) A single axis strain gauge can be effective for a stationary measurement. When compensating for motion in a single axis, a dual-axis (b) sensor can be used. Likewise, a shear/torque configuration (c) can compensate for acceleration in 2 axes.

If this technique is to be used in a moving or accelerating system, it will need to be either sampled when there is no acceleration, or calibrated against an accelerometers' reading since liquid will shift with inertia and can provide false readings.

Another approach is to make your own accelerometer by using a multi axis strain gauge. For example, a dual axis 350 Ohm version is the CEA-06-125UT-350 from Micro Measurements. This part uses a TEE sensor arrangement (Figure 3b), that can be used in a ‘V” configuration to compensate for motion along a single axis.

Similarly, a Shear/Torque type of strain gauge like the 350 Ω CEA-06-250US-350 can be used as an accelerometer in two axes (Figure 3c).

What’s nice about this approach is that you get a very resolute reading. This isn’t a stepped sensor — it is a real linear signal that will provide exact levels with the accuracy of your A/D converter.

Hearing is believing

Another linear liquid- level sensing technique employs the use of ultrasonic range finding. Since the speed of sound is so much slower than the speed of light, timing for reflected signals is easily in the range of low cost electronics. As a result, ultrasonic transducers can accurately measure distances and proximity for reasonable cost.

Off the shelf, ultrasonic distance sensors can be used for industrial and critical systems. For example, the 943 series Ultrasonic Distance Sensors from Honeywell have built in hysteresis and resolutions down to 1mm. Output options are PNP or NPN transistor, or 0 – 10-V and 4– 20-mA outputs. These parts are optimized for sensing distances from 60 to 3,500 mm.

For cost-sensitive designs, we are fortunate that several good ultrasonic transducers are within reach. A good general purpose part like the surface mount Knowles Acoustics SPM0404UD5 provides a wide sonic range; from the audible 10 kHz to the ultrasonic 65 kHz.

The –40°C to +100°C operating range also makes this a potential part for fuel gauge sensing in extreme climates. Since the same transducer can emit or detect, the same point of emission is the same point of reception. A simple op-amp circuit can detect and amplify the return signal (Figure 4).

AC-coupled inverting op-amp

Figure 4: An AC-coupled inverting op-amp can be used as a signal detector and amplifier for the return path.

For non-caustic, stationary, direct line of site, a direct exposure can be used with minimal protective coatings. For a more protective approach, reflectors and resonant barrier can be used to route and pass the specific signals to and from the measured level.

An example of a stereoscopic proximity detector is the Parallax 28015 Distance Sensing Ultrasonic Proximity sensor (Link 11). This is a 5-V, pulsed, 40-kHz, integrated distance sensor that can modularly connect to your PCB through a simple 3-pin SIP (Figure 5).

Parallax 28015

Figure 5: As a 3 pin through hole SIP module, the Parallax 28015 can easily be incorporated into a design

It can sense distances from 20 mm away to 3 m away. A burst output is pulsed and the return echo timing is used to generate a corresponding pulse width (Figure 6).

Burst output is pulsed

Figure 6: The return path timing generates a corresponding pulse width representing the sensed distance.

An ultrasonic development environment is also provided in the Microchip DM163026 Low Power Solutions Demo/Eval/Development board Based on the PIC18-J series microcontrollers (PIC18F4620), this board features a fully functional ultrasonic range finder, and three self-paced lab exercises that introduce the designer to the reduced power functionality of the PIC18-J series. A corresponding training module is also available on the Digi-Key website.

This article has described techniques and devices that can be used to monitor liquid levels, focusing on optical, gravitational, and sonic technology products. More information can be obtained by using the links provided to Digi-Key product pages.

Disclaimer: The opinions, beliefs, and viewpoints expressed by the various authors and/or forum participants on this website do not necessarily reflect the opinions, beliefs, and viewpoints of Digi-Key Electronics or official policies of Digi-Key Electronics.

About this author

Jon Gabay

About this publisher

Electronic Products

Electronic Products magazine and serves engineers and engineering managers responsible for designing electronic equipment and systems.