Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
Now-a-days electricity has become a basic need to humans. The consumption
of electricity has increased a lot compared to the past years. The theft of electricity
has also become a problem these days and there is no control over the loss due to theft
of electricity. In this project we present you the smart energy meter device used to
measure the consumption of the electricity by the individual and provide security
against theft of electricity.
A smart meter is usually an electrical meter that records consumption of
electric energy in intervals of an hour or less and communicates that information at
least daily back to the utility for monitoring and billing purposes.Smart meters enable
two-way communication between the meter and the central system. Unlike home
energy monitors, smart meters can gather data for remote reporting.
The term Smart meter often refers to an electricity meter, but it can
increasingly also mean a device measuring natural gas or water consumption.Smart
energy meter is software based, power efficient device that accurately tracks energy
consumption and performs computation. Meter readings can be transmitted to
distributors/utilities over wireless media; thus, eliminating the need of manual meter
reading collection process. The smart energy meter offers major benefits to both
customers and companies in terms of efficiency, reliability, and cost saving.
Imagine if you knew how much energy you were consuming at home at any
time of the day, and knew how much energy each device was using, will you stop
using those energy hog appliances? Or use them at the time of the day when the
energy is cheapest? In the economy turmoil we are currently in, I believe all of us are
willing to make those small sacrifices to lower down the bill numbers at the end of the
month.
Smart energy meters are devices that will sit on your home, monitor energy
data from your electricity meter, and let you know how much energy you are using
this put more control on your hands on how you spend your energy at home.
Conventional electricity meters are normally hidden somewhere on a wall on the
1
basement, and the only time you realize how much energy youve been spending is
when the bill hit the door.
The new smart meters will provide Indian consumers with information
regarding energy consumption that was not previously available with a traditional
meter. This system will allow the easy disconnection of defaulted customers and
power connections from a remote site. The new smart system is also able to instantly
detect tampering with the power lines and sends signals to security personnel if
necessary. Utility employees will also have the ability to change a customers billing
method from pre paid to post paid in a matter of seconds, without having to physically
visit the meter.
CHAPTER II
LITERATURE SURVEY
2.1 MOTIVATION:
The usage of electricity these days has been increased a lot and the theft of the
electricity has been increasing. Most of the worlds electricity is being produced by
using the natural resources (mostly fossil fuels) which are causing pollution and
affecting the earths atmosphere. So, there is a need to control the usage of electricity
as well as to provide security against thetheft of electricity. In our project we have
implemented and designed a meter which can be useful to reduce the consumption of
electricity by using a smart energy meter which keeps a track of the consumption of
the electricity and transmits the same to the customer through GSM module by which
the user can manage his usage and reduce the consumption of electricity. As we get
details of each and every user we can easily find out where the excess electricity is
flowing and take necessary actions to block the excess flow.
2.2 SCOPE:
The scope of the project work is to introduce advanced technology in
converting dc voltage in to ac voltage and introducing smart energy metering concept.
In future this project can be used to measuring natural gas or water
consumption. These meters can be connected to GSM module and data (i.e.
consumption) can be transmitted over GSM networks and the bills can be
automatically issued to the particular customer through SMS. By making small
modifications in the program (code) we can break the connection if user does not pay
the bills in time. There is no need for the electricity officials to visit the spot to
disconnect the connections i.e., everything can be controlled over the GSM module.
The user can also sell the electricity to the government which is created in his home
using solar cells. These meters can also be used as prepaid energy meters by slightly
modifying them.
2.4 Advantages:
CHAPTER III
DESIGN METHODLOGY
3.1 Introduction to SMART ENERGY METER EC Unit
Low cost
Low power consumption, small, fast
Simple design
Easy maintainability and interoperability
Bug-free/Correctness, safety, many more
I/O ports, 3 16-bit timer/event counters, 4 priority levels, nested interrupt structure, an enhanced
UART and on-chip oscillator and timing circuits.
The device contains a non-volatile 64kB Flash program memory that is both parallel
programmable and serial In-System and In-Application Programmable. In-System Programming
(ISP) allows the user to download new code while the microcontroller sits in the application. InApplication Programming (IAP) means that the microcontroller fetches new program code and
reprograms itself while in the system.
This device executes one machine cycle in 6 clock cycles, hence providing twice the speed
of a conventional 80C51. The added features of the P89C51RD2BN make it a powerful
microcontroller for applications that require pulse width modulation, high-speed I/O and up/down
counting capabilities such as motor control.
Registers:
8051has34generalpurposeorworkingregisters.TwoofthemA&B, holdresults of
manyinstructions,particularlymathematical and logical operationsof 8051 CPU.
The other 32 registersarranged as apart of internal RAM in 4banks RB0-RB3.
A
(accumulator)registerisusedformanyoperations-
Auxiliary carry:
If
there
is
carry from
D3
to
D4
position
during
Add/Sub
then
Overflowflag:
Thisflagissetwhenevertheresultofasignednumberoperationis
too
largeto
C finishes the instruction it is executing and saves the address of the next
instruction (PC) on the stack
The microcontroller gets the address of the ISR from the interrupt vector table
and jumps to it and starts to execute the ISR until it reaches the last instruction
RETI
The microcontroller returns to the place where it was interrupted, it gets the
PC address from the stack by popping the top two bytes of the stack into the
PC and then it starts to execute from that address.
The 8051 provides five interrupt sources. These are listed below.
on bits IT0 and IT1 in Register TCON. The flags that actually generate these
interrupts are bits IEO and IE1 in TCON. When an external interrupt is generated, the
flag that generated it is cleared by the hardware when the service routine is vectored
to only if the interrupt was transition-activated. If the interrupt was level-activated,
then the external requesting source is what controls the request flag, rather than the
on-chip hardware.
Ground: 0 Vreference.
Power Supply: This is the powersupplyvoltage for normal, idle,and powerdown operation.
9
Port 0:
The pins 39-32 are considered as port0. Port 0is an open-drain,
bidirectional I/Oport.Port0 pins thathave1s written tothemfloat and canbe used
ashigh-impedance inputs.Port 0is alsothemultiplexed low-order address and
databus during accessesto externalprogramand data memory. In this
internal pull-ups.
Port 2:
The pins 21-28 are considered as port2.Port
bidirectionalI/Oport
withinternal
pull-ups.Port2
pins
2is
that
an
8-bit
have
1s
addresses
(MOVX@DPTR).In
externaldata
memorythatuses
8-bit
addresses
Port 3:
The pins 10-17 are considered as port3.Port 3is an 8-bit bidirectional
I/Oport withinternal pull-ups.Port3 pins that have 1s writtentothemare pulled
highby theinternal pull-ups and canbe used as inputs. As inputs,port 3pinsthat
are externallybeingpulled lowwill source current because ofthe pull-ups.Port3
also servesthespecial features ofthe P89C51RD2xx,arelisted in tablebelow:
Table: 3.3 Port 3 Alternate Functions
Reset:
10
Pin9 is the reset pin. It is an input and is active high. A high on this pin for
two machine cycles while the oscillator is running, resets the device. An internal
resistor to VSS permits a power-on reset using only an external capacitor to VCC.
the low byte of the address during an access to external memory. In normal
operation, ALE is emitted twice every machine cycle, and can be used for external
timing or clocking. Note that one ALE pulse is skipped during each access to
external data memory. ALE can be disabled by setting SFR auxiliary.0. With this
bit set, ALE will be active only during a MOVX instruction.
program counter high byte (PCH) directly to the external memory. The signal ALE
operates as in the 8085 to allow an external latch to store the PCL byte while
multiplexed bus is made ready to receive the code byte from the external memory.
Port 0 then switches function and becomes the data bus receiving the byte from
memory.
3.4.7 FEATURES
On chip Flash Program Memory with In-System Programming (ISP) and InApplication Programming
Boot ROM contains low level Flash programming routines for downloading
via the UART
3.5SERIAL COMMUNICATION
3.5.1 Introduction
12
28800 and 33600. Baud rates greater than these are possible, but these rates reduce
the distance by which devices can be separated. These high baud rates are used for
device communication where the devices are located together, as is typically the case
with GPIB devices.
CHAPTER IV
14
PROJECT DESIGN
4.1 HARDWARE DESIGN:
POWER SUPPLY
The input to the circuit is applied from a 9V battery. This voltage is given to a
voltage regulator to obtain a pure constant dc voltage of 5V. The output voltage of the
voltage regulator is applied to the microcontroller circuit rails which are internally
connected to the microcontroller and other circuitry.
The block diagram of microcontroller is shown below:
15
MAX 232:
Max232 IC is a specialized circuit which makes standard voltages as required by
RS232 standards. This IC provides best noise rejection and very reliable against discharges
and short circuits. MAX232 IC chips are commonly referred to as line drivers.
To ensure data transfer between PC and microcontroller, the baud rate and
voltage levels of Microcontroller and PC should be the same. The voltage levels of
microcontroller are logic1 and logic 0 i.e., logic 1 is +5V and logic 0 is 0V. But for
PC, RS232 voltage levels are considered and they are: logic 1 is taken as -3V to -25V
and logic 0 as +3V to +25V. So, in order to equal these voltage levels, MAX232 IC is
used. Thus this IC converts RS232 voltage levels to microcontroller voltage levels
and vice versa.
Pin Configuration:
RS 232(Female Port)
RS-232 is the component which is used to connect system (pc) to
microcontroller.
RS-232 (Recommended Standard 232) is the traditional name for a series of
standards for serial binary single-ended data and control signals connecting between a
DTE (Data Terminal Equipment) and a DCE (Data Circuit- terminating Equipment). It
is commonly used in computer serial ports. The standard defines the electrical
16
characteristics and timing of signals, the meaning of signals, and the physical size and
pin out of connectors.
RS232 is limited to point-to-point connections between PC serial ports and
devices. RS 232 hardware can be used for serial communication up to distances of 50
feet.
Voltage levels:
The RS-232 standard defines the voltage levels that correspond to logical one
and logical zero levels for the data transmission and the control signal lines.
For data transmission lines (TxD, RxD and their secondary channel
equivalents) logic one is defined as a negative voltage, the signal condition is called
marking, and has the functional significance. Logic zero is positive and the signal
condition is termed spacing.
Table: 4.1 indicating voltage levels for DB 9 connector
Logic level
1
0
Voltage level
-10V
10V
PIN CONFIGURATION
17
18
2.
3.
4.
These components are specialized for being used with the microcontrollers,
which means that they cannot be activated by standard IC circuits. They are
used for writing different messages on a miniature LCD.
In our project, we use a JHD162A LCD Display which has 2 rows and 16
characters. It has a better contrast and a wider viewing angle. This LCD can display
messages in two lines with 16 characters each. It displays all the alphabets, Greek
letters, punctuation marks, mathematical symbols etc. In addition, it is possible to
display symbols that user makes up on its own. Automatic shifting message on display
(shift left and right), appearance of the pointer, backlight etc. are considered as useful
characteristics.
Features
RS232 compatible serial interface (2400 & 9600 BaudSelectable)
Externally selectable serial polarities (Inverted & Non-Inverted)
Serially controllable contrast and backlight levels
8 user programmable custom characters
16 Byte serial receive buffer
Pin Configuration:
There are pins along one side of the small printed board used
for connection to the microcontroller. There are total of 16 pins
marked with numbers .Their function is described in the table below:
SPECIFICATIONS:
Duty: 1/16
LCD screen:LCD screen consists of two lines with 16 characters each. Each character
consists of 5*7 dot matrix. Contrast on display depends on the power supply voltage
and whether messages are displayed in one or two lines. For that reason, variable
voltage 0-Vdd is applied on pin marked as VEE. Trimmer potentiometer is usually used
for that purpose. Some versions of displays have built in backlight (blue or green
diodes). When used during operating, a resistor for current limitation should be used
(like with any LE diode)
To start with LCD the user should initialize it first which should be
programmed with its LCD commands. The LCD commands are given
Table 3.3 Commands for LCD
KEYPAD:
Keypads and LCDs are the most widely used input/output devices of the 8051
and a basic understanding of them is essential. Keypad is used in this project for the
purpose of Authentication of user such as user id, password, changing price, user
mobile number, etc. Therearevastvarietiesofkeypadsavailableinthemarket;amongthem
theoneis selectedas4*4matrix keyboard. Theselectedkeyboardisoflowinthecostandthe
resourceoccupationbythemicrocontrollerisalsominimalincount (I/Oportoccupation).
The keypad used in this project is 4*4 keypad.
20
Principle of Operation:
A photodiode is a PN junction or PIN structure. When a photon of sufficient
energy strikes the diode, it excites an electron thereby creating a mobile electron and a
positively charged electron hole. If the absorption occurs in the junction's depletion
region, or one diffusion length away from it, these carriers are swept from the junction
by the built-in field of the depletion region. Thus holes move toward the anode, and
electrons toward the cathode, and a photocurrent is produced.
Applications:
Photo diodes are used in
IR Receiver:
22
Principle of Operation:
The electrons that are generated by photons in the base-collector junction are
injected into the base, and this current is amplified by the transistor operation. Note
that although phototransistors have a higher responsivity for light they are unable to
detect low levels of light any better than photodiodes. Phototransistors also have
slower response times.
Resistors:
A resistor is a two-terminal passive electronic component that implements
electrical resistance as a circuit element. When a voltage V is applied across the
terminals of a resistor, a current I will flow through the resistor in direct proportion to
that voltage. This constant of proportionality is called conductance, G. The reciprocal
of the conductance is known as the resistance R, since, with a given voltage V, a
larger value of R further "resists" the flow of current I as given by Ohm's law:
23
Fig: 4.13Capacitors
Capacitors are widely used in electronic circuits for blocking direct current
while allowing alternating current to pass, in filter networks, for smoothing the output
of power supplies, in the resonant circuits that tune radios to particular frequenciesand
for many other purposes.
The capacitor is a reasonably general model for electric fields within electric
circuits. An ideal capacitor is wholly characterized by a constant capacitance C,
defined as the ratio of charge Q on each conductor to the voltage V between them:
24
25
CHAPTER V
IMPLEMENTATION
5.1 HARDWARE IMPLEMENTATION:
The 5V DC supply from the power supply circuit is given to the pins 40(VCC)
used particularly for setting the proper baud rate for serial data transfer.
The 9(RST) pin is connected to reset circuit consisting of a 4 pin switch a
resistor (8.2K) & capacitor (10f). The 8.2K resistor is grounded through 1
pin, the10f capacitor is connected between VCC and one of other 3 pins, one
pin is connected to VCC and the remaining pin is connected to 9 th pin of
26
microcontroller. We should take care that the connections are such that resistor
is connected to VCC and the 9th pin is connected to VCC through the capacitor.
LCD CONNECTIONS:
CONTRAST CONTROL:
27
KEYPAD CONNECTIONS:
28
key press has occurred i.e., for example, if D3-D0=1110, this means that a key in the
D0 column has been pressed. After a key press is detected, the microcontroller will go
through a process of identifying the key. Starting with the top row, the microcontroller
grounds it by providing a low to row D0 only and then it reads the columns. If the
data read is all 1s, no key in that row is activated and the process is moved to the next
row. It grounds the next row, reads the columns and checks for any zero. This process
continues until the row is identified. After identification of the row in which the key
has been pressed, the next task is to find out which column the pressed key belongs to.
Now this will be easy since the microcontroller knows at any time which row and
column are being accessed.
The keypad connections are shown in figure below:
Fig: 5.6 Matrix Keypad schematic
555 TIMER and IR transmitter connections:
receiver.
The 555 timer is operated in astable mode of operation.
The 1st pin is grounded.
The 2nd pin and 6th pin are shorted, 2nd pin is connected to VCC through
the 10K and 220K pot, IR receiver is connected to 2 nd pin in reverse
bias.
The pin 3 of 555 timer is an output pin which is connected to the 12 th
CONCLUSION
Since the inception of electricity deregulation and market-driven pricing
throughout the world, utilities have been looking for a means to match consumption
with generation. Smart meters are also believed to be a less costly alternative to
traditional interval or time-of-use meters and are intended to be used on a wide scale
with all customer classes, including residential customers
Supporting Consumers: a) An end to estimate bills, which are a major source
of complaints for many customers b)A tool to help consumers better manage their
energy use - smart meters with a display can provide up to date information on
electricity consumption in the currency of that country and in doing so help people to
better manage their energy use and reduce their energy bills and carbon emissions .c)
voltage levels, and power events can be tracked and logged across the entire customer
base.
Supports Power Grid: The Ability to remotely turn power on or off to a
customer, read usage information from a meter, detect a service outage, detect the
unauthorized use of electricity, know the maximum amount of electricity that a
customer can demand at any time. It is projected to reduce the staff required to read
meter data across the customer base.
The billing is through HyperTerminal or GSM, so lot of paper can be saved
.So Cutting of Trees can be avoided. It is believed that billing customers by time of
day will encourage consumers to adjust their consumption habits to be more
responsive to market prices thereby saving the power by which natural resources are
protected.
31
BIBILOGRAPHY:
systems,
PHI
Prentice
hall
India,
Eastern
Economy
Edition,www.phindia.com
32