Professional Documents
Culture Documents
Model Engineering College Energy Meter Monitoring Via Power Line Communication
Model Engineering College Energy Meter Monitoring Via Power Line Communication
CHAPTER 1
INTRODUCTION
Power is the soul of world which is related to electricity and “electricity” is the
word which now rules the world. So, proper and wise utilization of electricity is of
immense importance in the present scenario. Hence, it is necessary to measure power
consumption at all levels- households, industries, offices and other commercial
purposes. Normally, large scale industries consist of various departments like
production, storage, packing, administration, transportation etc. situated far away
from each other. For such industries, it is necessary to maintain a systematic record of
daily power consumed by every department to keep check on excess power
consumed.
This project is mainly implemented for the purpose of getting a fully
automatic electricity billing system. The aim of this project is to measure and monitor
the electricity consumed by consumers in a locality and transmitting the measured
reading between the consumer and utility. It also helps in reducing the malpractices
and damages of the meter and also eliminates the issues and practical difficulties
associated with human operators.
Automatic meter reading (AMR) is a technology which automatically gathers
data from energy metering devices and transfers it to the master station in order to
analyse it for billing purposes. Data are read remotely, without the need to physically
access the meter. This makes monitoring of meters at hard to reach locations simpler
and accurate. Other advantages include reducing peak demand for energy, supporting
the time-of-use concept for billing, enabling customers to make informed decisions,
and reducing the cost of meter reading. Various communication technologies in AMR
have been proposed recently, including mobile technologies, based on radio
frequency, transmission over the power line, or telephonic platforms (wired or
wireless). The inherent communication infrastructure presented by Power Line Carrier
CHAPTER 2
The energy meter IC ADE7757 is directly fed from the single phase AC
supply. The hall-effect current sensor ACS712 is connected in series with the load and
the voltage measuring circuit across the load. These values are fed to the
microcontroller (PIC16F877A). The power drawn by the load is transferred to the
microcontroller via an opto-coupler. The microcontroller is so programmed to convert
the pulses into number of electrical units (here, 100 pulses= 1 kWh). From the PIC the
Department of Electrical and
Electronics Engineering 3
Model Engineering College Energy Meter Monitoring via
Power Line Communication
voltage, current and no. of units consumed are displayed on the LCD segment. Also
the data are transferred to the Electricity Board (EB) side via a PLC modem through
existing transmission lines.
LCD Display
(16x2)
M
I
Energy Interfacing C
PLC
meter IC circuit R
(Modem)
ADE7757 (Optocoupler) O
C
O
N
T
R
Relay and O
interfacing L
circuit L
E
R
Load
The PLC modem also receives the data from the EB side and displays the bill
amount on the LCD display. Depending on the signal from the EB side, based on
whether the bill dues are cleared or not, the relay can be activated, thereby
disconnecting the supply.
The data transferred from the consumer side are received at the utility via a
PLC modem from the transmission line. These information are transferred to a
computer using a DB15 connector. MAX232 IC is used for voltage level conversion.
Based on the no. of units consumed, the bill amount is calculated and transferred back
to the consumer.
CHAPTER 3
HARDWARE DESCRIPTION
The power supply module is used for powering up the different sections. 230V
single phase AC is stepped down to a lower voltage using a step-down transformer.
This stepped down voltage is rectified and filtered using suitable components to get
the desired 5V DC.
A step down transformer is one whose secondary voltage is less than its
primary voltage. It is designed to reduce the voltage from the primary winding to the
secondary winding. This kind of transformer “steps down” the voltage applied to it.
As a step-down unit, the transformer converts high-voltage, low-current power into
low-voltage, high-current power. The larger-gauge wire used in the secondary
winding is necessary due to the increase in current. The primary winding, which
doesn’t have to conduct as much current, may be made of smaller gauge wire.
Here, a 230/9 V transformer is used. This transformer steps down the 230V
coming at the primary into 9V at the secondary.
internally. The voltage source in a circuit may have fluctuations and would not give
the fixed voltage output. Capacitors of suitable values can be connected at input and
output pins depending upon the respective voltage levels for ripple smoothening and
filtering.
transmitted from the remote terminal to the isolator block. In energy meter section,
energy used by consumer is evaluated digitally. Energy meter module is composed of
ADE7757 which is an energy metering IC with integrated oscillator and load which
produces the analog signal can be converted into digital signal and using this digital
signal in the form of pulses ADE7757outputs average real power information based
on the load.
The ADE7757 is a high accuracy
electrical energy measurement IC. The
ADE7757 supplies average real power
information on the low frequency outputs
F1 and F2.These outputs may be used to
directly drive an electromechanical counter
or interface with an MCU. The high
frequency CF logic output, ideal for Fig 3.3: Pin-out of ADE7757
calibration purposes, provides instantaneous
real power information. The ADE7757 includes a power supply monitoring circuit on
the VDD supply pin. The ADE7757 will remain inactive until the supply voltage on
VDD reaches approximately 4 V. If the supply falls below 4 V, the ADE7757 will also
remain inactive and the F1, F2, and CF outputs will be in their non-active modes.
Internal phase matching circuitry ensures that the voltage and current channels are
phase matched while the HPF in the current channel eliminates dc offsets. An internal
no-load threshold ensures that the ADE7757 does not exhibit creep when no load is
present. The ADE7757 is available in a 16-lead SOIC narrow-body package.
3.2.2 Opto-coupler
Each opto-coupler consists of Gallium
Arsenide infrared LED and a silicon NPN
phototransistor. It is used to interface the energy
meter IC with the microcontroller. In electronics,
an opto-isolator, also called an opto-coupler,
photo-coupler, or optical isolator, is a component
that transfers electrical signals between two
isolated circuits by using light. Opto-isolators
prevent high voltages from affecting the system Fig 3.5: Pin-out of opto-coupler
receiving the signal.
3.3.1 Microcontroller
PIC 16F877 is one of the most advanced microcontroller from Microchip. This
controller is widely used for experimental and modern applications because of its low
price, wide range of applications, high quality, and ease of availability.PIC16F877A
devices are available in 40-pin packages. This device is from the PIC16F87XAfamily
and share common architecture. The features are as listed below:
3.4.1 MAX232
requires less wires that yields to the less cost. The RS232 is the communication line
which enables the data transmission by only using three wire links. The three links
provides ‘transmit’, ‘receive’ and common ground.
The RS232 serial port-
o Receives readings transmitted via PLC modem.
o The tariff is calculated for bill generation and transmitted to individual
customers via PLC modem.
o Output is displayed on PC using Turbo C/C++ software.
Power line modem is useful to send and receive serial data over existing AC
main power lines of the building. It has high immunity to electrical noise persistence
in the power line and built in error checking, so it never gives out corrupt data. The
modem is in form of a ready to use circuit module, which is capable of providing
9600 baud rate low rate bi-directional data communication. Due to its small size it can
be integrated into and made part of the user’s power line data communication system.
The module provides bi-directional half-duplex communication over the mains of any
voltage up to 250V AC and for frequency 50 Hz or 60 Hz. Half Duplex
communications means it can either transmit or receive data at a time but not both at
the same time.
CHAPTER 4
SOFTWARE DESCRIPTION
4.1 Turbo C
Turbo C is a discontinued Integrated Development Environment (IDE) and
compiler for the C programming language. As an IDE, it included a source code
editor, a fast compiler, a linker and an offline help file for reference. It was noted for
its integrated development environment, small size, fast compile speed,
comprehensive manuals and low price. Turbo C features:
Inline assembly with full access to the C language symbolic structures and
names - this allowed programmers to write some assembly language codes
right into their programs without the need for a separate assembler.
Support for all memory models-This had to do with the segmented memory
architecture used by 16-bit processors of that era, where each segment was
limited to 64 kilobytes (Kb). The models were called tiny, small, medium,
large and huge, which determined the size of the data used by a program, as
well as the size of the program itself.
Speed or size optimization-The compiler could be configured to produce an
executable program that was either fast or small in size, but not both.
Constant folding -This feature allowed the Turbo C compiler to evaluate
constant expressions during compile time rather than during run time.
4.2 Proteus
Proteus PCB design combines the ISIS schematic capture and ARES PCB
layout programs to provide a powerful, integrated and easy to use suite of
tools for professional PCB design. All Proteus PCB design products include
an integrated shape based auto router and a basic layout. It combines a superb
mixed mode circuit simulator based on the industry standard.
ISIS of PROTEUS was used in simulation of circuits, testing of programs and
algorithms. CPU Models available for microcontrollers such as the PIC and
8051 series. Interactive peripheral models include LED and LCD displays, a
universal matrix keypad, and a whole library of switches, pots, lamps, LEDs
etc. are available in PROTEUS which makes it very user friendly.
4.3 PIC C
CHAPTER 5
CIRCUIT IMPLEMENTATION
5.1Power supply
The power supply section consists of a 230/9V transformer which steps down
the230V supply voltage to 9V. The obtained voltage is rectified and filtered using
bridge rectifiers and capacitors. This is regulated using 7805 IC and used for various
sections.
frequency of power drawn by the load is obtained at frequency pins F1 and F2. The
frequency at pin CF
is 16 times of that at pins F1 and F2. The pulses at CF are transferred to the PIC via
an optocoupler.
The controlling circuit consists of the voltage measuring circuit, PIC, LCD
display and relay. The values measured by the voltage circuit and current sensor are
transferred to the PIC. Depending on the signal received from the EB side, the relay
will be actuated.
5.4 EB side
At the EB side, the data received by the PLC modem is transferred to the serial
port of the computer via a DB15 connector. A MAX232 IC is used for level
conversion.
CHAPTER 6
PCB FABRICATION
6.1.4 Etching
The removal of unwanted copper from copper clad sheet is known as
etching. For these 4 types of tanks are used.
1. Ferric Chloride
2. Cupric Chloride
3. Chromic acid
4 .Alkaline ammonia
Among these Ferric Chloride is cheap and also suited for home and
industrial applications. The high corrosive power of FeCl leads to short etching time
and little under etching. Ferric chloride matches well photo and screen printed resists.
6.1.5 Drilling
Drilling of components, mounting holes into the PCBs is by the most
important mechanical machining operation in PCB production process. The
importance of hole drilling on PCB has further group with electronic component
miniaturization and its need for smaller hole diameters and higher packing density
where hole punching is practically routed out.
Four types of drilling are commonly used.
1. Drilling by direct sight
2. Drilling by optical sight
3. Jig drilling
4. NC drilling
CHAPTER 7
Start
Initialise pulses=0
kWh=0
Check if relay =1
Turn off the supply using
relay
Department of Electrical and
Electronics Engineering 27
Model Engineering College Energy Meter Monitoring via
Power Line Communication
No Yes
Start
Check if bill is
paid
No Transmit the bill relay
signal =1 to turn off supply
Yes
Stop
CHAPTER 8
8.1 Advantages
8.2 Limitations
CHAPTER 9
CONCLUSION
REFERENCES
APPENDIX 1
PROGRAMMING
The program of the consumer side was written and complied in PIC C using
PIC C Compiler. The code is as follows:
#define LCD_TYPE 1
#include <lcd.c>
#use delay(clock=20000000)
#include<string.h>
void main()
int p,kWh,j;
float v1,v,a,b,i1,i;
char ch,str[10];
lcd_init();
setup_adc_ports(AN0_AN1_AN3);
setup_adc(ADC_CLOCK_DIV_32);
setup_psp(PSP_DISABLED);
Department of Electrical and
Electronics Engineering 33
Model Engineering College Energy Meter Monitoring via
Power Line Communication
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
p=0;
kWh=0;
do
set_adc_channel(0);//Voltage Measurement
a=0;
for(j=0;j<1000;j++)
if(read_adc()>a)
a=read_adc();
v1=b*5/1023;
v=(2*v1)/0.022;
printf(lcd_putc,"voltage= %f",v);
delay_ms(1000);
lcd_putc("\f");
Department of Electrical and
Electronics Engineering 34
Model Engineering College Energy Meter Monitoring via
Power Line Communication
set_adc_channel(1);//Current Measurement
b=read_adc();
i1=b*5/1023;
i=(8*i1)-20;
printf(lcd_putc,"Current= %f",i);
delay_ms(1000);
lcd_putc("\f");
if(input(pin_B0)==1)//kWh measurement
p++;
kWh=p/1600;
printf(lcd_putc,"%d kWh",kWh);
delay_ms(1000);
lcd_putc("\f");
if(ch=='*')
while(getchar()!='#')
str[i]=getchar();
i=i+1;
str[i]='\0';
Department of Electrical and
Electronics Engineering 35
Model Engineering College Energy Meter Monitoring via
Power Line Communication
lcd_putc(str);
delay_ms(1000);
lcd_putc("\f");
if(ch=='1') //Relay
output_low(pin_C1);
if(ch=='0')
output_high(pin_C2);
while(1);
The program for the EB (Electricity Board) side was written in Turbo C. The
code is as follows:
#include<conio.h>
#include<bios.h>
#include<stdio.h>
#include<iostream.h>
void main()
clrscr();
Department of Electrical and
Electronics Engineering 36
Model Engineering College Energy Meter Monitoring via
Power Line Communication
int kwh;
float bill;
kwh=inportb(port1);
bill=kwh*2.80+20; //Bill
outportb(port1,'*');
outportb(port1,bill);
outportb(port1,'#');
outportb(port1,1) //Relay
delay_ms(10000);
outportb(port1,0)
getch();
APPENDIX 2
BILL OF MATERIALS
APPENDIX 3
DATASHEETS