Beruflich Dokumente
Kultur Dokumente
During the past decade, water needs have increased unpredictably in India. Increasing
demand of water supply has become a major challenge for the world. Wasteful usage of water,
climatic changes and Urbanization has further depleted the resource. Conservation and
management of the resource must be given utmost importance. In this project, we present an IoT
design for water monitoring and control approach which supports internet based data collection
on real time bases. The system addresses new challenges in the water sector -flow rate measuring
and the need for a study of the supply of water in order to curb water wastage and encourage its
conservation. The traditional water metering systems require periodic human intervention for
maintenance making it inconvenient and often least effective. For shortcoming of the existing
models for a ubiquitous usage of wireless systems for water flow rate measuring and
communicate data wirelessly
INTODUCTION
According to recent survey, water has become a big issue because of less rain fall, increase in
population many cities are facing this problem people have to suffer from this problem they
don’t have sufficient amount for their daily needs. Due to lack of monitoring water can’t be
supplied properly, some areas in city get water while other some areas can’t so, there is a need of
continuous monitoring, water supply scheduling and proper distribution another problems are
excessive consumption, overflow of tanks, leakage in pipeline, interrupted water supply. Water is
a basic need of every human being everyone has to save the water many times with lack of
monitoring, overflow of these overhead tanks can occur because of this lots of water get wasted,
another thing because of overflow in the pipelines with more pressure there is possibility of
pipeline damage, leakage detection is one more problem all these problems are because of lack
of monitoring, manual work, less man power. By focusing on problems in traditional methods
our system design and develop a low cost embedded system device for real time monitoring of
water distribution system in Internet of things (IOT) platform. IOT is a world where billions of
objects can sense, communicate and share information , all interconnected over public or private
Internet Protocol (IP) networks. These interconnected objects have data regularly collected,
analysed and used to initiate action, providing a wealth of intelligence for planning, management
and decision making. The Internet Of Things (IOT) is the inter-networking of physical devices,
vehicles (also referred to as "connected devices" and "smart devices"), buildings, and other items
embedded with electronics, software, sensors, actuators, devices many more and network
connectivity which enable these objects to collect and exchange data. In 2013 the Global
Standards Initiative on Internet of Things (IOT-GSI) defined the IOT as "a global infrastructure
for the information society, enabling advanced services by interconnecting (physical and virtual)
things based on existing and evolving interoperable information and communication
technologies" and for these purposes a "thing" is "an object of the physical world (physical
things) or the information world (virtual things), which is capable of being identified and
integrated into communication networks". The IOT allows objects to be sensed or controlled
remotely across existing network infrastructure, creating opportunities for more direct integration
of the physical world into computer-based systems, and resulting in improved efficiency,
accuracy and economic benefit in addition to reduced human intervention. When IOT is
augmented with sensors and actuators, the technology becomes an instance of the more general
class of cyber-physical systems, which also encompasses technologies such as smart grids,
virtual power plants, smart homes, intelligent transportation and smart cities. Each thing is
uniquely identifiable through its embedded computing system but is able to interoperate within
the existing Internet infrastructure. Experts estimate that the IOT will consist of about 30 billion
objects by 2020.
Objectives of project
Now a days wastage of water is increasing day by day, by using this we get to know where most
of water is consumed as well as wasted (appartments). The water meters are situated in the
houses, offices and factories etc . The meter reading is given automatically to the authorized
person of flat or house enabling payment for basic water billing services via notification when
online or a text based message when he is offline. Water flow can be analysed every time and
give directly to connected devices. To measure the water flow according to the consumption of
water per user.
EXISTING SYSTEM
Same cost for any type of using ie., less or more usage of water flow. In the present scenario
water meters are deployed in all houses. The current procedure with regard to the billing process
for water is not a fully automated system. It involves manual processes from the time the Meter
reader starts reading the meter until the system is updated with the current reading. A meter
reader visits a house, does the meter reading, and then manually calculates the amount
considering the units consumed. Back in the office a data entry officer enters the meter readings
into the system manually and a bill generated and given to customers. Then the customer must
go to the water supply service to pay the bill according to their usage. The procedure is far from
satisfactory and it is believed a better system using availabletechnologies would definitely be an
advantage.
Present scenario
2. Block diagram and description
Water tank
CLOUD
THINGSPEAK
ADC
REVERSE
ANALYSIS
WIFI
Optional Enhancement
RASPBERRYPI 3
GPS
MYSQL DB
SERVER
INTERNET OF THINGS (IoT)
Internet of Things (IoT) is the networking of physical objects that contain electronics
embedded within their architecture in order to communicate and sense interactions amongst each
other or with respect to the external environment. In the upcoming years, IoT-based technology
will offer advanced levels of services and practically change the way people lead their daily
lives. Advancements in medicine, power, gene therapies, agriculture, smart cities, and smart
homes are just a very few of the categorical examples where IoT is strongly established.
Internet of things on IoT agenda- The Internet of Things (IoT) is a system of interrelated
computing devices, mechanical and digital machines, objects, animals or people that are
provided with unique identifiers and the ability to transfer data over a network without requiring
human-to-human or human-to-computer interaction.The globally ruling technology acting as a
single key to shrinking this whole universe to a tiny globally connected village, whereas IoT
comprises of just two words which precisely depicts its definition.
Internet: Inter connectivity-For global connection
+
Things: Embedded system devices-sensors, actuators, RFID tags, QR code and so many.
THINGSPEAK
Thing Speak is a platform providing various services exclusively targeted for building
IoT applications. It offers the capabilities of real-time data collection, visualizing the collected
data in the form of charts, ability to create plugins and apps for collaborating with web services,
social network and other APIs. We will consider each of these features in detail below.
The core element of Thing Speak is a ‘Thing Speak Channel’. A channel stores the data
that we send to ThingSpeak and comprises of the below elements:
8 fields for storing data of any type - These can be used to store the data from a sensor or
from an embedded device
location fields - Can be used to store the latitude, longitude and the elevation. These are
very useful for tracking a moving device
1 status field - A short message to describe the data stored in the channel
To use ThingSpeak, we need to signup and create a channel. Once we have a channel, we
can send the data, allow ThingSpeak to process it and also retrieve the same. Let us start
exploring ThingSpeak by signing up and setting up a channel.
Open "https://thingspeak.com/" and click on the ‘Get Started Now’ button on the center
of the page and you will be redirected to the sign-up page (you will reach the same page when
you click the ‘Sign Up’ button on the extreme right). Fill out the required details and click on the
‘Create Account’ button.
Figure 2.8.1.1 Account opening in ThingSpeak
Go ahead and click on ‘New Channel’. You should see a page like in the figure 2.8.1.2
You can change the name to fit your need and you can add a description corresponding to
the channel. You can add any other useful description into the metadata field. In the figure
2.8.1.3, you should see the fields for Latitude, Longitude and Elevation. Also, when you scroll
down you should see a check box that says ‘Make Public?’. Let us consider the significance of
the various fields and the tabs:
Latitude, longitude and elevation - These fields correspond to the location of a ‘thing’
and are especially significant for moving things.
Make Public? - If the channel is made public, anyone can view the channel's data feed
and the corresponding charts. If this check box is not checked, the channel is private,
which means for every read or write operation, the user has to pass a corresponding API
key.
URL - This can be the URL of your blog or website and if specified, will appear on the
public view of the channel.
Video ID - This is the ID corresponding to your YouTube or Vimeo ID. If specified, the
video appears on the public view of the channel.
Fields 1 to 8 - These are the fields which correspond to the data sent by a sensor or a
‘thing’. A field has to be added before it can be used to store data. By default, Field 1 is
added. In case you try posting to fields that you have not added, your request will still be
successful, but you will not be able to see the field in the charts and the corresponding
data. You can click on the small box before the ‘add field’ text corresponding to each
field to add it. Once you click the ‘add field’ box, a default label name appears in the text
box corresponding to each field and the ‘add field’ text changes to ‘remove field’. You
can edit the field text that appears by default when a field is added to make more sense.
For example, in the below screen, I have modified the text for Field 2 to ‘SensorInput’.
To remove a field which is added, just check on the ‘remove field’ box. Once you click
this, the text ‘remove field’ changes back to ‘add field’ and the corresponding field text is
cleared.
Once you have edited the fields like in figure 2.8.1.4, click on ‘Save Channel’ button. You should
now see a page like the below figure 2.8.1.5 in which the ‘Private View’ tab is defaulted:
Now click on the ‘API Keys’ tab. You should see a screen similar to the below. The write
API key is used for sending data to the channel and the read API key(s) is used to read the
channel data. When we create a channel, by default, a write API key is generated. We generate
read API keys by clicking the ‘Generate New Read API Key’ button under this tab. You can also
add a note corresponding to each of the read API keys.
Note: Please note that clicking on the ‘Generate New Write API Key’ will over-write the
previous key. You will only have one Write API key at any point of time. Also, in case your
channel is private, others can only view the channel’s feed and charts by using a Read API key.
Please share the Read API keys with people who are approved and authorized to view your
channel.
The Raspberry Pi is a tiny computer designed in the United Kingdom and sold around the
world at a very low price. The Pi ships as a bare circuit board with standard connections for a
keyboard, mouse, monitor, and power supply. You must add these extras yourself. To keep costs
down, the Pi uses an SD card, a small memory card, as a hard drive.
The Pi also includes extra connections you can use in your own electronic projects, and two
software applications, Python[5] and Scratch, for learning programming. The Pi is much less
powerful than a PC or Mac. You cannot run Microsoft Office on it. However, you can use it as a
small media centre and for programming games. You can also create network based projects
such as a web server, file server, or even a home automation system.
3.1.1 Understanding the Linux OS:
As of summer 2013, some Pi kits ship with a tool called NOOBS (New Out of the Box
Operating System) which gives users a choice of operating systems. This book describes the
most popular and best-supported operating system — Raspbian Wheezy, a version of the popular
free Linux operating system, often represented by a penguin mascot known as Tux. Linux is
more challenging and hands-on than Windows and OS X, but is ideal for customization and for
building hardware and software projects around the Pi. For information about getting started with
NOOBS, see you can choose two models of the Pi board. The Model A has half the memory of
the Model B +(256MB versus 512MB), lacks the B's Ethernet network connector, and has a
single USB socket instead of the B+'s stacked pair. It consumes a third less power. Many users
develop a project with a Model B+ and build the finished version around a Model B.
Dimensions:
The Raspberry Pi is a small device coming in at 85mm x 56mm x 17mm and weighing
only 45g. This makes it perfect for home automation, where a small device can be placed in a
case and mounted inside an electrical box, or replace an existing thermostat device on a wall.
HDMI port:
The High Definition Multi-media Interface (HDMI) port allows the Raspberry Pi to be
hooked up to high-definition televisions and monitors that support the technology. This provides
an additional option to the composite RCA port for video and additionally supports audio.
SD card port:
The main storage mechanism of the Raspberry Pi is via the SD card port. The SD card will be
where we install our operating system and will act as our basic hard disk. Of course, this storage
can be expanded upon using the USB ports.
GPU:
Ethernet port:
The Ethernet port is the Raspberry Pi's main gateway to communicating with other
devices and the Internet. You will be able to use the Ethernet port to plug your Raspberry Pi into
a home router such as the one you currently use to access the Internet, or a network switch if you
have one set up.
GPIO pins:
Figure 3.1.7: GPIO pin functionality of Raspberry Pi
The General Purpose Input/output (GPIO) pins on the Raspberry Pi are the main way of
connecting with other electronic boards such as the Arduino. As the name suggests, the GPIO
pins can accept input and output commands and thus can be programmed on the Raspberry Pi.
The Raspberry Pi comes equipped with an SD card slot allowing us to insert an SD card
and use it as our devices' main storage mechanism, much like a hard disk on a PC.While you can
use other storage mechanisms such as a USB drive or USB external hard drive, the SD card is
small and thus lends itself better to embedded devices such as those found in home automation
projects.
There are a variety of brands of SD cards on the market, and they come in a range of
sizes. The Raspberry Pi supports larger SD cards such as those with 64 GB of storage space. For
the projects in this book, you should be using an SD card with a minimum of 2 GB storage. We
will now look at the options available with regards to purchasing an SD card pre-installed with
the operating system and formatting and installing it ourselves.
The install manager for the Raspberry Pi is NOOBS. The operating systems included with
NOOBS are:
Archlinux ARM
OpenELEC
Pidora (Fedora Remix)
Puppy Linux
Raspbmc and the XBMC open source digital media center
RISC OS – The operating system of the first ARM-based computer
Raspbian (recommended for Raspberry Pi 1) – Maintained independently of the
Foundation; based on the ARM hard-float (armhf) Debian 7 'Wheezy' architecture port
originally designed for ARMv7[4] and later processors (with Jazelle RCT/
ThumbEE, VFPv3, and NEON SIMD extensions), compiled for the more
limited ARMv6 instruction set of the Raspberry Pi. A minimum size of 4 GB SD card is
required. There is a Pi Store for exchanging programs.
The Raspbian Server Edition is a stripped version with fewer software packages bundled
as compared to the usual desktop computer oriented Raspbian.
The Wayland display server protocol enable the efficient use of the GPU for hardware
accelerated GUI drawing functions. on 16 April 2014 a GUI shell for Weston
called Maynard was released.
PiBang Linux is derived from Raspbian.
Raspbian for Robots - A fork of Raspbian for robotics projects with LEGO, Grove, and
Arduino.
The tool recommended for writing images on Windows is the somewhat predictably
named Image Writer. You can find the link on the Raspberry Pi downloads page
To open the configuration tool after this, simply run the following from the command line:
sudo raspi-config
The sudo is required because you will be changing files that you do not own as the pi user.
Figure 4.1.1: Raspberry Pi configuration tool
1 Expand Filesystem Ensures that all of the SD card storage is available to the OS
2 Change User Password Change password for the default user (pi)
location
<Select><Finish>
Figure 4.1.1: Booting of Raspberry Pi
4.1.2 SD Formatter:
It is best to format your SD card before copying the NOOBS files onto it. To do this:
Visit the SD Association’s website and download SD Formatter 4.0 for either Windows or Mac.
Follow the instructions to install the software. Insert your SD card into the computer or laptop’s
SD card reader and make a note of the drive letter allocated to it, e.g. G:/
In SD Formatter, select the drive letter for your SD card and format it.
Drag and drop NOOBS files. Once your SD card has been formatted, drag all the files in the
extracted NOOBS folder and drop them onto the SD card drive. The necessary files will then be
transferred to your SD card. When this process has finished, safely remove the SD card and
insert it into your Raspberry Pi.
First boot Plug in your keyboard, mouse and monitor cables. Now plug in the USB power cable
to your Pi. Your Raspberry Pi will boot, and a window will appear with a list of different
operating systems that you can install. We recommend that you use Raspbian – tick the box next
to Raspbian and click on Install. Raspbian will then run through its installation process. Note this
can take a while. When the install process has completed, the Raspberry Pi configuration menu
(raspi-config) will load. Here you are able to set the time and date for your region and enable a
Raspberry Pi camera board, or even create users. You can exit this menu by using Tab on your
keyboard to move to Finish. Logging in and accessing the graphical user interface. The default
login for Raspbian is username pi with the password raspberry. Note you will not see any writing
appear when you type the password. This is a security feature in Linux. To load the graphical
user interface type startx.
4.1.3 PuTTY:
PuTTy is a stand-alone tool, so you can run it as soon as you’ve downloaded it; you don’t
have to install anything on your machine. This is generally pretty useful because it means you
can stick it on a USB stick and carry it around with you, and you can run it on other machines
without needing Administrator privileges. If you keep losing track of PuTTy (it’s amazing how
easy it is to do), you might want to download the “Installer” version, which will install it on your
machine and set up the Start menu and Desktop shortcut icons for you.
For accessing Pi through command line on windows PC we needed PuTTY. PuTTY
is a free and open-source terminal emulator, serial console and network file transfer application.
It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket
connection.
APT:
Some Python packages can be found in the Raspbian archives and can be installed using APT,
for example:
sudo apt-get update
sudo apt-get install python3-picamera
This is a preferable method of installing software, as it means that the modules you install can be
kept up to date easily with the usual sudo apt-get update and sudo apt-get upgrade commands.
Python packages in Raspbian which are compatible with Python 2.x will always have a
python- prefix. So, the picamera package for Python 2.x is named python-picamera Python 3
packages always have a python3-prefix. So, to install rpi.gpio for Python 3 you would use:
home
- pi
- myproject
- python
- html
Python script:
You don't need to put webiopi.js and jquery.js in your project html folder. You just need
the <script> tag in your index.html. The WebIOPi server filters browsers requests to serves both
webiopi.js and jquery.js files from the default WebIOPi resource folder.
The index.html is composed of few HTML tags, including a little Javascript part and few
CSS lines. The most important to take care about is the anonymous Javascript function passed to
WebIOPi JS library with webiopi().ready(). This ensure WebIOPi and jQuery libraries are
loaded before modifying the UI. Also take of the parenthesis when prefixing functions calls
with webiopi(). After the button creation, we use a jQuery function to append it to a HTML
element, declared later in the <body> tag.
YF-S201 Hall Effect Water Flow Meter / Sensor
This sensor sits in line with your 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. However, its
great for basic measurement tasks!
We have as example Arduino sketch that can be used to quickly test the sensor, it will calculate
the approximate flow of water in liters/hour.
The pulse signal is a simple square wave so its quite easy to log and convert into liters per
minute using the following formula.
Features:
Model: YF-S201
Sensor Type: Hall effect
Working Voltage: 5 to 18V DC (min tested working voltage 4.5V)
Max current draw: 15mA @ 5V
Output Type: 5V TTL
Working Flow Rate: 1 to 30 Liters/Minute
Working Temperature range: -25 to +80℃
Working Humidity Range: 35%-80% RH
Accuracy: ±10%
Maximum water pressure: 2.0 MPa
Output duty cycle: 50% +-10%
Output rise time: 0.04us
Output fall time: 0.18us
Flow rate pulse characteristics: Frequency (Hz) = 7.5 * Flow rate (L/min)
Pulses per Liter: 450
Durability: minimum 300,000 cycles
Cable length: 15cm
1/2" nominal pipe connections, 0.78" outer diameter, 1/2" of thread
Size: 2.5" x 1.4" x 1.4"
Connection details: