Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to design a multi-use level indicator using Arduino

By Ashutosh Bhatt December 17, 2023

In this mini do-it-yourself (DIY) electronic project, we’ll design a multi-use level indicator that can measure multiple physical parameters like temperature, water, voltage, humidity, distance, and more. It consists of a bar-graph LED display that presents the measurements.

Four main types of sensors are used to measure the different physical parameters, including the following

  • LM35 – senses ambient room temperature
  • HC SR04 (UDM) – measures the distance of an object
  • Soil moisture sensor – senses the soil moisture level
  • Potentiometer (POT) – senses input analog voltage level
  • The bar-graph LED display – indicates the different physical parameter levels as follows:
    – Temperature : 0 – 100° C
    – Analog voltage : 0 – 5 V
    – Distance of an object : 0 – 100 cm
    – Soil moisture : 0 – 100%

Two additional LEDs indicate the maximum and minimum values of physical measurements. These LEDs blink when a sensor value reaches its maximum or minimum limit. A buzzer also beeps when the maximum or sensor values are achieved.

The bar-graph LED displays the level of any one physical parameter at a time and can be selected by using the push button. A user can choose any sensor by pressing the push button, and the sensor will display its current value on the bar-graph LED.

This device uses simple components, including the LEDs, a bar graph, a push button, a buzzer, sensors, and an Arduino NANO board. Check out the block diagram below to view the setup.

Components required
Aside from an Arduino NANO board, here’s what you’ll need to build this project:

LM35: a temperature sensor that measures the ambient room temperature and gives an analog voltage output. This semiconductor-type sensor is based on the thermocouple principle. It provides a calibrated output of 10 mV /o C, measuring the temperature from 0 – 100° C, with an output of 0 – 1 V.  

POT (potentiometer): a variable resistor that provides the Arduino board with the analog voltage (of 0 to 5 V) as input.

HC SR04 (ultrasonic distance measurement – UDM): measures the distance between any two objects and generates a pulse-width modulation (PWM) output. The width of the output pulse is proportional to the object’s distance.

Soil moisture sensor: measures the moisture level of the soil. The conductivity varies as per the soil moisture level. This sensor provides a 0 to 5V output as the resistance (conductivity) changes. When the soil is completely dry, the sensor’s resistance is at max, and the output is 5V. When the soil is completely wet, the sensor’s resistance is extremely low, and the output is 0 V.

LED indications: indicate the maximum or minimum level of any sensor value, such as the temperature, soil moisture, etc. The LEDs also indicate which sensor level is currently displayed on the bar graph. 

Push button: used to select any one sensor at a time. There are four in total. The level measured is then displayed on the LED bar graph.  

Buzzer: generates a beeping sound when any sensor level reaches its minimum/maximum value.

 LED bar graph: an eight-LED bar graph used to indicate the level (from 10 – 90) of the selected sensor (or parameter) like temperature, distance, soil moisture, etc.

Arduino board: the main building block and CPU of the system. Arduino performs the following tasks:

  1. Reads or senses temperature, soil moisture, distance, etc., from the sensors 
  2. Gives different indications on LEDs, like the maximum and minimum sensor levels reached
  3. Generates a beeping sound from the buzzer
  4. Displays the different sensor levels on the LED bar graph
  5. Reads the user input from the push button to select the correct sensor

Circuit diagram

Circuit description:
The circuit is built using an Arduino NANO board, an eight LED bar-graph display, the LM35 temperature sensor, an HC SR-04 ultrasonic distance measurement (UDM) sensor, a soil moisture sensor, a few LEDs, one buzzer, and one push button.

The LED bar graph:

  1. There are eight LEDs in it. All the cathode terminals are shorted together and connected to the ground.
  2. Eight anode terminals are connected with Arduino NANO’s digital pins D2 – D9.

The LED indicators:

  1. There are six LEDs. Their cathodes are connected to the ground.
  2. Max_LED (RED) is used to indicate the maximum value of the sensor, and it’s connected to digital pin D10.
  3. MIN_LED (BLUE) is used to indicate the minimum value of the sensor, and it’s connected to digital pin D11.
  4. Temp_LED (YELLOW) indicates the temperature level displayed on the bar graph. It’s connected to pin A0 (digital pin 14).
  5. Dist_LED (YELLOW) indicates distance is indicated on the bar graph. It’s connected to pin A1 (digital pin 15).
  6. SEN_LED (YELLOW) indicates the potentiometer level shown on the bar graph. It’s connected to pin A2 (digital pin 16).
  7. Soil_most_LED (YELLOW) indicates the soil moisture level as indicated on the bar graph. It’s connected to pin A3 (digital pin 17).

Buzzer: generates a beeping sound when the sensor’s level has reached the minimum or maximum. It’s connected to digital pin D12. 

Push button: used to select different sensors, and is connected to digital pin D13.

LM35 temperature sensor: has three pins: (1) Vcc (2) GND (3) Op. The Vcc pin is connected to 5 V, and the GND pin is connected to the ground. The Op pin is connected to the analog input pin A7. 

Soil moisture sensor: has three pins: (1) Vcc (2) GND (3) Op. The Vcc pin is connected to 5 V, and the GND pin is connected to the ground. The Op pin is connected to the analog input pin A5. 

Potentiometer: has three terminals. Two end terminals are connected to 5 V and the ground. The center terminal is connected to the analog input pin A6. 

HC SR04 UDM: has four pins: (1) Vcc (2) GND (3) Trig (4) Echo. The Vcc pin is connected to 5 V, and the GND pin is connected to the ground. The Trig and Echo pins are connected with the digital pins D1 and D0, respectively.

Circuit operation:
There are four sensors used in this circuit. Their levels are indicated on the bar graph based on the user’s selection, which is conducted by pressing a push button. The sensors can be selected cyclically, as per Table I. 

Table 1

Potentiometer (POT): provides the analog voltage (0 to 5 V) as an input to pin A6. This analog voltage is then converted into a digital value of 0 to 1023 by Arduino. This range is further converted into 0 to 100 and displayed on the bar graph as per Table 2.

Table 2

LM35 temperature sensor: measures the temperature between 0 – 100° C and provides the analog output of 0 to 1V. It has a 10 mV/° C resolution. The analog voltage of 0 – 1V is given to input pin A7. Arduino converts this analog voltage input into a digital value in the range of 0 – 100, which is displayed on the LED bar graph (as per Table 2).

Soil moisture sensor: measures the moisture level in the soil and provides the analog voltage 0 – 5 V as output. The output is 5 V when the soil is fully dry, and 0 V when the soil is completely wet. This analog voltage output is given to input pin A5, which is converted into a digital value of 0 to 1023 by Arduino. This range is further converted into 0 to 100 and displayed on the LED bar graph (as per Table 2).

HC SR-04 UDM: measures the distance of any object in front of it, generating a PWM output on the Echo pin. Arduino measures the width of this output pulse from the Echo pin and calculates the object’s distance in centimeters. The distance of the object (between 0 – 100 cm) is displayed on the LED bar graph.

When any sensor value reaches above 90, the MAX_LED starts blinking and the buzzer beeps. Similarly, when any sensor value is less than 10, the MIN_LED starts blinking and  the buzzer beeps.

The user can select the:

  1. Temperature level
  2. Soil moisture level
  3. Object distance
  4. Potentiometer level

By pressing the push button, that sensor’s level is displayed on the LED bar graph. It’s also possible to connect with any other analog or digital sensor (like DHT, DS18B20) and its level will be displayed. That is why this device is truly a multipurpose level indicator.

 

 

You may also like:


  • Forest fire detection system using IoT sensor network
  • IR LEDs
    Sensor 3: Arduino-based optical proximity sensor using IR LEDs

  • Tutorial 10 : How to create a constant current source…

  • How to measure current using Arduino and ACS712 current sensor

  • Arduino-based altitude meter using BMP180 sensor

Filed Under: Arduino Projects, Electronic Projects
Tagged With: Arduino, arduinonano, circuitdiagram, LM235, potentiometer, sensors, ultrasonicsensor
 

Next Article

← Previous Article
Next Article →

Comments

  1. [email protected] says

    April 8, 2025 at 7:21 am

    How can i get this project Code ?

    Log in to Reply

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • CST Studio Suite 2021 – New Project Window Shows Black Screen
  • Introduction to the Principle of Human Detection by Millimeter-Wave Radar Modules
  • Biasing an AC signal
  • SiC FET turn-off in 2000W PFC
  • Why SG3525 + TL431 + PC817 feedback is not working on ±35 V push-pull SMPS?

RSS Electro-Tech-Online.com Discussions

  • restarting this Christmas project
  • desoldering
  • Unknown, to me, electric motor fitting
  • Can a small solar panel safely trickle-charge old NiMH AA batteries?
  • KiCad custom symbol definition correct approach

Featured Tutorials

Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
    Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
    Practical application of hardware filters with real-life examples
  • A filter design example
    A filter design example
  • Types of filter responses
    Types of filter responses
  • What are the two types of hardware filters?
    What are the two types of hardware filters?
  • What are hardware filters and their types?
    What are hardware filters and their types?
More Tutorials >

Recent Articles

  • Taiwan Semiconductor adds 24-V automotive TVS devices
  • ST e-fuse controller enables fast, flexible automotive power protection
  • Posifa sensors improve low-flow accuracy in compact systems
  • Acopian releases low-profile power supplies rated to 900 W
  • Octavo Systems OSDZU-3 REF Development Platform

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe