prepaid energy meter

32
1 Chapter 1 Introduction 1.1 History of electricity meter: An electricity meter or energy meter is a device that measures the amount of electric energy consumed by a residence, business or an electrically powered device. As commercial use of electric energy spread in the 1880s, it became increasingly important that an electric energy meter. Many experimental types of meter were developed. Edison at first worked on a DC electromechanical meter with a direct reading register, but instead developed an electrochemical metering system, which used an electrolytic cell to totalize current consumption. The electrochemical meter was labor-intensive to read and not well received by customers. In 1885 Ferranti offered a mercury motor meter with a register similar to gas meters; this had the advantage that the consumer could easily read the meter and verify consumption. The first accurate, recording electricity consumption meter was a DC meter by Dr. Hermann Aron, who patented it in 1883. Hugo Hirstof the British General Electric Company introduced it commercially into Great Britain from 1888. Meters had been used prior to this, but they measured the rate of energy consumption at that particular moment. The first specimen of the AC kilowatt-hour meter produced on the basis of Hungarian Otto Blathy's patent and named after him was presented by the Ganz Works at the Frankfurt Fair in the autumn of 1889, and the first induction kilowatt-hour meter was already marketed by the factory at the end of the same year.These were the first alternating-current watt meters, known by the name of Blathy-meters. The AC kilowatt hour meters used at present operate on the same principle as Blathy's original invention. Also around 1889, Elihu Thomson of the American General Electric company developed a recording watt meter (watt-hour meter) based on an ironless commutator motor. This meter overcame the disadvantages of the electrochemical type and could operate on either alternating or direct current. In 1894 Oliver Shallenberger of the Westinghouse Electric Corporation applied the induction principle previously used only in AC ampere-hour meters to produce a watt-hour meter of the

Upload: jignesh-chikhaliya

Post on 30-Nov-2015

174 views

Category:

Documents


12 download

DESCRIPTION

Prepaid Energy Meters are based on the principle of microcontroller application.There aretwo basic function modules in the meter separately named the energy metering module andthe MPU controller module.The energy-metering module adopts well-selected special integrated circuits and will sendthe pulse frequency to the MPU to accumulate the consumption of the electricity.The MPUcontroller module transfers message between the prepaid card and the port of card to realizethe prepaid metering function and other appointed function.

TRANSCRIPT

Page 1: PREPAID ENERGY METER

1

Chapter 1

Introduction

1.1 History of electricity meter:

An electricity meter or energy meter is a device that measures the amount of electric

energy consumed by a residence, business or an electrically powered device.

As commercial use of electric energy spread in the 1880s, it became increasingly

important that an electric energy meter. Many experimental types of meter were developed.

Edison at first worked on a DC electromechanical meter with a direct reading register, but

instead developed an electrochemical metering system, which used an electrolytic cell to

totalize current consumption. The electrochemical meter was labor-intensive to read and not

well received by customers.

In 1885 Ferranti offered a mercury motor meter with a register similar to gas meters;

this had the advantage that the consumer could easily read the meter and verify consumption.

The first accurate, recording electricity consumption meter was a DC meter by Dr. Hermann

Aron, who patented it in 1883. Hugo Hirstof the British General Electric

Company introduced it commercially into Great Britain from 1888. Meters had been used

prior to this, but they measured the rate of energy consumption at that particular moment.

The first specimen of the AC kilowatt-hour meter produced on the basis of

Hungarian Otto Blathy's patent and named after him was presented by the Ganz Works at the

Frankfurt Fair in the autumn of 1889, and the first induction kilowatt-hour meter was already

marketed by the factory at the end of the same year.These were the first alternating-current

watt meters, known by the name of Blathy-meters. The AC kilowatt hour meters used at

present operate on the same principle as Blathy's original invention.

Also around 1889, Elihu Thomson of the American General Electric company

developed a recording watt meter (watt-hour meter) based on an ironless commutator motor.

This meter overcame the disadvantages of the electrochemical type and could operate on

either alternating or direct current.

In 1894 Oliver Shallenberger of the Westinghouse Electric Corporation applied the induction

principle previously used only in AC ampere-hour meters to produce a watt-hour meter of the

Page 2: PREPAID ENERGY METER

2

modern electromechanical form, using an induction disk whose rotational speed was made

proportional to the power in the circuit. The Blathy meter was similar to Shallenberger and

Thomson meter in that they are two-phase motor meter. Although the induction meter would

only work on alternating current, it eliminated the delicate and troublesome commutator of

the Thomson design.

The most common unit of measurement on the electricity meter is the kilowatt hour [kWh],

which is equal to the amount of energy used by a load of one kilowatt over a period of

one hour.

In addition to metering based on the amount of energy used, other types of metering are

available. Meters which measured the amount of charge (coulombs) used, known as ampere-

hour meters, were used in the early days of electrification. Some meters measured only the

length of time for which charge flowed, with no measurement of the magnitude of voltage or

current being made. These were only suited for constant-load applications. Neither type is

likely to be used today.

1.2 Types of meters:

Electricity meters operate by continuously measuring the instantaneous voltage (volts)

and current (amperes) and finding the product of these to give instantaneous electrical

power (watts) which is then integrated against time to give energy used (joules, kilowatt-

hours etc.).

Meters for smaller services (such as small residential customers) can be connected directly

in-line between source and customer. For larger loads, more than about 200 ampere of

load, current transformers are used, so that the meter can be located other than in line with

the service conductors. The meters fall into two basic categories, electromechanical and

electronic.

Page 3: PREPAID ENERGY METER

3

1. Electromechanical meters

The most common type of electricity meter is the electromechanical induction watt-hour

meter.The electromechanical induction meter operates by counting the revolutions of

an aluminum disc which is made to rotate at a speed proportional to the power. The number

of revolutions is thus proportional to the energy usage. The voltage coil consumes a small

and relatively constant amount of power, typically around 2 watts which is not registered on

the meter. The current coil similarly consumes a small amount of power in proportion to the

square of the current flowing through it, typically up to a couple of watts at full load, which

is registered on the meter.

Fig 1.1 Electromechanical meter(Courtesy of Wikipedia.com)

2. Electronic meters

Electronic meters display the energy used on an LCD or LED display, and can also transmit

readings to remote places. In addition to measuring energy used, electronic meters can also

record other parameters of the load and supply such as maximum demand, power

factor and reactive power used etc. They can also support time-of-day billing, for example,

recording the amount of energy used during on-peak and off-peak hours.

Page 4: PREPAID ENERGY METER

4

Fig 1.2 Electronic meter(Courtesy of Wikipedia.com)

3. Prepayment meters

The standard business model of electricity retailing involves the electricity company billing

the customer for the amount of energy used in the previous month or quarter. In some

countries, if the retailer believes that the customer may not pay the bill, a prepayment meter

may be installed. This requires the customer to make advance payment before electricity can

be used. If the available credit is exhausted then the supply of electricity is cut off by a relay.

In the UK, mechanical prepayment meters used to be common in rented accommodation.

Disadvantages of these included the need for regular visits to remove cash, and risk of theft

of the cash in the meter.

Modern solid-state electricity meters, in conjunction with smart cards, have removed these

disadvantages and such meters are commonly used for customers considered to be a

poor credit risk. In the UK, one system is the pay point network, where rechargeable tokens

(Quantum cards for natural gas, or plastic "keys" for electricity) can be loaded with whatever

money the customer has available.

Recently smartcards are introduced as much reliable tokens that allow two way data

exchange between meter and the utility.

Around the world, experiments are going on, especially in developing countries, to test pre-

payment systems. In some cases, prepayment meters have not been accepted by customers.

There are various groups, such as the Standard Transfer Specification (STS) association,

Page 5: PREPAID ENERGY METER

5

which promote common standards for prepayment metering systems across manufacturers.

Prepaid meters using the STS standard are used in many countries.

Fig 1.3 Prepayment meters using magnetic strips(Courtesy of Wikipedia.com)

1.3 Study and analysis:

Over 40 countries have implemented prepaid meters in their markets. In United

Kingdom the system, has been in use for well over 70 years with about 3.5 million

consumers.The prepaid program in South Africa was started in 1992, since then they

have installed over 6 million meters. Other African counties such as Sudan,

Madagascar are following the South African success.

The concept has found ground in Argentina and New Zealand with few thousands of

installations.The Sabah Electricity SdnBhd (SESB), Malaysia, has awarded a contract

to a local manufacturer to supply 1,080 prepaid meters. Countries such as Thailand,

Bangladesh, Singapore, and Iran have been showing increased interest in adopting

prepaid system.

In India, the State of West Bengal has introduced the smart card operated prepaid

energy meters in remote islands of Sunder bans. In Mumbai, pre-paid power is

provided by the Brihanmumbai Electricity Supply and Transport (BEST)

Undertaking.

Tata Power plans to introduce pre-paid electricity in Delhi. Tata Steel is likely to

install prepaid electricity meters at its employee township in Jamshedpur.Now days,

Uttar pradesh govt. has decided to replace conventional energy meters by prepaid one

in greater Noida.

Page 6: PREPAID ENERGY METER

6

Over the last few years, Prepaid Energy Meter has been proposed as an innovativeSolution

aimed at facilitating affordability and reducing the cost of utilities. Thismechanism,

essentially, requires the users to pay for the electricity before its consumption. In this way,

consumers hold credit and then use the electricity until thecredit is exhausted. If the available

credit is exhausted then the supply of electricity is cutoff by a relay.

But their use is still controversial. On the one hand, those that support the diffusion ofprepaid

meters claim that they benefit both consumers and utilities because they helpusers to

consume more efficiently and to improve the management of their budget, whileallowing

firms to reduce financial costs, as well as the costs of operation and bad debts.

On the other hand, those that are against prepaid meters argue that their adoption isexpensive

for firms and risky for low income consumers, as the insecurity and volatilityof their income

may force them to make little use of the service, or ultimately, bringabout involuntary self-

disconnection.

Prepaid meters are usually installed by electricity supplier, if it feels that the customer cannot

keep up payments on their energy bill. However, they can also be requested by thecustomer

themselves - and are often seen as a good method of budgeting. Generallyspeaking they are

used by lower income households, such as people on welfare benefits,lone parents or those

with no bank account.

From a technological point of view, the prepayment system consists of three

welldifferentiated components. The first is a service meter installed at the unit where

energywill be consumed, such as a household dwelling or a store. In general, these meters are

ofthe ―two-gang‖ type, and consist of a user’s interface unit and a current measuring set.

The interface unit is a device installed inside the building, which allows the user to―interact‖

with the meter. The metering unit, on the other hand, is the intelligentcomponent that stores

credit and consumption information, and makes up the elementthat either clears or switches

off electricity supply.

The second component of the systemis the so-called credit dispensing unit, which is the

vending machine where consumerscan purchase electricity credit. In general, these sales

outlets are located at the utility’scommercial offices, as well as in stores with long opening

hours. The third component isthe supporting device that links the various sales outlets to the

utility’s managementsystem.

Page 7: PREPAID ENERGY METER

7

Chapter 2

Working principle

Prepaid Energy Meters are based on the principle of microcontroller application.There are

two basic function modules in the meter separately named the energy metering module and

the MPU controller module. The energy-metering module adopts well-selected special integrated circuits and will send

the pulse frequency to the MPU to accumulate the consumption of the electricity.The MPU

controller module transfers message between the prepaid card and the port of card to realize

the prepaid metering function and other appointed function.

Every consumer can buy a memory card (is nothing but an EEPROM IC) with apassword

stored inside it using a microcontroller program. The memory card isavailable at various

ranges (i.e. Rs 50, Rs 100, Rs 200 etc.).

When the consumer insert a smart card into the card reader, which is connected in prepaid

energy meter. The card reader will read the stored information and delete the information

from the EEPROM IC (smart card) using the MC program. So that the smart card cannot be

reused by others.

According to the power consumption the amount will be reduced. When the amount is over,

the relays will automatically shut down the whole system.

Microcontroller AT89S52 acts as the primary controller. The primary controller collects

information from energy meter as well as from the smart card which is IC AT24C02

(EEPROM chip).Smart card gives information about the limitation of units. The energy

meter reading is compared with the smart card information by the primary controller.

Depending on the result the Primary Controller will activate the buzzer if the credit is low

and the Controller will trigger the Relay if the credit goes very low. Once the Relay is

triggered, the electricity Supply will be cut. The supply will start again only when the meter

is recharged with enough credit.Flow chart of it is given below.

Page 8: PREPAID ENERGY METER

8

No

Yes

No

Yes

No Yes

Insert Smart

card

Read /store

data

Is

recharges

uccess?

Increment

Counter/decrement

unit

Is unit

less

than 10?

Start buzzer every

minute/ Display

”Recharge”

Is unit

zero?

Cut off power supply

Page 9: PREPAID ENERGY METER

9

Chapter 3

Construction

3.1Block diagram

Fig 3.1 Block diagram of prepaid energy meter

Microcontroller

Energy

meter

Circuit

breaker

Pulse

detector

Display

Power supply

Smart card

(Read)

Electrical line

To load

Buzzer

Page 10: PREPAID ENERGY METER

10

There are two modules in prepaid energy meters.

1. Energy meter

2. Prepayment circuit

3.2 Energy meter:

Here, we are using an energy metering IC AD7752/68 instead of conventional

electromechanical energy meter for electrical power measurement.

It has following features:

i. On-chip oscillator as clock source

ii. High accuracy, supports 50 Hz/60 Hz

iii. Less than 0.1% error over a dynamic range of 500 to 1

iv. High frequency output CF calibrates and supplies instantaneous, positive-only

real power

v. Logic output REVP indicates potential miswiring or negative power

vi. Direct drive for electromechanical counters and 2-phase stepper motors (F1

and F2)

vii. On-chip power supply monitoring

viii. On-chip reference 2.45 V (20 ppm/°C typical) with external overdrive

capability

ix. Single 5 V supply, low power (20 mW typical)

x. Low cost CMOS process

Description:

The ADE7768 is a high accuracy, electrical energy metering IC. It is a pin reduction version

of the ADE7755, enhanced with a precise oscillator circuit that serves as a clock source to

the chip. The ADE7768 eliminates the cost of an external crystal or resonator, thus reducing

the overall cost of a meter built with this IC. The chip directly interfaces with the shunt

resistor.

Page 11: PREPAID ENERGY METER

11

The ADE7768 specifications surpass the accuracy requirements of the IEC62053-21

standard. The AN-679 Application Note can be used as a basis for a description of an

IEC61036 (equivalent to IEC62053-21) low cost, watt-hour meter reference design.

The only analog circuitry used in the ADE7768 is in the Σ-Δ ADCs and reference circuit. All

other signal processing, such as multiplication and filtering, is carried out in the digital

domain. This approach provides superior stability and accuracy over time and extreme

environmental conditions.The ADE7768 supplies positive-only average real power

information on the low frequency outputs, F1 and F2. These outputs can be used to directly

drive an electromechanical counter or interface with an MCU. The high frequency CF logic

output, ideal for calibration purposes, provides instantaneous positive-only, real power

information.

The ADE7768 includes a power supply monitoring circuit on the VDD

supply pin. The

ADE7768 remains inactive until the supply voltage on VDD

reaches approximately 4 V. If the

supply falls below 4 V, the ADE7768 also remains inactive and the F1, F2, and CF outputs

are in their nonactive 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 ADE7768 does not exhibit creep when no load is present. When

REVP is logic high, the ADE7768 does not generate any pulse on F1, F2, and CF.

The ADE7768 comes in a 16-lead, narrow body SOIC package.

Fig 3.2 AD7768 pin out

Page 12: PREPAID ENERGY METER

12

Pin

No.

Mnemonic

Description

1 VDD

Power Supply. This pin provides the supply voltage for the

circuitry in the ADE7768. The supply voltage should be

maintained at 5 V ± 5% for specified operation. This pin should be

decoupled with a 10 μF capacitor in parallel with a 100 nF ceramic

capacitor.

2,3 V2P, V2N Analog Inputs for Channel V2 (Voltage Channel). These inputs

provide a fully differential input pair. The maximum differential

input voltage is ±165 mV for specified operation. Both inputs have

internal ESD protection circuitry; an overvoltage of ±6 V can be

sustained on these inputs without risk of permanent damage.

4,5 V1N, V1P Analog Inputs for Channel V1 (Current Channel). These inputs are

fully differential voltage inputs with a maximum signal level of

±30 mV with respect to the V1N pin for specified operation. Both

inputs have internal ESD protection circuitry and, in addition, an

overvoltage of ±6 V can be sustained on these inputs without risk

of permanent damage.

6 AGND This pin provides the ground reference for the analog circuitry in

the ADE7768, that is, the ADCs and reference. This pin should be

tied to the analog ground plane of the PCB. The analog ground

plane is the ground reference for all analog circuitry, such as

antialiasing filters, current and voltage sensors, and so forth. For

accurate noise suppression, the analog ground plane should be

connected to the digital ground plane at only one point. A star

ground configuration helps to keep noisy digital currents away

from the analog circuits.

7 REFIN/OUT

This pin provides access to the on-chip voltage reference. The on-

chip reference has a nominal value of 2.45 V and a typical

temperature coefficient of 20 ppm/°C. An external reference

source may also be connected at this pin. In either case, this pin

should be decoupled to AGND with a 1 μF tantalum capacitor and

a 100 nF ceramic capacitor. The internal reference cannot be used

to drive an external load.

8 SCF Select Calibration Frequency. This logic input is used to select the

frequency on the calibration output CF.

9,10 S1, S0 These logic inputs are used to select one of four possible

frequencies for the digital-to-frequency conversion. With this logic

input, designers have greater flexibility when designing an energy

meter. See the Selecting a Frequency for an Energy Meter

Application section.

11

RCLKIN To enable the internal oscillator as a clock source to the chip, a

precise low temperature drift resistor at a nominal value of 6.2 kΩ

must be connected from this pin to DGND.

Page 13: PREPAID ENERGY METER

13

Table 3.1 Pin description of AD7768

3.3 Prepayment circuit:

Main part of our project is prepayment circuit, which is governed by a microcontroller.Pulsed

output of energy meter is given to microcontroller of this circuit.Circuit diagram for prepaid

circuit is given below.

12 REVP This logic output goes high when negative power is detected, that

is, when the phase angle between the voltage and current signals is

greater than 90°. This output is not latched and is reset when

positive power is once again detected. The output goes high or low

at the same time that a pulse is issued on CF.

13 DGND This pin provides the ground reference for the digital circuitry in

the ADE7768, that is, the multiplier, filters, and digital-to-

frequency converter. This pin should be tied to the digital ground

plane of the PCB. The digital ground plane is the ground reference

for all digital circuitry, such as counters (mechanical and digital),

MCUs, and indicator LEDs. For accurate noise suppression, the

analog ground plane should be connected to the digital ground

plane at one point only—a star ground.

14 CF Calibration Frequency Logic Output. The CF logic output

provides instantaneous, positive-only real power information. This

output is intended for calibration purposes. See the SCF pin

description.

15,16 F2, F1 Low Frequency Logic Outputs. F1 and F2 supply average

positive-only real power information. The logic outputs can be

used to directly drive electromechanical counters and 2-phase

stepper motors. See the Transfer Function section.

Page 14: PREPAID ENERGY METER

14

Fig 3.3Prepayment circuit

Components used in above circuits are as follows:

1) Microcontroller IC AT89S52

2) EEPROM IC AT24C02

3) Relay

4) Relay driver IC ULN2003

5) LCD display

6) Buzzer

7) Power supply

Page 15: PREPAID ENERGY METER

15

3.3.1 AT89C052

Fig 3.4Pin outs of AT89S52

Features:

8KBytesof In-SystemProgrammable(ISP) Flash Memory

4.0Vto 5.5V OperatingRange

256 x 8-bitInternalRAM

FullDuplexUARTserial Channel

32 ProgrammableI/OLines

FullyStatic Operation:0Hz to 33 MHz

Vital role of Micro controller-AT89S52:

It will act as a master to communicate with memory.

Whenever command is sent to reset the memory, controller resets the memory.

Controller takes the pulses from the energy meter and increments the Unit which depends

upon the calculations and stores in memory.

Microcontroller also switches off the energy meter whenever the credit is exhausted.

Page 16: PREPAID ENERGY METER

16

Sr

no.

Mnemonics Description

1 VCC Supply voltage.

2 GND Ground.

3 Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port,

each pin can sink eight TTL inputs. When 1s are written to port 0 pins,

the pins can be used as high-impedance inputs. Port 0 can also be

configured to be the multiplexed low-order address/data bus during

accesses to external program and data memory. In this mode, P0 has

internal pull-ups. Port 0 also receives the code bytes during Flash

programming and outputs the code bytes during program verification.

External pull-ups are required during program verification.

4 Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1

output buffers can sink/source four TTL inputs. When 1s are written to

Port 1 pins, they are pulled high by the internal pull-ups and can be used

as inputs. As inputs, Port 1 pins that are externally being pulled low will

source current (IIL) because of the internal pull-ups. In addition, P1.0

and P1.1 can be configured to be the timer/counter 2 external count input

(P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX),

respectively, as shown in the following table. Port 1 also receives the

low-order address bytes during Flash programming and verification.

5 Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2

output buffers can sink/source four TTL inputs. When 1s are written to

Port 2 pins, they are pulled high by the internal pull-ups and can be used

as inputs. As inputs, Port 2 pins that are externally being pulled low will

source current (IIL) because of the internal pull-ups. Port 2 emits the

high-order address byte during fetches from external program memory

and during accesses to external data memory that uses 16-bit addresses

(MOVX @ DPTR). In this application, Port 2 uses strong internal pull-

ups when emitting 1s. During accesses to external data memory that uses

8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2

Special Function Register. Port 2 also receives the high-order address

bits and some control signals during Flash programming and

verification.

6 Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3

output buffers can sink/source four TTL inputs. When 1s are written to

Port 3 pins, they are pulled high by the internal pull-ups and can be used

as inputs. As inputs, Port 3 pins that are externally being pulled low will

source current (IIL) because of the pull-ups. Port 3 receives some control

signals for Flash programming and verification.

7 RST Reset input. A high on this pin for two machine cycles while the

oscillator is running resets the device. This pin drives high for 98

oscillator periods after the Watchdog times out. The DISRTO bit in SFR

AUXR (address 8EH) can be used to disable this feature. In the default

state of bit DISRTO, the RESET HIGH out feature is enabled.

Page 17: PREPAID ENERGY METER

17

Table 3.2 Pin functions of AT89S52

3.3.2 AT24C02

AT24C02 provides 2048 bits of serial electrically erasable and programmable read only

memory organized as 256 words of 8 bits each.

The device is optimized for use in manyindustrial and commercial applications where low-

power and low-voltage operation are essential. The AT24C01A/02/04/08A/16A is available

in space-saving 8-lead PDIP,8-lead JEDEC SOIC, 8-lead MAP, 5-lead SOT23

(AT24C01A/AT24C02/AT24C04), 8lead TSSOP, and 8-ball dBGA2 packages and is

accessed via a Two-wire serial interface.

In addition, the entire family is available in 2.7V (2.7V to 5.5V) and 1.8V (1.8V to

5.5V) versions.

8 ALE/PROG Address Latch Enable (ALE) is an output pulse for latching the low byte

of the address during accesses to external memory. This pin is also the

program pulse input (PROG) during Flash programming. In normal

operation, ALE is emitted at a constant rate of 1/6 the oscillator

frequency and may be used for external timing or clocking purposes.

Note, however, that one ALE pulse is skipped during each access to

external data memory. If desired, ALE operation can be disabled by

setting bit 0 of SFR location 8EH. With the bit set, ALE is active only

during a MOVX or MOVC instruction. Otherwise, the pin is weakly

pulled high. Setting the ALE-disable bit has no effect if the

microcontroller is in external execution mode.

9 PSEN Program Store Enable (PSEN) is the read strobe to external program

memory. When the AT89S52 is executing code from external program

memory, PSEN is activated twice each machine cycle, except that two

PSEN activations are skipped during each access to external data

memory.

10 EA/VPP External Access Enable. EA must be strapped to GND in order to enable

the device to fetch code from external program memory locations

starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is

programmed, EA will be internally latched on reset. EA should be

strapped to VCC for internal program executions.

11 XTAL1 Input to the inverting oscillator amplifier and input to the internal clock

operating circuit.

12 XTAL2 Output from the inverting oscillator amplifier.

Page 18: PREPAID ENERGY METER

18

Features

Low-voltage and Standard-voltage Operation

– 2.7 (VCC = 2.7V to 5.5V)

– 1.8 (VCC = 1.8V to 5.5V)

Internally Organized 256 x 8 (2K)

Two-wire Serial Interface

Schmitt Trigger, Filtered Inputs for Noise Suppression

Bidirectional Data Transfer Protocol

100 kHz (1.8V) and 400 kHz (2.7V, 5V) Compatibility

Partial Page Writes Allowed

Write Protect Pin for Hardware Data Protection

Self-timed Write Cycle (5 ms max)

High-reliability

Automotive Grade and Lead-free/Halogen-free Devices Available

Fig 3.5EEPROM IC

Table 3.3 Pin functions of AT24C02

Pin name Function

AD0-AD2 Address Inputs

SDA Serial Data

SCL Serial Clock Input

WP Write Protect

NC No Connect

GND Ground

Vcc Power Supply

Page 19: PREPAID ENERGY METER

19

3.3.3 Relay:

Fig 3.6Power relay

A relay is an electrically operated switch. Many relays use an electromagnet to operate a

switching mechanism mechanically, but other operating principles are also used. Relays are

used where it is necessary to control a circuit by a low-power signal (with complete electrical

isolation between control and controlled circuits), or where several circuits must be

controlled by one signal.

Here we use relay for on/off prepaid meter as per signal from microcontroller.

3.3.4 ULN2003:

Fig 3.7ULN2003

Page 20: PREPAID ENERGY METER

20

The ULN2003 is a monolithic high voltage and high currentDarlington transistor arrays. It

consists of seven NPN darlingtonpairs that features high-voltage outputs with common-

cathodeclamp diode for switching inductive loads.

The collector-current rating of a single darlington pair is 500mA. The darlington pairs may be

paralleled for higher current capability. Applications include relay drivers,hammer drivers,

lampdrivers,display drivers (LED gas discharge),line drivers, and logic buffers.

The ULN2003 has a 2.7kW series base resistor for each darlington pair for operation directly

with TTL or 5V CMOS devices.

Features:

500mA rated collector current(Single output)

High-voltage outputs: 50V

Inputs compatible with various types of logic.

Relay driver application

3.3.5 LCD display:

Fig 3.816x2 LCD display

FEATURES:

x 8 dots with cursor

Built-in controller (KS 0066 or Equivalent)

+ 5V power supply (Also available for + 3V)

1/16 duty cycle

B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED)

Page 21: PREPAID ENERGY METER

21

Table 3.4 Pin functions of LCD display

Pin name Description

Vss GND

Vdd + 3V or + 5V

Vee Contrast adjustment

RS H/L Register Select Signal

R/W H/L Read/Write Signal

E H to L Enable Signal

D0-D7 Data Bus Line

Page 22: PREPAID ENERGY METER

22

Chapter 4

Recharge unit

4.1Block diagram:

Fig 4.1 Block diagram for recharge unit

As we are using smart card to recharge electricity meter, we need a separate

programming unit or recharge unit to recharge the smart card.

Here is the circuit diagram for recharge unit.

Microcontr

oller

LEDs

Smart

card(write)

Power

supply

Key pad

Page 23: PREPAID ENERGY METER

23

4.2 Circuit diagram:

Fig 4.2Circuit diagram for programming unit

First of all we have to connect the circuit as per shown in the figure.Then, we have to

connect the smart card or an EEPROM IC to the card reader.Now, insert an amount of

recharge and charge of single unit.We have provided two LEDs. If programming is

successful then green LED will on, otherwise red LED will on.

Components used are:

1) IC AT89C2051

2) 4x3 Key pad

3) 10k Resistor bank

4) LEDs

Page 24: PREPAID ENERGY METER

24

5) Power supply

6) crystal

4.2.1 AT89C2051:

Features

Compatible with MCS®-51Products

2K Bytes of Reprogrammable Flash Memory

2.7V to 6V Operating Range

Fully Static Operation: 0 Hz to 24 MHz

Two-level Program Memory Lock

128 x 8-bit Internal RAM

15 Programmable I/O Lines

Two 16-bit Timer/Counters

Six Interrupt Sources

Programmable Serial UART Channel

Direct LED Drive Outputs

On-chip Analog Comparator

Low-power Idle and Power-down Modes

Fig 4.3 Pin outs of AT89C2051

Page 25: PREPAID ENERGY METER

25

Table 4.1 Pin functions of AT89C2051

Pin

name

Function

Vcc Supply voltage.

GND Ground.

Port1 The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide

internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve

as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-

chip precision analog comparator. The Port 1 out-put buffers can sink 20 mA and

can drive LED displays directly. When 1s are written to Port 1 pins, they can be

used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled

low, they will source current (IIL) because of the internal pull-ups. Port 1 also

receives code data during Flash programming and verification.

Port3 Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pull-

ups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is

not accessible as a general-purpose I/O pin. The Port 3 output buffers can sink 20

mA. When 1s are written to Port 3 pins they are pulled high by the internal pull-

ups and can be used as inputs. As inputs, Port 3 pins that are externally being

pulled low will source current (IIL) because of the pull-ups.

RST Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the

RST pin high for two machine cycles while the oscillator is running resets the

device. Each machine cycle takes 12 oscillator or clock cycles.

XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating

circuit.

XTAL2 Output from the inverting oscillator amplifier.

Page 26: PREPAID ENERGY METER

26

4.2.2 4x3 key pad

Fig 4.4 Key pad interfacing

Here we have used a 4x3 numeric key pad for entering the codes as per program.

Key pad is connected to microcontroller using 10k resistor bank.

Page 27: PREPAID ENERGY METER

27

Chapter 5

Software

In our project, we will use three electronics softwares.

1. Keil µ-vision

2. PRO51 programmer software

3. ExpressPCB

Keil µ-vision:

Keil is a cross compiler. We will use this program to construct a C program and source code

for energy meter and its recharge unit.

These are the steps to develop 8051 project using keil

1. Create source files in C or assembly.

2. Compile or assemble source files.

3. Correct errors in source files.

4. Link object files from compiler and assembler.

5. Test linked application.

PRO51 programmer software

Using this software we can load .hex program file into 8051 microcontroller.

ExpressPCB

There are two parts of this software, i. ExpressSCH and ii. ExpressPCB

ExpressSCH is used to draw schematics, while using ExpressPCB we can design circuit

boards.

Page 28: PREPAID ENERGY METER

28

Chapter 6

Advantages and Applications

6.1 Advantages

1. Pay before use

2. Recover money owed (debt)

3. Lower Overheads

4. No bill production

5. No bill distribution

6. No need to chase payments

7. No further actions such as disconnections

6.2 Application

1. In Homes

2. In Festivals where electricity is required just for a few days.

3. Rental accommodation

4. Industries and Factories

5. In malls

Page 29: PREPAID ENERGY METER

29

Chapter 7

Market study and proposed work

7.1 Market study

Power sector reforms:

The customer focused deregulated power distribution market will force the market

participants to make the existing metering and billing process more competent. This is

likely to drive the prepaid market.

Increasing non-technical losses:

Metering errors, tampering with meters leading to low registration and calibration related

frauds are some of the key components of non-technical losses. India reports greater than

10 percent of non-technical losses. It has been reported that prepaid meters control on-

technical losses better than conventional ones.

Opportunities in the emerging electrifying markets:

Most of the Asian countries do not have 100 percent electrification; hence new markets

are being created by the increasing generating capacity. Prepaid systems can be more

easily introduced in such new markets rather than the existing ones.

Consumer behavior:

Consumers have not had any major problems with the existing postpaid system, and hence

it is likely to be difficult to convince them to change over to prepaid system. Consumers

might not appreciate the concept of "pay and use" as far as electricity is concerned

because it might be perceived as an instrument to control commonman’s life style.

Initial investment:

Utilities might be discouraged by the huge initial investment, which includes the cost of

instrument, marketing campaign, establishing distribution channel, and other management

costs.

Page 30: PREPAID ENERGY METER

30

Rapidtechnology changes:

The rapid technology changes happening in the metering market are expected to delay the

decision to go for prepaid system.

Uncertainty over the success:

Prepaid system is not as proven a concept in all the markets as South Africa; hence there is

bound to be uncertainty over its success, if implemented. The success of the system

depends on the commitment by utilities and for this they need to get convinced on the real

benefits of prepaid meters.

7.2 Proposed work

Till now, we were studying all the components to be used. We have collected enough

information about all components and we have purchased most of it.

Now, we are learning about ExpressPCB. So, first of all we will design a PCB for all three

circuits mentioned above and will etch all the components on it and regularly check for the

errors.

Then, we will go for Embedded C programming. We will program a recharge unit first, so

that an EEPROM IC can be programmed. An energy meter will be constructed then, as its

output works as an input for prepayment circuit. At last we will program for prepayment

circuit.

Page 31: PREPAID ENERGY METER

31

Chapter 8

Conclusion

Prepayment systems have been proposed as an innovative solution to the problem

of affordability in utilities services. In spite of being a popular system in European

and African countries, the use of such mechanisms remains controversial. Among

the main arguments in favor of its dissemination are the advantages concerning

lower costs of arrears, running costs and finance charges for the service provider

and the better allocation of resources it implies for users. The arguments against

prepaid meters are based on the higher cost of the technology and the possibility of

self-disconnection of low-income users. The monopolistic power distribution

market in Asia is gradually transforming into a competitive market place.

Differentiation in service is going to be the key competitive factor to improve e-

market share in the deregulated power markets. Prepaid meters with their

advantages over conventional ones are likely to help power distributors to

differentiate and offer value-added services to consumers. Encouraging consumers

to opt for prepaid meters on a voluntary basis and offering tariff or non-tariff

incentives to those consumers who prepay their power charges, would help the

utilities to implement this system.

Page 32: PREPAID ENERGY METER

32

References:

[1] Electricity meters: their construction and management: 1st edition

ByCharles Henry William Gerhardi

[2] Electricity meters: 3rd

edition

ByHenry G. Solomon

[3] www.8051projects.net/tags/prepaid-energy-meter

[4]www.engineersgarage.com/contribution/electronic-energy-meter

[5] en.wikipedia.org/wiki/Electricity_meter