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

Skill Lab Report

Uploaded by

Impana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Skill Lab Report

Uploaded by

Impana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

JSS ACADEMY OF TECHNICAL EDUCATION

BANGALORE –560060
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SUBJECT : APPLIED PHYSICS FOR CSE STREAM

SUBJECT CODE : BPHYS202

REPORT ON TOPIC: ARDUINO BASED WATER LEVEL CONTROLLER


SLNO USN NAME SIGNATURE
1 1JS23CS049 Dhanvanth S Gurukar

2 1JS23CS050 Dhanya R V

3 1JS23CS051 Dhruvi V

4 1JS23CS052 Gagan Surendra S

5 1JS23CS053 Ganavi M C

6 1JS23CS054 Ganesh C

7 1JS23CS055 Gnanashree B U

8 1JS23CS056 Gowda Adya T

9 1JS23CS057 H Shravani

10 1JS23CS058 Halaswamy S B

11 1JS23CS059 Harsh Srivastava

12 1JS23CS060 Harshika Sumagna R Y

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

Department Of Computer Science and Engineering Page1


Contents:
1. Introduction
2. Block diagram
3. Flowchart
4. Hardware components
5. Arduino code
6. Prototyping and installation
7. System working
8. Applications
9. Advantages & Disadvantages
10. Conclusion

Department Of Computer Science and Engineering Page 2


➢ INTRODUCTION

• An Arduino-based water controller is a sophisticated microcontroller system designed for


automating and optimizing water management processes.

• It integrates various sensors to continuously monitor critical parameters such as water


levels, flow rates, and water quality in real-time.

• 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.

• The controller's capability to respond dynamically to changing conditions helps prevent


wastage and ensures reliable water supply in applications ranging from agriculture and
aquaculture to industrial and residential settings.

• Overall, an Arduino-based water controller represents a cost-effective and versatile solution


for managing water resources sustainably and efficiently.

➢ BLOCK DIAGRAM

Department Of Computer Science and Engineering Page 3


⮚ FLOWCHART

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.

Department Of Computer Science and Engineering Page 4


Department Of Computer Science and Engineering Page 5
➢ Prototyping: Water Level Monitoring System Using 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:

1. Ultrasonic Sensor Connections:


▪ Connect the VCC pin of the HC-SR04 to the 5V pin on the Arduino.
▪ Connect the GND pin of the HC-SR04 to the GND pin on the Arduino.
▪ Connect the Trig pin of the HC-SR04 to a digital pin on the Arduino (e.g., D2).
▪ Connect the Echo pin of the HC-SR04 to another digital pin on the Arduino (e.g., D3).

Department Of Computer Science and Engineering Page 6


2. Optional LCD Display Connections:
▪ Connect the VSS pin of the LCD to GND on the Arduino.
▪ Connect the VDD pin of the LCD to 5V on the Arduino.
▪ Connect the RS, E, and D4-D7 pins of the LCD to appropriate digital pins on the
Arduino as per your specific LCD module's wiring requirements.
▪ Use a potentiometer to adjust the contrast of the LCD if necessary.
Programming:
1. Arduino Code to Read Sensor Data:
```cpp
constinttrigPin = 2; // Pin for Trig
constintechoPin = 3; // Pin for Echo

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);

duration = pulseIn(echoPin, HIGH);


distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.print(distance);

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...

intwaterLevel = tankHeight - distance;

Serial.print("Water Level: ");


Serial.print(waterLevel);
Serial.println(" cm");

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>

constintrs = 7, en = 8, d4 = 9, d5 = 10, d6 = 11, d7 = 12;


LiquidCrystallcd(rs, en, d4, d5, d6, d7);

void setup() {
// Existing setup code...
lcd.begin(16, 2);
lcd.print("Water Level:");
}

Department Of Computer Science and Engineering Page 8


void loop() {
// Existing distance and water level calculation code...

lcd.setCursor(0, 1);
lcd.print(waterLevel);
lcd.print(" cm");

delay(1000);
}

Testing:

1. Upload Code to Arduino:


▪ Use the Arduino IDE to upload the code to the Arduino board.

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.

3. Ensure Accurate Distance-to-Level Conversion:


▪ Verify the readings by comparing them with actual measurements of the water level.
▪ Adjust the code or sensor placement if necessary to improve accuracy.

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.

➢ Installation Guide for Water Level Monitoring System

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.

Department Of Computer Science and Engineering Page 9


2. Arduino Placement:
▪ Place the Arduino board near the tank but in a location where it is protected from water and
moisture.
▪ Use a waterproof enclosure if necessary to protect the Arduino and other electronics.

Power Supply:

1. Connect Power Supply:


▪ Use a stable power source, such as a wall adapter, to power the Arduino.
▪ Ensure the power source provides the correct voltage and current as specified for your
Arduino model.

Calibration:

1. Fine-Tune the Code:


▪ Adjust the code to account for any specific characteristics of your tank and sensor setup.
▪ Test and modify the distance-to-water level conversion calculations to ensure accuracy.

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.

Department Of Computer Science and Engineering Page 10


Monitoring and Maintenance:

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.

➢ Display the water level percentage on the LCD.

Department Of Computer Science and Engineering Page 11


➢ Applications:

• 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.

• Irrigation systems: These devices can be used to automate irrigation systems.

• 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.

Department Of Computer Science and Engineering Page 12


• Ease Installation With LED Monitoring: These new solid-state electronics and
integrated electronics offer superior performance, hassle-free installation, and lower cost to
operate over time when compared to the lifespan of the original design. For continuous
monitoring, the integrated firmware and digital dry-contact circuitry easily and quickly
connect to the automation systems of a building. Each function of the integrated electronics
and relays use LED lights to offer operators the ability to visually scan them in order to
verify proper operations.

➢ 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.

• Programming Complexity for Beginners: While Arduino's programming environment is


user-friendly, beginners may still find it challenging to write and debug complex code or
handle specific hardware interactions properly.

• 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.

Department Of Computer Science and Engineering Page 13


➢ Conclusion:

• Arduino-based water meters represent a transformative advancement in water usage


monitoring, enabling both individuals and businesses to comprehensively track their water
consumption patterns.

• These devices leverage innovative sensor technologies to ensure precise measurement


accuracy, which is crucial for effective resource management.

• Future developments are poised to further enhance sensor accuracy, aiming for even more
reliable data collection.

• Moreover, integration with smart home ecosystems is expected to expand, facilitating


seamless connectivity and control. Advanced data analytics will play a pivotal role,
offering personalized insights and recommendations for optimizing water management
strategies tailored to specific needs.

• This evolution promises to empower users with actionable information, fostering more
sustainable and efficient water usage practices on a broader scale.

Department Of Computer Science and Engineering Page 14


➢ Reference:

• 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/

Department Of Computer Science and Engineering Page 15

You might also like