Smart Eco Home Report
Smart Eco Home Report
Spring 2018-19
Project Advisors:
Advisor Name: Mr. Saifullah Shafiq
Public Information
Abstract
Public Information
2
Table of Contents
Abstract ................................................................................................................................... 2
1. Introduction ............................................................................................................................ 5
Public Information
3
4.3 Subsystem 3: Power factor, Energy ................................................................................ 34
References ................................................................................................................................ 48
Public Information
4
1. Introduction
In this project, a smart energy meter is designed which is used to measure voltages and current
to calculate power consumption. This would enable us to calculate electricity units
consumption and control home appliances by using WiFi enabled control device with
integrated mobile application and voice recognition software developed in Android Platform.
The design of the proposed circuit can be extended to various applications includes: as GSM
based energy meter and RFID based energy meter.
To design a smart energy meter that will have the following functions
The project will involve the design of a smart energy system that will perform to the following
target specifications:
1) Assumes home powered from grid (220V, 60Hz)
2) Digitally measure consumption of electricity by measuring current, voltage, power
factor.
3) Digitally measure consumption of electricity by measuring voltage to load sensitivity
and energy consumed.
4) A mobile application is developed in Android Platform to remotely communicate with
the Main Control Energy system.
5) Voice recognition and controlling the device power supply.
Public Information
5
6) WiFi enabled appliances/load control switching control system
7) Apply control measures to reduce consumption
8) Control all appliances remotely to save energy
9) Compact design with a dimension of 10.5 in * 8.5 in * 2 in.
10) The system is portable.
The project is divided into several parts to make it easy to handle and test. The main part of the
project is to build a smart meter that will measure and monitor the power consumption.
In first phase, we use voltage and current sensors to measure voltages and current and then
calculate power to be shown on LCD by using Arduino Microcontroller.
The second phase includes researching and implementing an accurate way to measure power
factor
Public Information
6
Figure 2 Smart Energy Metering and Control System
In third phase, we have used Four relays and connect our controller with internet using
ESP8266 internet module. The main task is to operate our home appliances by using IoT. The
block diagram is shown in Figure 2.
In this project, we have developed a way to measure voltage to load senstivity. The block
diagram of the system is shown in Figure 1. The following tasks were performed while
designing the smart energy system. There are:
Public Information
7
A list of components used in this project are listed below.
Public Information
8
1.5 Applications:
2. Literature review
In smart metering mechanism, the electronic power meter is utilized to fully remote control the
appliances, anti-tampering or anti-theft mechanisms, diagnostics, consumption and power peak
analysis, time-variable tariffs, fault alerts, and other possible instances. The use of the “Power-
Line Communication”, known as PLC or relevant wireless and wired types of technologies for
the connection of the service provider to the meter allows these aforementioned features
compatible and realistic with the future protocols of smart grid.
Smart energy meters are typically digital meters that work in substitute for the old analog
meters many homes use for the recording of their electrical use. Details of energy consumption
can be transmitted by digital meters frequently to the utility as opposed to the conventional
analog meters that need transmit the information using a meter reader. Home electric energy
use is being recorded hourly or less. With smart meters, monitoring your consumption is easier
and accurate to enable you make any informed decisions regarding the energy or controlling
Public Information
9
the use of energy. Some feature sets of the meter are capable of notifying about power outage
or enable the switching on or off of the electricity service of the utility.
In this section, we have highlighted some of the previous works that are relevant to the
proposed design. A comparison of the proposed design is made in next section of this chapter.
Public Information
10
b) Data Reading from Smart Energy Meters in a Modren Metering Infrastructure
Data frequently gathered through the conventional method from electricity meters on the basis
of people displacements have the tendency of being substituted from the electricity meters,
with respect to the people moving houses; have the tendency of being substituted by modern
solutions: the Automated Meter Reading and the drive-by. Drive-by is just the mobile devices,
moving close to the meters, gathering data. There are less personnel and nothing like manual
readings. Moreover, the AMR is the automatic collection of data directly from the meters and
transferring it to a particular central computer.
AMR has benefits like subsidized costs to read meter, accessing meters easily, which can be
otherwise hard to access due to their security measures or positions, higher fraud detection,
real-time pricing supported, decreased read-to-bill time, and many more. Smart meters are very
essential to AMR. Asides from their conventional functions, reading the consumptions requires
smart meters to be capable of sending the readings directly across the communication lines.
Many advanced systems require the meter to identify consumers’ address as well as the
activation or deactivation of internal modules. The required requirements must be satisfied by
a meter, particularly for getting the data read from the convention area of the meter as well as
providing a response to the commands provided by the lines.
A particular infrastructure is required by the AMR. These include the unidirectional system,
which implies that there is a periodical sending of data by meters, or could be bidirectional,
where the possibility of getting the system managed is added, an instance is the connection and
disconnection of users, for the gathering of the data directly from the meters based on set
standards, for the grouping of the meters and more. This infrastructure is regarded as Advanced
Metering Infrastructure, represented as AMI. AMI has a communication channel, which has to
make sure the data collector otherwise known as gateway and the data collector of the
communication smart meter otherwise known as gateway of the central computer exist. The
solutions include the wired solution or the wireless solution. The preferred solution has to
consider the distances that exist between the devices, while considering the current
infrastructure and associated financial implications [2].
c) IR Remote Controlled Home Automation
The IR based wireless type of communication system for the control of home appliance is
discussed in this work. The entire process is controlled using Arduino. A few commands are
sent with the use of IR DVD/TV/MP3 remote to controlling system of the AC home appliances.
Public Information
11
When the signal had been received from the IR remote, the related signal is sent by Arduino to
relays that are in charge of getting the home appliances switched ON or OFF with the help of
the relay driver. This is quite simple. A code is sent when a button is pressed on the remote just
like train of encoded pulses. 38 Kilohertz of modulating frequency is used. The TSOP1738
sensor receives the pulses and Arduino reads and decodes directly to a hexadecimal values after
comparing the decoded value with the pressed button’s predefined hexadecimal value. Any
match from this makes Arduino operate as expected and the 16x2 LCD presents the
corresponding result with the use of the suitable commands [3].
Public Information
12
Figure 5 SMS based system
Public Information
13
2.3 Comparative Study
Increased growth of energy use makes the development of energy conservation an issue of
concern, particularly for increased tariff in the Kingdom of Saudi Arabia. It is utmost desired
to investigate and implement the mechanism to enhance awareness, devise new methods to
reduce the consumption and better utilization. Since the development of energy, conservation
for homes and commercial buildings is increasing, providing suitable methods to assess energy
usage efficiently. Several efforts have been made and are discussed in the literature part of this
chapter.
In our work, we have proposed a simple, more economical solution for energy conservation.
The method is implement with accurate calculation of line parameters, can determine the
various values like voltage, current, power factor, active and reactive powers, power
calculation and energy usage. In addition, the system is equipped with WiFi module to control
the appliance remotely. This would help the consumers with better option to monitor the energy
usage and at the same time, would have an option to control the home appliances remotely.
This low cost solution is mostly suitable for domestic applications.
Public Information
14
3. System Design
In this chapter, we will discuss the various design constraints and available option for
implementing the various stages of the smart energy metering and remote controlling of the
appliances. The Arduino programming was used for the design of this project. This chapter
focuses on the design steps of the energy meter implementation. Moreover, the embedded
system is an essential and digital system having a dedicated operation within a massive
electrical system or mechanical system, usually having real-time computing limitations. It is
incorporated as one of the complete device, which usually include mechanical and hardware
parts. On the contrary, a personal computer or the general-purpose computer is made flexible
to satisfy the different needs of the end-users. Most of the devices used nowadays are controlled
by the embedded systems.
The modern embedded systems’ operations are on the basis of microcontrollers alongside
peripheral interfaces and/or the integrated memory, while the ordinary microprocessors (with
the use of external chips for the peripheral interface circuits and memory) remain popular,
particularly in complex systems. In any of these cases, there are different types of the
processor(s) applied, which include the general purpose ones and the extremely specialized
ones in specific computation categories, or including the custom designed for the underworking
application.
Generally, an energy or electric meter measures the quantity of consumed electric energy by
an entity (electrically powered device, residence or business). Typically, energy meters have
calibration in billing units – kilowatt-hour (kWh). The energy consumed and billing cycles are
set up by the periodic readings of the electricity meters amid a cycle. For the choice of energy
savings for a particular time, the settings of the meters can be used for the demand
Public Information
15
measurement, including the maximum power used for a particular interval. Electric rates are
allowed by “time of day” metering to change during the day, for usage recording amid the off-
peak lower-cost intervals or the peak high cost intervals. Additionally, other types of meters
are designed with demand response load, which shed amid peak load intervals. Since the 1880s
when electric energy spread commercially, it turned out extremely essential that an electric
energy meter, just like the gas meters around, was necessitated to appropriately get customers
billed for the energy costs, rather than being billed for a particular fixed lamp number each
month. The majority of the research kinds of meter were created. A DC electromechanical
meter was first operated by Edison alongside a straightforward reading register, but rather got
the electrochemical metering system designed, which made use of an electrolytic cell to sum
up the existing consumption [5].
3.1.1 Design Constraint: Engineering Standards
Design constraints are conditions that are needed to be utilized to execute the project
successfully. Design constraints helped in narrowing down the available choices and its
standardization. Design constraints are sometimes challenging to be addressed but they are
helpful to meet the demand and operate the devices safely. For the proposed design,
engineering constraints are summarized in this section [6].
a. The device should be capable to withstand the temperature of 55 oC in summer. This high
temperature constraints are because of severe weather conditions in Saudi Arabia.
b. The current rating determine the number of appliances to be connected to the given energy
metering. It is required to design such an energy metering system for household load or
should be capable to withstand the commercial energy usage.
c. The device should be capable to give accurate reading in severe summer weather.
d. The devices should withstand with the environmental conditions including sand storms as
well as rainy conditions.
Smart energy meters are equipped with radio waves to allow readings to be taken remotely or
could be utilized for controlling the appliances. There is fear that the radiation emitted from
energy meter might cause some health risk. However, it is proven that smart meters are very
safe to be utilized in home appliances. The electromagnetic spectrum have been used for
decades to transmit radio and television broadcasts, mobile phone services and wireless internet
access without any dangerous [7].
Public Information
16
Working with the AC main may cause some fear for consumers to handle. However, the
proposed design is well isolated to be utilized. There is no safety risk for electricity consumer
in utilizing the proposed design.
Moreover, the high voltage can cause damage to human life. It is highly recommended to be
utilized in safe environment. Safety should be considered for using such devices.
Most of the smart energy metering solutions provided are with high cost. The cost of equipment
and implementation made it difficult for consumers to adopt the solution. The electricity
providing companies have a rising concern of using such high cost solution.
For our proposed work, it is very economical and can be easily implemented in residential as
well as commercial sites. The total cost of such device is less than 500 SAR which make it
more appropriate solution to be utilized. The electricity providing companies are in need to use
such sophisticated system to implement for commercial and residential areas.
For subsystem one(power measurement), while thinking about the design we have set three
must haves that the design must have which are:
No DC measurement because our next step is measuring the power factor
The controller cannot read below zero values
Both Current and Voltage need to be accurate
The power factor calculation we found that implementing a Schmitt trigger circuit will do the
job well, however, after much research we found a way that we can calculate the power factor
using Arduino IDE library functions as it shown in Appendix D. For this subsystem it needed
to be:
Accurate
Economical
Precise
Third subsystem which is expanding the design we needed it to be of high quality, easy to use
and reliable. For voltage to load sensitivity, we needed it be accurate and find a way to
implementing it, therefore, so much research has been done on it, as it never been done before.
Public Information
17
A. Unit of Measurement
The most simple unit of measuring the electricity is the kilowatt-hour [kWh], which is equal to
the amount of power consumption used by a load of one kilowatt over a period of one hour, or
3,600,000 joules. Power consumption is normally measured in watts, but averaged over a
period, most often a quarter or half hour. Reactive power is measured in "thousands of volt-
ampere reactive-hours", (kvarh). By convention, a "lagging" or inductive load, such as a motor,
will have positive reactive power. [4] Only in the presence of external measuring pulse. The
number of pulses measured can be converted to current.
Number of pulses measured in 5sec = x
Number of pulses measured in 1sec = x/5;
Number of pulses measured in 60 sec = (60*x)
In Hall Effect sensor, current flow in a straight path in Hall Effect plate (sensor). If a magnetic
field near the conducive plate is disturbed, the straight flow of the charge get disturbed and
deflected to one side of the conducive plate and the +ve charges on the other side of the
conducive plate. Thus, a voltage difference is created within the sensor and can be utilized to
measure the speed of the motor.
The basic Hall Element of the Hall Effect magnetic sensors mostly provides very small voltage
of only a few microvolts, hence it is necessary to manufacture high gain built-in- amplifiers
within sensor IC. In Figure 5, Hall Effect sensor is connected with high gain amplifier within
the IC and an analog output voltage is obtained in the circuit. In Figure 6, the output of amplifier
is fed to Schmitt trigger circuit. The Schmitt trigger circuit is a logic input type that gives two
different voltage levels, thus the output can be utilized as digital signal. The output sensors
provide 2 output states, either “ON” or “OFF”. This type of circuit is useful to avoid noisy
input and signals with abrupt and unexpected variation in the signals.
Public Information
18
Figure 6 Basic Hall Effect sensor circuit
The Hall Effect based measurement setup is very important to accurately determine, provides
a relatively simple method to measure the change in magnetic field, and can be easily deployed
in such applications. Because of its simplicity, low cost, and fast turnaround time, Hall Effect
sensor, based measurement techniques are indispensable in the industry, research and in
laboratories.
In this project execution, we have started our work by looking for voltage and current sensors.
A number of sensors are available online but it is hard to find them in local market. We got
SCT-013 & Voltage sensor and design procedure and the selection of the rest of the component
were based on this sensor. The components used in this project with details are given below.
9 volt battery. It is not very relaiable as you need to switch of the device every time to
change the battery so the energy measurement will be lost
Power up the Arduino using a voltage regulator LM-2596S IC which will work hand
in hand with the battery option.
Using the a voltage transformer 230V to 5v and a AC to DC circuit to power up the
circuit, this will make sure the device keep running as long as it plugged in .
Using a voltage sensor ZMPT101b to get the voltage
Using ACS712 Current Sensor.
Using a CT SCT-013 for current sensing
Using a voltage transformer for sensing voltage.
Public Information
19
Using a power measurement IC to measure bother current and voltage
LCD (Liquid Crystal Display) A 20x4 LCD display is very simple module and is
widely used in various devices and circuits
Controller we needed a brain to preform all the calculations and we chose
ATmega328 for ease of use and vast library.
Below you will see a comparison table between the devices we used to implement this
subsystem as well as a brief explanation on the products we chose.
Easy availability √ √ √ √
Can be replaced √ √ √ √
easily
Accurate √ √ √ √
Can use √ √ √
emon.lib with
the selected
components
Public Information
20
Current Sensor
A current transformer (CT) is a type of transformer, which is used to measure
alternating current as shown in Figure 8. It flow a current in its secondary coil, which is
proportional to the current in its primary coil. In this project, we have selected SCT-013 current
sensor.
LCD 20x4
LCD (Liquid Crystal Display) screen is an electronic character display module and find a wide
range of applications as shown in Figure 10. A 20x4 LCD display is very simple module and
Public Information
21
is widely used in various devices and circuits. These modules are preferred over seven
segments and other multi segment LCDs.
Arduino Uno
The Arduino Uno is a microcontroller control board based on the ATmega328 as shown in
Figure 11. It has 14 digital I/O pins (in which six can be used as PWM outputs), six analog
inputs, a 16 MHz ceramic resonator, a power jack, a USB connection, an icsp header, and a
reset button.
For this subsystem we had to choose between two designs one that included a Schmitt trigger
circuit, and the second included only Arduino library. For more economical reasons we chose
the later design, as the first design will cost money on ICs that are not very raged.
Public Information
22
IOS platform is very hard to create a program on it and not pay for it as it wont be
able to be downloaded on your iPhone without it being uploaded to the apple store.
Android platform can be used easily because google stores have programs that can
help you get the app on your phone without it being on the store, it is also easier to
create than the iPhone version.
Esp8266
The ESP8266 is a cheap Wi-Fi module with full TCP/IP stack and microcontroller
capability produced by Shanghai-based Chinese manufacturer Espressif Systems as shown
in Figure 12. The chip 1st came to the attention of western makers in Aug-14 with the ESP-
001 module, made by a third-party manufacturer Ai-Thinker.
To implement this we needed to preform the first subsystem and it needed to be measuring the
voltage accurately so we used the same products to measure voltage to load sensitivity.
Public Information
23
3.4 Implementation
The various design stages and relevant hardware implementation is discussed in this section.
The various which factor which limit us to use such solution in described in details in this
section.
A. Design 01
The design 1 is consisted of voltage transformer (VT) and current transformer. The voltage
obtained at the output of VT is passed through conditional circuit to make it suitable to be used
in Arduino controller as shown in Figure 13 with the corresponding waveform in Figure 14.
Figure 15
Public Information
24
B. Design 02
The second approach is to use IC ADE 7757, energy metering IC. The out put of the energy
metering is fed to controller for necessary calculation and showing the data the output LCD.
The block diagram is shown in Figure 16. However, we were not fortunate to test it as it is very
expensive and not available in local market
C. Design 3
This strategy of using voltage sensor and current sensor, we have implmented and we could
measure the voltage and current easly
Public Information
25
Figure 18 Proposed System Block Diagram
Although the above-mentioned circuits as given in Figures 16, can be used to measure the
current and voltages of home. Design one is the best option because of the following reasons:
Ease of execution
Cheap components
More practical
Public Information
26
For subsystem 3 we have only chose
F. Design 1
An automatic relay type of switching system was developed in this subsystem in order
to get load switched remotely. Wi-Fi can be used as a means of communication and
relays can be operated with the use of Wi-Fi with the help of mobile application.
There are some components in this subsystem, including [13]:
- Esp8266 Wi-Fi Module
- Mobile Application
- Arduino Uno
- 4-channel relay module
The software was developed by the team members in Android Platform that can recognize the
instruction from the end user and controlling the units connected to the system remotely
through a Wi-Fi. The Logo of PMU was used to represent the application.
Public Information
27
Figure 18 App used in the project
Public Information
28
4. System Testing and Analysis
For the proposed work, the subsystem 1 is functioning as a power meter. The current and
voltages values can be measured using the power meter. The PF can be measured by using the
current and voltage waveform. The phase difference between the two quantities give us the PF.
We can use different sensors for accuracy and monitor each sensor on different load for the test
analysis [10]. Finally, we choose the most accurate sensor for our project. Following are the
sensor name we used in our project:
1. SCT-013 (Current Transformer)
2. 220VAC - 6VAC Step Down Transformer ( Potential Transformer)
A. Voltage Sensor Selection:
We have tried two voltage sensors ZMPT101b and Transformer based voltage sensor, check
both sensors results, and choose the accurate one for our project.
Circuit diagram of handmade voltmeter for Arduino and other controllers.
We have tested the circuit in simulation and it was working well in simulation. Then the
circuitry was checked on the breadboard and had checked the result on Arduino serial monitor.
Second sensor is ZMPT101b it is a Potential transformer based voltage-measuring module for
AC Sources. We had checked this module as well and the circuit was working well. Sometimes,
we have observed some junk values on analog pin that changed our result for a short interval
of time. This had to be removed for more accurate results.
Public Information
29
Figure 20 ZMPT101B Voltage Sensor
Public Information
30
SCT-013 Specification:
70
60
50
40
30
20
10
0
Load 1: Lamp 60 watts rating Load 2: Lamp 30 watts rating Load 3: Fan 45 watts rating
Public Information
31
Table 3 Current, voltage, and power measurements across three different loads.
In this subsystem, we made an automatic relay switching system which is used to switch load
remotely. We have used a Wi-Fi as a communication medium to and operate the relays by
using Wi-Fi via mobile application. In this subsystem, the following components were used
[12]:
1. 4-channel relay module
2. Esp8266 Wi-Fi Module
3. Arduino Uno
4. Mobile Application
A. 4-Channel Relay Module
An automatic relay type of switching system was developed in this subsystem in order to get
load switched remotely. Wi-Fi can be used as a means of communication and relays can be
operated with the use of Wi-Fi with the help of mobile application. There are some components
in this subsystem, including [13]:
- Esp8266 Wi-Fi Module
Public Information
32
- Mobile Application
- Arduino Uno
- 4-channel relay module
The 4-Channel Relay Module
This system has 4 channel relay interface board with 5 volts, in which the individual channel
requires a 15 to 20 mA type of driver current. It is capable of being used for the control of
different equipment and appliances alongside large current. There are high-current relays
designed with it under the DC 30V 10 Amps or AC 250V 10 Amps. A standard interface is
designed with it, which the microcontroller controls.
The figure below shows that the moment the signal port gets to the low level, there will be a
lighting up of the indicator, while the opto-coupler 817c will then conduct (which transforms
electrical signals based on light and capable of isolating the output and input electrical signals),
while getting the transistor on, there will be an electrifying of the relay coil, while the relay
which typically has an open contact will remain closed. At high level, the relay’s closed contact
will remain closed. Therefore, connecting and disconnecting any load is possible when the
control signal port level is controlled [14]
Public Information
33
commands. In any case, in the first instance, no English language documentation was required
on the chip as well as the accepted commands [15]. The scarcity of the components and its
affordability are suggestions that it can finally be fully available in volumes, and then attracting
numerous hackers to attempt to use the chip, accompanied software, and the module together,
while using Chinese documentation or its translation. This system also has a built-in flash of 1
MiB, which permit for single-chip devices to connect directly to Wi-Fi connections [17].
C.
After we were able to have both current and voltage readings in addition to the real power
reading, we also became able to get the readings of power factor, energy, and voltage sensitivity
as well through some coding in the library of Arduino.
A. Power Factor
The formula used is cos(𝜃𝑣 – θi).
B. Energy
For the sake of presenting, we measured energy in kilo-watt-minutes instead of KWh, as KWh
results are very small numbers considering the short time we have to present the demo. Energy
is taken as the average every minute.
Public Information
34
.
100%
80%
60%
40%
20%
0%
Lamp 60 W Lamp 30 W Fan 45 W Heater 1320 W
Public Information
35
Figure 28 Energy consumption with all loads added up gradually.
It was measured using the simple formula [V(t)-V(t-u) / P(t)-P(t-u)], where t is the time before
the load is connected, and u is the time after the load is connected. Voltage sensitivity is
measured every 30 seconds.
Public Information
36
Table 3 Power factor, energy, and voltage-to-load sensitivity measurements.
Load Power factor (cos(θ)) Energy (KWmin) Voltage to load
Sensitivity V(t)-V(t-u)
/ P(t)-P(t-u)
The prototype of the proposed design is shown in Figure 24 while Figure 25 shows the inside
view of the design. After powering on the meter, the measurement circuit current and voltage
were observed by the sensors (current and voltage). The Arduino was used to compute the
sensors’ signals, adhering to the programmed algorithm. The data processed regarding power,
voltage, and current showed results on the LCD display provided on the power meter. The
connection of the single-phase power meter was done to the main supply prior to connecting
the loads. The sensing of the voltage occurred after the neutral wire and live wire were
connected to the system of the voltage sensor. The measurement of the voltage requires that
just the live wire moved through the current sensor of the Hall Effect to get the current obtained
by the load. The voltage sensor and current sensor of the analog signal were then converted
directly to digital with the use of the ADC (analog to digital converter) embedded within the
Arduino. The LCD display showed the results of the power ratings, applied voltage, and circuit
current.
Public Information
37
Figure 29 Prototype front view
For the proposed work, the factors measured were current, voltage, real power, active power,
reactive power and energy consumption. All the measured values were cross checked with the
known values using multi-meter. It has been observed that the proposed design is working well
for the measured values of voltage, current and power. The design is embedded with the
calibration of each module in Arduino. Any mismatch in the measured values were
compensated for using the numerical values in Arduino Program.
The proposed smart energy meter was also tested for remote WiFi control. We had successfully
demonstrated the ON/OFF operation of various appliances connected to the device. The mobile
application was successfully integrated with hardware. It has been shown that the appliances
can be controlled remotely with accuracy and exhibited good performance of the proposed
device.
Public Information
38
Figure 30 Prototype inside view
Public Information
39
5. Project Management
The current high electricity tariff motivated us to contribute in the energy sector. The main
objective was to come-up with a solution that would be suitable as well as beneficial for public.
This proposed work can be extended further to be utilized for electricity consumers in the
Kingdom of Saudi Arabia.
The proposed project work was divided into 4 sub-systems as given below.
1. Subsystem 1: Measuring Current and Voltage using CT and PT
2. Subsystem 2: Measurement of Power Factor
3. Subsystem 3: Power meter integration with software and hardware
4. Subsystem 4: Power meter integration with automated relay switching
The contribution of each group member to the implementation of each subsystem and time
required to execute the project is given below:
Time
Task Mohammed Abdullah Ahmed Khaled
Duration
Public Information
40
5.2 Contribution of Team Members
SN
ACTIVITY
Assigned ACTUAL PERCENT
To DURATION COMPLETE
1
2 100%
Project Planning M.D/KH/AE/AA
2 subsystem 1: Power
100%
meter M.D/KH 2
3 Test subsystem: Power
100%
meter M.D/KH 2
4 Technical Theoretical
100%
Framework M.D/KH/AE/AA 2
5 Sensors Selection:
Voltage and Current 100%
Sensor M.D/KH 4
6
Sensors Testing 4 100%
M.D/KH
7 Arduino Code
100%
Development AE/AA 3
8 Power factor code and
100%
Testing AE/AA 2
9 Relay selection and
Relays testing on AC 100%
load AE/AA 2
11 Arduino Code
Development for 100%
automated switching AE/AA 2
12 Prepare midterm
100%
Presentation AE/AA 2
13 Power factor code
Development and 100%
Testing M.D/AA 2
14 Power Factor Accuracy
100%
Testing M.D/AA 1
15 Arduino Code
Development for Relay 100%
Switching M.D/AA 2
16 subsystem: Energy and
100%
Sensitivity Analysis M.D/AA
17 Mobile App
development for remote 100%
control KH/AE
18 Automated load
100%
switching testing KH/AE
19 System Level
100%
Integration and Testing KH/AE
20
100%
Prepare final report M.D/KH/AE/AA
21 Prepare final
100%
presentation M.D/KH/AE/AA
22
100%
Prepare Project Demo M.D/KH/AE/AA
23 Submit
100%
Rpt/PPT/Brochure …. M.D/KH/AE/AA
Table The contribution of each team member to perform the tasks are given in the below.
Public Information
41
Table 7: Contribution of all team members
In the proposed work, project execution was monitored since the inception of the idea till the
execution and final demonstration of the full-scale project implementation. During the
execution of the project, Team Leader Mr. Ahmed Al Enazi ensure the following:
a. All the group members ensure that all stakeholders should be well informed about the
progress and execution of the project.
b. All the project stages were reviewed regularly by all team members.
c. The project progress reports were regularly submitted to the Project Advisor.
d. The project planning document was regularly updated based on the comments and
feedback from the advisor and group members.
e. We had ensured to meet regularly to discuss the progress of the project.
f. All team members were regularly in contact and to‐do lists was readily available to all
team members.
g. Validate and follow the schedule to ensure the start, finish and durations of all the tasks.
h. We regularly validate the tasks and their relationship to the project plan execution.
i. We had ensured to accomplish all the tasks accurately according to the plan.
Public Information
42
j. All the group members collaborated to conduct project status meetings regularly.
k. Any delay due to the execution of the challenging tasks were tactfully executed.
l. Any changes in the project execution planning was organized in a way to least impact to
the schedule.
m. All the team members were aware of any schedule change or updates that what had been
done to resolve the problem.
During the implementation and the execution of the proposed work, we had faced a number of
challenges that were overcome with time. The list of all these challenges are outlined below:
Feasibility study of the project execution
Component selection stage to choose the best available resources
Availability of component in local market
Potential high risk while working with 220V AC main
Analysis of the accuracy of voltage sensor and current sensor
The calibration of voltage sensor
Calibration of current sensor
The calculation of power factor and its accuracy determination was a one of greatest
challenge we face during the execution of this project work
Table 8 List of used component and prices
Public Information
43
14 Resistor 10K Ohms 5
15 Resistor 100K Ohms 5
16 220VAC – 5VDC Power Supply 40
17 I2C Protocol Module For LCD 45
Total 894
Relay automated switching and its integration with mobile application
The list of the used components and the prices of the selected components are given in the
below table.
6. Project Analysis
Practical work experience and training during the execution of senior design project execution
for graduating students is their first step to professional career to develop practical work
experiences and enhance their skills. Therefore, this was an ideal opportunity for us that enable
to get exposure and prepare ourselves for the research and development jobs for the challenging
future employment. During the practical project development work experience, we had
developed excellent working skills, polished our communication skills and develop strategies
to work in a team.
In this project, we have learnt a lot independently. The experience gained by implementing a
new technologies and work with different kind of sensors was a great addition to our
Public Information
44
professional skills set. Following are the skills set that we have learnt during the execution of
this project:
1. Get familiar with Arduino IDE software and coding
2. Learn many Arduino libraries that helped us in practical system implementation
3. Sensor interfacing with microcontroller
4. Learn about how to test the complete systems
5. Learn about the system level integration
6. Develop Project management skills
7. Time management skills
8. Report writing
9. Hardware assembling
Engineering solutions always have some impact on the people and society for their benefits.
The engineering solution devised in this project work has a positive impact on the society. In
this project, the solution provided will impact the electricity consumers in a very positive way.
The impact of the proposed engineering solution on people’s life and society are highlighted
below:
a. The design evaluate and describe accurately the impact of increasing tariff of electricity
on people, its effects on the middle class income families.
b. The smart energy metering system will help the electricity consumers to save energy
usage.
c. The switching mechanism is easy to be implemented.
d. The remote control sensing will enable the users to control the electricity consumption.
e. The consumer behavior can be enhanced by adopting the smart energy metering and
controlling the energy consumption.
f. This project accurately determine the energy usage and enable consumers to be updated
on the energy consumption.
g. Evaluate and describe accurately the economic tradeoffs of the proposed work in
newly constructed residential areas.
The existing conventional metering system requires to send the meter readings to electric
power companies for real time billing purposes. The conventional methods is unable to control
Public Information
45
the power losses at the residential and commercial premises. The metering system is unable to
accurately determine the energy usage and solely depends on manual readings. The
contemporary issues as addressed in the proposed design are highlighted below:
a. The smart energy metering system can be utilized to reduce the laborious work of manual
energy consumption reading.
b. Digitally measure consumption of electricity by measuring current, voltage, power factor
and energy usage.
c. The system enable to check the energy usage at any given time.
d. A mobile application is developed to remotely communicate with the Main Control
Energy system.
e. WiFi enabled appliances/load control switching control system
f. Apply control measures to reduce consumption
g. Control all appliances remotely to save energy
7.1 Conclusions
In this project, a smart energy meter system is designed and built using Arduino UNO
microcontroller with current and voltage sensors. The measured energy is displayed on the 20
x 4 Lcd using I2C modules. The smart meter is used to replace the mechanical energy meter
that has several advantages over the mechanical one. In addition, smart meter has the ability to
give us the voltage and current reading at the given instance of time. In addition, we can use
the smart meter for producing reading of various electrical quantities processed in Arduino
microcontroller. The proposed device can be utilized to measure the amount of electric power
consumed by electrical appliances along with the monitoring and the consumption of electric
energy usage by measuring both current and voltage signal from power system. Voltage and
current signal are sampled and analyzed by using Arduino. The devices is embedded with WiFi
control switching operation, i.e- to turn on/off the appliances at any time remotely. An Arduino
code is developed to measure the various circuit parameters including current voltage, power
factor (PF) real power consumption and reactive power. The system is also embedded with
sensitivity measurement module and the values are displayed regularly. To control the various
Public Information
46
appliances, a mobile application is developed and integrated with the system. WiFi enabled
energy metering system can be utilized to control the appliances remotely.
For future work, we suggest expanding the smart meter to work with three-phase system and
to replace the display module with another has the ability to display the results as a graphics
form. Following changes are recommended to be implemented in this project to make it more
accurate and reliable.
Three-Phase measuring
Graphical display
Increase LCD size
Increase current rating of system up to 100A.
More compact size
Public Information
47
References
[1]. Lee, Shi-Wei, et al. "Design of an automatic meter reading system [electricity metering]."
Proceedings of the 1996 IEEE IECON. 22nd International Conference on Industrial
Electronics, Control, and Instrumentation. Vol. 1. IEEE, 1996.
[2]. Popa, M. "Data collecting from smart meters in an Advanced Metering Infrastructure."
2011 15th IEEE International Conference on Intelligent Engineering Systems. IEEE, 2011.
[3]. Rashdi, Adnan, et al. "Remote energy monitoring, profiling and control through GSM
network." Arabian Journal for Science and Engineering 38.11 (2013): 3249-3257.
[4]. Abdollahi, Ali, Marjan Dehghani, and Negar Zamanzadeh. "SMS-based reconfigurable
automatic meter reading system." 2007 IEEE International Conference on Control
Applications. IEEE, 2007.
[5]. Sehgal, Vivek Kumar, et al. "Electronic Energy Meter with instant billing." 2010 Fourth
UKSim European Symposium on Computer Modeling and Simulation. IEEE, 2010.
[6] Anon: “Electricity Tariff Fundamentals”, University of Pretoria Electricity and Energy
group, 2008. [Online]. Available e-mail: Werner.Badenhorst@up.ac.za Message: get
Electrical Tariff Fundamentals paper
[8]Anon: “Retail Tariff Restructuring Plan”, www.eskom.co.za, 2008. [Online]. Available:
http://www.eskom.co.za/live/content.php?Category_ID=287
[9] Ryan Firestone, Chris Marnay: “The Effects of Electricity Tariff Structure on Distributed
Generation Adoption in New York State”, Environmental Energy Technologies Division,
2005. [Online]. Available: http://eetd.lbl.gov/EA/EMP/
[10] Dr. C. Cooper, J. Prinsloo: “Digest of South African energy statistics”, Department of
Minerals and Energy (South Africa), 2005. [Online]. Available:
www.dme.gov.za/pdfs/energy/planning/digest_energy_05.pdf
[11] Hubert D. Henderson: “Supply and Demand”, EBook #10612, 2004. [Online]. Available:
http://www.gutenberg.org/ebooks/10612
[12] Department of Minerals and Energy: “National Response To South Africa’s Electricity
Shortage”, Interventions to address electricity shortages, 2008. [Online]. Available:
www.info.gov.za/otherdocs/2008/nationalresponse_sa_electricity1.pdf
[13] David S. Loughran, Jonathan Kulick: “Demand-Side Management and Energy Efficiency
in the United States”, The Energy Journal, Vol. 25, No. 1, 2004.
Public Information
48
[14] David Harper: “Understanding Supply-Side Economics”, www.investopedia.com, 2008.
[Online]. Available: http://www.investopedia.com/articles/05/011805.asp
[15] Rob Hartway, Snuller Price, C.K. Woo: “Smart meter, customer choice and profitable
time-of-use rate option”, Energy 24, 1999, pp.895–903
[16] M.E. Phillips, B.J. Adams: “Transforming the Ferraris Disc Meter into a key element in
an automated meter reading system”, Metering and Tariffs for Energy Supply, 3-5July 1996,
Conference Publication No. 426, 0IEE, 1996.
[17]Anon: “Radio Teleswitching”, Radio Teleswitching Services, 2008. [Online]. Available:
http://www.energynetworks.org/rts/
Public Information
49
Appendix A: Progress Reports
Progress Report 01
Progress Report 02
Public Information
50
Progress Report 03
Progress Report 04
Progress Report 05
Public Information
51
Appendix B: Bill of Materials
Public Information
52
15 Resistor 100K Ohms 5
16 220VAC – 5VDC Power Supply 40
17 I2C Protocol Module For LCD 45
Public Information
53
Appendix C: Datasheet
Public Information
54
Public Information
55
Public Information
56
Public Information
57
Public Information
58
Appendix D: Program Code
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#include "EmonLib.h"
EnergyMonitor CurrentVoltageSensor; //
Initiliaze Current & Voltage Library
SoftwareSerial ESP8266(11, 12); //
Initiliaze Software Serial RX, TX
LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); //
Initiliaze LCD
//***********************ESP8266 Variables***************************//
String server = ""; //variable for sending data to webpage
boolean No_IP = false; //variable to check for ip Address
String IP = ""; //variable to store ip Address
char temp1 = '0'; // Temparary Variable for Status
int a = 0; //Loop Variable
String ESP_STRING = ""; //variable to store ESP String
void setup()
{
lcd.begin(20, 4); // LCD Dimenssions Set 20x4
Serial.begin(9600); // Serial Monitor Baud Rate Set 9600
ESP8266.begin(9600); // Wifi Module Baud Rate Set 9600
Public Information
59
digitalWrite(3, LOW); // Switch 1 Relay Off
digitalWrite(4, HIGH); // Switch 2 Relay Off
digitalWrite(5, HIGH); // Switch 3 Relay Off
digitalWrite(6, HIGH); // Switch 4 Relay Off
lcd.setCursor(0, 2);
lcd.print("Connecting to WIFI..");
lcd.setCursor(0 , 2);
lcd.print("IP:");
lcd.print(IP);
lcd.setCursor(0 , 3);
lcd.print("Port: 80");
delay(5000); //Delay 5 Seconds
void loop()
{
x++;
MeasureValues(); // Call this UDF for Measure Recent Values of all
Parameters
PrintValues(); // Call this UDf to Print Values on LCD
}
else if (ESP_STRING.endsWith("r2on") || ESP_STRING.endsWith("switch two
on") || ESP_STRING.endsWith("switch 2 on"))
{
digitalWrite(4, LOW);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 2 ON ");
delay(1000);
}
else if (ESP_STRING.endsWith("r3on") || ESP_STRING.endsWith("switch
three on") || ESP_STRING.endsWith("switch 3 on") )
Public Information
60
{
digitalWrite(5, LOW);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 3 ON ");
delay(1000);
}
else if (ESP_STRING.endsWith("r4on") || ESP_STRING.endsWith("switch
four on") || ESP_STRING.endsWith("switch 4 on"))
{
digitalWrite(6, LOW);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 4 ON ");
delay(1000);
}
else if (ESP_STRING.endsWith("allon") || ESP_STRING.endsWith("all on")
|| ESP_STRING.endsWith("All on"))
{
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, LOW);
digitalWrite(6, LOW);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" All Switches ON ");
delay(1000);
}
else if (ESP_STRING.endsWith("r1off") || ESP_STRING.endsWith("switch
one off") || ESP_STRING.endsWith("switch 1 off"))
{
digitalWrite(3, HIGH);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 1 OFF ");
delay(1000);
}
else if (ESP_STRING.endsWith("r2off") || ESP_STRING.endsWith("switch
two off") || ESP_STRING.endsWith("switch 2 off"))
{
digitalWrite(4, HIGH);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 2 OFF ");
delay(1000);
}
else if (ESP_STRING.endsWith("r3off") || ESP_STRING.endsWith("switch
three off") || ESP_STRING.endsWith("switch 3 off"))
{
digitalWrite(5, HIGH);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" Switch 3 OFF ");
delay(1000);
}
else if (ESP_STRING.endsWith("r4off") || ESP_STRING.endsWith("switch
four off") || ESP_STRING.endsWith("switch 4 off"))
{
digitalWrite(6, HIGH);
lcd.clear();
lcd.setCursor(0, 2);
Public Information
61
lcd.print(" Switch 4 OFF ");
delay(1000);
}
else if (ESP_STRING.endsWith("alloff") || ESP_STRING.endsWith("all
switch off") || ESP_STRING.endsWith("all switch of"))
{
digitalWrite(3, HIGH);
digitalWrite(4, HIGH);
digitalWrite(5, HIGH);
digitalWrite(6, HIGH);
lcd.clear();
lcd.setCursor(0, 2);
lcd.print(" All Switches OFF ");
delay(1000);
}
else
{
}
}
delay(3000);
}
//**************** ESP_8266 Functions ********************//
Public Information
62
}
if (ch == '+')
break;
delay(1000);
}
Serial.print(IP);
Serial.print("Port:");
Serial.println(80);
}
establishConnection("AT", 100);
establishConnection("AT+CWMODE=3", 100);
establishConnection("AT+CWQAP", 100);
findIp(5000);
if (!No_IP)
{
Serial.println("Connecting Wifi....");
establishConnection("AT+CWJAP=\"iPhone\",\"01234567\"", 7000);
//provide your WiFi username and Password here
}
else
{
}
Serial.println("Wifi Connected");
establishConnection("AT+CIPMUX=1", 5000);
establishConnection("AT+CIPSERVER=1,80", 7000);
}
void MeasureValues()
{
CurrentVoltageSensor.calcVI(30, 1000); //
Calculate all. No.of half wavelengths (crossings), time-out
Public Information
63
Real_Power, Power_Factor, Voltages, Current, Reactive_Power = 0; // All
Parameters Values Become Zero
Power_Factor = CurrentVoltageSensor.powerFactor; //
Read Power Factor and store in Power_Factor Variable
Voltages = CurrentVoltageSensor.Vrms; //
Read Voltages and store in Voltages Variable
Current = CurrentVoltageSensor.Irms; //
Read Current and store in Current Variable
delay(10);
Reactive_Power = Voltages * Current * (1 -
Power_Factor); //extract Reactive Power into Variable
Real_Power = Voltages * Current *
Power_Factor; //extract Real Power into Variable
EEPROM.get(0, Units);
Units = (Units + (Real_Power * (0.001 / 60 / 60 /
1000))); //Calculate kilowatt hours used in Units
EEPROM.put( 0, Units);
if (x == 0)
{
v1 = Voltages;
p1 = Real_Power;
}
if (x == 10)
{
v2 = Voltages;
p2 = Real_Power;
x = 0;
}
Sensi = ((v1 - v2) / (p1 - p2));
}
void PrintValues()
{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("-SMART-ENERGY-METER-");
lcd.setCursor(0, 1);
lcd.print("V=");
lcd.print(Voltages);
lcd.setCursor(11, 1);
lcd.print("I=");
lcd.print(Current);
lcd.setCursor(0, 2);
lcd.print("P.F=");
lcd.print(Power_Factor);
lcd.setCursor(11, 2);
lcd.print("W=");
lcd.print(Real_Power);
lcd.setCursor(0, 3);
lcd.print("Sen=");
lcd.print(Sensi, 2);
lcd.setCursor(9, 3);
lcd.print("Unit=");
lcd.print(Units, 3);
Public Information
64
// Serial.print("Sen=");
// Serial.println(Sensi, 2);
// Serial.print("Real_Power = ");
// Serial.println(Real_Power);
// Serial.print("Reactive_Power = ");
// Serial.println(Reactive_Power);
// Serial.print("Power_Factor = ");
// Serial.println(Power_Factor);
// Serial.print("Voltages = ");
// Serial.println(Voltages);
// Serial.print("Current = ");
// Serial.println(Current);
// Serial.print("Unit=");
// Serial.println(Units, 6);
}
Public Information
65
Appendix E: Operation Manual
First Step: Plug-in the power cord of energy meter 220VAC 50Hz.
Wait 1 Min for Wi-Fi Connection.
Second Step: Now you can see the IP Address on LCD in this format (192.168.1.3).
After 10 Seconds Main screen is appears, wait 30 Seconds for Current & Voltages Calibration.
Third step: Enter that IP address on mobile app for operating switches.
Fourth step: Now you can see the main screen, in this screen you can see the Voltages,
Current, Power, Energy Consumption and Sensitivity of the System.
Public Information
66
Fifth Step: Now you can connect the load on sockets.
Switch 1 is ON by default and other three switches is OFF by default, you can control all the
switches via Mobile App.
Sixth Step: You can control Switches via Mobile App and monitor all the parameters on
LCD Screen.
Public Information
67