Smart Energy Meter and Power Factor Correction
Smart Energy Meter and Power Factor Correction
Smart Energy Meter and Power Factor Correction
Factor Correction
A
Project Report
Submitted by
RITIK SINGH
(BT16EEE001)
BHUMIKA MEENA
(BT16EEE003)
ANUJ KUMAR
(BT16EEE004)
JUNAID ALAM
(BT16EEE005)
in partial fulfillment
for
the award of the degree
of
BACHELOR OF TECHNOLOGY
In
ELECTRICAL AND ELECTRONICS ENGINEERING
Candidate’s Declaration
This is to certify that the work which is being presented in this project report entitled
“BI-DIRECTIONAL ENERGY METER WITH AUTOMATIC POWER FACTOR
CORRECTION” in fulfillment of the requirement for the award of the degree of BACHELOR
OF TECHNOLOGY in Electrical and Electronics Engineering and submitted in the
Department of Electrical Engineering of National Institute of Technology Uttarakhand is an
authentic record of my own work under the supervision of Mr. Himesh Kumar,Trainee
Teacher, Electrical Engineering Department.
The matter presented in this thesis has not been submitted by me for the award of any
degree of this or any University/Institute. I have followed the guidelines provided by the
Institute in preparing the project report. Whenever I have used the material (data, theoretical
analysis, figures and text) from other sources, I have given due credits by citing in the text of
thesis with details in the references.
3
Acknowledgements
Firstly, we would like to express our sincere and deepest gratitude to our project
supervisor Mr. Himesh Kumar for his unwavering support during our project work.
We would like to thank him for the patience and motivation. His valuable suggestions
have brought us out of the toughest time during our research and his guidance has
helped us in shaping the thesis in the current form. We could not have imagined having
a better supervisor and mentor for our project work, for which we are very grateful.
We thank the Head of the Department Dr. Prakash Dwivedi for his timely
support for providing the facilities and working environment in the department which
helped in timely completion of this thesis work. We are truly grateful to him for the
cooperation extended in the hour of need. We take this opportunity to especially thank
our friends and colleagues for their constant support and encouragement in both
happy and tough times.
Last but not the least, we would like to thank our family members. We can’t
thank them enough for their unconditional love, patience and sacrifices they have
made to make us reach this stage of life.
4
Abstract
The Report in its present form gives the idea of Bi-directional metering and control of
power factor automatically using capacitor bank. There undoubtedly exists energy
meters for calculate the consumption of energy- but such meter are neither efficient
nor economical when viewed from the large scale perspective. The sole idea behind
this project is to present a model or idea that can demonstrate an efficient way of
metering the energy consumption with an objective to minimize the reactive power
consumption as much as possible. Surely the cost factor may seem to be higher when
working on the small models , but then the tremendous decrease in the reactive power
consumption and the electricity cost using the same model justifies the idea used.
Here, instead of using the fixed rate for billing purpose, we have implemented the idea
of Wi-fi module technique, to fetch the instant electricity rate from vidyut pravah site.To
provide an interface between our hardware and Wi-fi module, we are using Arduino
Mega as the development board. Finally the 16*2 LCD display facilitates the user to
look on to the energy consumption and electricity bill.
Nomenclature
5
A - Amper
V - Volt
R - RealPower
Q - ReactivePower
S - Apparent Power
PCB - Printed Circuit Board
PIC - Peripheral Interface Controller
IEEE - Institution of Electrical and Electronics Engineering
IC - Integrated Circuit
SPI - Serial Peripheral Interface
R - Resistor orresistance
L - Inductor
C - Capacitor
X - Reactance
Z - Impedance
kW - kilo-Watt
kVa - kilo-volt-ampere
kVar - kilo-volt-ampere-reactive
P.F - PowerFactor
I - Current
6
Contents
Declaration 3
Acknowledgements 4
Abstract 5
Nomenclature 6
Contents 7
List of Figures 9
1 Introduction 100
1.1 Introduction to Bi-dirctional metering with smart featuresError! Bookmark not
defined.1
2 Review of literature
2.1 Bi-directional meter 12
2.2 Requirements for bi-directional metering 12
2.3 Power Factor 12
2.4 Power factor correction 13
2.5 Disadvantage of a low power factor 14
2.6 Advantage of power factor correction 14
2,7 Electrical loads 14
2.7.1 Inductive 15
2.7.2 Capacitive 15
2.7.3 Resistive 16
2.8 Power pricing 17
4 Modules 22
4.1 Components and their description 22
4.1.1 Potential transformer 22
7
4.1.2 Current Transformer 23
4.1.3 Current Sensor 23
4.1.4 Capacitor bank 24
4.1.5 X-OR gate 24
4.1.6 Relay 26
4.1.7 Wi-fi Module 27
4.1.8 LCD 29
4.1.9 Arduino Mega 30
5 Software Development 32
5.1 Programming development environment 32
5.2 pulseIn() 33
5.3 Programme 33
References 48
8
List of Figures
Fig no. Title Name Pg. no.
1 Power Triangle 13
2 Waveform and phasor diagram of V and I 15
across inductor
3 Waveform and phasor diagram 16
4 Waveform and phasor 17
5 Electricity rate from vidyut pravah site 18
6 Block diagram of bi-directional metering 19
7 ZCD 20
8 Voltage Transformer 22
9 Current Transformer 23
10 Current Sensor 24
11 X-OR gate 25
12 Current and voltage input to the X-Or 25
gate and output on purely resistive load
13 Current and voltage input to the X-Or 26
gate and output on purely inductive load
14 Relay 27
15 Wi-Fi Module 27
16 LCD 29
17 Arduino Mega Board 30
18 Energy meter showing power factor 45
correction
19 Wi-fi module fetch data from vidyut 46
pravah site
20 SMS to customer for controlling reactive 46
power
9
Chapter 1
Introduction
11
Chapter 2
Review of Literature
13
1. The limit of intensity plant transmission and circulation hardware must be more
than that which would be fundamental if the heap was requested at solidarity control
factor.
2. For a similar dynamic power .Operation of a current power framework at a low
power factor implies over-burdening the hardware now and again of full burden.
3. Low power factor implies a more noteworthy current and henceforth higher vitality
misfortunes.
4. The voltage guideline to be poor.
Load PF %
Induction Motor 70-90
Small Adjustable Speed Drive 90-98
14
Fluorescent Lights
Magnetic Ballast & Electronic 70-80 & 90-95resp.
Ballast
Arc Welders 35-80
2.7.1.Inductive:
An inductor with AC supply is appeared in the figure beneath alongside its Phasor
graph, which demonstrates the stage edge among current and voltage. In the event
of an inductor, voltage drives current by 90⁰. The voltage over an inductor drives the
current in light of the fact that the Lenz' law conduct stands up to the development of
the current and it requires a limited investment for a forced voltage to compel the
development of current to its most extreme.
2.7.2 Capacitive:
15
A capacitor with AC supply is appeared in the figure beneath alongside the waveform
and Phasor graph, which demonstrates that the stage point among current and
voltage. If there should arise an occurrence of a capacitor, voltage falls behind the
current by 90⁰. The voltage over a capacitor slacks the current in light of the fact that
the current must stream to develop charge and the voltage is corresponding to that
energize which is based on the capacitor plates.
2.7.3 Resistive
A capacitor with AC supply is appeared in the figure beneath alongside the waveform
and Phasor outline, which demonstrates that the stage point among current and
voltage. If there should be an occurrence of a capacitor, the stage point among current
and voltage is 0⁰. For customary flows and frequencies, the conduct of a resistor is
that of a dissipative component which changes over electrical vitality into warmth. It is
free of the course of current stream and the recurrence. So we state that the AC
impedance of a resistor is equivalent to its DC obstruction.
16
Fig. 4: Waveform and Phasor diagram
17
Fig. 5: Electricity Rate from Vidyut Pravah
Chapter 3
18
Design and Development
3.1 Principle:
19
Fig 7.ZCD
These 2 digitized signals i.e. voltage and currents are sent to the microcontroller
because of the inputs. In keeping with the program written microcontroller calculates
the time distinction between the zero crossings of those 2 signals. This point distinction
is indirectly proportional to the system power factor. The knowledge concerning this
power factor and therefore the power loss is displayed on the alphanumeric display.
And in keeping with the range calculated by the microcontroller program; this drives
the relays that switch the shunt capacitors across the load. While increasing of the
inductive load by connecting the opposite loads like motors to the current circuit leads
to reduced power factor. This may build the microcontroller to drive the additional
variety of relays leading to more shunt capacitors to be connected. In this project, the
easy technique of capacitance demand calculation used supported the time delay
between the voltage and current to bring the power factor as regards to unity.
However, in real-time applications, it'll not be therefore. It needs the calculations like
load current magnitude and KVAR demand etc. Variety of capacitors needs depends
on the load on the actual system. These parameters should be thought of whereas
handling the industrial power factor improvement or compensating products.
3.3 Zero crossingdetector:
A zero intersection is wherever the indication of a scientific capability changes (for
example from positive to negative), spoken to by the intersection of the hub (zero
esteem) within the chart of the capability. it's an ordinarily utilized term in gadgets,
arithmetic, sound, and picture making ready. In exchanging current, the zero-
intersection is that the immediate time once there's no voltage present. In a wave, this
condition normally happens double during a cycle. A zero intersection finder may be
a vital utilization of operation amp comparator circuit. It will likewise be alluded to as a
sin to square wave converter. Anybody of the displeasing or the non-modifying
comparators are often utilized as a zero intersection symbol. The reference voltage
20
for this case is about to zero. The yield voltage waveform demonstrates once and in
7 what heading a data flag crosses zero volts. Whenever input voltage may be a low
repeat flag, at that time yield voltage can rush to alter beginning with one
immersionpoint then onto the subsequent. What's additional, if there's commotion
within the middle of the 2 data hubs, the yield might amendment among positive and
negative immersion voltage ‗Vsat'. .Here IC LM358 is employed as a zero intersection
finder.
21
Chapter 4
Modules
The potential transformer here is being utilized for voltage detecting in the line. They
are intended to display an insignificant burden to the supply being estimated and have
an exact voltage proportion and stage relationship to empower precise optional
associated metering. The potential transformer is utilized to supply a voltage of about
12V to the Zero Crossing Detectors for zero intersection location. The yields of the
potential the transformer is taken from one of the fringe terminals and the focal terminal
as just a voltage of about 12V is adequate for the task of Zero intersection locator
circuit.
22
4.1.2. CurrentTransformer:
The current transformer is an instrument transformer used to venture down the current
in the circuit to quantifiable qualities and is consequently utilized for estimating
exchanging flows. At the point when the current in a circuit is too high to even
think about applying legitimately to an estimating instrument,
a present transformer delivers a diminished current precisely relative to the current in
the circuit which can thus be helpfully associated with estimating and recording
instruments. A current transformer confines the estimating instrument from what
might be an extremely high voltage in the checker circuit. Current transformers
are ordinarily utilized in metering and defensive transfers.
Like some other transformer, a current transformer has a solitary turn wire of an
exceptionally extensive cross-area as its essential winding and the auxiliary winding
has a substantial number of turns along these lines diminishing the current in
the optional to a small amount of that in the essential. Consequently, it has
an essential winding an attractive center and an optional winding.
The substituting current in the essential creates a rotating attractive field in
the attractive center which at that point incites an exchanging current inthe auxiliary
winding circuit.
24
Fig11: X-OR gate
Fig12: Current and Voltage inputs to the X-OR gate and the output on purely
Resistive load
25
Fig13: Current and Voltage inputs to the X-OR gate and the output on Resistive and
Inductive Load.
4.1.6 Relay:
The relays utilized in the control circuit are top notch Single Pole-Double Throw
(SPDT), fixed 6V Sugar Cube Relays. These relays work by uprightness of an
electromagnetic field produced in a solenoid as current is made to stream in its
winding. The control circuit of the hand-off is normally low power (here, a 6V supply is
utilized) and the controlled circuit is a power circuit with a voltage around 230V air
conditioning.
The relays are separately determined by the hand-off driver through a 6V control
supply. At first, the transfer contacts are in the Normally Open 'state. At the point when
a relay works, the electromagnetic field powers the solenoid to climb and hence the
contacts of the outside power circuit are made. As the contact is made, the related
capacitor is associated in parallel with the heap and over the line. The hand-off curl is
evaluated up to 8V, with a base exchanging voltage of 5V. The contacts of the hand-
off are evaluated up to 7A @ 270C AC and 7A @ 24V DC.
26
Fig.14: Relay
Fig.15:Wi-Fi Module
The fastest and most straightforward approach to begin with an ESP8266 is to get to
it by means of the AT direction interface. Wi-Fi module ESP8266 has a worked in
UART (Serial) association. This implies it can both send and get information utilizing
the UART convention.
27
Imagine a scenario in which we had an application that kept running on the ESP8266
which took "directions" got over the sequential connection, executed them and after
that restored a reaction. This would then enable us to utilize the ESP8266 while never
knowing the programming dialects that arelocal to the gadget.
This is actually what a program that has so far been observed to be re-introduced on
the ESP8266. The program is known as the "AT direction processor" named after the
configuration of the directions sent through the sequential connection. These
directions are altogether prefixed with "AT".
These AT Commands will control every one of the information that ought to be sent or
got through the Wi-Fi module.
Creating account on ThingSpeak and connecting esp8266 Wi-Fi module with Wi-
Fi:
Step 1
The first step is to create an account on ThingSpeak. Visit ThingSpeak and create
your account.
After signing up, create a channel as shown in figure below: Arduino will send the data.
After clicking on Green New Channel button, they will ask about the requirements. Fill
the fields as you want.
After that open API Keys tab and save your write keys to use later in the Arduino Code.
Arduino will send measured readings to the ThingSpeak using this API write key.
Step 2
Now the second step is to connect ESP8266 with Wi-Fi router. ESP8266, in its default
configuration, boots up into the serial modem mode. In this mode you can
communicate with it using a set of AT commands. These AT commands are then used
28
to transfer data to the ThingSpeak channel. Below are the Arduino commands used
to connect esp8266 with Wi-Fi.
In second step we will also include a Softwarserial library in Arduino code. This library
is to use Arduino pins as RX and TX other than the default RX, TX pins (pin 0 and 1).
Step 3
Next step is to declare your Wi-Fi router related information like ssid, password and
ThingSpeak’s ip address
#define SSID "your Wi-Fi ssid" #define PASS "your Wi-Fi password" #define IP
"184.106.153.149"
Step 4
In the next step create a serial port for communicating with esp8266.Here 9600 is the
baud rate choose for esp8266 module.
Step 5
In next step, use AT commands to connect esp8266 module with Wi-Fi.
After establishing a connection as client, ESP8266 module is ready to send data to
ThingSpeak.
29
Fig.16: Liquid Crystal Display
4.1.9 Arduino Mega:
Chapter 5
Software Development
31
bit Atmel ARM. Current models highlight a USB interface, 6 simple information pins,
just as 14 advanced I/O pins which enable the client to connect different expansion
sheets.
Presented in 2005, at the Interaction Design Institute Ivrea, in Ivrea, Italy, it was
intended to give understudies a cheap and simple approach to program intelligent
items. It accompanies a straightforward Integrated Development Environment (IDE)
that keeps running on standard PCs and permits composing programs for Arduino
utilizing a mix of basic Java and C or C++.
• setup(): a capacity run once toward the beginning of a program that can introduce
settings.
• loop(): a capacity called over and again until the board controls off.
The past code won't be seen by a standard C++ compiler as a legitimate program,
so when the client taps the "Transfer to I/O Board" catch in the IDE, a duplicate of
the code is kept in touch with an impermanent record with an additional incorporate
header at the top and an exceptionally basic „main()‟ work at the base to make it a
substantial C++ program.
The Arduino IDE utilizes the GNU tool chain and AVR Libc to incorporate projects
and uses AVR dude to transfer projects to the board As the Arduino stage utilizes
Atmel microcontrollers, Atmel's improvement condition AVR Studio or the more up to
date Atmel Studio, may likewise be utilized to create programming for the Arduino.
32
5.2pulseIn():
•Description:
The work peruses a heartbeat (either HIGH or LOW) on a stick. For instance, if esteem
is HIGH, pulseIn() trusts that the stick will go HIGH, begins timing, at that point trusts
that the stick will go LOW and quits planning. Returns the length of the beat in
microseconds. Surrenders and returns 0 if no heartbeat begins inside a predetermined
time out.
The planning of this capacity has been resolved experimentally and will most likely
show mistakes in longer heartbeats. Takes a shot at heartbeats from 10 microseconds
to 3 minutes long.
•Syntax:
•Parameters:
stick: the quantity of the stick on which you need to peruse the beat. (int) esteem: kind
of heartbeat to peruse: either HIGH or LOW. (int)
timeout (discretionary): the number of microseconds to trust that the beat will begin;
default is one moment (unsigned long), restores the length of the beat (in
microseconds) or 0 if no heartbeat began before the timeout (unsigned long)
5.3 Program:
Arduino Code-
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int pin = 13;
int re1=6;
int re2=7;
int re3=8;
int re4=9;
float time;
float rads = 57.29577951; // 1 radian = approx 57 deg.
33
float degree = 360;
float frequency = 50;
float nano = 1 * pow (10,-6); // Multiplication factor to convert nano seconds into
seconds
// Define floats to contain calculations
float pf;
float angle;
float pf_max = 0;
float angle_max = 0;
int ctr;
const int sensorIn=A0;
int mVperAmp=66;
double Voltage=0;
double VRMS=0;
double AmpsRMS=0;
void setup()
{
pinMode(pin, INPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
Serial.begin(9600);
Serial2.begin(4800);
lcd.begin(16, 2);
lcd.print("ANUJ KUMAR");
lcd.setCursor(0, 1);
lcd.print("BT16EEE004");
34
delay(2000);
lcd.clear();
lcd.print("JUNAID ALAM");
lcd.setCursor(0, 1);
lcd.print("BT16EEE005");
delay(2000);
lcd.clear();
lcd.print("BHUMIKA MEENA");
lcd.setCursor(0, 1);
lcd.print("BT16EEE003");
delay(2000);
lcd.clear();
lcd.print("RITIK SINGH");
lcd.setCursor(0, 1);
lcd.print("BT16EEE001");
delay(2000);
lcd.clear();
lcd.print("GUIDED BY");
lcd.setCursor(0, 1);
lcd.print("MR HIMESH KUMAR");
delay(2000);
lcd.clear();
}
void loop()
{
float price=wifi();
Serial.print("price=");
Serial.println(price);
35
lcd.print("CURNT PRC=");
lcd.setCursor(11, 0);
lcd.print(price);
lcd.setCursor(0, 1);
lcd.print("VidyutPravah.in");
delay(3000);
lcd.clear();
Voltage=getVPP();
VRMS=(Voltage/2.0)*0.707;
AmpsRMS=(VRMS*1000)/mVperAmp;
Serial.print("current=");
Serial.println(AmpsRMS);
lcd.setCursor(0,0);
lcd.print("CURRENT");
lcd.setCursor(9,0);
lcd.print(AmpsRMS);
lcd.setCursor(0,1);
Serial.println("VOLTAGE=230.00");
lcd.print("VOLTAGE 230.00");
delay(3000);
lcd.clear();
for (ctr = 0; ctr <= 4; ctr++) // Perform 4 measurements then reset
{
// 1st line calculates the phase angle in degrees from differentiated time pulse
// Function COS uses radians not Degree's hence conversion made by dividing
angle / 57.2958
angle = ((((pulseIn(pin, HIGH)) * nano)* degree)* frequency);
// pf = cos(angle / rads);
36
if (angle > angle_max) // Test if the angle is maximum angle
{
angle_max = angle; // If maximum record in variable "angle_max"
pf_max = cos(angle_max / rads); // Calc PF from "angle_max"
}
}
if (angle_max > 360) // If the calculation is higher than 360 do following...
{
angle_max = 0; // assign the 0 to "angle_max"
pf_max = 1; // Assign the Unity PF to "pf_max"
}
if (angle_max == 0) // If the calculation is higher than 360 do following...
{
angle_max = 0; // assign the 0 to "angle_max"
pf_max = 1; // Assign the Unity PF to "pf_max"
}
//Serial.print(angle_max, 2); // Print the result
//Serial.print(",");
// Serial.println(pf_max, 2);
float m=fabsf(pf_max);
Serial.print("powerfactor=");
Serial.println(m);
lcd.setCursor(0,0);
lcd.print("PF=");
lcd.setCursor(4,0);
lcd.print(m);
lcd.print(" ");
lcd.setCursor(0,1);
37
lcd.print("Ph-Shift=");
lcd.setCursor(10,1);
lcd.print(angle_max);
lcd.print(" ");
delay(3000);
lcd.clear();
float z=m*m;
float p=1-z;
float q=AmpsRMS*230*sqrt(p);
lcd.setCursor(0,0);
lcd.print("ACT PWR");
lcd.setCursor(9,0);
float power=AmpsRMS*230*m;
int powerint=power;
Serial2.write(powerint);
lcd.print(power);
Serial.print("Act power=");
Serial.println(power);
lcd.setCursor(0,1);
lcd.print("RACT PWR");
lcd.setCursor(9,1);
lcd.print(q);
//Serial.println(AmpsRMS*230*sqrt(p));
Serial.print("React pwr=");
Serial.println(q);
delay(3000);
lcd.clear();
38
time = millis();
float wh=time/3600000;
float kwhPower=power/1000;
float energy=kwhPower*wh;
lcd.setCursor(0, 0);
lcd.print("ENERGY");
lcd.setCursor(8, 0);
lcd.print(energy);
Serial.print("energy=");
Serial.println(energy);
//Serial.print("time ");
//Serial.println(wh);
//lcd.setCursor(12, 0);
//lcd.print("kwh");
lcd.setCursor(0, 1);
lcd.print("COST=");
lcd.setCursor(6, 1);
float cost=energy*price;
lcd.print(cost);
Serial.print("cost=");
Serial.println(cost);
//lcd.setCursor(10, 1);
//lcd.print("rps");
delay(3000);
lcd.clear();
39
angle_max = 0;
//relay
if (m < 0.98)
{
digitalWrite(re1,HIGH);
if (m < 0.98)
{
digitalWrite(re2,HIGH);
if (m < 0.98)
{
digitalWrite(re3,HIGH);
if (m < 0.98)
{
digitalWrite(re4,HIGH);
}
}
}
}
else if(m >= 0.98)
{
Serial.print("\tThe circuit has a resistive load, hence the normal power factor is:\t\t\t");
Serial.println(m);
}
Serial.println("--------------XXXXXXXXXXXXXXXXXXXXXxXXXXXX--------------");
}
float getVPP()
{
40
float result;
int readValue;
int maxValue=0;
int minValue=1024;
uint32_t start_time=millis();
while((millis()-start_time)<1000)
{
readValue=analogRead(sensorIn);
if(readValue>maxValue)
{
maxValue=readValue;
}
if(readValue<minValue)
{
minValue=readValue;
}
}
result=((maxValue-minValue)*5.0)/1024.0;
return result;
}
float wifi(){
while(Serial2.available()>0){
String payload = Serial2.readString();
Serial.print("payload ");
Serial.println(payload);
float val=payload.toFloat();
return val;
}
41
delay(1000);
}
Wi-Fi Code-
#include <SoftwareSerial.h>
#include <WiFiClientSecure.h>
SoftwareSerial NODEMCU(D2,D3);
int data;
#include "ThingSpeak.h"
#include <ESP8266WiFi.h>
const char* host = "api.thingspeak.com";
const int httpsPort = 443;
const char fingerprint[] PROGMEM = "F9 C2 65 6C F9 EF 7F 66 8B F7 35 FE 15 EA
82 9F 5F 55 54 3E";
//---------------- Fill in your credentails ---------------------
char ssid[] = "anuj"; // your network SSID (name)
char pass[] = "anujanuj"; // your network password
unsigned long myChannelNumber = 749923; // Replace the 0 with your channel
number
const char * myWriteAPIKey = "8CR1CVEK34KO0QEC"; // Paste your ThingSpeak
Write API Key between the quotes
//------------------------------------------------------------------
WiFiClient client;
void setup() {
NODEMCU.begin(4800);
Serial.begin(9600);
WiFi.mode(WIFI_STA);
ThingSpeak.begin(client);
if(WiFi.status() != WL_CONNECTED){
42
while(WiFi.status() != WL_CONNECTED){
WiFi.begin(ssid, pass);
delay(5000);
}
}
WiFiClientSecure client;
client.setFingerprint(fingerprint);
if (!client.connect(host, httpsPort)) {
NODEMCU.println("connection failed");
return;
}
String url = "/apps/thinghttp/send_request?api_key=PGDLA4VOV1ZTHURL";
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"User-Agent: BuildFailureDetectorESP8266\r\n" +
"Connection: close\r\n\r\n");
while (client.connected()) {
String line = client.readStringUntil('\n');
if (line == "\r") {
break;
}
}
String line = client.readStringUntil('\n');
NODEMCU.print(line);
}
void loop() {
43
if (NODEMCU.available()>0)
{
data=NODEMCU.read();
}
// Connect or reconnect to WiFi
// Write to ThingSpeak. There are up to 8 fields in a channel, allowing you to store up
to 8 different
// pieces of information in a channel. Here, we write to field 1.
int x = ThingSpeak.writeField(myChannelNumber, 1, data, myWriteAPIKey);
// Check the return code
if(x == 200){
Serial.println("Channel update successful.");
}
else{
Serial.println("Problem updating channel. HTTP error code " + String(x));
}
Serial.println(data);
delay(20000); // Wait 20 seconds before sending a new value
}
Chapter 6
Results and Conclusion
6.1Results
44
Following fig. shows the assembled circuit of energy meter
45
.
Fig.19 Wi-fi Module fetch active power data from vidyut pravah site
46
Conclusion:
The Bi-directional meter with Automatic Power Factor Detection and Correction gives
a precise estimation of power use without the requirement for an evaluated month to
month bills or visits from meter per users likewise improve the power factor of a power
framework by an efficient way. It Eliminate the manual meter reading, Monitoring the
electric framework all the more quickly, Making it conceivable to utilize control assets
all the more efficiently, Providing ongoing information valuable for adjusting electric
burdens ,Enabling powerful estimating (raising or bringing down the expense of power
dependent on interest) ,Offering increasingly itemized input on vitality use to client
which causes them to alter their propensities to bring down electric bills
47
References
48