You are on page 1of 32

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

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 amperehour 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, kilowatthours 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.

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.

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 prepayment systems. In some cases, prepayment meters have not been accepted by customers. There are various groups, such as the Standard Transfer Specification (STS) association,

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.
5

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 selfdisconnection. 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 users interface unit and a current measuring set. The interface unit is a device installed inside the building, which allows the user tointeract 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 utilityscommercial offices, as well as in stores with long opening hours. The third component isthe supporting device that links the various sales outlets to the utilitys managementsystem.

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.

Insert Smart card

Read /store data

Is recharges uccess?

No

Yes
Increment Counter/decrement unit

No

Is unit less than 10?

Yes
Start buzzer every minute/ Display Recharge

No

Is unit zero?

Yes

Cut off power supply

Chapter 3 Construction
3.1Block diagram

To load

Pulse detector

Energy meter

Smart card (Read) Microcontroller Display Circuit breaker

Electrical line

Buzzer

Power supply

Fig 3.1 Block diagram of prepaid energy meter

There are two modules in prepaid energy meters. 1. 2. Energy meter 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. ii. iii. iv. On-chip oscillator as clock source High accuracy, supports 50 Hz/60 Hz Less than 0.1% error over a dynamic range of 500 to 1 High frequency output CF calibrates and supplies instantaneous, positive-only real power Logic output REVP indicates potential miswiring or negative power Direct drive for electromechanical counters and 2-phase stepper motors (F1 and F2) On-chip power supply monitoring On-chip reference 2.45 V (20 ppm/C typical) with external overdrive capability Single 5 V supply, low power (20 mW typical) Low cost CMOS process

v. vi.

vii. viii.

ix. x.

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.

10

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

11

Pin No. 1

Mnemonic

Description

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

4,5

V1N, V1P

AGND

REFIN/OUT

8 9,10

SCF S1, S0

11

RCLKIN

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. 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. 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. This pin provides access to the on-chip voltage reference. The onchip 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. Select Calibration Frequency. This logic input is used to select the frequency on the calibration output CF. 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. 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.

12

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

14

CF

15,16

F2, F1

This pin provides the ground reference for the digital circuitry in the ADE7768, that is, the multiplier, filters, and digital-tofrequency 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 onlya star ground. 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. 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.

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.

13

Fig 3.3Prepayment circuit

Components used in above circuits are as follows: 1) 2) 3) 4) 5) 6) 7) Microcontroller IC AT89S52 EEPROM IC AT24C02 Relay Relay driver IC ULN2003 LCD display Buzzer Power supply

14

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.

15

Sr no. 1 2 3

Mnemonics Description VCC GND Port 0 Supply voltage. Ground. 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. 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. 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 pullups 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. 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. 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.
16

Port 1

Port 2

Port 3

RST

10

11 12

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. 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. 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. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. 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 lowpower 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.

17

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

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 Table 3.3 Pin functions of AT24C02

18

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

19

The ULN2003 is a monolithic high voltage and high currentDarlington transistor arrays. It consists of seven NPN darlingtonpairs that features high-voltage outputs with commoncathodeclamp 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)

20

Pin name Vss Vdd Vee RS R/W E D0-D7

Description GND + 3V or + 5V Contrast adjustment H/L Register Select Signal H/L Read/Write Signal H to L Enable Signal Data Bus Line

Table 3.4 Pin functions of LCD display

21

Chapter 4 Recharge unit

4.1Block diagram:

Key pad

Smart card(write)

Microcontr oller

Power supply

LEDs

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.

22

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

23

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

24

Pin name Vcc GND Port1 Supply voltage. Ground.

Function

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 onchip 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 pullups. 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 pullups 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.

Table 4.1 Pin functions of AT89C2051

25

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.

26

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. 2. 3. 4. 5. Create source files in C or assembly. Compile or assemble source files. Correct errors in source files. Link object files from compiler and assembler. 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.

27

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

28

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 ontechnical 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 commonmans 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.

29

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.

30

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 emarket 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.

31

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

32

You might also like