Liquid level measurement is a common technique in several industrial as well as domestic applications (to measure water level in a tank). This is usually done using a probe dipped in the liquid and measuring the conductivity between them. This conductivity is usually measured by the resistance change because of the water level change. This type of sensor is shown in the following picture:
The other way to sense level (usually full level) for applications such as motor cut-off when the water tank becomes full, is to use a float-based sensor which shut's off the flow mechanically. These are usually clunky, mechanical devices and can detect only when the tank is full.Why we couldn't use these
For the particular application that we were working on, we could not physically put anything inside the barrel because of the nature of the liquid. This is also the case if what you're measuring is food. Getting food grade sensors and keeping up the food safety standards could be a challenge.
A non-invasive, non-contact way of sensing the liquid level in the tank seemed to be the best approach. In this situation, the question of liquid contamination does not even come in to the picture.How did we do it
ProtoCentral's Laser sensor breakout board contains the VL53L0X sensor from ST Microelectronics, that is a complete Laser-based time-of-flight ranging distance measurement sensor. The good thing about this device is that it can bounce invisible IR Laser light off of any surface and measure the time it takes for the light to reach the detector, which is also built into the device.
The maximum distance measurement range of the sensor is 2 meters, but we were still able to achieve a resolution of 2 mm of water level in the tank. The Laser ToF breakout board is connected to an Arduino-compatible board known as the ProtoFly from ProtoCentral, which has a built-in Bluetooth wireless module. Coupled with a Li-Ion battery pack, this is all set to go wireless.
This unit is mounted on the top of a tank into which water is pumped in with a small water pump.
This height data is then sent over wireless to a computer running a GUI based on processing. The processing applications measures and logs the water level data in real-time. Below is a video of the device and the software in action.Results
Overall, we had a good experience of using a non-conventional way to measure water level in a tank. This sensor also provided a non-contact and more reliable way of measurement with very little interfacing work involved.
We will also make a Fritzing hook-up guide as soon as we can, but it is pretty straight-forward to connect this board to an Arduino, with all the code and libraries provided.