0% found this document useful (0 votes)
53 views

Measure Fuel Level With Arduino: Instructables

This instructable describes how to measure fuel level with an Arduino by using a magnetic float sensor and mapping the sensor readings. The sensor uses variable resistors to indicate different fuel levels, and an Arduino applies voltage to read the resistance values. A program maps the sensor readings between minimum and maximum values to indicate fuel level as a percentage. While this avoids issues with potentiometers in fuel tanks, the magnetic sensor still produces current so there is a fire risk when used with flammable fuels.

Uploaded by

Habtamu Worku
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Measure Fuel Level With Arduino: Instructables

This instructable describes how to measure fuel level with an Arduino by using a magnetic float sensor and mapping the sensor readings. The sensor uses variable resistors to indicate different fuel levels, and an Arduino applies voltage to read the resistance values. A program maps the sensor readings between minimum and maximum values to indicate fuel level as a percentage. While this avoids issues with potentiometers in fuel tanks, the magnetic sensor still produces current so there is a fire risk when used with flammable fuels.

Uploaded by

Habtamu Worku
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

instructables

Measure Fuel Level With Arduino

by jmorles

The sensing unit usually uses a float connected to a would allow the driver to run out of fuel with no prior
potentiometer, typically printed ink design in a notification). Corrosion or wear of the potentiometer
modern automobile. As the tank empties, the float will provide erroneous readings of fuel level.
drops and slides a moving contact along the resistor, However, this system has a potential risk associated
increasing its resistance.[2] In addition, when the with it. An electric current is sent through the variable
resistance is at a certain point, it will also turn on a resistor to which a float is connected, so that the
"low fuel" light on some vehicles. value of resistance depends on the fuel level. In most
automotive fuel gauges such resistors are on the
Meanwhile, the indicator unit (usually mounted on the inward side of the gauge, i.e., inside the fuel tank.
dashboard) is measuring and displaying the amount Sending current through such a resistor has a fire
of electric current flowing through the sending unit. hazard and an explosion risk associated with it.
When the tank level is high and maximum current is These resistance sensors are also showing an
flowing, the needle points to "F" indicating a full tank. increased failure rate with the incremental additions
When the tank is empty and the least current is of alcohol in automotive gasoline fuel. Alcohol
flowing, the needle points to "E" indicating an empty increases the corrosion rate at the potentiometer, as it
tank. is capable of carrying current like water.
Potentiometer applications for alcohol fuel use a
The digital fuel gauge in a 2012 Hyundai Elantra pulse-and-hold methodology, with a periodic signal
showing a full tank along with a distance to empty being sent to determine fuel level decreasing the
display. corrosion potential. Therefore, demand for another
safer, non-contact method for fuel level is desired.
The system can be fail-safe. If an electrical fault
opens, the electrical circuit causes the indicator to Wikypedia
show the tank as being empty (theoretically provoking
the driver to refill the tank) rather than full (which

Measure Fuel Level With Arduino: Page 1


https://youtu.be/9kooBWako9I

Step 1: Theory

There are two thing you must understatnd:

Magnetic switch:

This sensor have many diferent values resistors (Low level 240 ohm High level 30 ohm), that conmutes to "GND"
(Not necessarily).

Ohms law:

if we can apply a fixed voltage and a fixed resistor we can apply the Ohms law.

and measure the voltage in any given level, so we transfom digital commuting analogic.

Measure Fuel Level With Arduino: Page 2


Measure Fuel Level With Arduino: Page 3
Step 2: Schematics-materials

-Arduino Nano

-Oled Display

-Breadboard

-Level Sensor

-2 2.2K resistors

-2 100ohm resistors

https://tuppens.com/kus-wema-fuel-water-tank-level...

Measure Fuel Level With Arduino: Page 4


Step 3: Program

The program basicaly takes a measured value from 0-1023

we first take notice what value we get at the low level and the high level

i got

min = 295

max = 785

then map it from 0 to 100

Like this.

TankValue0 = map(sensorTankValue0, 295, 785, 0, 100);

Download
https://www.instructables.com/ORIG/FCO/R1PM/JBQUKVSA/FCOR1PMJBQUKVSA.rar

Measure Fuel Level With Arduino: Page 5


Step 4: Test

How about the flammable fuels? if the sensors produce heat/current it would make fire isn't it?

Can’t download the code on my ipad. Do you know why?

thank you

Measure Fuel Level With Arduino: Page 6

You might also like