mathesh ppttt
mathesh ppttt
1
ABSTRACT
2
ABSTRACT
The demand for power has increased exponentially with time. One avenue
through which today's energy problems can be address through the reduction of
energy usage in households. This has increased the emphasis on the need for
accurate and economic methods of power measurement. The goal of providing
such data is to optimize and reduce their power consumption.
This project presents a smart energy meter for an automatic and superior
metering and billing system. The integration of the controller and IOT Short
Message Service (SMS) provide the meter reading system with some automatic
functions that are predefined.
INTRODUCTION
3
4
CHAPTER-1
INTRODUCTION
At present, Electricity is the essential commodity in the world for human life
today. Every home, offices, companies, industries requires electricity connection
for their functioning. Due to rapid increase in human population and the human‘s
dependency towards electrical energy, the demand for electricity has increased
many folds, causing deficit of electrical energy during peak hours. In order to cope
up with the energy challenges, it is necessary to modernize the electrical system.
5
The process may be interrupted due to bad weather conditions, also if the
consumer is not available, the billing will be pending and human operator needs to
revisit. India is facing energy deficit during peak hours. Low voltage during peak
hours has been reported as a major power quality issue. Load shedding is a
common power management practice followed by the utility providers. Energy
conservation has great significance in this scenario of increasing electrical energy
demand.
The present system of energy billing is error prone, time consuming and
laborious. Errors get introduced at every stage of energy billing like errors with
electro-mechanical meters, human errors while noting down the meter reading.
These errors can be overcome by using the smart energy meter. The main objective
of the proposed work is to develop a smart energy meter.
The Arduino takes the pulse from the energy meter, calculate units and
displays the reading on the LCD. The reading is stored in built in EEPROM so, in
case of power failures it continues the computation. The reading of the energy
meter is also sent to the cell phone of the user in the form of a message through
Wi-Fi modem. The proto type system is powered by external power supply that
takes the ac power and converts it into dc power and is fed to Arduino and Wi Fi.
6
BIODOLOGY
- Archelle B.Batiller et
2) IOT Based projects
- Dr.Rajesh Singh
- Labile Labile
7
BLOCK DIAGRAM
8
BLOCK DIAGRAM
BLOCK DIAGRAM
9
METHODOLOGY
10
METHODOLOGY
EXISTING SYSTEM
PROPOSED SYSTEM
Every two months after microcontroller sends the consumed unit and price
to mobile phone thorough RS232 converter. Mobile phone sends SMS of this
information to EB office as well as owners mobile these numbers already stored in
the microcontroller.
The proposed energy meter system can incorporate with embedded
controller and GSM modem to transmit the data like consumed energy in kWh,
generated bill, security services (line Cut/On) over GSM mobile network such as
data can be then fed and integrated into existing energy management systems
located at power companies or organizations to provide the services among the
customers without man-power.
11
OBJECTIVES
• Smart Energy Metering using IoT is a revolutionary technology that has the
potential to transform the way we consume & track energy.
• By providing real-time monitoring and control of energy consumption, it can
help users to reduce their energy usage, save money, and promote
sustainable energy consumption.
• IoT based smart energy metering refers to the use of internet-connected
devices to measure and monitor energy consumption in homes, buildings, or
entire communities.
• These IoT-based smart meters are equipped with sensors that can collect
data on energy usage and transmit that data over the internet to a cloud
database for advanced data analytics.
ADVANTAGES
1. Easy to Read and send data via wireless protocol using GSM technology
2. Easy to manage the meter as well as the line connection
3. GSM module the network coverage of the SIM used is one of the important facts
4. More reliable and higher degree of satisfaction and safety
5. Overall cost may reduce more
APPLICATIONS
• Applicable for big industries
• House hold purposes
• Luxurius malls and theaters
• .
12
DESIGN PROCEDURE
13
CHAPTER - 4
DESIGN PROCEDURE
SOFTWARE
ESP32 is a single 2.4 GHz Wi-Fi-and-Bluetooth combo chip designed with the TSMC ultra-low-
power 40 nm technology. It is designed to achieve the best power and RF performance, showing
robustness, versatility and reliability in a wide variety of applications and power scenarios.
FEATURES:
14
• External 2 MHz ~ 60 MHz crystal oscillator (40 MHz only for Wi-Fi/Bluetooth
functionality)
• External 32 kHz crystal oscillator for RTC with calibration
• Two timer groups, including 2 × 64-bit timers and 1 × main watchdog in each
group
• One RTC timer
• RTC watchdog
4. Bluetooth Key Features
• 802.11 b/g/n
• 802.11 n (2.4 GHz), up to 150 Mbps
• WMM • TX/RX A-MPDU, RX A-MSDU Immediate Block ACK
• Defragmentation
• Automatic Beacon monitoring (hardware TSF)
• 4 × virtual Wi-Fi interfaces
• Simultaneous support for Infrastructure Station, SoftAP, and Promiscuous
modes Note that when ESP32 is in Station mode, performing a scan, the SoftAP
channel will be changed.
• Antenna diversity
6. Security
• Secure boot
• Flash encryption
• 1024-bit OTP, up to 768-bit for customers
• Cryptographic hardware acceleration:
15
– AES
– Hash (SHA-2)
– RSA
– ECC
– Random Number Generator (RNG)
7. Advanced Peripheral Interfaces
• 34 × programmable GPIOs
• 12-bit SAR ADC up to 18 channels
• 2 × 8-bit DAC • 10 × touch sensors
• 4 × SPI • 2 × I2S • 2 × I2C • 3 × UART
• 1 host (SD/eMMC/SDIO)
• 1 slave (SDIO/SPI)
• Ethernet MAC interface with dedicated DMA and IEEE 1588 support
FUNCTIONAL DESCRIPTION
CPU ESP32 contains one or two low-power Xtensa® 32-bit LX6 microprocessor(s) with the
following features:
• 7-stage pipeline to support the clock frequency of up to 240 MHz (160 MHz for ESP32-
S0WD)
• 16/24-bit Instruction Set provides high code-density
• Support for Floating Point Unit
• Support for DSP instructions, such as a 32-bit multiplier, a 32-bit divider, and a 40-bit
MAC
• Support for 32 interrupt vectors from about 70 interrupt sources The single-/dual-CPU
interfaces include:
• Xtensa RAM/ROM Interface for instructions and data
• Xtensa Local Memory Interface for fast peripheral register access
• External and internal interrupt sources
• JTAG for debugging
BLOCK DIAGRAM
16
PIN DESCRIPTION
17
power amplifier, enabling state-of-the-art performance in delivering up to +20.5 dBm of power
for an 802.11b transmission and +18 dBm for an 802.11n transmission. Additional calibrations
are integrated to cancel any radio imperfections, such as:
• Carrier leakage
• I/Q phase matching
• Baseband nonlinearities
• RF nonlinearities
• Antenna matching These built-in calibration routines reduce the amount of time
required for product testing, and render the testing equipment unnecessary.
Clock Generator
The clock generator produces quadrature clock signals of 2.4 GHz for both the receiver
and the transmitter. All components of the clock generator are integrated into the chip, including
all inductors, varactors, filters, regulators and dividers. The clock generator has built-in
calibration and self-test circuits. Quadrature clock phases and phase noise are optimized on-chip
with patented calibration algorithms which ensure the best performance of the receiver and the
transmitter.
WiFi
ESP32 implements a TCP/IP and full 802.11 b/g/n Wi-Fi MAC protocol. It supports the
Basic Service Set (BSS) STA and SoftAP operations under the Distributed Control Function
(DCF). Power management is handled with minimal host interaction to minimize the active-duty
period.
Bluetooth
The chip integrates a Bluetooth link controller and Bluetooth baseband, which carry out
the baseband protocols and other low-level link routines, such as modulation/demodulation,
packet processing, bit stream processing, frequency hopping, etc.
C++ is a programming language that can be used to develop IoT projects. C++ is a good choice
for IoT projects because it provides access to low-level system resources, reuse, maintainability,
18
and a modular approach. C++ is also portable and has a large number of ready-made
libraries.
IoT applications often involve processing a massive amount of data collected from
sensors. C++ offers powerful data processing capabilities through libraries like
OpenCV and Eigen. We can perform complex data analytics tasks like image
recognition or machine learning using these libraries.
#include <EEPROM.h>
// Include Libraries
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#include <Wire.h>
#include <ACS712.h>
#include "EmonLib.h"
#include <LiquidCrystal_I2C.h>
19
//-----------------------------------------------
Pins-------------------------------------------------------
--------------------//
#define SOL_ADC 2
// Solar panel side voltage divider is connected to pin 2
#define BAT_ADC 4
// Battery side voltage divider is connected to pin 4
#define LOAD_CURRENT_ADC 19
// ACS 712 current sensor is connected to pin 19 for load
curremt
#define SOL_CURRENT_ADC 21
// ACS 712 current sensor is connected to pin 21 for solar
current
#define AVG_NUM 10
// number of iterations of the adc routine to average the
adc readings
20
int down = 18;
//Down button
LiquidCrystal_I2C lcd(0x27, 20, 4);
//-----------------------------------------Counter to
change positions of
pages---------------------------------------//
int page_counter = 1 ;
//To move beetwen pages
unsigned long previousMillis = 0;
//Variables for autorreturn
unsigned long interval = 100;
//Desired wait time
float solar_volt = 0;
float bat_volt = 0;
float load_current = 0;
float solar_current = 0;
float offsetVoltage = 2.5;
// for ACS712 sensor
float Sensitivity = 0.66;
// 185mV/A for ACS712-5A variant,66mV/A for 30A
float last_time = 0;
float current_time = 0;
//long unsigned time = 0;
long unsigned msec = 0;
long unsigned last_msec = 0;
21
long unsigned elasped_msec = 0;
long unsigned elasped_time = 0;
float load_ampSecs = 0;
float load_ampHours = 0;
float load_watts = 0;
float load_wattSecs = 0;
float load_wattHours = 0;
float solar_ampSecs = 0;
float solar_ampHours = 0;
float solar_watts = 0;
float solar_wattSecs = 0;
float solar_wattHours = 0;
const int addrVrms = 0;
// EEPROM addresses for each variable
const int addrIrms = 4;
const int addrPower = 8;
const int addrKWh = 12;
float kWh = 0.0;
//----------------------------------------------------
Storage debounce
function---------------------------------------------------
----//
boolean current_up = LOW;
boolean last_up = LOW;
boolean last_down = LOW;
boolean current_down = LOW;
22
EnergyMonitor emon1;
//Create an instance
BlynkTimer timer;
void checkPhysicalButton();
23
void checkPhysicalButton()
{
if (digitalRead(btnPin) == LOW) {
// btnState is used to avoid sequential toggles
if (btnState != LOW) {
24
void setup()
{
Serial.begin(9600);
//emon1.voltage(34, 0.5, 1.7);
// Voltage: input pin, calibration, phase_shift
//emon1.current(35, 1.1);
// Current: input pin, calibration.
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print(" IoT METER ");
lcd.setCursor(0, 1 );
lcd.print(" INITIALISE ");
lcd.setCursor(0, 2 );
lcd.print(" SUCCESS!!! ");
lcd.setCursor(0, 3 );
lcd.print("By IBRAHIM AHMED ");
delay(3000);
//lcd.clear();
Blynk.begin(auth, ssid, pass);
pinMode(ledPin, OUTPUT);
pinMode(btnPin, INPUT_PULLUP);
digitalWrite(ledPin, ledState);
// Initialize EEPROM with the size of the data to be
stored
EEPROM.begin(32); // Allocate 32 bytes for float values
(4 bytes each) and some extra space
25
// Read the stored energy data from EEPROM
readEnergyDataFromEEPROM();
//----------------------------------------------------
De-bouncing function for all
buttons----------------------------------------//
boolean debounce(boolean last, int pin)
{
boolean current = digitalRead(pin);
if (last != current)
{
//delay(5);
current = digitalRead(pin);
}
return current;
}
26
void loop()
{
Blynk.run();
timer.run();
read_data();
// read different sensors data from analog pin of esp32
emon1.calcVI(20,1000);
// Calculate all. No.of half wavelengths (crossings), time-
out
emon1.serialprint();
// Print out all variables (realpower, apparent power,
Vrms, Irms, power factor)
// Calculate energy consumed in kWh
unsigned long currentMillis = millis();
kWh += emon1.apparentPower * (currentMillis - lastMillis)
/ 3600000000.0;
lastMillis = currentMillis;
float realPower = emon1.realPower;
//extract Real Power into variable
float apparentPower = emon1.apparentPower;
//extract Apparent Power into variable
float powerFActor = emon1.powerFactor;
//extract Power Factor into Variable
float supplyVoltage = emon1.Vrms;
//extract Vrms into Variable
27
float Irms = emon1.Irms;
//extract Irms into Variable
//-----------------------------------------------------Page
counter function to move
pages------------------------------------------------------
-----------//
28
if(page_counter <4){
//Page counter never higher than 3(total of pages)
page_counter= page_counter +1;
//Page up
lcd.clear();
//When page is changed, lcd clear to print new page
}
else{
page_counter= 4;
}
}
last_up = current_up;
//Page Down
if (last_down== LOW && current_down == HIGH){
if(page_counter >1){
//Page counter never lower than 1 (total of pages)
page_counter= page_counter -1;
//Page down
lcd.clear();
//When page is changed, lcd clear to print new page
}
else{
page_counter= 1;
}
}
29
last_down = current_down;
Android is a complete set of software for mobile devices such as tablet computers,
notebooks, smartphones, electronic book readers, set-top boxes etc.
1. linux kernel
2. native libraries (middleware),
3. Android Runtime
4. Application Framework
5. Applications
30
HARDWARE DESCRIPTION
1. ARDUINO CONTROLLER
31
32
Microcontroller Arduino– 8 bit AVR family
microcontroller
Memory 2kB
12V 7Ah batteries are used here for power supply purpose. 12V 7Ah
batteries were built only as Sealed Lead Acid (SLA) batteries. 12V 7Ah batteries
feature physical dimensions of (L x W x H) 5.94 x 2.56 x 3.7 inches. 12V 7Ah
batteries feature a nominal voltage of 12V and a nominal (20h) capacity of 7Ah.
Lead-Acid Battery:
Where high values of load current are necessary, the lead-acid cell is the
type most commonly used.
The electrolyte is a dilute solution of sulfuric acid (H₂SO₄). In the
application of battery power to start the engine in an auto mobile, for example, the
load current to the starter motor is typically 200 to 400A. One cell has a nominal
output of 2.1V, but lead-acid cells are often used in a series combination of three
for a 6-V battery and six for a 12-V battery.
The lead acid cell type is a secondary cell or storage cell, which can be
recharged. The charge and discharge cycle can be repeated many times to restore
the output voltage, as long as the cell is in good physical condition. However, heat
33
with excessive charge and discharge currents shortends the useful life to about 3 to
5 years for an automobile battery. Of the different types of secondary cells, the
lead-acid type has the highest output voltage, which allows fewer cells for a
specified battery voltage.
3. IOT DETAIL
5. CLOUD
34
An IoT cloud is a massive network that supports IoT devices and applications. This
includes the underlying infrastructure, servers and storage, needed for real-time
operations and processing. An IoT cloud also includes the services and standards
necessary for connecting, managing, and securing different IoT devices and
applications.
6. BUZZER:
35
BILL OF MATERIALS
36
BILL OF MATERIALS
Sl.No
Description of Parts No. off
.
4 IOT MODULE 1
5 LCD DISPLAY 1
6 RELAY DRIVERS 1
37
CONCLUSION
38
CONCLUSION
As the world moves towards a more sustainable future, Smart Energy Metering
using IoT will play a crucial role in shaping the future of energy consumption.
Smart energy metering can help businesses to improve their overall energy
efficiency by identifying assets & equipment that are consuming higher energy
than they should and implementing strategies to rectify the issue.
Smart energy meters can be accessed remotely, allowing users to monitor their
energy usage from anywhere, using a smartphone or other device.
39
REFERENCES
40
REFERENCES
[1] Alexandria. A.R, Cortez. P.C, Felix. J.H.S, Girao. A.M, Frota. J.B.B and Bessa.
J.A 2014,An OCR System for Numerals Applied to Energy Meters,IEEE
latinamerica transactions, vol. 12, no. 6, september 2014.
[5] Er. Alekhya Datta, Dr. Parimita Mohanty, Er. Mukesh Gujar,2014Accelerated
Deployment of Smart Grid Technologies in India Present Scenario, Challenges and
Way Forward978-1-4799- 3653-3/14/$31.00 ©2014 IEEE.
[6] Himshekhar Das, L.C.Saikia,2015 GSM Enabled Smart Energy Meter and
Automation of Home Appliances978-1-4678-6503- 1/15/$31.00 © 2015 IEEE.
41
[7] Labib Labib, Masum Billah, G.M. Sultan Mahmud Rana, Md. Nazmus Sadat,
Md. Golam Kibria, Md. Rafiqul Islam2017 Design and implementation of low-cost
universal smart energy meter IET General Transmission. Distribution ., 2017, Vol.
11 Iss. 16, pp. 3938- 3945 © The Institution of Engineering and Technology
2017.
42
PHOTOGRAPHY
43