Exercise 4 Water Level Monitoring System
Exercise 4 Water Level Monitoring System
Introduction:
Inefficient water usage due to overflowing tanks is a common issue, leading to significant water
waste. While mechanical solutions like ball valves address this problem, they offer limited functionality.
This project delves into a more sophisticated approach: an electronic water level indicator utilizing an
Arduino and ultrasonic sensor. This system boasts several advantages over traditional methods.
Unlike ball valves, the Arduino allows for customizable alerts. We can program the system to
trigger alarms at specific water levels, not just when the tank is completely full. This flexibility is
particularly valuable for tanks with designated fill zones or where precise water level control is crucial.
Additionally, the code can be adapted to track water level data over time. By monitoring these trends, we
can gain valuable insights into water usage patterns within a household or facility. This information can
be used to identify areas for water conservation and implement targeted strategies to reduce waste.
Furthermore, the system can be enhanced with an LCD screen connected to the Arduino. This
visual display provides real-time water level readings, offering a convenient and informative way to
monitor tank status. This project not only explores the feasibility of an electronic water level indicator but
also aims to demonstrate the benefits of using electronics for water conservation and monitoring. By
leveraging the power of Arduino and sensors, we can create a smarter and more efficient system to manage
our water resources.
Objectives:
• Design and construct an electronic water level indicator using an Arduino and sensors to monitor
water levels and promote water conservation.
• Develop programming skills for Arduino to create customizable water level alerts and explore
the functionalities of ultrasonic sensors for real-time water level measurement.
• Troubleshoot potential issues with the electronic water level indicator, such as inaccurate sensor
readings or malfunctioning alarms, to ensure system reliability.
Equipment Required:
Servo Motor
Power supply
Level sensors
Procedures:
1. Set up the Proteus simulation environment by launching the software and creating a new project.
2. Drag and drop the required components onto the workspace, including Arduino Uno, diode,
transistor, relay, motor, and LCD display. Create water tank level sensor using logic toggle.
3. Connect the components according to the schematic diagram provided in the project
specifications, ensuring proper wiring and connections.
4. Write the Arduino code to implement the functionality of the door locking system, including
motor control, LCD display interaction, and error handling.
5. Configure the Arduino IDE settings to compile the code for the Arduino Uno board.
6. Compile the Arduino code to check for any syntax errors or compilation issues.
7. Generate the HEX file from the compiled code by selecting the appropriate option in the Arduino
IDE.
8. Upload the generated HEX file to the Arduino Uno board using the Proteus software, ensuring
proper configuration of the upload settings.
9. Set the simulation parameters in Proteus, such as simulation duration and sampling rate, to match
the desired testing conditions.
10. Run the simulation to verify the functionality of the water tank level monitoring system,
observing the behavior of the sensors, motor, and LCD display.
11. Test various scenarios, including sensor functions, and error handling, to evaluate the system's
performance and reliability.
12. Analyze the simulation results and make any necessary adjustments to the circuit design or
Arduino code to optimize system functionality.
13. Document the simulation setup, including circuit diagram, Arduino code, simulation parameters,
and observations, in a comprehensive report for future reference.
#include <LiquidCrystal.h>
int i, j, k, l;
void setup() {
lcd.begin(16, 2);
pinMode(lowTank, INPUT);
pinMode(quTank, INPUT);
pinMode(halfTank, INPUT);
pinMode(fullTank, INPUT);
pinMode(motor, OUTPUT);
void loop() {
i = digitalRead(fullTank);
j = digitalRead(halfTank);
k = digitalRead(quTank);
l = digitalRead(lowTank);
lcd.setCursor(0, 0);
lcd.print(char(219));
lcd.print(char(219));
lcd.print(char(219));
lcd.print(char(219));
lcd.print(' ');
lcd.setCursor(5, 0);
lcd.setCursor(0, 1);
digitalWrite(motor, LOW);
lcd.setCursor(0, 0);
lcd.print(char(219));
lcd.print(char(219));
lcd.print(char(219));
lcd.print(char(219));
lcd.print('_');
lcd.print(' ');
lcd.setCursor(5, 0);
lcd.setCursor(0, 1);
lcd.print("MOTOR is OFF ");
digitalWrite(motor, LOW);
lcd.setCursor(0, 0);
lcd.print(char(219));
lcd.print(char(219));
lcd.print('_');
lcd.print('_');
lcd.print(' ');
lcd.setCursor(5, 0);
lcd.setCursor(0, 1);
lcd.print("MOTOR is ON ");
digitalWrite(motor, HIGH);
lcd.setCursor(0, 0);
lcd.print(char(219));
lcd.print('_');
lcd.print('_');
lcd.print('_');
lcd.print(' ');
lcd.setCursor(5, 0);
lcd.setCursor(0, 1);
lcd.print("MOTOR is ON ");
digitalWrite(motor, HIGH);
lcd.setCursor(0, 0);
lcd.print('_');
lcd.print('_');
lcd.print('_');
lcd.print('_');
lcd.print(' ');
lcd.setCursor(5, 0);
lcd.setCursor(0, 1);
lcd.print("MOTOR is ON ");
digitalWrite(motor, HIGH);
else {
digitalWrite(motor, LOW);
lcd.setCursor(0, 0);
lcd.print("Sensor Fail!");
lcd.setCursor(0, 1);
}
Simulation Environment:
Conclusion:
Questions to answer:
1. How can an electronic water level indicator constructed with an Arduino and ultrasonic sensor
contribute to water conservation efforts?
2. What functionalities of the Arduino IDE and ultrasonic sensor will be utilized to program
customizable water level alerts and measure water level in real-time?
3. When troubleshooting the water level indicator, what are some potential causes of inaccurate
sensor readings and how can they be rectified? (
4. Beyond the functionalities explored in this lab, what additional features could be implemented in
the water level indicator using Arduino's capabilities?
5. How can the data acquisition and display capabilities of the system be further improved to
provide more comprehensive water level monitoring?
References: