A fuel level sensor is used in all automobiles to indicate fuel level. Various methods are used to measure fuel level such as resistive film, discrete resistors, capacitive, and ultrasonic. Resistive-based sensors are most commonly used for this application. These sensors are mechanically connected to a float which moves up or down depending on the fuel level. As the float moves, the resistance of the sensor changes.
Sensor is Connected to Arduino Analog Pin A0 with 1K Pull Up Resistor.