This sensor is particularly suitable for use in small spaces, such as the petrol tank of a motorbike. It has the advantage of not having any moving parts, unlike a conventional sensor with a float and float arm that make it difficult to fit in a tank.
The sensor circuit is made from standard, inexpensive components and can be put together for little money.
The operating principle is based on measuring the forward voltages of t wo identical diodes (check this first by measuring them). The forward voltage of a diode decreases with increasing junction temperature. If a resistor is placed close to one of the two diodes, it will be heated slightly if it extends above the surface of the petrol. For best results,the other diode (used for reference) should be located at the same level. If the diodes are covered by the petrol in the tank, the heating resistor will not have any effect because it will be cooled by the petrol. An opamp compares the voltage across the two diodes, with a slightly smaller current passing through the reference diode. When the petrol level drops, the output of the opamp goes high and the output transistor switches on. This causes a sense resistor to be connected in parallel with the sensor output. Several sensor circuits can be used together, each with its own switched sense resistor connected in parallel with the output, and the resulting output signal can be used to drive a meter or the like.
Using this approach, the author built a petrol tank ‘sensor strip’ tank consisting of five PCBs, each fitted with two sensor circuits. With this sensor strip installed at an angle in the tank, a resolution of approximately 1.5 litre per sensor is possible. Many tanks have an electrical fitting near the bottom for connection to a lamp on the instrument panel that indicates the reserve level. The sensor strip can be used in its place.
You will have to experiment a bit with the values of the sense resistors, but do not use values lower than around 100 Ω. It is also important to fit the diodes and heater resistor in a little tube with a small opening at the bottom so that splashing petrol does not cool the heater resistor since this would result in false readings.
The circuit should be powered from a regulated supply voltage of 5 to 6 V to prevent the heating resistors from becoming too hot. After testing everything to be sure that it works properly, it’s a good idea to coat the circuit board with epoxy glue to provide better protection against the petrol.
Tip: you can use the well-known LM3914 to build a LED display with ten LEDs, which can serve as a level indicator. Several examples of suitable circuits can be found in back issues of Elektor.
Note: this sensor circuit is not suitable for use in conductive liquids.