Professional Documents
Culture Documents
Environmental Monitoring System
Environmental Monitoring System
on
by
1. Shreya Bhagole
2. Monish Naidu
University of Mumbai
(Year 2018-2019)
CERTIFICATE
This is to certify that the mini project titled “ENVIRONMENT MONITORING SYSTEM” is a
bonafide work of Shreya Bhagole (Roll No. 120) and Monish Naidu (Roll No. 105) submitted
to the University of Mumbai in partial fulfillment of the requirement for the award of the degree
of Bachelor of Engineering in Computer Engineering .
--------------------------- ---------------------------
Prof. Chitra Wasnik Dr. Pravin Nikumbh
Project Guide Head
Dept of Computer Engineering
MINI PROJECT REPORT
Submitted By
1. Shreya Bhagole
2. Monish Naidu
Guide:
Examiner:
_____________________
Prof. Chitra Wasnik (1) ___________________
(2) ___________________
_____________________ ________________________
Dr. Pravin Nikumbh Dr. Vivek Sunnapwar
Head (Principal)
Dept of Computer Engg.
Date of Submission:
(College Stamp)
DECLARATION
I declare that this project represents my ideas in my own words and where others' ideas or words
have been included, I have adequately cited and referenced the original sources. I also declare
that I have adhered to all principles of academic honesty and integrity and have not
misrepresented or fabricated or falsified any idea/data/fact/source in my project work. I promise
to maintain minimum 75% attendance, as per the University of Mumbai norms. I understand that
any violation of the above will be cause for disciplinary action by the Institute.
Yours Faithfully
___________________
___________________
Abstract
Internet of Things (IoT) is expected to play a major role in our lives through pervasive systems
of sensor networks encompassing our environment. These systems are designed to monitor
environment changes and generate result which can be transmitted and saved at cloud from
where this information can be accessed through applications and further actions can be taken.
This project presents the implementation and results of an environment monitoring system using
light sensor and temperature sensor. The temperature is measured using temperature sensor and
an alert sent via message, email and even a tweet on social media. The system deploys Bolt iot
wifi module which transmits data to open IOT API service Digital Ocean.
I
Acknowledgement
I remain immensely obliged to Prof. Chitra Wasnik for providing me with the idea of this topic,
and for her invaluable support in gathering resources for me either by way of information or
computer also her guidance and supervision which made this project successful.
We would like to thank mini project Coordinators, Dr. P. J. Nikumbh, Head Computer
Engineering Department, Dr. Subhash Shinde, Vice Principal and Dr. Vivek Sunnapwar,
Principal, LTCoE.
I am also thankful to faculty and staff of Computer Engineering Department and Lokmanya
Tilak College of Engineering, Navi Mumbai for their invaluable support.
I would like to say that it has indeed been a fulfilling experience for working out this project
topic.
________________________ ________________________
II
LIST OF FIGURES
III
TABLE OF CONTENTS
Abstract……………………………………………………………………………….I
Acknowledgement……………………………………………………………………II
Table of contents………………………………………………………………………IV
Chapter 4. Conclusion
IV
1. BACKGROUND AND MOTIVATION
1.1 Introduction
EMS monitors environmental factors like light and temperature. It keeps detailed records of
those factors with a live video streaming using a high-quality camera. EMS display useful
information on software interface, which gives operator/user one stop dashboard with alarming
facility in the abnormal condition.
EMS prevents calamitous situations resulting from climate and power related issues within
monitored environment, this can reduce revenue loss, save guard reputations and prevent life
threatening accidents. EMS best suits for the Building Management System, Monitoring data
centre / IT, telecom, healthcare and food storage Industry.
EMS Device
EMS devices comes with wide range of models, it differs by On-Board Sensors, External
Sensors and other hardware features. It has capacity to connect various analogue, digital sensors .
EMS device-
Features
Monitors- EMS monitors various parameters like Temperature and Light.
Applications
1
1.2 Motivation
The main motive behind this project is to make the users aware of the environmental
changes. The system enables the users to get in-phone alerts about the temperature and also
makes it easy for them to grasp the changes in light intensity during different parts of the day
in different surroundings. Various IOT products are able to adjust the room environment
according to the weather outside. These products can use this system as a module to detect
the temperature. Also, various weather prediction systems can use the light intensity data to
form various patterns and predict the conditions in future.
The bolt wifi module contains a ESP-8266 circuit. The problem is to connect the LDR,
resistor in such a way that the light intensity is detected in an optimum way. This detected
light intensity has to be plotted in the form of various types of graphs by accessing the
google charts library through JavaScript.
For temperature monitoring, the LM35 has to be connected to the bolt wifi module using the
male-female wires. The connections are made in such a way that there is no time lag while
detecting temperature and accuracy is maintained.
If the temperature crosses a threshold value, an alert is sent to the user in form of an sms and
an email. Also, a tweet is posted from the user’s account to make his acquaintances aware of
the recent temperature rise. These tweets is posted by using the python tweepy library.
2
2. LITERATURE SURVEY
The Internet of things (IoT) is the extension of Internet connectivity into physical devices and
everyday objects. Embedded with electronics, Internet connectivity, and other forms of hardware
(such as sensors), these devices can communicate and interact with others over the Internet, and
they can be remotely monitored and controlled.
The definition of the Internet of things has evolved due to convergence of multiple technologies,
real-time analytics, machine learning, commodity sensors, and embedded systems. Traditional
fields of embedded, wireless sensor networks, control systems, automation (including home and
building automation), and others all contribute to enabling the Internet of things. In the consumer
market, IoT technology is most synonymous with products pertaining to the concept of the
"smart home", covering devices and appliances (such as lighting fixtures, thermostats, home
security systems and cameras, and other home appliances) that support one or more common
ecosystems, and can be controlled via devices associated with that ecosystem, such as
smartphones and smart speakers.
The IoT concept has faced prominent criticism, especially in regards to privacy and security
concerns related to these devices and their intention of pervasive presence.
3
3. SYSTEM ANALYSIS AND DESIGN
4
3.3 Overall System Description
1. Make sure you have not powered on your Bolt Module while connecting the circuit. This
will ensure that in case we make any mistake, it will not short circuit your device. Switch
off the power if it is connected.
2. Connect one end of the LDR to the A0 (analog) pin of the Bolt device and other ends of
the LDR to the 5V pin of the Bolt as shown in the image below.
3. Connect the 10K ohm resistor between the GND and A0 pin of the Bolt so that LDR and
the resistor form a series connection.
5
B. Temperature Monitoring System
1. Make sure you have not powered on your Bolt Module white connecting the circuit. This
will ensure that in case we make any mistake, it will not short circuit your device. Switch
off the power if it is connected.
3. Connect the GND pin of LM35 to GND pin of the Bolt device.
4. Connect the analog output pin of LM35 to A0 (analog input) pin of the Bolt device.
6
3.4 Overview of the modules and subsystems
STEPS:
1. After making the connections, create a product on bolt cloud and link the
device to the product.
2. Select the A0 pin in the hardware tab on bolt cloud and give it the name
“light”.
7
A. Light Intensity Monitoring System
Initial step is to create product on bolt cloud and configure it by writing few lines of code. Once
code is saved we proceed with selecting bolt iot cloud and linking it with product. The result is
generated as different types of graph.
setChartLibrary("google-chart");
setChartType('barGraph');
plotChart('time_stamp','light');
Output:
8
Code for Gauge Chart:
setChartLibrary("google-chart");
setChartTitle('Gauge Chart');
setChartType('gauge');
setAxisName('light);
setDimensions(400, 400);
setMaxValue(1023);
setGreen(250, 500);
setYellow(501, 725);
setRed(726, 1023);
plotChart('light);
Output:
9
B. Temperature Monitoring System
Create product on bolt cloud and log in to the digital ocean droplet using PUTTY followed by
writing codes in separate files to perform various functionalities.
Temperature alerts are send as sms, email and even a tweet on social media site.
10
Output:
On Terminal:
As SMS:
11
Code for Email:
MAILGUN_API_KEY = 'This is the private API key which you can find on your
Mailgun Dashboard'
SANDBOX_URL= 'You can find this on your Mailgun Dashboard'
SENDER_EMAIL = 'This would be test@your SANDBOX_URL'
RECIPIENT_EMAIL = 'Enter your Email ID Here'
API_KEY = 'This is your Bolt Cloud accout API key'
DEVICE_ID = 'This is the ID of your Bolt device'
12
Code for tweet on social media
Introduction to Tweepy
Tweepy is an easy to use Python library for accessing the Twitter API. Twitter provides APIs to access
various functionality related to your Twitter account. These API's work over HTTP protocol, i.e. you can
make GET, POST requests to access your Twitter account.
Also accessing the information in the response object requires very good knowledge of JSON. To
make the process of making the Twitter API requests simpler and to handle the response information
in an easier manner, we shall make use of the Tweepy library. The Tweepy library converts all the
Twitter APIs into Python functions that you can simply use in your programs and access the Twitter
API. It also returns the Twitter APIs data in an object format with methods that we can use to access
the data easily.
CONFIGURATION FILE
CODE (post-tweet.py)
import tweepy
import conf, json, time
from boltiot import Bolt
# Dictionary to store credentials as key-value pairs.
config = {
"consumer_key" : conf.consumer_key,
"consumer_secret" : conf.consumer_secret,
"access_token" : conf.access_token,
"access_token_secret" : conf.access_token_secret
}
# Method to authenticate user via Tweepy and return API object
def get_api_object(cfg):
auth =tweepy.OAuthHandler(cfg['consumer_key'],cfg['consumer_secret'])
auth.set_access_token(cfg['access_token'],cfg['access_token_secret'])
return tweepy.API(auth)
mybolt = Bolt(conf.bolt_cloud_api_key, conf.device_id)
temperature_threshold = 59
13
while True:
response = mybolt.analogRead('A0')
data = json.loads(response)
print (data['value'])
try:
sensor_value = int(data['value'])
if sensor_value > temperature_threshold:
print "Temperature has crossed the threshold."
# Call get_api_object to authenticate user and get the API object
api_object = get_api_object(config)
# Store the tweet message in the variable
tweet = "Temperature has crossed the threshold."
# Post the tweet on your Twitter account using the
update_status method.
status = api_object.update_status(status=tweet)
except Exception as e:
print ("An error occurred ", e)
time.sleep(10)
Output:
14
3.5 Circuit Diagram of ESP8266-12E
15
4. CONCLUSION
The importance of environmental monitoring system lies in sending prompt alerts about the
imminent weather to the users and also visualizing the light intensity data for further analysis.
The environmental monitoring system is of great use to various IOT gadgets that use the
temperature data to adjust the room temperature. The graphs plotted for the light intensity can be
used to analyze different patterns of light intensity during different times of day. Thus, the
environmental monitoring system serves a great purpose.
16
5. REFERENCES
[1] Jalpa Shah & Biswajit Mishra, IoT enabled environmental monitoring system for smart
cities, IEEE, 2016
[2] Jaydeep Thik & Chintan Bhatt, Data Logging and Visualization Using Bolt IoT, ICANI,
2019
[3] Anitha Bommana, IoT based Monitoring and Control System for Home Automation
using Prediction Algorithms, IJARCCE, 2017
[4] Bruce Sinclair, IoT Inc: How Your Company Can Use the Internet of Things, May 2017
[5] Maciej Kranz, Building the Internet of Things: Implement New Business Models,
Disrupt Competitors, Transform Your Industry, 2016
[6] Arshdeep Bahga & Vijay Madisetti, Internet of Things: A Hands-On Approach, 2015
[7] https://docs.boltiot.com/docs/bolt-wifi-module
[8] https://docs.boltiot.com/docs/getting-started-with-bolt-temperature-monitoring-system
[9] https://files.readme.io/e6e2307-bolt_v4.0_ROHS_sch_esp-12e.png
[10] https://docs.boltiot.com/docs/controlling-devices
[11] https://etasr.com/index.php/ETASR/article/view/2144
[12] https://docs.boltiot.com/docs/getting-started-with-bolt-light-monitoring-for-plants
17
ANNEXURE
PLAGIARISM REPORT
This is to certify that this project is the original work of Ms. Shreya Bhagole and Mr. Monish
Naidu. The project has been solely prepared by the above mentioned students. The idea was
supported by the references mentioned. There is no plagiarism involved whatsoever in the idea
or the implementation of the project.
18