You are on page 1of 60

Chapter No Content Page No

1.0 1.1Synopsis 1
1.2 Organization Profiles

2.0 System Analysis 7


2.1Existing system
2.2Proposed system
2.3Project description

3.0 System Configuration 15

4.0 System Design 17


4.1Software description
4.2Domain introduction
4.3Diagrams

5.0 Design 42
5.1Frontend design
5.2Backend design

6.0 Sample Coding 53

7.0 Testing 72

8.0 Conclusion 76

9.0 Future Enhancement 78

10.0 References 80
CHAPTER 1
SYNOPSIS
For past few years, there have been several an accident of children falling into an
abandon bore-well which is left uncovered and get trapped. These bore-wells in turn have
many innocent lives. In addition to this an ultrasonic sensor. In order to determine the
feasibility of the system a prototype was designed and fabricated. The prototype consists
of all mechanical and electronics set up as discussed above but in miniature version. The
prototype has a control module which consists of LCD display, motor driver IC,
Nodemcu inbuilt micro controller with wi-fi module, control switches, buttons and power
supply unit. Present scenario there have been several incidents reported on abandoned
bore-wells which are turning in to death wells. Many innocent children are being trapped
into these borewells and losing their lives. The actual purpose of bore-wells is to save
lives, but these bore-wells in turn have started taking many innocent lives. Usually these
rescue operations are very lengthy, complicated and very time taking processes. This
paper presents a simple and effective method to rescue the child from the bore-well. This
is the main electronic unit which controls and co-ordinates the whole systems operation.
The project is intended to reduce the risk involved during the child rescues operation by
analyzing the simulation. Water scarcity is a major problem faced by human society
currently. After drying the bore wells people are not closing them. There is a risk Water
scarcity is a major problem faced by human society currently. After drying the bore wells
people are not closing them. There is a risk that children or animals fall down into the
bore well. The depth and the diameter of the bore-well is the main obstacle to rescue the
child safely. As mall delay in rescue system will take the life of the child or permanent
physically handicap. To solve this problem, we have designed our project “CHILD
RESCUE SYSTEM IN OPEN BOREWELL”. This project saves the child’s life before it
reaches the depth of the borewell. To construct this project, we have used Nodemcu
inbuilt microcontroller with wi-fi module, board IR Sensor etc
1.2 ORGANIZATION PROFILES

ABOUT SCION RESEARCH & DEVELOPMENT


Founded in Feb2009, Scion Research & Development is one of the leaders in
advanced technique computer training programmes. Scion Research & Development
Courses covers A to Z in all areas of software, hardware & networking and multimedia.
The courses are designed to keep pace with the changing needs and times. Scion Research
& Development and generates software and hardware professionals. Students have been
given fantabulous computer training and they become extremely computer Savvy and
expertly handle the IT capabilities in their respective fields.
Scion Research & Development courses enable the students to prepare for the
coveted worldwide certifications. Theoretical teaching is reinforced with practical
training again and again. Guest lectures by experts from the group and outside are
periodically arranged for 100% industry exposure.
We do have a R&D group to discover and create new knowledge about scientific
and technological topics for the purpose of uncovering and enabling development of
valuable new products, processes, and services.
MISSION
Our mission is to delight our customers by providing excellence in IT services,
vales and results. This is achieved by building a world class and competitive team with
challenging, rewarding and growth oriented work. Our values include integrity, respect
for the individual, open and honest communication, partnering, innovation and
excellence.
VISION
Scion wish to become a company of world class employees, world class
customers and a desire to be the world leader in offshore consulting services. At scion, we
help turn ideas into reality. Scion stands out by virtue of building our success around one
customer at a time.
SCION OFFERS
 Assistance for Research Scholar
 Assistance for UG/ PG Students Project
 Journal Publications Support
 Corporate Training for Software
 On-Campus Training
 Placement Assistance
 In-plant Training & Industrial Visit
 Soft Skill Development
 Website Creation
DISCIPLINE IS ONE OF THE TOPMOST PRIORITIES IN TRAINING
The student trainee will keep regular attendance; the student will show honesty,
punctuality, courtesy, a cooperative attitude, proper health and grooming habits, good
dress, and a willingness to learn. Students must wearing ID card.
BENEFITS FOR STUDENTS
Providing jobs to campus graduates and professionals .We have partnership with
many marquees IT companies who have signed with us to hire trained talent force. Career
counselling which will help graduates to chose a career which promises growth &
stability.
CHAIRMAN'S MESSAGE
As founder and Chairman of Scion, I want to assure you that we will do
everything in our power to conduct ourselves in a professional manner and be highly
competitive and diligent in providing outstanding service to you in a timely, cost-
effective and quality manner.
We stand behind our contractual commitments to our clients and we will work
diligently to earn your trust and respect and deliver business and IT results with
excellence.
EXCELLENT CORPORATE TRAINING FACULTIES
We have training faculty with good communication skills and sound technical
knowledge. We are team professional, experienced, certified software trainers from a
myriad of industries. Because we came from the trenches and have worked with software
for many versions, we provide real life, practical knowledge to users of all levels. A
natural extension of training, we provide guidance in streamlining processes to save time
and money and eliminate redundancy
CORPORATE TRAINING FOR SOFTWARE
To provide training in software at par with corporate. Scion Research &
Development training covers A to Z in all areas of Software, Hardware & Networking
and Multimedia. The Courses are designed to keep pace with the changing needs and
times. Scion Research &Development and generates software and hardware
professionals.

ADMINISTRATION OFFICE
OFFICE ADDRESS:
No.17/595, 1st Floor Mannar Sarefoji Nagar 2nd Street,Opp.New Bus Stand,
Thanjavur-5.
CONTACT: 04362-228899, 9597754496.
E-MAIL: scionrd2009@gmail.com.
CHAPTER 2
SYSTEM ANALYSIS
2.1EXISTING SYSTEM
Water scarcity is a major problem faced by human society currently. After drying
the bore wells people are not closing them. There is a risk Water scarcity is a major
problem faced by human society currently. After drying the bore wells people are not
closing them. There is a risk that children or animals fall down into the bore well. The
depth and the diameter of the bore-well is the main obstacle to rescue the child safely. As
mall delay in rescue system will take the life of the child or permanent physically
handicap.

Disadvantages

1. There have been several an accident of children falling into an abandon bore-well
which is left uncovered and get trapped.
2. These bore-wells in turn have many innocent lives.
2.2 PROPOSED SYSTEM
In such accidents normal rescue operations are very complicated because the
process is time consuming, requires huge man-power etc. The aim of this project is to
provide a better and reliable solution for this problem. This rescue system uses the high-
tech electronics automatic system the block diagram of the hardware set up. Here IR1
infrared sensor is placed near to the open bore well. IR2 and IR3 infrared sensors are
connected inside the bore-well. If any movement is detected near to the bore well it will
detect by the IR1 sensor and send information to the Arduino Uno controller. Controller
will send the alert message through GSM module to the authorized person and display the
same message on the LCD display. Here only we can save the life of the victim before
falling down into the bore-well. Then also if child felled down into the bore-well then IR2
and IR3 sensor will sense the motion in-side the bore well and activate the dc motor
driver. It gives long alarm. This DC motor driver controlling the two motors namely M1
and M2. M1 motor is used to rotate the vertical plate into the horizontal position to catch
the child. And stop child further going into the dept. Motor M2 is used to pull up the
rotated plate along with the child. After successfully saving the child reset button is
provided to bring the system into the original position. This system requires the 5-volt AC
voltage supply. That we are proving with the help of adaptor which converts 230-volt AC
supply into the 5-volt DC voltage.

Advantages

1. Our application the aim of this project is to provide a better and reliable solution
for this problem. This rescue system uses the high-tech electronics automatic
system the block diagram of the hardware set up.
2. As the application will be released in Android Market the scope will extend to
users worldwide.
2.3 PROJECT DESCRIPTION

MICROCONTROLLER

It has 14 digital input/output pins .The Arduino Uno R3 can be used as PWM
outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack,
an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a AC-
to-DC adapter or battery to get started.

IR SENSOR
An infrared sensor is an electronic device that emits in order to sense some
aspects of the surroundings. An IR sensor can measure the heat of an object as well as
detects the motion. These types of sensors measure only infrared radiation, rather than
emitting it that is called a passive IR sensor.

POWER
The Arduino Uno can be powered via the USB connection or with an external
power supply. The power source is selected automatically. External (non-USB) power
can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be
connected by plugging a 2.1mm centre-positive plug into the board's power jack. Leads
from a battery can be inserted in the ground and Vin pin headers of the POWER
connector. The board can operate on an external supply of 6 to 20 volts. If supplied with
less than 7V, however, the 5V pin may supply less than five volts and the board may be
unstable. If using more than 12V, the voltage regulator may overheat and damage the
board. The recommended range is 7 to 12 volts.

RELAY
Relays are electrically operated switches. They are used to control a circuit by a
separate low-power signal or to control several circuits with one signal. The three main
types of relays are electromechanical, solid-state, and reed. This overload protection relay
reacts to overheating. A relay allows circuits to be switched by electrical equipment: for
example, a timer circuit with a relay could switch power at a present time.

IOT MODULE

An IOT MODULE is a small electronic device embedded in objects, machines, and a


thing connected to wireless networks and sends and receives data.

SERVO MOTOR
A servo motor is a rotary actuator that allows for precise control of angular position. It
consists of a motor coupled to a sensor for position feedback
CHAPTER 3
SYSTEM CONFIGURATION

Hardware Requirements

Hard disk : 1 TB
RAM : 4 GB
Processor : Core i3
Monitor : 15’’Color Monitor
Microcontroller.
Infrared Sensor.
Buzzer.
CHAPTER 4
SYSTEM DESIGN

4.1SOFTWARE DESCRIPTION
Micro-Controller.
 ESP32 is a low-power, and highly integrated microcontroller that is widely used
in the Internet of Things (IoT) applications.
 It is based on the Xtensa LX6 processor, which is a dual-core 32-bit
microcontroller with integrated Wi-Fi and Bluetooth connectivity.
 The ESP32 features a wide range of peripherals such as GPIO, ADC, DAC, I2C,
SPI, UART, and more, which makes it highly versatile for a wide range of
applications.
 It also supports various development platforms such as Arduino, MicroPython,
and ESP-IDF, making it easy for developers to get started with the platform.
Infrared Sensor.
 An infrared sensor is a type of electronic device that is designed to detect infrared
radiation, which is a type of electromagnetic radiation that has a longer
wavelength than visible light.
 Infrared radiation is emitted by all objects that have a temperature above absolute
zero, so infrared sensors can be used to detect the presence of objects based on
their temperature.
 Infrared sensors typically consist of a detector that is sensitive to infrared
radiation and a circuit that processes the signal from the detector.
 The detector may be made of materials such as pyroelectric crystals, thermopiles,
or bolometers, which all respond to changes in temperature caused by infrared
radiation.
 When the detector senses infrared radiation, it generates an electrical signal that is
proportional to the temperature of the object emitting the radiation.
4.2 DOMAIN INTRODUCTION
Internet of Things
Since the coining of the term in 1999, the internet of things (IoT) has transformed
from a mere vision to a palpable reality. This can be attributed to the extensive use of the
Internet Protocol (IP), the rise of ubiquitous computing, and the continued advancement
of data analytics, among other drivers of development. By 2020, it is estimated that there
will be 20.4 billion devices connected to the IoT. Despite its continuing expansion,
however, the IoT remains to some degree an obscure concept, something that’s often
referred to in abstract terms even as it provides manifest benefits.

The IoT can be described as an extension of the internet and other network
connections to different sensors and devices or “things” affording even simple objects,
such as light bulbs, locks, and vents, a higher degree of computing and analytical
capabilities.

Interoperability is one of the key aspects of the IoT that contribute to its growing
popularity. Connected or “smart” devices as “things” in the IoT are often called have the
ability to gather and share data from their environments with other devices and networks.
Through the analysis and processing of the data, devices can perform their functions with
little or no need for human interaction.

Given the ever-increasing number of connected devices, the IoT continues its path of
evolution, adding different layers to the data that is already being shared and processed,
and giving rise to sophisticated algorithms that result in improved levels of automation.
And because of the variety of “things” that can be connected to it, the IoT has enabled
diverse applications for individual users and entire industries alike.
4.3 DIAGRAMS

Block Diagram

Input

Infrared Sensor 1 Infrared Sensor 2

Micro controller Micro controller


Micro
controller
Infrared Sensor 3
Infrared Sensor 4
Micro controller
Micro controller

Output

Buzzer

Micro
controller
Data Flow Diagram
A data-flow diagram (DFD) is a way of representing a flow of a data of
a process or a system. The DFD also provides information about the outputs and inputs of
each entity and the process itself. A data-flow diagram has no control flow; there are no
decision rules and no loops. Specific operations based on the data can be represented by
a flowchart.
Use Case Diagram
A use case diagram is a graphic depiction of the interaction among the elements of a
system. A Use case diagram is methodology used in system analysis to identify, clarify,
and organize system requirements .the actor, usually individuals involved with system
defined according to their roles.
Class Diagram
Class diagram is the type of static structure diagram that describe the structure of a
system by showing the systems classes, their attributes operations or methods under
relationship among the objects.
Activity Diagram
Activity diagram is another important diagram in UML to describe the dynamic
aspects of the system. Activity diagram is basically a flowchart to represent the flow from
one activity to another activity. The activity can be described as an operation of the
system. The control flow is drawn from one operation to another. This flow can be
sequential, branched, or concurrent. Activity diagrams deal with all type of flow control
by using different elements such as fork, join, etc.
E-R Diagram
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how
“entities” such as people, objects or concepts relate to each other within a system. ER
Diagrams are most often used to design or debug relational databases in the fields of
software engineering, business information systems, education and research.
CHAPTER 5
DESIGN
5.1 FRONTEND DESIGN
CHAPTER 6
SAMPLE CODING

#include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);
voidhandleRoot() {

String s = MAIN_page; //Read HTML contents

server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

{
Serial.begin(115200);

Serial.println();

Serial.println("Booting Sketch...");

WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

}
void loop()

server.handleClient();

IR_1_read = digitalRead(IR_1);

IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(


<!DOCTYPE html>

<html>

<style>

.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>


</div>

<script>

setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>
</html>

)=====";

include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);
voidhandleRoot() {

String s = MAIN_page; //Read HTML contents

server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

Serial.begin(115200);
Serial.println();

Serial.println("Booting Sketch...");

WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

void loop()

{
server.handleClient();

IR_1_read = digitalRead(IR_1);

IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(

<!DOCTYPE html>

<html>
<style>

.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>

</div>

<script>
setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>

</html>

)=====";
include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);

voidhandleRoot() {

String s = MAIN_page; //Read HTML contents


server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

Serial.begin(115200);

Serial.println();

Serial.println("Booting Sketch...");
WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

void loop()

server.handleClient();

IR_1_read = digitalRead(IR_1);
IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(

<!DOCTYPE html>

<html>

<style>
.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>

</div>

<script>
setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>
</html>

)=====";

#include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);
voidhandleRoot() {

String s = MAIN_page; //Read HTML contents

server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

{
Serial.begin(115200);

Serial.println();

Serial.println("Booting Sketch...");

WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

}
void loop()

server.handleClient();

IR_1_read = digitalRead(IR_1);

IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(


<!DOCTYPE html>

<html>

<style>

.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>


</div>

<script>

setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>
</html>

)=====";

include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);
voidhandleRoot() {

String s = MAIN_page; //Read HTML contents

server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

Serial.begin(115200);
Serial.println();

Serial.println("Booting Sketch...");

WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

void loop()

{
server.handleClient();

IR_1_read = digitalRead(IR_1);

IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(

<!DOCTYPE html>

<html>
<style>

.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>

</div>

<script>
setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>

</html>

)=====";
include <WiFi.h> ///// webserver with ajax

#include <WiFiClient.h>

#include <WebServer.h>

#include "index.h"

#define IR_1 16

#define IR_2 17

#define IR_3 18

#define IR_4 19

#define BUZ 4

int IR_1_read,IR_2_read,IR_3_read,IR_4_read;

WebServer server (80);

const char* ssid = "IR SENSOR"; // Enter SSID here

const char* password = "12345678"; //Enter Password here

/* Put IP Address details */

IPAddresslocal_ip(192,168,43,1);

IPAddressgateway(192,168,43,1);

IPAddresssubnet(255,255,255,0);

voidhandleRoot() {

String s = MAIN_page; //Read HTML contents


server.send(200, "text/html", s); //Send web page

voidhandleADC() {

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

String adcValue = String(" Warning.! Move Away...! ");

server.send(200,"text/plane",adcValue);

else

String adcValue = String("No Detection..");

server.send(200,"text/plane",adcValue);

void setup()

Serial.begin(115200);

Serial.println();

Serial.println("Booting Sketch...");
WiFi.mode(WIFI_AP);

WiFi.softAPConfig(local_ip, gateway, subnet);

WiFi.softAP(ssid, password);

Serial.println(WiFi.softAPIP());

delay(100);

server.on("/", handleRoot);

server.on("/readADC",handleADC);

server.begin();

Serial.println("HTTP server started");

pinMode(IR_1,INPUT);

pinMode(IR_2,INPUT);

pinMode(IR_3,INPUT);

pinMode(IR_4,INPUT);

pinMode(BUZ, OUTPUT);

void loop()

server.handleClient();

IR_1_read = digitalRead(IR_1);
IR_2_read = digitalRead(IR_2);

IR_3_read = digitalRead(IR_3);

IR_4_read = digitalRead(IR_4);

Serial.println(IR_4_read);

if(IR_1_read == 0 || IR_2_read == 0 || IR_3_read == 0 || IR_4_read == 0)

digitalWrite(BUZ,HIGH);

else

digitalWrite(BUZ,LOW);

HTML Code

const char MAIN_page[] PROGMEM = R"=====(

<!DOCTYPE html>

<html>

<style>
.card{

max-width: 400px;

min-height: 250px;

background: #02b875;

padding: 30px;

box-sizing: border-box;

color: #FFF;

margin:20px;

box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);

</style>

<body>

<div class="card">

<h2>Information</h2><br>

<h1>Object Detected :<span id="ADCValue">0</span></h1><br>

<br><a href="https://www.armadai.net/">Armada Industrial Automation</a>

</div>

<script>
setInterval(function() {

// Call a function repetatively with 2 Second interval

getData();

}, 2000); //2000mSeconds update rate

functiongetData() {

varxhttp = new XMLHttpRequest();

xhttp.onreadystatechange = function() {

if (this.readyState == 4 &&this.status == 200) {

document.getElementById("ADCValue").innerHTML =

this.responseText;

};

xhttp.open("GET", "readADC", true);

xhttp.send();

</script>

</body>

</html>

)=====";
CHAPTER 7
TESTING

SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a specific
testing requirement.

TYPES OF TESTS:

Testing is the process of trying to discover every conceivable fault or weakness in


a work product. The different type of testing is given below:

UNIT TESTING:

Unit testing involves the design of test cases that validate that the internal program
logic is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit
before integration.

This is a structural testing, that relies on knowledge of its construction and is invasive.
Unit tests perform basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique path of a
business process performs accurately to the documented specifications and contains
clearly defined inputs and expected results.

INTEGRATION TESTING:

Integration tests are designed to test integrated software components to determine


if they actually run as one program. Testing is event driven and is more concerned with
the basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically
aimed at exposing the problems that arise from the combination of components.

FUNCTIONAL TEST:

Functional tests provide systematic demonstrations that functions tested are available
as specified by the business and technical requirements, system documentation, and user
manuals.

Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be rejected.

Functions : identified functions must be exercised.

Output : identified classes of application outputs must be


exercised.

Systems/ Procedures: interfacing systems or procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify
Business process flows; data fields, predefined processes, and successive processes must
be considered for testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.

PERFORMANCE TESTING:

System testing ensures that the entire integrated software system meets requirements.
It tests a configuration to ensure known and predictable results. An example of system
testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration
points.

WHITE BOX TESTING:


White Box Testing is a testing in which in which the software tester has knowledge
of the inner workings, structure and language of the software, or at least its purpose. It is
purpose. It is used to test areas that cannot be reached from a black box level.

BLACK BOX TESTING:

Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of
tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in
which the software under test is treated, as a black box .you cannot “see” into it. The test
provides inputs and responds to outputs without considering how the software works.

ACCEPTANCE TESTING:

User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.

Test Results: All the test cases mentioned above passed successfully. No defects
encountered
CHAPTER 8
CONCLUSION

The controller setup connected to the bore well detected the test object (stuff doll)
felt into the bore well and message is sent using the IOT to the number which is given in
the code. The location and depth of the test object data is sent in the message. By using
the pickup arm the test object (stuff doll) is taken out from the bore well safely. Thus, we
can implement this system in intelligent way for future use.

CHAPTER 9
FUTURE ENHANCEMENT
In future the work of instant messaging and further module development can be
done which will make our project fully automated and also more reliable software for the
event should be provided. Near future, will be given permission to access, like and
comment on it for better conduction of fest next year.
CHAPTER 10
REFERENCES

[1] K Poornisha , M R Keerthana , S. Sumathi, “Bore well water quality and motor
monitoring based on IoT gateway”, IEE International Conference On Communication,
Computing And Internet Of Things (Ic3iot) 2018.
[2] Ayob Johari, Mohd Helmy, “Tank water level monitoring using GSM network”,
Faculty of electrical and electronics engineering, (IJCSIT), Vol. 2 (3), 2011.
[3] Made Saraswati, Endrowednes Kuantama, Pono Mardjoko,”Design and Construction
of Water Level Measurement System Accessible Through SMS”, Department of
Electrical Engineering Universitas Pelita Harapan Tangerang, Indonesia, 2012.
[4] Usama Abdullah, Ayesha Ali (2014). GSM Based Water level and Temperature
Monitoring System. International Journal of Recent Development in Engineering and
Technology. Volume 3, Issue 2, August 2014.
[5] Asaad Ahmed Mohammedahmed Eltaieb, Zhang Jian Min, “Automatic Water Level
Control System”, International Journal of Science and Research (IJSR)2013
[6] Nivit Yadav, “CPCB Real Time Water Quality Monitoring", port: Centre for Science
and Environment, 2013.
[7] Atzori, L., Iera, A., and Morabito G.; “The internet of things: A survey.”; Computer
networks, 2010 54(15), 2787-2805
[8] Mandula, K., Parupalli, R., Murty, C. A., Magesh, E., and Lunagariya, R.; “Mobile
based home automation using Internet of Things (IoT).” International IEEE Conference
on Control, Instrumentation, Communication and Computational Technologies
(ICCICCT), December 2015, pp. 340-343.

You might also like