Mini Project
Mini Project
PROJECT REPORT
Submitted by
BABU SHANKAR.S
RAVI KUAMR.P
SHYAM KUMAR.S
DHAKSHINAMOORTHI.E
1 ABSTRACT 04
2 OBJECTIVES 04
3 INTRODUCTION 04
4 BLOCK DIAGRAM 05
5 CIRUIT DIAGRAM 05
6 HARDWARE IMAGE 06
7 SOFTWARE OUTPUT 08
9 REFERENCE 10
1. ABSTRACT:
In this Arduino based automatic water level controller project we are
going to measure the water level by using ultrasonic sensors. Basic
principal of ultrasonic distance measurement is based on ECHO. When
sound waves are transmitted in environment then they return back to
the origin as ECHO after striking on any obstacle. So we have to only
calculate its traveling time of both sounds means outgoing time and
returning time to origin after striking on any obstacle. And after some
calculation we can get a result that is the distance. This concept is used
in our water controller project where the water motor pump is
automatically turned on when water level in the tank becomes low. You
can also check this simple water level indicator circuit for a simpler
version of this project.
2. OBJECTIVES:
• The main motive of this project is to save water and electricity.
• This project can be connected in real life starter and control a motor.
3. INTRODUCTION
5. CIRCUIT DIAGRAM
➢ The uses of a water level indicator include the real time
applications:
home,
• Fuel tank level gauging.
Fig 6.2
7. SOFTWARE OUTPUT
// //
// Arduino Ultrasoninc Sensor HC-SR04
// Re-writed by Arbi Abdul Jabbaar
// Using Arduino IDE 1.8.7
// Using HC-SR04 Module
// Tested on 17 September 2019
// //
// defines variables
long duration; // variable for the duration of
sound wave travel int distance; // variable for
the distance measurement
void setup() {
pinMode(trigPin, OUTPUT); // Sets the trigPin
as an OUTPUT pinMode(echoPin, INPUT); //
Sets the echoPin as an INPUT
Serial.begin(9600); // // Serial Communication is starting with
9600 of baudrate speed Serial.println("Ultrasonic Sensor HC-
SR04 Test"); // print some text in Serial Monitor
Serial.println("with Arduino UNO R3");
}
void loop() {
// Clears the trigPin
condition
digitalWrite(trigPin,
LOW);
delayMicroseconds(2);
// Sets the trigPin HIGH (ACTIVE) for 10
microseconds digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel
time in microseconds duration = pulseIn(echoPin,
HIGH);
// Calculating the distance
distance = duration * 0.034 / 2; // Speed of sound wave divided by 2 (go
and back)
// Displays the distance on the
Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
}
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel
time in microseconds duration = pulseIn(echoPin,
HIGH);
// Calculating the distance
distance = duration * 0.034 / 2; // Speed of sound wave divided by 2 (go
and back)
// Displays the distance on the
Serial Monitor
Serial.print("Distance: ");
Serial.print(distance);
Serial.println(" cm");
}
TRUTH TABLE FOR RELAY OPERATION
• In this case, some people may forget to switch on and switch off the
motor properly.