Smart Energy
Smart Energy
Smart Energy
Thesis submitted by
L Srikanth (B121686)
D VinayKumar (B121857)
M Chanti (B121147)
i
Rajiv Gandhi University of Knowledge
Technologies
Basar–504107, Nirmal (D), Telangana. (INDIA)
CERTIFICATE
This is to certify that the thesis entitled “SEM-IoT(Smart Energy Management using
IoT)” being submitted to the Rajiv Gandhi University of Knowledge Technologies, by
Mr. L Srikanth (ID No.B121686), Mr. D VinayKumar (ID No:B121857), Mr. M
Chanti (ID No:B121147) in partial fulfillment for the award of Bachelor of Technology
in Electronics and Communication Engineering is a bona fide work carried out by him
under our supervision and guidance. The matter embodied in this thesis has not been
submitted to any other University for the award of any degree or diploma. This thesis, in
our opinion, is worthy consideration for the award of the degree of Bachelor of
Technology in accordance with the regulations of the institute.
ii
Rajiv Gandhi University of Knowledge
Technologies
Basar–504107, Nirmal (D), Telangana. (INDIA)
CERTIFICATE OF EXAMINATION
This is to certify that I have examined the thesis entitled “SEM-IoT(Smart Energy
Management using IoT)” submitted by Mr. L Srikanth (ID No.B121686), Mr. D
VinayKumar (ID No:B121857), Mr. M Chanti (ID No:B121147) and hereby accord
my approval of it as a study carried out and presented in a manner required for its
acceptance in partial fulfillment for the award of the graduate degree for which it has
been submitted. This approval does not necessarily endorse or accept every statement
made, opinion expressed or conclusion drawn as recorded in the thesis. It only signifies
the acceptance of the thesis for the purpose for which it has been submitted.
External Examiner
Date:
Place:Basar.
iii
DECLARATION
I hereby declare that the work embodied in this thesis has been carried out by me under
the supervision of Mr. RajkumarAmbulage in the department of Electronics and
Communication Engineering, Rajiv Gandhi University of Knowledge Technologies,
Basar and has not been submitted to any other University. Information derived from the
published and unpublished work of others has been acknowledged and a list of
references is given.
iv
ACKNOWLEDGEMENTS
I wish to express my deepest wholehearted gratitude to my project supervisor
Mr. Rajkumar Ambulage Asst. professor in the Department of Electronics and
Communication Engineering for their valuable advices and technical support from the
beginning of my project.
I owe a particular debt of gratitude to Mr. ACh. Madhusudana Rao, Head of the
Department of Electronics and Communication Engineering for his valuable guidance,
significant suggestions and helping every aspect to accomplish this work.
I also extend my profound thanks to all the faculty members and lab staff who
have supported and helped me throughout this project.
I wish to thank my friends, for helping me get through the difficult times, and for
all the emotional support, entertainment, and caring they provided.
Finally, I love to dedicate this thesis to my family members for their sacrifice,
cooperation, support, affection and patience shown during the course work which made
it possible to complete this work in time.
Mr. L Srikanth
Mr. D VinayKumar
Mr. M Chanti
v
ABSTRACT
The current world is running behind the improvising and inventing new
technologies. Energy/ Power management plays a major role for deployment of these
technologies. As all we know world is running out of energy sources and trying for
alternative i.e. renewable energy sources. On other hand we should have a system the
uses the current energy sources properly and conveniently i.e. Energy Management.
Energy management is a basic thing and most useful thing to save our energy sources.
But this is not done manually because which needs lot of observation and maintenance.
To make this energy management system smart we are deploying a technology known as
IoT (Internet of Things). This is a technology known as 4th industrial revolution. Recent
study says about 31 billion devices will be connected with IoT by 2020. IoT is booming
technology which has characteristics of unique id, continuous connectivity, global nature
and accessibility. For our system SEM-IoT(Smart Energy Management using IoT)
proposes a smart energy management technique which has continuous tracking of energy
consumption data and analysis over data, remote controlling of electrical appliances over
internet with proper authentication.
This system also has the facility of SMS alert system and Connection termination
system which can fulfil the concept of smart energy management.
Key word: IoT (Internet of Things), SEM-IoT(Smart energy management using IoT),
Energy Management, SMS alert.
vi
Table of Contents
CERTIFICATE………………………………………………………………………….ii
CERTIFICATE OF EXAMINATION……………………...………………………...iii
DECLARATION………………………………………………………………………..iv
ACKNOWLEDGEMENTS……………………………………………………………..v
ABSTRACT…………………………………………………..…………………….…...vi
List of Figures…………………………………….………………………………..…....ix
Abbreviation …………………………………………………………………………….x
1: Introduction………………………………………..……………………………........1
1.1 Introduction …………………………………....……………….. …………...1
1.1.1 What is Smart Energy Management……………………………………..2
1.1.1.1 Controlling of Electrical Appliances……………………………...2
1.1.1.2 Monitoring of Energy consumption……………………………....2
1.1.2 Why Smart Energy Management? ............................................................2
1.2 Existing systems ……………………………….……….…………………….3
1.2.1 DTMF based system……………………………………..………………3
1.2.2 GSM based system……………………………………….........................3
2: Equipment and Tools required……..…….…………………....................................4
2.1 Raspberry pi ………………………………………………………….............5
2.1.1 Hardware layout of Raspberry pi………………...............................6
2.2 Digital Energy meter……………………………….……………....................8
2.3 LDR……………….…………………………………………………..............9
2.4 Arduino……………………………………………………….........................9
2.5 Relay circuit …………………………………………….………………......11
3: Literature review of SEM-IoT System……………………...………......................12
3.1 Motivation of the project…………………………………….........................12
3.2 Objective……………………………………………………….....................12
3.3 Overview of SEM-IoT ……………………………………...…....................14
3.4 How SEM-IoT works…………………………..............................................15
vii
3.4.1 Live monitoring………………………….…...………….………..16
3.4.2 Analysis………………………………………………….…...........16
3.4.3 Controlling ………………………….……………..…...................16
4: Implementation of SEM-IoT………………..............……………..........................17
4.1 Data Collection, Calculations and Processing………………………...…….17
4.2 Building a Website……………………………………………………...…..18
4.2.1 Creation of template pages…………………………………...…...18
4.2.2 Creation of mysql database………………………………………..21
4.3 Posting Raspberry data onto Web server……………………………………22
4.3.1 POST Data………………………………………………………...22
4.3.2 GET Data………………………………………………………….23
4.4 Analysis, Controlling, Monitoring over Internet…………………………....23
4.4.1 Monitoring of Energy consumption……………….……………....23
4.4.2 Analysis of Energy Consumption………………………………....24
4.4.3 Controlling of Electrical Appliances………………………….......25
5: Real Time Monitoring and Controlling…………………………………………...27
5.1 Sending SMS………………...........................................................................27
5.2 Connection ...……………………………………………...……………...…27
5.3 Advantages…………………………………………………………………..28
5.4 Challenges …………………………………………………………………..28
6: Extensions and Future scope………………………………………………………29
7: Conclusions…………………………………………………………………….…....30
Bibliography……………………………………………………………….………..31
viii
List of Figures
Figure 1.2.1 : DTMF Based Control System Block Diagram……………………...…..3
Figure 1.2.2 : GSM Based Control System Block Diagram……………………………3
Figure 2.0 : Required Material……………………………………………………….4
Figure 2.1.1 : Raspberry Pi Board……………………………………………………...5
Figure 2.1.2 : Hardware layout of Raspberry Pi………………………………………..6
Figure 2.1.3 : Raspberry Pi 2 GPIO Header…………………………………………...7
Figure 2.2.1 :Digital Energy Metre………………………………………………….…8
Figure 2.3.1 : LDR Sensors Diagram…………………………………………………..9
Figure 2.4.1 : Arduino board Layout………………………………………………….10
Figure 2.5.1 : Relay controller……………………………………………………..….11
Figure 3.0 : Overview Of SEM-IoT System………………………………………...13
Figure 4.1.2 : Counting pulses………………………………………………………...17
Figure 4.1.1 : Arduino code to collect the LDR pulses……………………………….17
Figure 4.2.1.1 : Web server Template page………………………………………..……18
Figure 4.2.1.2 : Web server Home page………………………………………….……..19
Figure 4.2.1.3 : Web server Analysis page……………………………………….……..19
Figure 4.2.1.4 : We server Controller page……………………………………..……….20
Figure 4.2.1.5 : We server About page………………………………………….………20
Figure 4.2.1.6 : We server Contact page………………………………………..……….20
Figure 4.2.2.1 : MySql Database……………………………………………….............21
Figure 4.2.1.2 : Database table for Analysis purpose………………………………..….21
Figure 4.2.1.2 : Database table for Controlling purpose……………………………......22
Figure 4.4.1.1 : Appliances Switch Board………………………………………..……..27
Figure 4.4.1.2 : Status of Appliances ……………………………………………...…....27
Figure 4.4.2.1 : Energy Consumption Monitoring ……………………………...….......28
Figure 4.4.3.1 : Energy Consumption Analysis…………………………………………29
Figure 5.1.1 : SMS alert…………………………………………………………........30
Figure 2.1.1 : Connection Termination………………………………………………..31
ix
Abbreviations
IoT : Internet of Things
kWh : kilowatthour
SMS : Short Message Service
DTMF : Dual Tone Multi Frequency
FM : Frequency Modulation
GSM : Global System for Mobile
GPIO : General Purpose Input / Output
USB : Universal Serial Bus
PHP : Personal Home Page
HTML : Hyper Text Markup Language
CSS : Cascading Style Sheet
x
Chapter 1
Introduction
1.1 Introduction
The Internet of Things (IoT) can be described as connecting everyday objects like
smart-phones, Internet TVs, sensors and actuators to the Internet where the devices are
intelligently linked together enabling new forms of communication between things and
people, and between things themselves. Building IoT has advanced significantly in the last
couple of years since it has added a new dimension to the world of information and
communication technologies.
The Internet has come a long way over the last 30 years. Old-fashioned IPv4 is
giving way to IPv6 so that every device on the Internet can have its own IP address.
Machine-to-machine (M2M) communication is on the rise, enabling devices to exchange
and act upon information without a person ever being involved. The scope and scale of the
Internet have changed as well: industry leaders predict that the number of connected devices
will surpass 15 billion nodes by 2015 and reach over 50 billion by 2020. The challenge for
the embedded industry is to unlock the value of this growing interconnected web of devices,
often referred to as the Internet of Things (IoT), describing it as the ultimate tool in our
future surveillance. This network has the power to reshape our cities.
1
quality of life. With the introduction of the Internet of Things (IoT), the research and
implementation of home automation are getting more popular.
2
1.2 Existing systems
DTMF based system:
This system for automation utilizes Dual Tone Multi Frequency (DTMF) that is
paired with a wireless module to provide seamless wireless control over many devices. This
user console has many keys, each corresponding to the device that needs to be activated. The
encoder encodes the user choice and sends via a FM transmitter. The FM receiver receives
the modulated signal and demodulates it and the user choices determined by the DTMF
decoder. Based upon this the required appliance is triggered.
3
Chapter 2
Equipment and Tools Required
4
2.1 Raspberry pi:
5
2.1.1 Hardware layout of Raspberry Pi:
6
Figure 2.1.3: Raspberry Pi 2 GPIO Header[7]
7
2.2 Digital Energy Meter:
Generally the energy consumption is measured in kWh (kilowatt hours). This can be
done by equipment inbuilt in digital energy meter by counting number of pulses as energy is
consumed.
In modern digital energy meter two types of calculations are available:
i) 1600 impulses/kWh
ii) 3200 impulses/kWh
It varies from meter to mete to meter in this meter the specifications says that 1600
imp/kWh
Calculations:
1kWh=1600 impulses
Number of units consume= (Number of pulses)/(1600)
Total amount = (Number of units consumed)*(5 Rs) (5Rs for 1kWH)(Approx)
8
2.3 LDR (Light Dependent Resistor):
2.4 ARDUINO:
Arduino is a small microcontroller board with a USB plug to connect to your
computer and a number of connection sockets that can be wired up to external electronics,
such as motors, relays, light sensors, laser diodes, loudspeakers, microphones, etc. They can
either be powered through the USB connection from the computer or from a 9V battery.
They can be controlled from the computer or programmed by the computer and then
disconnected and allowed to work independently. This also has the advantage that you can
use the USB connection to pass data back and forth between an Arduino board and your
9
computer. Arduino is best known for its hardware, but we also need software to program that
hardware.
Pin Configuration:
❖ 14 Digital IO pins(0-13)
These can be inputs or outputs, which is specified by the sketch you create in the IDE.
❖ 6 Analogue In pins (pins 0-5)
These dedicated analogue input pins take analogue values and convert them into a
number between 0 and 1023.
❖ 6 Analogue Out pins (pins 3,5,6,9,10 and 11)
These are actually six of the digital pins that can be reprogrammed for analogue output
using the sketch you create in the IDE.
❖ Power Pins
The board can be powered from your computer’s USB port, most USB chargers, or an
AC adapter. On your Roboduino Board there is an option for power selection by jumper
between USB power and external power supply. If Roboduino is connected to computer
10
then jumper is to be put towards USB and if external adapter or battery is connected then
put the jumper towards the other end.
A Relay is electrically operated switches, which allow low power circuits to switch a
relatively high voltage or current on/off. For a relay to operate a suitable pull in and holding
current should be passed through its coil. Relay coils are designed to operate from a
particular voltage often its 5V or 12V. The function of relay driver circuit is to provide the
necessary current energize the relay coil, when a LOGIC 1 is written on the PORT PIN thus
turning on the relay. The relay is turn off by writing LOGIC 0 on the port pin. In our system
four relays are used for device control.
11
Chapter 3
Literature Review of SEM-IoT System
The smart energy management concept is a wide topic and includes many
functionalities to fulfil concept of smart management. Basically smart energy management is
known to be controlling, monitoring, analysing the energy consumption and maintaining a
smart system. If we consider the general system the controlling, monitoring, analysis is done
by manually and which is very difficult and tough task where it requires continuous
observation.
Here our system proposes a new method of energy management i.e. SEM-IoT (Smart
Energy management using IoT) that includes smart management concepts like monitoring,
controlling, analysing over internet/web server.
3.1 Motive of the Project:
The main motive of this project is to avoid unnecessary energy waste. Although the
world is running out of the energy resources energy is being wasted unnecessarily due
human laziness, carelessness and irresponsibility. Remotely monitoring and controlling
smart system can bring change to this system and get to
Where the energy is being wasted?
How much energy is being wasted?
When the energy is being wasted?
If we can get to know the above things then we can implement a perfect system to
overcome the problems of energy wastage.
3.2 Objective:
To control, monitor, analyse energy consumption and to provide a best
solution for energy wastage by implementing a system SEM-IoT (Smart
Energy management using IoT)
12
3.3 Overview of SEM-IoT System:
Energy
meter with
LDR
Arduino
AC
Relay
Relay
Sending SMS Fan
SEM-IoT
WebServer Raspberry Pi
Light
Connection Relay
off/on
13
3.4 How SEM-IoT Works
SEM-IoT system has several stages
The pulses received from LDR will be counted by Arduino and the calculations done
as:
1kWh=1600 impulses
Number of units consume= (Number of pulses) / (1600)
Total amount = (Number of units consumed)*(5 Rs) (5Rs for 1kWH) (Approx)
The calculated information will be sent to Raspberry Pi using USB cable from Arduino in
the form of raw data.
Note: Here we are using arduino as analog to digital converter as Raspberry pi is digital
board which doesn’t take the analog data.
14
Stage3: Development of Website
Website is also a key thing for our system because we are saying that the continuous
observation of energy consumption is our aim we observes, monitors, controls the energy
consumption over internet using a web server in GUI model.
Database creation is used to maintain, manipulate, storing any type data. Here
we are created database to store the energy consumption data for analysis.
For the creation of mysql database we used phpMyAdmin for maintaining the
database records.
Stage 4: Posting data over web server and receiving the status through Raspberry Pi
15
Receiving data and status:
As we have posted data onto web server if any operation done over should be
reflected on Raspberry pi for example controlling of electrical appliances. This can
be done as if the status of any appliance is changed on internet/Web server the
command/data/status is sent back to Raspberry Pi as it is requested and the status of
appliances can be changed.
3.4.2 Analysis
Analysis also based the energy consumption data from Raspberry Pi. The Number of
units consumed, Total amount for consumed units, Initial balance, Remaining balance,
Connection details, SMS alert will be sent.
3.4.3 Controlling:
Controlling of electrical appliances is done by Raspberry Pi using relay switches
connected to the GPIO pins.
This is done as:
1. Control Switchboard in web interface displays the switches/buttons
corresponding to the electrical appliances.
2. Whenever the particular button is pressed corresponding button value stored in
database. And the database data will be accessed in another file.
3. Whenever Raspberry Pi calls particular file according to the file data the
appliances will be controlled.
16
Chapter 4
Implementation of SEM-IoT
4.1 Data Collection, Calculations and Processing:
17
4.2 Building website:
Here we used PHP and HTML languages for creation of web templates. CSS is used
for appending colour and style to the web pages.
4.2.1 Creation Template pages
Here our website has following Pages:
HOME
CONTROLLER
ANALYSIS
ABOUT
CONTACT
18
Those pages having the information as;
Homepage: Introduction of our project and details:
19
Controller page: Controller page has authentication for controlling appliances
20
4.2.2 Creation of MySql Database
MySql database is created for storing the energy consumption values.
This is done by phpMyAdmin. Which has the username and password for authentication.
21
Database Table for Controlling Purpose:
This database table has the status of the electrical appliances.
4.3 POST and GET Raspberry data onto and from Web server
Posting Raspberry Pi Data onto web server done as
Raspberry Pi requests the web server page with specific domain name.
The server receives the request from R Pi and establish connection.
Now, the web server receives the R Pi data and stores in database :
4.3.1 POST data:
Here we are posting our energy consumption data onto the web server named
“https://rguktiotlab.000webhostapp.com/ “ and we are posting data onto a page
called “val.php” which updates the “id4903613_mydb” database table “graph”.
Program for Posting Energy consumption data to web server:
22
4.3.2 GET data:
Here we are receiving or getting data or status of electrical appliances which
are being controlled by a web server “ https://rguktiotlab.000webhostapp.com/ “
from a page named “buttonstatus.php” which holds the data of database
“id4903613_mydb” and table “status”.
Program to get appliances status data from web server:
4.4 Analysis, Controlling, Monitoring over Internet
23
4.4.2 Analysis of Energy consumption
Analysis of energy consumption is done as the web server collects and stores
the energy consumption data and displays as the Total number of units consumed,
initial amount, Amount used for consumed units and remaining balance.
Whenever the balance is about to finish it displays the message to update the
balance.
24
4.4.3 Controlling of Electrical Appliances
25
Here the status of the appliances is shown as certain appliance is ON / OFF. This is
due to whenever the button gets pressed then the status is updated and corresponding
appliance state will be changed.
26
Chapter 5
Real Time Controlling and Alert System
Real time controlling and alert system is advancement in smart energy management
which includes several important topics like SMS alert and terminating main connection.
5.1 SMS Alert
SMS alert is most useful topic in the smart energy management. Although our system
is web based SMS alert is also needful, because we didn’t always have access to web server
to know the details or information about our system. For that we are providing SMS alert
system which sends the information of SEM-IoT system via phone.
27
5.2 Connection Termination:
To fulfill the concept of the smart energy management we must include the
term of connection termination i.e. we are costing amount for number of units consumed for
a uploaded initial amount and the amount is keep on deducting. Whenever the amount is
about finish or a threshold value is reached then we terminates the connection until and
unless the amount is re loaded.
28
5.3 Advantages
1. The SEM-IoT system provides a real time monitoring, analysis and controlling by
tracking the energy consumption and posting it onto the web server.
2. System to provide the information of energy wastage on web server by showing
the energy consumption on a continuous graph.
3. Provides the SMS alert system and Connection termination system if the balance
remained is about to finish.
4. Controlling of appliances remotely on web server by showing the status of
appliances on web server.
5.4 Challenges
1. Continuous power connectivity.
2. Continuous internet connectivity.
3. Storing and maintaining everyday’s data
29
Chapter 6
Extensions and Future scope
Our system may proposes the a good system for energy management but for the
needs and requirements of today’s society the system should be upgraded or has the future
scope for extensions.
The following points have the key role in extension of project.
❖ System should be environment friendly i.e. should behave based on the environment
condition that includes brightness of lights based on lighting outside, temperature
control with respect to environment.
❖ More security is needed to avoid malfunctioning and hacking.
❖ System should have human detection techniques to detect human and control the
system.
❖ The system should be extended for industries and offices.
30
Chapter 7
Conclusions
The SEM-IoT Smart Energy Management system is proposing a better and suitable
system for energy management. It include the remote controlling of electrical appliances
remotely i.e. on a web server, monitoring the energy consumption and analyzing the results
over internet/ web server. The system also proposes future extension where the system is
actually lacking and what actually should be implemented.
The SEM-IoT system also has the SMS alert system and Connection Termination
systems which helps in real time monitoring and tracking of energy consumption.
The system is mainly based on the Raspberry Pi which is known to be mini CPU
(Central Processing Unit) which does all the needful. R Pi is responsible posting and getting
data over internet which actually includes both embedded and IoT concepts.
Finally SEM-IoT system is best energy management system with continuous
tracking of energy consumption data, analyzing the data and controlling of electrical
appliances.
31
Bibliography
[1]. Automated Energy Meter Using WiFi Enabled Raspberry Pi P Arun Chandra, G Mohith
Vamsi , Y Sri Manoj , Gerardine Immaculate Mary. Recent Trends in Electronics,
Information & Communication Technology (RTEICT), IEEE International Conference on
09 January 2017.
[2]. Design and Implementation of Home Energy and Power Management and Control
System Vanessa Barnes, Thomas K. Collins, and Godfrey A. Mills Department of Computer
Engineering, University of Ghana, Legon.
[5].Enterprise IoT: Strategies and Best Practices for Connected Products and Services By
Dirk Slama, Frank Puhlmann, Jim Morrish, Rishi M Bhatnagar
[6]. Collaborative Internet of Things (C-IoT): For Future Smart Connected Life ...
By Fawzi Behmann, Kwok Wu
[7].https://www.raspberrypi.org/products/raspberry-pi-2-model-b/
[8]. Arduino Uno Rev3,https://store.arduino.cc/usa/arduino-uno-rev3
[9]. https://www.w3schools.com/php/default.asp
[10]. https://www.w3schools.com/php/php_mysql_intro.asp
[11]. https://www.000webhost.com/
[12]. https://www.fast2sms.com/dashboard/sms/bulk
32
33