Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • 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
    Arduino-based optical proximity sensor using IR LEDs

  • How to create a constant current source using LM338

  • 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 Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

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

  • High Side current sensing
  • The comparison of different Tcl script checkers
  • Voltage mode pushpull is a nonsense SMPS?
  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • How to simulate power electronics converter in PSpice?

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • 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
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • 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
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe