Water Usage Monitoring & Leakage Prevention Report Using Automated Control PDF
Water Usage Monitoring & Leakage Prevention Report Using Automated Control PDF
ON
SUBMITTED BY,
Mr. CHAITANYAKUMAR CHANDRASEN GADHAVE (B120452514)
Mr. SUMIT NAMDEO GORE (B120452520)
IN PARTIAL FULFILMENT OF
B.E. (ELECTRICAL ENGINEERING)
SAVITRIBAI PHULE PUNE UNIVERSITY
CERTIFICATE
Is a bonafide work carried out by them under the supervision of Prof. Manoj R. Tarambale and
it is approved for the partial fulfilment of requirement of Savitribai Phule Pune University for
award of the degree of Bachelor of Engineering (Electrical Engineering).
This project report has not been earlier submitted to any other Institute or University for the
award of any degree or diploma.
Sponsorship
We had participated in Intel Higher Education Challenge 2017 and came 6th all India
for the Rapid Prototyping Camp Selection for which they had sponsored us the Intel
Edison Kit.
Participation
We participated in various events using the same project. They are as follows:
All the required documents of participation and sponsorship are attached herewith.
Sumit Gore <[email protected]>
Dear Student
We are very pleased to inform you that your IDEA has been selected for next round. Congratulations on getting shortlisted.
IDEA Name: Water Usage Monitoring & Leakage Preven on using Automated Water Control
Now as a next step we are sending you SparkFun Inventor's Kit for Intel Edison, you have to use the same and design your idea into a working prototype.You will have
to send the youtube video of the prototype to your mentor mentioned below by September 30 - 2017.
NOTE:
1. You can also collect Intel Edison kit from our Bengaluru office address mentioned below.If you want us to courier ,please send your shipping address
to [email protected] in below format.
Full Name:
IDEA Number:
College Name:
Project Name:
Address:
Pincode:
Mobile Number:
2. Make sure you have seen all our 16 webinar videos: https://goo.gl/aHIYTg
3. By October end we will conduct 3 days Rapid Prototyping Camp ( RPC) in Bengaluru and the selected teams will need to attend without fail.Many Intel senior
leaders, Senior Faculties, Investors, Mentors will attend this event. You can view our last year RPC pictures at : https://goo.gl/6CT1Ym
4. Until RPC, you will get mentored by our mentor through email/phone or also you can meet them at our Bengaluru office in person.All the travel cost has to be borne by
project members.
5. All of the remaining components for the project have to be purchased by the project team members.
6.Kindly follow all our social media accounts for regular updates.The link is mentioned in my signature below.
7.You should provide weekly progress update of your prototype to the mentor without fail.
8. The events which will happen after RPC,will be informed during RPC for the selected teams only.
Krishna Kumar
Associate Director - Higher Education
| e: [email protected] | w: www.fice.in
Sumit Gore <[email protected]>
Dear Sir,
We are very glad to inform that your student team from your Institution has won a cash award of INR 5000 at the Rapid Prototyping Camp in the Intel Higher Education
Challenge 2017 on Cyber-Physical System held at SJB Institute of Technology, Bengaluru from Oct 25th to 27th 2017.
We truly appreciate your support to these students during their participation in this challenge.
Please find the student details mentioned below for your kind reference:
We wish the students all the best in their future endeavors.Kindly explore the images of the event, the winning designs from the competition at our twitter hashtag
#intelinnovationfestival.
Jonathan Rajiv
Assistant Program Manager - Higher
Education
| e: [email protected] | w: www.fice.in
ACKNOWLEDGEMENT
First and foremost, I thank the Almighty God for His guidance throughout my studies
in the Marathwada Mitra Mandal's College of Engineering, Pune from Savitribai Phule
Pune University (Formerly known as University of Pune) and the completion of this
project.
I also thank the Department of Electrical Engineering and my lecturers for instilling in
me the knowledge that has brought me this far.
Finally, I am grateful to all my classmates and friends who contributed to the success of
my studies in one way or another.
LIST OF FIGURES
FIGURE 17. FIGURE SHOWING CENTRAL HUB AND NODE ASSEMBLY. ..... 41
LIST OF TABLES
ACKNOWLEDGEMENT
ABSTRACT
CHAPTER 1 : INTRODUCTION............................................................................... 1
5.5 Terminal............................................................................................................. 38
Refrences ...................................................................................................................... 56
ABSTRACT
Water has become a major reason of concern due to scarcity of water resources and
increased population. Using water efficiently and properly can help reduce this problem.
Reducing leakages, unnecessary flow, closing taps properly will reduce water usage.
Working people neglect leakages, open taps leading unnecessary water wastage.
According to a report, Kolkata and Bangalore are known as India’s most water wasting
cities. Bangalore wastes nearly 50% of the water supplied to the city as studied from
different news reports.
Though India has made improvements over the past couple decades to both availability
and quality municipal water supplies, its large population has stressed planned water
resources. However India’s wet climate has helped somewhat to make water for
increasing Indian population. Regions having scarce rainfall has made the scenario
worse in such regions. People don’t even have access to basic drinking water.
Using smart automated system connected to cloud we can design a system with sensor
feedbacks and actuators to control this scenario. Such systems can be fitted in residential
as well as commercial complex. The system will consist of smart taps or smart end
points all connected a single hub through which all the data will be analyzed. The
sensors and actuators will be the part of the end point. All the end points will be
connected to the central huh through wireless technology like Wi-Fi or Zigbee(a new
type of Wi-Fi extension for node to node connectivity).
Organization of Report
The report is divided into various chapters to understand each aspect of the subject
technically and separately.
CHAPTER 1 : INTRODUCTION
Gives brief introduction of this project. This consist of introduction and scope of project,
objective of this project.
Gives brief review of the related Literature and present scenario of proposed system.
Describes briefly the idea we are trying to propose and gives an overview of the project.
This chapter mentions all the hardware and components we have used in the project with
detailed information of each.
This chapter includes all the software required to program the project in detail.
This chapter include all the software details and the program codes required for the
project.
Gives brief information about the costing, failure analysis and work progress of the
project.
We have briefly concluded the project and also given the future scope of the project.
Water Usage Monitoring and Leakage Prevention using IoT
Chapter 1 : Introduction
Extending the initial application scope, the IoT might also serve as backbone for
ubiquitous computing, enabling smart environments to recognize and identify objects,
and retrieve information from the Internet to facilitate their adaptive functionality.
Through the IoT, everyday objects (such as cars, refrigerators, umbrellas, etc. as well as
more advanced, computer and information services) will be able to interact and
communicate. Things do not have to be products of higher technology – any one of the
around 50,000 billion objects existing on earth can be introduced in the IoT.
Internet of Things represents a general concept for the ability of network devices to
sense and collect data from the world around us, and then share that data across the
Internet where it can be processed and utilized for various interesting purposes.
Some future consumer applications envisioned for IoT sound like science fiction, but
some of the more practical and realistic sounding possibilities for the technology
include:
• receiving warnings on your phone or wearable device when IoT networks detect
some physical danger is detected nearby
• self-parking automobiles
• automatic ordering of groceries and other home supplies
• automatic tracking of exercise habits and other day-to-day personal activity
including goal tracking and regular progress reports
• water and gas leakage detection
• smart locks for smart homes increasing home security with connected CCTV
surveillance
More than two billion people worldwide live in regions facing water scarcity and in
India this is a particularly acute crisis. Millions of Indians currently lack access to clean
drinking water, and the situation is only getting worse. India’s demand for water is
growing at an alarming rate. India currently has the world’s second largest population,
which is expected to overtake China’s by 2050 when it reaches a staggering 1.6 billion,
putting increasing strain on water resources as the number of people grows.
Since independence, India’s primary goals have been economic growth and food
security, completely disregarding water conservation. This has caused serious
ramifications being felt today, as many citizens still operate under these principles.
Unlike many other developing countries, especially those with acute water scarcity
issues such as China, Indian law has virtually no legislation on groundwater. Anyone
can extract water: homeowner, farmer or industry as long as the water lies underneath
their plot of land.
Average water consumption around the world is about 53 litres per head per day. India
expects to soon have only about 20 litres available per head per day. There has been
extensive droughts lasting a long time and now with global climate change, things will
become even more difficult. The glaciers are receding from the Himalayan Mountains.
They are about one fifth the size they were about 60 years ago.
1.2.2 Pollution
Given that India does not regulate water usage, it should come as no surprise that there
is also little regulation on pollution and even less enforcement of what regulations do
exist. A combination of sewage disposal, industrial effluents, chemicals from farm
runoffs, arsenic and fluoride has rendered India’s rivers unfit for drinking, irrigation,
and even industrial purposes.
Every river in India is polluted to some degree. The water quality in underground wells
violates the desired levels of dissolved oxygen and coliform, the presence of which is
one measure of filth, in addition to having high concentrations of toxic metals, fluoride,
and nitrates. India’s rivers also have high fluoride content, beyond the permissible limit.
The polluted water then seeps into the groundwater and contaminates agricultural
products when used for irrigation. Over 21% of transmissible diseases in India are
related to unsafe water. Millions of the poorest are affected by preventable diseases
caused by inadequate water supply and sanitation.
Looking at India’s Water Crisis it is clear that we have a shortage of water and millions
of people deprive od fresh water for regular household chores. We all know the major
draught that took place a couple of years ago in the district of Latur in Marathwada
province of Maharashtra and how it affected millions of people leaving in this district.
Water there was supplied by water tankers by both road and rail. In order to save water
our aim is to design a system for household works such that water is used efficiently and
we save lakhs of liters of water that is being wasted everyday due to open water taps
and leakages in pipes. Such a system will help improve water resource levels
significantly in a course of time. Hence we will be able to solve India’s water crisis
problems.
2. Literature review
Prevention of leakages. Even a small steady water leak can cause a loss of 226,800 liters!
A number of factors like climate, culture, food habits, work and working conditions,
level and type of development, and physiology determine the requirement of water. As
per the Bureau of Indian Standards, IS:1172-1993, a minimum water supply of 200 litres
per capita per day (lpcd) should be provided for domestic consumption in cities with full
flushing systems. IS:1172-1993 also mentions that the amount of water supply may be
reduced to 135 lpcd for the LIG and the economically weaker sections (EWS) of the
society and in small towns.
Understanding how consumers are responding to water availability will enable better
design of systems and result in efficient use of water. Our cities need to respond
urgently, says water activist S. Vishwanath
In India, the design of water supply systems has been done using certain standards.
Currently the standard being used is BIS 1172: 1993, reaffirmed in 1998. This specifies
a consideration of use of the following:
In its previous avatar there was also an attempt made in IS 1172 to understand the break-
up of this demand which was then put as 135 litres per person per day. The break-up
was as follows: Bathing: 55 litres; Toilet flushing: 30 litress; Washing of clothes: 20
litres; Washing the house: 10 litres; Washing utensils: 10 litres; Cooking: 5 litres;
Drinking: 5 litres.
Table 1. Domestic Water Consumption Per Household and Per Capita Per Day
While the consumption of water in India will increase by over 50%, the supply will
increase only by 5-10% during the next 12-15 years. This will lead to water scarcity
situation and most of the people, particularly those who are dependent on agriculture
and living in poverty will suffer the most. Water scarcity will affect the food production,
biodiversity and the environment. Environmental degradation will accelerate global
warming, which in turn will accelerate water crisis. This is a vicious cycle. The only
solution is to tap all the possible water resources and make them available for sustainable
use, while improving the water use efficiency. This can be done by addressing various
concerns and initiating suitable actions for development of new water resources,
augmentation of available resources, prevention of water pollution and improving the
efficiency of water use in all the sectors.
Considering the amount of water wasted due to leakages and inefficiencies, we proposed
a system that will help monitor water usage and prevent leakages in the entire concerned
area. A system that consists of various sensors like motion sensor, water flow sensor
and solenoid valve actuators that will co-ordinate with each other. Each tap or end point
called as node will consist of these sensors and actuators. All the nodes of concerned
area will communicate with a central hub and co-ordinate with each other.
The central hub will be the main processing that will take decisions and upload all the
data to a cloud based system; giving its user access through internet. Central hub and
the node will be communicating to each other via wireless communication using XBee
PRO S2C modules. An Amazon AWS server hosting Thingsboard server will act as the
cloud server which will communicate to the central hub via MQTT(Message Queuing
Telemetry Transport) protocol. The central hub will have its own water flow sensor to
measure total usage and compare it with the usage of nodes in order to detect leakages
in between the central hub and the nodes and solenoid valve to actuate the supply
depending upon the conditions.
With Increasing amount of water usage in urban areas, people are getting less aware of
their daily use. People living in urban areas are tend to use 95% more water than people
living in rural areas. In order to leave a fast life most of them simply keep the taps open
and lot of water is wasted. Moreover, they use a lot of water for daily needs. By giving
them access to their water usage an awareness can be created among the people. SMS
and E-Mails can be sent regarding the usage patterns to the users.
Forty percent or around 300 million liters of water go waste everyday due to leakages.
Leakages can either be natural or manmade. Keeping the tap open for longer can be
accounted as manmade leakage. Preventing leakages and giving user warning about
leaks can help save millions of liters of water. Same water can be used to supply water
to agriculture, rural areas, slums etc.
People in a hurry in their day to day life are very negligent. They keep the taps open for
long and a lot of usable and fresh water is wasted in this process. Our system will detect
such situations and in return will notify the user about it. If the user is not available due
to whatsoever the reasons be the system will wait for some time and take a decision on
its own based on the programmed algorithm and can also shut down the entire system
in the house if required.
The whole system consists of a single central hub and multiple nodes connected
wirelessly. The nodes are connected to taps or endpoints where water is used.
Node Specifications:
The client is the main communicating and decision-making device and is powered by
Intel Edison. A water flow sensor is connected to the client in order to measure the
consumption of entire house; it is connected to pin 5 of Intel Edison Arduino Expansion
Board. All the nodes communicate to the central hub wirelessly through XBee module
which works on IEEE 802.15-4. DIN and DOUT pins are connected to serial port of
Intel Edison i.e. pin 0 & 1 respectively. The central hub collects data from all the nodes
connected to it and compare it with the total usage calculated by it and with predefined
algorithm it detects whether a leakage has been occurred. On the decision made by the
central hub it will actuate the solenoid valve through 5V relay which is connected to pin
6 of Intel Edison. All the data is the sent over to a cloud server which is hosted on
Amazon AWS using MQTT protocol. Similarly, commands can be given to the central
hub from the server.
3.2.2 Node
The endpoints or the taps are the nodes in this system. It is powered by Arduino UNO.
Water flow sensor is used to collect water usage and flow rate and is connected to pin 2
of Arduino UNO. Infrared Sensor is used to detect hand and automatically open the tap
for the user and thus enhancing hand free experience. An PIR motion sensor connected
to pin 5 is used to detect human presence in order to avoid open taps in absence of
human. To send data to the central hub XBee. DIN and DOUT pins of XBee are
connected to pins 2 and 3 of Arduino Uno through software serial.
In this system the main boards used are Intel Edison Expansion Board and Arduino Uno.
Multiple sensors like water flow sensor, IR sensor, PIR sensor are used. Solenoid valve
is used to actuate the supply of water and the solenoid valve is controlled by a DC Relay.
The Intel Edison is an ultra-small computing platform that will allow you to jump into
ROS with a stamp size computer.
Each Edison is providing the same robust strength of your go-to single board computer.
Powered by the Intel Atom SoC dual-core CPU and including an integrated Wi-Fi,
Bluetooth LE, and a 70-pin connector to attach a veritable slew of shield-like “Blocks”
which can be stacked on top of each other. The Intel Edison packs a robust set of features
into its small size, delivering great performance, durability, and a broad spectrum of I/O
and software support. Those versatile features help meet the needs of a makers,
inventors, and beginners. This is a module with a high-speed processor and Wi-Fi and
Bluetooth Radios on board. Its low power and small footprint make it ideal for projects
that need a lot of processing power, but don’t have the ability to be near a larger power
source or have a large footprint.
Intel Released an Arduino Uno compatible board (with only 4 PWM pins instead of 6)
that accepts the Intel Edison module. Since intel Edison needs a expansion board and
Arduino being most popular we choose it.
Board features
• SD card connector
• DC power jack (7 to 15VDC input)
Pin Configuration
The UNO is the best board to get started with electronics and coding. If this is your first
experience tinkering with the platform, the UNO is the most robust board you can start
playing with. The UNO is the most used and documented board of the whole Arduino
family.
Programming
The Arduino Uno can be programmed with the (Arduino Software (IDE)). Select
"Arduino/Genuino Uno from the Tools > Board menu (according to the microcontroller
on your board). For details, see the reference and tutorials. The ATmega328 on the
Arduino Uno comes preprogrammed with a bootloader that allows you to upload new
code to it without the use of an external hardware programmer. It communicates using
the original STK500 protocol (reference, C header files). You can also bypass the
bootloader and program the microcontroller through the ICSP (In-Circuit Serial
Programming) header using Arduino ISP or similar; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is
available in the Arduino repository. The ATmega16U2/8U2 is loaded with a DFU
bootloader, which can be activated by:
• On Rev1 boards: connecting the solder jumper on the back of the board (near the
map of Italy) and then rese ing the 8U2.
• On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line
to ground, making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS
X and Linux) to load a new firmware. Or you can use the ISP header with an external
programmer (overwriting the DFU bootloader). See this user-contributed tutorial for
more information.
Board Features
• Microcontroller : ATmega328P
• Operating Voltage : 5V
• Input Voltage (recommended) : 7-12V
• Input Voltage (limit) : 6-20V
• Digital I/O Pins : 14 (of which 6 provide PWM output)
• PWM Digital I/O Pins :6
• Analog Input Pins :6
• DC Current per I/O Pin : 20 mA
• DC Current for 3.3V Pin : 50 mA
• Flash Memory : 32 KB (ATmega328P) of which 0.5 KB
used by bootloader
• SRAM : 2 KB (ATmega328P)
• EEPROM : 1 KB (ATmega328P)
• Clock Speed : 16 MHz
• LED_BUILTIN : 13
• Length : 68.6 mm
• Width : 53.4 mm
• Weight : 25 g
Pin Diagram
Pin Configuration
Power Vin, 3.3V, 5V, GND Vin: Input voltage to Arduino when using an
external power source.
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
Water flow sensor sensor sits in line with the water line and contains a pinwheel sensor
to measure how much liquid has moved through it. There's an integrated magnetic hall
effect sensor that outputs an electrical pulse with every revolution. The hall effect sensor
is sealed from the water pipe and allows the sensor to stay safe and dry.
The sensor comes with three wires: red (5-24VDC power), black (ground) and yellow
(Hall effect pulse output). By counting the pulses from the output of the sensor, you can
easily calculate water flow. Each pulse is approximately 2.25 milliliters. Note this isn't
a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid
pressure and sensor orientation. It will need careful calibration if better than 10%
precision is required.
The water flow sensor will send all the flow readings to Arduino Uno. The readings will
be converted to L/min flow and L water usage.
The water flow sensor will be used at the node side to calculate total water usage at the
node. While the water flow sensor at the central hub will calculate the total water flow
through the system. If both the flow value at the node and the central hub are not
approximately equal then there might be a leak in one of pipes.
Specifications
Connection Method
• Black : Gnd
4.4 XBee
XBee is the brand name from Digi International for a family of form factor compatible
radio modules. The first XBee radios were introduced under the MaxStream brand in
2005 and were based on the 802.15.4-2003 standard designed for point-to-point and star
communications at over-the-air baud rates of 250 kbit/s. Two models were initially
introduced—a lower cost 1 mW XBee and the higher power 100 mW XBee-PRO. Since
the initial introduction, a number of new XBee radios have been introduced and all
XBees are now marketed and sold under the Digi brand.
The XBee radios can all be used with the minimum number of connections – power (3.3
V), ground, data in and data out (UART), with other recommended lines being Reset
and Sleep. Additionally, most XBee families have some other flow control, I/O, A/D
and indicator lines built in. A version of the XBees called the programmable XBee has
an additional onboard processor for user’s code. The programmable XBee and a new
surface mount (SMT) version of the XBee radios were both introduced in 2010.
The XBee transmitter and receiver module will function as a bridge between node and
the central hub. Multiple transmitter can be linked to single receiver making XBee
perfect solution for our purpose.
Specifications
Pin Diagram
Pin Configuration
1 GND - Ground.
5 DIO12 GPIO.
11 GND - Ground.
13 GND - Ground.
22 GND - Ground.
35 GND - Ground.
This is a simple to use, USB to serial base unit for the Digi XBee line. This unit works
with all XBee modules including the Series 1 and Series 2.5, standard and Pro version.
Plug the unit into the XBee Explorer, attach a mini USB cable, and you will have direct
access to the serial and programming pins on the XBee unit.
This board also breaks out each of the XBee’s I/O pins to a pair of breadboard-
compatible headers. So if you want to make use of the XBee’s extended functionality,
you can solder some header pins into those, or even just solder some wire.
Specifications
Connection Method
A type of relay that can handle the high power required to directly control an electric
motor or other loads is called a contactor. Solid-state relays control power circuits with
no moving parts, instead using a semiconductor device to perform switching. Relays
with calibrated operating characteristics and sometimes multiple operating coils are used
to protect electrical circuits from overload or faults; in modern electric power systems
these functions are performed by digital instruments still called "protective relays".
Magnetic latching relays require one pulse of coil power to move their contacts in one
direction, and another, redirected pulse to move them back. Repeated pulses from the
same input have no effect. Magnetic latching relays are useful in applications where
interrupted power should not be able to transition the contacts.
Magnetic latching relays can have either single or dual coils. On a single coil device,
the relay will operate in one direction when power is applied with one polarity, and will
reset when the polarity is reversed. On a dual coil device, when polarized voltage is
applied to the reset coil the contacts will transition. AC controlled magnetic latch relays
have single coils that employ steering diodes to differentiate between operate and reset
commands.
The module is uses SRD relay module to control high-votage elecrical devices.
(maximum 250V).It can be used in interactive projects and can also be used to control
the lighting, electrical and other equipments.It can be controlled directly by a wide range
of microcontrollers and can be controlled through the digital IO port, such as solenoid
valves, lamps, motors and other high current or high voltage devices. A relay is used to
control the opening and closing of valve. The Arduino Uno controls the relay depending
upon the pre-defined algorithm.
Specifications
Cloud computing is a computing paradigm, where a large pool of systems are connected
in private or public networks, to provide dynamically scalable infrastructure for
application, data and file storage. With the advent of this technology, the cost of
computation, application hosting, content storage and delivery is reduced significantly.
Cloud computing is a practical approach to experience direct cost benefits and it has the
potential to transform a data center from a capital-intensive set up to a variable priced
environment.
Cloud Providers offer services that can be grouped into three categories.
built. The customer has the freedom to build his own applications, which run on the
provider‟s infrastructure. To meet manageability and scalability requirements of the
applications, PaaS providers offer a predefined combination of OS and application
servers, such as LAMP platform (Linux, Apache, MySql and PHP), restricted J2EE,
Ruby etc. Google‟s App Engine, Force.com, etc are some of the popular PaaS examples.
Figure 12. Cloud Computing Model showing different models and its functions
With a database as a service model, application owners do not have to install and
maintain the database themselves. Instead, the database service provider takes
responsibility for installing and maintaining the database, and application owners are
charged according to their usage of the service. For example, Amazon Web Services
provides three database as a service offerings as part of its cloud portfolio: SimpleDB,
a NoSQL key-value store; Amazon RDS, a relational database service that includes
support for MySQL, Oracle, and more; and DynamoDB. Microsoft offers its Azure SQL
Database service on its Azure cloud service platform. Cloud computing platform
Rackspace offers database as a service for MySQL and MongoDB. Database as a service
providers are not limited to cloud computing platforms. For example, the MongoDB as
a service provider mLab allows their customers to host their databases on AWS, Azure,
or Google Cloud Platform. Database vendors have also launched their own services
under this model. Oracle Cloud provides its own database as a service, allowing users
to access Oracle Database 11g and 12c as cloud services. MongoDB recently launched
its own hosted MongoDB as a service, MongoDB Atlas.
Data Models:
as they would a real physical computer. They can choose to deploy their AWS systems
to provide internet-based services for their own and their customers' benefit.
The AWS technology is implemented at server farms throughout the world, and
maintained by the Amazon subsidiary. Fees are based on a combination of usage, the
hardware/OS/software/networking features chosen by the subscriber, required
availability, redundancy, security, and service options. Based on what the subscriber
needs and pays for, they can reserve a single virtual AWS computer, a cluster of virtual
computers, a physical (real) computer dedicated for their exclusive use, or even a cluster
of dedicated physical computers. As part of the subscription agreement, Amazon
manages, upgrades, and provides industry-standard security to each subscriber's system.
AWS operates from many global geographical regions including 6 in North America.
In 2017, AWS comprised more than 90 services spanning a wide range including
computing, storage, networking, database, analytics, application services, deployment,
management, mobile, developer tools, and tools for the Internet of Things. The most
popular include Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage
Service (S3). Most services are not exposed directly to end users, but instead offer
functionality through APIs for developers to use in their applications. Amazon Web
Services’ offerings are accessed over HTTP, using the REST architectural style and
SOAP protocol.
Since we are using a lot of different hardware we will need different Intergraded
Development Environments to program the hardware. Intel Edison is supports
programming in various languages such as C, C++, Java Script, Python, Node.JS and as
it is running Yocto OS we will need some kind a software to access it through serial port
or secure shell. Arduino UNO can be programmed in C language using their proprietary
IDE. XBee is used to create a personal wide area network in a premise and to configure
it we have used XCTU; a software developed by DIGI to configure XBee. A server
running Ubuntu 16.04 LTS is hosting Thingsboard; an open source IoT Platform being
used to collect and visualize the data provided by the system.
We will be using Intel XDK to program Intel Edison in Node.JS. Intel XDK was an
Integrated Development Environment (IDE) created by Intel to create native apps for
mobile phones and tablets using web technologies like HTML5, CSS and JavaScript.
Apps were created edited and simulated using the IDE then exported to Adobe
PhoneGap or Cordova CLI for compilation into a native code app. The IDE allowed a
developer to target the same solution to different platforms, thus reducing the amount
of code required to ship a cross-platform product. The XDK was first launched in
October 2013.
XDK has been re-purposed by Intel for IoT development, and core mobile development
features have been deprecated by Intel and are no longer supported. The accompanying
cross-platform Cordova cloud build service has been taken offline.
Arduino is an open source computer hardware and software company, project, and user
community that designs and manufactures single-board microcontrollers and
microcontroller kits for building digital devices and interactive objects that can sense
and control objects in the physical world. The project's products are distributed as open-
source hardware and software, which are licensed under the GNU Lesser General Public
License (LGPL) or the GNU General Public License (GPL), permitting the manufacture
of Arduino boards and software distribution by anyone. Arduino boards are available
commercially in preassembled form, or as do-it-yourself (DIY) kits.
Arduino board designs use a variety of microprocessors and controllers. The boards are
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced
to various expansion boards (shields) and other circuits. The boards feature serial
communications interfaces, including Universal Serial Bus (USB) on some models,
which are also used for loading programs from personal computers. The
microcontrollers are typically programmed using a dialect of features from the
programming languages C and C++. In addition to using traditional compiler toolchains,
the Arduino project provides an integrated development environment (IDE) based on
the Processing language project.
5.3 XCTU
XCTU includes all of the tools a developer needs to quickly get up and running with
XBee. Unique features like graphical network view, which graphically represents the
XBee network along with the signal strength of each connection, and the XBee API
frame builder, which intuitively helps to build and interpret API frames for XBees being
used in API mode, combine to make development on the XBee platform easier than
ever.
• You can manage and configure multiple RF devices, even remotely (over-the-
air) connected devices.
• The firmware update process seamlessly restores your module settings,
automatically handling mode and baud rate changes.
• Two specific API and AT consoles, have been designed from scratch to
communicate with your radio devices.
• You can now save your console sessions and load them in a different PC running
XCTU.
• XCTU includes a set of embedded tools that can be executed without having any
RF module connected:
o Frames generator: Easily generate any kind of API frame to save its value.
o Frames interpreter: Decode an API frame and see its specific frame values.
o Recovery: Recover radio modules which have damaged firmware or are in
programming mode.
o Load console session: Load a console session saved in any PC running
XCTU.
o Range test: Perform a range test between 2 radio modules of the same
network.
o Firmware explorer: Navigate through XCTU's firmware library.
• An update process allows you to automatically update the application itself and the
radio firmware library without needing to download any extra files.
• XCTU contains complete and comprehensive documentation which can be accessed
at any time.
5.4 ThingsBoard
ThingsBoard is:
• robust and efficient: single server node can handle tens or even hundreds
thousands of devices depending on use-case. ThingsBoard cluster can handle
millions of devices.
• customizable: adding new functionality is easy with customizable widgets and
rule engine nodes.
• durable: never lose your data.
Being open source and fit to provide necessary platform for our project we choose to go
with ThingsBoard.
5.5 Terminal
The terminal is an interface in which you can type and execute text based commands. It
can be much faster to complete some tasks using a Terminal than with graphical
applications and menus. Another benefit is allowing access to many more commands
and scripts.
To save a detailed list of files in the current directory tree to a file called listing.txt:
5.6 Yocto OS
The Yocto Project (YP) is an open source collaboration project that helps developers
create custom Linux-based systems for embedded products, regardless of the hardware
architecture.
The project provides a flexible set of tools and a space where embedded developers
worldwide can share technologies, software stacks, configurations, and best practices
that can be used to create tailored Linux images for embedded and IOT devices.
Intel has developed their own version of Yocto image to run the Quark processor in the
Intel Edison. It is available for download on their website for free.
This chapter deals with the hardware assembly of the project. We have used various
sensors and components all interconnected.
Our main component of the hardware is water supply model. It is a scaled model of how
water is supplied to a house. We have constructed a tank in steel frame on which we
have fitted water pipes.
Components used :
1. Water Tank
2. Water Tank Stand
3. PVC Pipe
4. PVC Taps(2 Nos)
5. Solenoid Valve
6. Water Flow Sensor
The two solenoid valves used are of central hub and node i.e. the endpoint or the tap.
Two taps are used to depict an end point and to create leakages manually between the
endpoint and the central hub. The solenoid valves are place before water flow sensors
for both central hub assembly and node assembly. The assembly is scaled down model
of entire house. The incoming to the house is the central hub from which the water is
supplied to various end points.
Following is the code for Central Hub programmed in Intel XDK in Node.JS
Code
"use strict" ;
//Required libraries
var mraa = require("mraa");
var mqtt = require('mqtt')
//GPIO Declaration
var wsensor = new mraa.Gpio(5);
var uart = new mraa.Uart(0);
var actuator = new mraa.Gpio(4);
wsensor.dir(mraa.DIR_IN);
actuator.dir(mraa.DIR_OUT);
wsensor.isr(mraa.EDGE_RISING,counter);
baudRate: 9600
});
port.on('error', function(err) {
console.log('Error: ', err.message);
})
//Count pulses
function counter()
{
count=count + 1;
}
//Valve Actuation
function valveActuation(condition)
{
actuator.write(condition);
console.log("Valve Status : " + condition);
}
var b = {"Message":"The tap is open in absence of human and the system has been shut down"};
client.publish('v1/devices/me/telemetry',JSON.stringify(b));
}
}
//XBee function
function xbee()
{
xbeedata =port.read()
if(xbeedata != null)
{
var word = xbeedata.toString();
if(word[0] == "l"){
var myString = word;
clpm = word.slice(1);
}
if(word[5] == "q")
{
console.log("Open tap leakage.");
tapopendataupload(2);
operationcondition = 1;
sendMessage(2);
}
}
}
//Client flow
function clientflow()
{
cliters = clpm/60;
cliterssum = cliters + cliterssum;
}
//Pipe Leakage
function pipeleakage()
{
if(lpm > 0 & clpm == 0)
{
pipeleaktimer = pipeleaktimer + 1;
//Warer usage
function waterusage()
{
if(literssum > 2)
{
console.log("Water usage exceed");
waterusagedataupload(2);
}
}
//Stop function
function stop()
{
tapopendataupload(0);
leakdataupload(0);
waterusagedataupload(0);
}
//Main function
function main()
{
if(operationcondition == 0)
{
serverflow();
xbee();
sendData();
pipeleakage();
console.log('Server LPM : ' + lpm+' Server Liters : ' + literssum + ' Count : ' + count + 'Client
LPM : '+clpm + 'Client Liters : ' + cliterssum);
count = 0;
}
else
{
console.log('There is a problem in the system. Closing server valve');
valveActuation(1);
console.log('Server valve closed. Attempting to close client valve.');
port.write('s');
var interval1 = setInterval(stop,2000);
clearInterval(interval);
}
}
var interval = setInterval(main,1000);
7.2 Node
Following is the code programmed in C language using Arduino IDE for the Node.
Code
//Pin configurations
SoftwareSerial XBee(3, 4);
int flowsensor = 2;
int solenoid = 7;
int opencounter = 0;
//Flowsensor variables
double frequency; // Measures flow meter pulses
double lpm = 0.00000; // Calculated litres/hour
void setup() {
//initiate serial communications for monitoring and XBee
Serial.begin(9600);
XBee.begin(9600);
//Pin modes
pinMode(flowsensor,INPUT);
pinMode(solenoid,OUTPUT);
digitalWrite(solenoid,LOW);
//Interrupt function
void flow ()
{
frequency++;
}
//Measure flow
void measureflow()
{
liters = (frequency/360);
literssum = literssum + liters;
lpm = (frequency/(360/60));
Serial.print(lpm);
Serial.print("\t");
Serial.println(literssum);
frequency = 0;
if(lpm > 0)
{
opencounter = opencounter + 1;
Serial.print("Open counter : ");
Serial.println(opencounter);
if(opencounter == 10)
{
digitalWrite(solenoid,HIGH);
}
}
else
{
opencounter = 0;
}
}
void loop() {
measureflow();
xbee();
xbeerecieve();
delay(1000);
}
8.1 Costing
Component Cost
XBee Rs.1800
Relay Rs.150
Total Rs.17750
As this is a prototype the costs are high. Making this as a product the costs will reduce
as components will be brought in bulk and the main component (Intel Edison) cost will
reduce as dedicated and custom electronic circuits will be used.
The first prototype we developed had many issues and studying those problems we
developed a newer version. Initial version included a single hub which reduced the
functionality. Only the system leaks could be detected only when a single tap is open.
So, we included multi node and single hub system where we can detect the pipe
leakages. Moreover, initial version did not have any provision to detect any presence of
human activity in the premise of study; hence by including motion sensors this problem
was solved.
June:
• Finalization of groups.
• Searching for project ideas.
• Shortlisting topics for project.
July:
August:
September:
October:
December:
January:
February:
9.1 Conclusion
Clearly smart automated systems is the future of world. Internet of Things will help
boost and ease life of human beings. At the contrast developing systems with known
problems is must. Water will be a major problem in coming future. For a part of humor
it is said that World War 3 will take place due to water. And taking the opportunity of
this knowledge we decided to develop a Internet of Things based automated system that
will help mankind save millions of liters of water that is being wasted everyday.
For coming future we thrive to make this system more stable and efficient and most
importantly feasible and cost effective for all classes of the world. We have always
worked and inspired by “Water = Life, Future = Conservation”
Increasing population and globalization will increase the burden on existing water
resources. More likely the probability of water wastage will increase by substantial
amount. To cope up for this solutions such as leak detectors and automated water
controllers are very essential. Our next step for improvement is to design special
plumbing fixtures and pipes with integrated tracks of voltage source on it. When a drop
of water comes on between these sources the capacitance will change and exact leakage
location can be tracked. A series of continuous improvement will help us develop a
sustainable system that can function at par to help save water.
Refrences