• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

  • 1000+ Circuits
  • Privacy Policy
  • About Us
  • Contact
  • Disclaimer
  • Videos – Circuit Test Results
You are here: Home / Arduino Engineering Projects / Ultrasonic Fuel Level Indicator Circuit

Ultrasonic Fuel Level Indicator Circuit

Last Updated on November 7, 2019 by Swagatam 11 Comments

An electronic device or circuit which detects and indicates the various fuel levels in a fuel tank without a physical contact, through ultrasonic waves, is called an ultrasonic fuel level sensor

In this post we learn how to build a simple fuel tank level indicator circuit using Arduino and ultrasonic sensors.

In every vehicle the fuel tank is probably the most important part of the entire system, since the vehicle's operation critically depends on the presence of the tank fuel.

This also means that monitoring the fuel level in the tank becomes an essential factor for the owner or the driver of the vehicle.

Although, most vehicles are already equipped with an advanced digital fuel sensor indicator device, building your own circuit can be a lot of fun and satisfaction.

Warning: This project is only for experimental purpose. It must be done under expert supervision, if actual fuel is used for the tank fluid.

In this article we will learn how to build an LED based fuel indicator circuit using GSM wireless ultrasonic sensors and Arduino.

Ultrasonic Fuel Sensor Transmitter

To build the transmitter circuit, you will need the following modules:

  1. Arduino NANO - 1no
  2. Ultrasonic sensor module HC-SR04 - 1no
  3. nRF24L01 wireless Tx/Rx module - 1no

After programming the Arduino, the modules will have to wired as shown in the following diagram:

Fuel sensor, level indicator transmitter circuit Arduino

The white table at the top left shows how the pinouts of the nRF24L01 module needs to be connected with the Arduino board.

How it Works

As we can see, there are a pair of ultrasonic sensors in the module. One senor sends the ultrasonic frequency or the wave towards the fuel surface. The waves collide with the fuel surface and reflect back towards the module. The reflected ultrasonic waves are captured by the second sensor unit, and sent to the Arduino.

The Arduino compares the reflected ultrasonic time with the reference time of the tank "full height" and creates an estimation of the instantaneous height or the level of the fuel.

The information is then encoded and forwarded it to the nRF24L01 wireless module. The nRF24L01 module finally converts the code into RF signal and transmits it into the atmosphere for the receiver unit to capture the signal.

How to Mount the Sensors

Once assembled, the ultrasonic sensor will need to be installed on the fuel tank in the following manner:

The ultrasonic sensor will need to be installed by inserting the sensing heads through perfectly dimensioned holes, and sealed with appropriate sealing agent.

We can see the tank is specified with two measures, one is the full height, and the other is the maximum or the optimal fuel height inside the tank.

You will have to note these two measures as these will be required to be entered in the program code for the Arduino.

Ultrasonic Fuel Sensor Receiver

For making the fuel sensor receiver you will require the following materials:

  1. Arduino NANO - 1no
  2. Ultrasonic sensor module HC-SR04 - 1no
  3. nRF24L01 wireless Tx/Rx module - 1no
  4. LEDs as shown in the following diagram - 4nos
  5. Piezo buzzer - 1no
  6. 330 Ohm 1/4 watt resistors - 4nos

Circuit Diagram

After programming the various modules may be connected in the following manner:

fuel sensor receiver circuit using Arduino

Here, the nRF24L01 wireless works like a receiver. The antenna captures the RF content transmitted by the transmitter circuit, and sends it to the Arduino. As per the program code, the Arduino analyzes the varying ultrasonic time, and translates it into an incrementing digital output.

This digital output which corresponds with the instantaneous height or the level of the fuel is fed into an LED array. The LEDs in the array respond and illuminate sequentially enabling a direct visual indication of the fuel level to the owner.

The green LEDs indicate a healthy condition of the fuel content. The yellow LED indicates that the vehicle needs a refueling quickly, while the red LED indicates a critical situation, regarding the fuel about to finish. The buzzer now starts buzzing creating the necessary warning alarm.

Program Code

The complete program code for the transmitter and the receiver can be found in the following link:

https://github.com/Swagatam1975/Arduino-Code-for-Fuel-Sensor

You'll need to Change the two example values in the code with the values that you measured for your fuel tank:

// ------- CHANGE THIS -------//
float water_hold_capacity = 1.0; // Enter in Meters.
float full_height = 1.3; // Enter in Meters.
// ---------- -------------- //




Previous: Digital-to-Analog (DAC), Analog-to-Digital (ADC) Converters Explained
Next: How Transformers Work

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

You'll also like:

  • 1.  Vehicle Speed Detector Circuit for Traffic Police
  • 2.  Automatic Vehicle Headlight Dipper/Dimmer Circuit
  • 3.  How to Make Dog Barking Preventer Circuit using High Frequency Deterance
  • 4.  Simple Ignition Code Lock Circuit for Automobile Protection
  • 5.  Monitoring State of a Switch (Digital Read Serial) – Arduino Basics
  • 6.  LED “Halogen” Lamp Circuit for Motorbike Headlamp

Please Subscribe (Only if you are Genuinely Interested in our Newsletters)


 

Reader Interactions

Comments

    Your Comments are too Valuable! But please see that they are related to the above article, and are not off-topic! Cancel reply

    Your email address will not be published. Required fields are marked *

  1. Search Related Posts for Commenting

  2. Beardly says

    Hello Sir,
    I’m very happy to find your website, it is a fantastic cache of information and is great for novices as well as more experienced technicians. I have some background in electronics, but it has been a long time since I’ve really used it, and I could use some help.
    My inquiry is about the Ultrasonic Fuel Level Gauge, and I have a slight twist on the concept. I have a transceiver, DS1603L V1.0, that operates at 2Mhz, and it is capable of measuring the fluid level from below, affixed to the bottom of a metal fuel tank, with a detection range of a meter or so. It has a uart serial output, and I need to convert it to an analog voltage output for a standard 12v fuel gauge on my motorcycle. I bought it from Ebay, but they’re available on Amazon or AliExpress also.
    An Arduino should be perfect for this, but I have no experience with these yet. Would you be interested in a little experiment and showing us how this might be done?

    Reply
    • Swagatam says

      Thank you Beardly, unfortunately I too do not have an expertise in the field of Arduino, so I won’t be able to provide any help in this particular subject, although I wish I could!

      Reply
  3. Russell says

    Is there some form of signal smoothing, to try and eliminate signal variations due to fuel sloshing in the tank?

    Reply
    • Swagatam says

      I don’t think that would affect the reading, because Arduino being a digital device will respond ony to the genuine peaks of the signal, and reject the lower undefined ones.

      Still you can try connecting a 1uF capacitor across the ECHO pin and the ground pin.

      Reply
  4. Stephen Buadee says

    I really appreciate your invention, but instead of the led indicators as the output signal can’t you upgrade it and use 16 x 2 LCD screen

    Reply
    • Swagatam says

      You can upgrade it by reading the instructions as given in the following article:

      https://www.homemade-circuits.com/learning-basic-arduino-programming-tutorial-for-the-newcomers/

      Reply
  5. Larry Douglas (KC7JJ) says

    Thank you for the Arduino code. I purchased a few of the ultrasonic modules to play with but haven’t had time until now (just retired) to work with them. You’ve given me a ‘kickstart’ and I appreciate it.

    Reply
    • Swagatam says

      That sounds great, Glad I could help, keep up the good work!!

      Reply
  6. Aravind says

    Hi,
    Tahnks for the project.
    Can you share the pcb design file for this project?

    Reply
    • Swagatam says

      Hi, thanks, there’s no PCB for this project, because all the parts are in the form of modules, which needs to be joined with the wires.

      Reply
      • Ron says

        Sir what will be the design if i simply want the circuit to measure a liquid volume using an ultrasonic sensor? I don’t have to use LED or buzzer and just a dc power supply? Hope you can help me. Thanks alot

        Reply


  7. COMMENT BOX IS MOVED AT THE TOP


Primary Sidebar

Electronic Projects Categories

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (51)
  • 4060 IC Circuits (25)
  • 555 IC Circuits (92)
  • 741 IC Circuits (18)
  • Amplifiers (48)
  • Arduino Engineering Projects (82)
  • Audio Projects (83)
  • Battery Chargers (75)
  • Car and Motorcycle (87)
  • Datasheets (44)
  • Decorative Lighting (Diwali, Christmas) (31)
  • DIY LED Projects (81)
  • Electronic Components (96)
  • Electronic Devices and Circuit Theory (34)
  • Electronics Tutorial (99)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Games (2)
  • GSM Projects (9)
  • Health Related (16)
  • Heater Controllers (23)
  • Home Electrical Circuits (98)
  • Incubator Related (6)
  • Industrial Electronics (25)
  • Infrared (IR) (39)
  • Inverter Circuits (93)
  • Laser Projects (10)
  • LM317/LM338 (21)
  • LM3915 IC (24)
  • Meters and Testers (52)
  • Mini Projects (152)
  • Motor Controller (64)
  • MPPT (7)
  • Oscillator Circuits (12)
  • PIR (Passive Infrared) (8)
  • Power Electronics (32)
  • Power Supply Circuits (64)
  • Radio Circuits (9)
  • Remote Control (46)
  • Security and Alarm (54)
  • Sensors and Detectors (114)
  • SG3525 IC (4)
  • Simple Circuits (72)
  • SMPS (30)
  • Solar Controllers (60)
  • Timer and Delay Relay (51)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (36)
  • Ultrasonic Projects (12)
  • Water Level Controller (45)

Follow Homemade Circuits

Facebook
Twitter
YouTube
Instagram
My Facebook-Page
Quora

Feeds

Post RSS
Comment RSS

Circuit Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2021 · Swagatam Innovations

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok