Skill Lab Report
Skill Lab Report
BANGALORE –560060
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
2 1JS23CS050 Dhanya R V
3 1JS23CS051 Dhruvi V
5 1JS23CS053 Ganavi M C
6 1JS23CS054 Ganesh C
7 1JS23CS055 Gnanashree B U
9 1JS23CS057 H Shravani
10 1JS23CS058 Halaswamy S B
13 1JS23CS061 Harshitha S
14 1JS23CS062 Hongiran D
15 1JS23CS063 Hruthick M
16 1JS23CS064 Impana P
SUBMITTED TO:
DR.ABHILASHA SINGH
DEPARTMENT OF PHYSICS FACULTY SIGNATURE
JSSATE BANGALORE-560060
• These sensors enable the system to gather precise data essential for effective decision-
making and control. By processing information from the sensors, the Arduino
microcontroller executes algorithms and user-defined commands to regulate pumps, valves,
and other devices.
• This automation ensures that water distribution, usage, and treatment are maintained at
optimal levels, enhancing efficiency and resource conservation.
➢ BLOCK DIAGRAM
Ultrasonic sensor
(sensor)
Arduino Pump
(Actuator)
I2c
Display
➢ HARDWARE COMPONENTS
• Arduino Uno: This will serve as the main microcontroller that processes data from the
sensors and controls the output devices.
• Lcd display: This shows the digital representation of the level of water present in the tank
• I2C module: Using an I2C module with a water meter project can simplify connections and
improve the efficiency of communication between the microcontroller and the display or
sensor.
• Ultrasonic sensor: Using an ultrasonic sensor for a water meter involves measuring the
water level in a tank or pipe to calculate the volume or flow rate .
• Led Lights: These are the lights which indicate the level of water present in the tank.
• Buzzer: This is used when the red light is turned on it gives a warning.
• Connecting Wires: wires are used for making electrical connections, and connecting wires
are used to connect components on a breadboard or directly to the Arduino.
Components Needed:
• Arduino board(e.g., Arduino Uno)
• Ultrasonic distance sensor (e.g., HC-SR04)
• Wires
• Breadboard
• Optional: LCD display (e.g., 16x2 LCD)
Circuit Setup:
long duration;
int distance;
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
Serial.println(" cm");
delay(1000);
}
```
Department Of Computer Science and Engineering Page 7
2. Convert Distance Measurements to Water Level:
▪ Calculate the water level based on the tank dimensions. For example, if the sensor is
mounted at the top of the tank, subtract the distance measured from the total height of
the tank to get the water level.
```cpp
constinttankHeight = 100; // Height of the tank in cm
void loop() {
// Existing distance measurement code...
delay(1000);
}
```
3. Display Readings on Serial Monitor or LCD:
▪ If using an LCD, include the necessary library and add code to display the readings on
the LCD.
```cpp
#include <LiquidCrystal.h>
void setup() {
// Existing setup code...
lcd.begin(16, 2);
lcd.print("Water Level:");
}
lcd.setCursor(0, 1);
lcd.print(waterLevel);
lcd.print(" cm");
delay(1000);
}
Testing:
2. Test on Breadboard:
▪ Connect all components on a breadboard as per the circuit setup.
▪ Power the Arduino and check the serial monitor or LCD for the water level readings.
This setup will allow you to monitor the water level in a tank using an ultrasonic sensor
and display the results on either a serial monitor or an optional LCD display.
Hardware Placement:
1. Sensor Placement:
▪ Mount the ultrasonic distance sensor at the top inside of the tank, ensuring it has a clear,un
obstructed view of the water
▪ The sensor should be positioned perpendicular to the water surface for accurate readings.
Power Supply:
Calibration:
2. Calibration Offsets:
▪ Measure the actual water level at known distances and compare with sensor readings.
▪ Adjust the code to account for any discrepancies (e.g., add an offset value).
Final Checks:
1. Verification:
▪ Fill the tank to various levels and verify that the readings on the serial monitor or LCD
display are accurate.
▪ Record the actual water levels and compare them with the sensor readings.
2. Address Issues:
▪ Check for any issues such as sensor drift, interference, or incorrect readings.
▪ Ensure the sensor is stable and not affected by vibrations or other external factors.
1. Regular Checks:
▪ Periodically check the system to ensure it is functioning correctly.
▪ Verify that the readings remain accurate over time.
2. Maintenance:
▪ Clean the sensor and ensure it remains free of debris and obstructions.
▪ Inspect connections and the Arduino setup for any signs of wear or damage.
3. Addressing Problems:
▪ If you notice inaccuracies or other issues, troubleshoot by checking connections,
recalibrating, and adjusting the code as needed.
▪ Regularly update the firmware and software to maintain optimal performance.
By following these steps, you can ensure a reliable and accurate water level monitoring system
using an Arduino and an ultrasonic sensor. Regular maintenance and monitoring will help keep the
system running smoothly and accurately over time.
➢ System Working
➢ Ultrasonic sensor sends sound waves into the water tank. Sensor detects the reflection of
sound waves (ECHO).
➢ Trigger the ultrasonic sensor module to transmit signal using Arduino. Wait for the ECHO
signal. Arduino reads the time between triggering and receiving the ECHO.
➢ Use the formula: Distance = (travel time / 2) * speed of sound. Speed of sound is
approximately 340 m/s.
➢ Water Level Calculation : Measure the distance from the sensor to the water surface.
Calculate the total length of the water tank. Subtract the measured distance from the total
length of the tank to get the water level.
➢ Percentage Calculation: Convert the water level distance into a percentage of the total tank
length.
• Consistent water pressure: Water level controllers can ensure consistent water pressure in
buildings by regulating the water level in the tanks or reservoirs.
• Save energy: Water level controllers can save energy by automatically switching off the
motor when the tank is full.
• Water conservation: These devices can prevent water waste by detecting leaks and
switching off the motor when the tank is full.
• Fuel tank level gauging: Water level controllers can be used to gauge the level of fuel in
tanks.
• Pool water level control: These devices can be used to regulate the water level in pools.
• Sewage pump level control: Water level controllers can be used to regulate the level of
sewage in pumps.
➢ Advantages:
• Cost-Effective: Arduino boards and sensors are relatively inexpensive, making it affordable
for small-scale and personal projects.
• Ease of Use: Arduino’s user-friendly platform is ideal for beginners. It has a
straightforward programming environment and a wide range of community support and
tutorials.
• Low Power Consumption: Arduino boards consume low power, making them suitable for
battery-powered or solar-powered projects in remote areas.
• Integration with Other Systems: Arduino can easily interface with other systems and
components, such as GSM modules for SMS alerts, Wi-Fi modules for cloud connectivity,
or relays for controlling external devices.
• Educational Value: Arduino projects serve as an excellent learning tool for understanding
electronics, programming, and system design, making them valuable in educational
settings.
➢ Disadvantages:
• Memory Constraints: With a limited amount of RAM and flash memory, storing large
amounts of data or running complex algorithms on an Arduino can be challenging.
• Limited Connectivity Options: Basic Arduino boards do not have built-in networking
capabilities (e.g., Wi-Fi or Ethernet), making remote monitoring and control more
complicated without additional modules or shields.
• Scalability Issues: Scaling an Arduino-based system for larger or multiple water tanks can
be cumbersome and might require significant reprogramming or additional hardware.
• Maintenance and Durability: DIY setups with Arduino may lack the robustness and
durability required for long-term operation in harsh environments, potentially leading to
more frequent maintenance.
• Reliability: A water level controller may not always function correctly, particularly if it is
not properly installed or maintained
• Initial cost: A water level controller can be expensive to install, particularly if it requires
specialized equipment or installation.
• Future developments are poised to further enhance sensor accuracy, aiming for even more
reliable data collection.
• This evolution promises to empower users with actionable information, fostering more
sustainable and efficient water usage practices on a broader scale.
• https://circuitdigest.com/microcontroller-projects/interfacing-water-level-sensor-with-
arduino#:~:text=Working%20of%20the%20Arduino%20Water%20Level%20Sensor&t
ext=At%20first%2C%20you%20can%20see,LED%20glows%20at%20full%20brightne
ss.
• https://circuitdigest.com/microcontroller-projects/interfacing-water-level-sensor-with-
arduino#:~:text=Working%20of%20the%20Arduino%20Water%20Level%20Sensor&t
ext=At%20first%2C%20you%20can%20see,LED%20glows%20at%20full%20brightne
ss.
• https://projecthub.arduino.cc/Manusha_Ramanayake/wireless-water-tank-level-meter-
with-alarm-ce92f6
• https://robocraze.com/blogs/post/arduino-based-water-level-monitoring
• https://www.instructables.com/Water-Level-Indicator-Using-Arduino-1/