This liquid level sensor measures the capacitance of the liquid between two electrodes and gives an indication of liquid level inside a bottle. Capacitance is measured by charging the capacitor and measuring the time needed to discharge via a known resistor. The brain of the sensor is an Arduino board.
A capacitive liquid sponsor relies on the fact the the capacitance or charge between 2 metal plates will change (in this case increase) depending on what material is between them. This allows us to create a level sensor that is save for use with any liquid, this one will be used in a buggy with gasoline
Building a Capacitive Liquid Sensor - [Link]