CHAPTER I 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 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CHAPTER I
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
basement, and the only time you realize how much energy you’ve been spending is
when the bill hit the door.
1
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 customer’s billing
method from pre paid to post paid in a matter of seconds, without having to physically
visit the meter.
2
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 world’s electricity is being produced by
using the natural resources (mostly fossil fuels) which are causing pollution and
affecting the earth’s 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.
3
2.3 PROBLEM DEFINATION:
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 electricity bills are
issued by a person going to each and every house of the locality with an instrument in
his hand. But lack of resources has made the government to take the help of the
private organizations who supply man power. These organizations are charging the
government a high amount for the supply of the man power which is causing the
government to lose its profits on selling the electricity. The theft of electricity has also
become a problem these days and there is no control over the loss due to theft of
electricity.
The solution to the above problems is Smart Energy Meter. By using Smart
Energy Meter we can directly issue the bills to the customers i.e., there is no need to
go to each every house of the locality for the issue of the bills. The consumers can
cut-off their electricity bills by reducing their power consumption. The theft of
electricity can be easily found as the consumption in every house is noted and
monitored.
2.4 Advantages:
More accurate bills
Lower bills
Track of energy usage
Sell energy back to the grid
Flexible tariffs
No more meter readings
4
CHAPTER III
DESIGN METHODLOGY
3.1 Introduction to SMART ENERGY METER EC Unit
Fig: 3.1 BLOCK DIAGRAM
3.2 SELECTION OF HARDWARE:
The hardware selected must be such a way that
Low cost
Low power consumption, small, fast
Continually reacts to changes in the system’s environment
Must compute certain results in real-time without delay
Simple design
Easy maintainability and interoperability
Bug-free/Correctness, safety, many more
3.3 HARDWARE AND SOFTWARE SPECIFICATIONS
5
3.3.1 HARDWARE
1. P89C51RD2BN Microcontroller (IC)
2. Power supply
3. MAX 232 (IC)
4. RS 232 (female port)
5. 2x16 Display Liquid Crystal Display (JHD162A)
6. 4*4 matrix keypad
7. NE555 timer (IC)
8. IR Sensors (IR Transmitter and IR Receiver)
9. Resistors
10. Capacitors
11. Serial port connector
12. Crystal oscillator
3.4 8051 Microcontroller:
Microprocessors and microcontrollers are widely used in embedded systems
products. Microcontroller is a programmable device. A microcontroller has a CPU in
addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a
single chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in
microcontrollers makes them ideal for many applications in which cost and space are
critical.The Intel 8051 is Harvard architecture, single chip microcontroller (µC) which
was developed by Intel in 1980 for use in embedded systems.
The microcontroller used here is P89C51RD2xx. This microcontroller is
manufactured by Philips. This microcontroller has 256 byte RAM and 64KB flash
memory. It has 4 timers, 1 serial port and 4 I/O ports (each 8 bit) on a single chip. It is
a flash type 8051. The present project is implemented on Keil µvision. In order to
program the device, preload tool has been used to burn the program onto the
microcontroller or it can be connected to a computer through the serial port as the IC
has in-built ISP mode. The features, pin description of the microcontroller and the
software used are discussed below.
The 89C51RD2xx is a Single-Chip 8-Bit Microcontroller manufactured in advanced
CMOS process and is a derivative of the 80C51microcontroller family. The device also has 4 8-bit
A sensor is a combination of a transmitter and a receiver. A transmitter is used
to transmit the IR signals which are received at the receiver. The sensor unit is used
along with a 555 timer. Whenever the transmission is blocked the sensor unit sends an
interrupt signal to the microcontroller which then increments the counter.
Photo diode:
A photodiode is a type of photo-detector capable of converting light into
either current or voltage, depending upon the mode of operation.
Photodiodes are similar to regular semiconductor diodes except that they may
be either exposed (to detect vacuum UV or X-rays) or packaged with a window or
optical fiber connection to allow light to reach the sensitive part of the device. Many
diodes designed for use specifically as a photodiode will also use a PIN junction
rather than the typical PN junction.
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
Consumer electronic devices such as compact disc players, smoke
detectors, and the receivers for remote controls in VCRs and television.
Accurate measurement of light intensity.
Detectors for computed tomography (coupled with scintillators) or instruments to analyze samples (immunoassay), pulseoximeters.
Optical communications and in lighting regulation. Astronomy, spectroscopy, night vision equipment and laser range finding.
21
IR Receiver:
IR receiver is used to receive the signals transmitted by the IR transmitter.IR
receiver is similar to an N-P-N transistor. It is a three terminal device but looks like a
two terminal device a base is connected internally. It is a nothing but a
phototransistor.
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:
Fig: 4.12 Resistors
Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits.
22
Capacitors:
A capacitor (formerly known as condenser) is a device for storing electric charge. The
forms of practical capacitors vary widely, but all contain at least two conductors
separated by a non-conductor. Capacitors used as parts of electrical systems, for
example, consist of metal foils separated by a layer of insulating film.
A capacitor is a passive electronic component consisting of a pair of conductors separated by
a dielectric (insulator). When there is a potential difference (voltage) across the conductors, a
static electric field develops across the dielectric, causing positive charge to collect on one
plate and negative charge on the other plate. Energyis stored in the electrostatic field. An ideal
capacitor is characterized by a single constant value, capacitance, measured in farads. This is
the ratio of the electric charge on each conductor to the potential difference between them.
Fig: 4.13CapacitorsCapacitors 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:
23
CHAPTER VIMPLEMENTATION
5.1 HARDWARE IMPLEMENTATION:
Fig: 5.1 Schematicof Smart Energy Meter
In this schematic we observe the following connections of microcontroller
with LCD, keypad, sensors and MAX 232.
Microcontroller P89C51RD2XX connections:
It includes Keypad interfacing, LCD interfacing, MAX 232 connections and
RS232 connections, IR transceiver connections.
The 5V DC supply from the power supply circuit is given to the pins 40(VCC)
& 20pin (GND) of P89C51RD2XX for its working.
The Oscillatory circuit with crystal frequency 11.0592MHz is give to the
18(XTAL2) & 19(XTAL1) pins of P89C51RD2BN. The frequency 11.0592 is
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 (10µf). The 8.2K resistor is grounded through 1
pin, the10µf capacitor is connected between VCC and one of other 3 pins, one
pin is connected to VCC and the remaining pin is connected to 9th pin of
24
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.
This circuit enables to reset the system to the original configuration.
The Port 1 is used to interface the keypad. In this Port1 the pins P1.0, P1.1,
P1.2 and P1.3 are used for detection of rows, and pins P1.4, P1.5, P1.6 and
P1.7 are used to detect columns.
The Port0 is used to interface LCD data lines. Through this Port the
P89C51RD2BN can send the command and data bytes.
The Port 2.5 is connected to RS pin of LCD, and Port 2.6 is connected to RW
pin of LCD, Port 2.7 is connected to EN pin of LCD. These pins enable the
LCD to operate in different modes.
The pins P3.0 (RxD) and P3.1 (TxD) are connected to the 11, 12 pins of MAX
232 which is used as a level translator. Through these pins the data is
transmitted between microcontroller and MAX 232.
The pins 2(RxD), 3(TxD) of RS 232 is connected to 13(TxD) and 14(RxD)
pins of MAX 232 for data transmission.
The P3.2 (INT0) pin is connected to IR Receiver through resistors.
The 29th pin is connected to a 3 pin switch which is used to toggle between
program execution (high) and code dumping (low).
LCD CONNECTIONS:
The LCD used is JHD162A, it is a 16 pin LCD
The 1st and 2nd pins are connected to ground and VCC respectively.
The 3rd pinis connected to a variable resistor or a potentiometer to
adjust the contrast.
The 4th, 5th ,6th pins are connected to 26th (P 2.5), 27th (P 2.6), 28th (P
2.7) pins of the microcontroller respectively.
The 7th to 14th pins are data pins and are connected to the 39 th (P 0.0) to
32nd (P 0.7) pins of the microcontroller respectively.
The 15th and 16th pins are used for backlight purpose. 15th pin is
connected to VCC and 16th pin to ground.
25
CONTRAST CONTROL:
To have a clear view of the characters on the LCD, contrast should be
adjusted. To adjust the contrast, the voltage should be varied. For this, a preset is used
which can behave like a variable voltage device. As the voltage of this preset is
varied, the contrast of the LCD can be adjusted.
Fig: 5.2 Variable Resistor
The LCD connections are as shown in figure below:
Fig: 5.3 LCD Connections
KEYPAD CONNECTIONS:
The keypad used is 4*4 keypad
The pins 1, 2, 3, 4 which are connected to columns of the keypad are
connected to 1, 2, 3, 4(P1.0 to P1.3) pins of the microcontroller
respectively.
26
The pins 5, 6, 7, 8 which are connected to rows of the keypad are
connected to 5, 6, 7, 8(P1.4 to P1.7) pins of the microcontroller
respectively.
INTERFACING THE KEYPAD TO 8051:
At the lowest level, keyboards are organized in a matrix of rows and columns.
The CPU accesses both rows and columns through ports. Therefore, with one 8-bit
port, a4*4 matrix of keys can be connected to a microprocessor. When a key is
pressed, a row and a column make a contact otherwise there is no connection
between rows and columns. It is the function of programs stored in EPROM of the
microcontroller to scan the keys continuously, identify which one has been
activated and present it to the microcontroller.
Scanning and identifying the key:
The rows are connected to an output port and the columns are connected to an
input port. If no key has been pressed, reading the input port will yield 1s for all
columns since they are all connected to high (Vcc). If all the rows are grounded and a
key is pressed, one of the columns will have 0 since the key pressed provides the path
to ground. It is the function of the microcontroller to scan the keypad continuously to
detect and identify the key pressed.
Grounding rows and reading the columns:
Fig: 5.5 initializing rows with 0’s and columns with 1’s
To detect a pressed key, the microcontroller grounds all rows by providing 0
(zero) to the output latch and then it reads the columns. If the data read from the
columns is D3-D0 =1111, no key has been pressed and the process continues until a
key press is detected. However, if one of the column bits has a zero, this means that a
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
27
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:
The sensor is designed using a 555 timer, a IR transmitter and a IR
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 2nd pin in reverse
bias.
The pin 3 of 555 timer is an output pin which is connected to the 12 th
pin (P 3.2) of the microcontroller.
The 4th pin and 8th pin are shorted, 8th pin is connected to VCC and 0.1µf
capacitor is connected between 8th pin and ground.
The 5th pin is grounded through 0.01µf capacitor.
The IR transmitter is connected between VCC and ground through 270
ohm resistor. It is connected in forward bias.
If there is obstruction between transmitter and receiver, the receiver
output gives 3V to 5V.
Whenever there is an obstruction of current between transmitter and
receiver, the current passed to receiver decreases and hence the voltage
across voltage divider decreases. As a result a short pulse is applied to
the port pin of the 8051 sensor circuit, the controller increments the
counter which indicates the consumption of electricity.
CONCLUSION
28
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.
29
BIBILOGRAPHY:
Janci Gillespie Mazidi, Muhammad Ali Mazidi,The 8051micro controller and
Embedded systems, PHI Prentice hall India, Eastern Economy
Edition,www.phindia.com
Kenneth J. Ayala, The 8051 Microcontroller, architecture, Programming and
Applications, Pen ram international publishing Pvt. Ltd. 1996
Arnold S. Berger, Embedded systems design, an introduction to process, tools and
Techniques, CMP Books, 2005. www.cmpbooks.com
Yashvant Kanetkar, Let Us C, BPB Publications, 1999 www.bpbpub.com
Dreamtech Software Team, Programming for Embedded systems, WILEY