Liquid level measurement using capacitive sensor
Capacitive liquid level sensors work by measuring capacitance of the probe which is immersed into the liquid or even placed around the tank (which in that case must be non-metallic). Depending on amount of liquid between probe electrodes, the resulting capacitance will be different which can be detected by electronics and used to calculate level or volume of liquid inside a tank.
This project is based on Arduino board and the probe is made with kitchen aluminium foil which is in this case wrapped around a plastic bottle. It uses CapSense library which needs just one resistor and two microcontroller pins. After calibrating and taking measurement, the resulting value is calculated to either height or volume of liquid.
[ Source: Vadim S ]