Sie sind auf Seite 1von 66

MEASUREMENT OF ENERGY METER READING

CHAPTER-1 INTRODUCTION
1.1 EMBEDDED SYSTEMS:
Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. Wireless communication has become an important feature for commercial products and a popular research topic within the last ten years. There are now more mobile phone subscriptions than wired-line subscriptions. Lately, one area of commercial interest has been low-cost, low-power, and short-distance wireless communication used for personal wireless networks." Technology advancements are providing smaller and more cost effective devices for integrating computational processing, wireless communication, and a host of other functionalities. These embedded communications devices will be integrated into applications ranging from homeland security to industry automation and monitoring. They will also enable custom tailored engineering solutions, creating a revolutionary way of disseminating and processing information. With new technologies and devices come new business activities, and the need for employees in these technological areas. Engineers who have knowledge of embedded systems and wireless communications will be in high demand.

1.2 ZIGBEE TECHNOLOGY:


ZIGBEE is a new wireless technology guided by the IEEE 802.15.4 Personal Area Networks standard. It is primarily designed for the wide ranging automation applications and to replace the existing non-standard technologies. It currently operates in the 868MHz band at a data rate of 20Kbps in Europe, 914MHz band at 40Kbps in the USA, and the 2.4GHz ISM bands Worldwide at a maximum data-rate of 250Kbps.
SRTIST/ECE Page 1

MEASUREMENT OF ENERGY METER READING

The ZIGBEE specification is a combination of Home RF Light and the 802.15.4 specification. The specification operates in the 2.4GHz (ISM) radio band - the same band as 802.11b standard, Bluetooth, microwaves and some other devices. It is capable of connecting 255 devices per network. The specification supports data transmission rates of up to 250 Kbps at a range of up to 30 meters. ZIGBEE's technology is slower than 802.11b (11 Mbps) and Bluetooth (1 Mbps) but it consumes significantly less power.

1.3 FEATURES:
Standards-based wireless technology Interoperability and worldwide usability Low data-rates Ultra low power consumption Very small protocol stack Support for small to excessively large networks Simple design Security Reliability

1.4 PARAMETERS:
Operating frequency Operating voltage Transmitted power Range Data rate Receiver sensitivity Frequency range : 2.4GHz : 3.3V : 1mw : 30m(urban area), 200m (LOS) : 250Kbps

Operating temperature range : -40oC to +80oC : -104dbm : 2.4 2.4875 GHz.

SRTIST/ECE

Page 2

MEASUREMENT OF ENERGY METER READING

1.5 INTRODUCTION TO THE PROJECT:


Automatic meter reading (AMR) is popular because of its remote nature of data collection. There are different technologies being used to capture and transfer data remotely, but the accuracy, speed, efficiency, reliability and cost effectiveness are the usual benefits that should be properly achieved using this system. AMR is defined as the communication link, complete from the meter to the utility headquarters. The automatic meter-reading system employs distributed structure, consists of measuring meters, sensors, intelligent terminals, management centre and wireless communication network. The meter reading and management processes are free from human errors. With the advancement of new modern computer technologies, chances for more well-organized management of electric power distribution are there. The increasing importance of more accurate energy measurement data and real-time access to that data is accelerating acceptance of the digital metering technology. The data communication is an important part of the AMR system. The communication system should be accurate, reliable and cost effective. To evaluate the type of communications network needed to carry metering data, it is necessary to review the type of customer infrastructures that could be interfaced to such a network For successfully wireless data transmission, in this paper the ZigBee specification is utilized. There has been increased interest in the ZigBee standard recently, in particular for building automation and industrial controls since its release in 2004. People prefer using this standard network among different wireless protocol for diversified applications. So ZigBee specifications are incorporated by many manufacturers in their device design. Zigbee product is used for the wireless transmitting and receiving data from a single-phase energy meter, which is commonly used for residential consumer. This will benefit both the consumer and the service provider of electricity.

SRTIST/ECE

Page 3

MEASUREMENT OF ENERGY METER READING

1.6 BLOCK DIAGRAM:

1.6.1 CONSUMER SECTION

POWER SUPPLY
MICRO CONTROLLER

LCD

KEYPAD

RTC

OPTO COUPLER

ENERGY METER

EEPROM
RELAY

ZIGBEE TRANSCEIVER
HOME APPLIANCES

BUZZER

FIG 1.1 CONSUMER SECTION

SRTIST/ECE

Page 4

MEASUREMENT OF ENERGY METER READING

1.6.2 SUBSTATION SECTION:

POWER SUPPLY

LCD

KEYPAD

MICRO CONTROLLER

ZIGBEE TRANSCEIVER

FIG 1.2 SUBSTATION SECTION

1.7 HARDWARE COMPONENTS:


The Hardware components used in this project are Regulated Power Supplies Microcontroller EEPROM LCD AD7753 IC Relays Zigbee transceiver RTC Optocoupler (4N35) Key pad

SRTIST/ECE

Page 5

MEASUREMENT OF ENERGY METER READING

CHAPTER-2 POWER SUPPLY

2.1 REGULATED POWER SUPPLY:


Power supply is a supply of electrical power. A device or system that supplies Electrical or other types of energy to an output load or group of loads is called a Power Supply Unit or PSU. The term is most commonly applied to electrical energy supplies, less often to mechanical ones, and rarely for others. The power supplies are designed to convert high voltage AC mains electricity to a suitable low voltage supply for Electronic circuits and other devices. A RPS (Regulated Power Supply) is the Power supply with Rectification, Filtering and Regulation being done on the AC mains to get a regulated power supply for Microcontroller and for the other devices being interface to it.

FIG 2.1(A): A 5V REGULATED POWER SUPPLY SYSTEM

SRTIST/ECE

Page 6

MEASUREMENT OF ENERGY METER READING

POWER SUPPLY CIRCUIT DIAGRAM:

FIG 2.1(B): POWER SUPPLY CIRCUIT DIAGRAM

There are many types of power supplies. Most are designed to convert high voltage AC mains to a low voltage supply for electronic circuits and other devices. A power supply can be broken down into a series of blocks, each of which performs a particular function.

2.2 TRANSFORMERS:
Transformer is a device which can efficiently transform the electric energy. Major use of transformer is in power distribution. Which is used in electrical devices, control systems, communication system devices etc. Step-up transformers increase voltage, stepDown transformers reduce voltage. Most power supplies use a step-down transformer to Reduce the dangerously high mains voltage (230V) to a safer low voltage.

SRTIST/ECE

Page 7

MEASUREMENT OF ENERGY METER READING

Fig 2.2(a): TRANSFORMER AND AC WAVEFORM

The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an Alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. A transformer that increases voltage from primary to secondary is called a step-up transformer. Conversely, a transformer designed to do just the opposite is called a stepdown transformer.

STEP DOWN TRANSFORMER:


The ratio of the number of turns on each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage. Efficient operation of a transformer requires that the individual winding inductances be engineered for specific operating ranges of voltage and current, so if a transformer is to be used backwards like this it must be employed within the original design parameters of voltage and current for each winding.

SRTIST/ECE

Page 8

MEASUREMENT OF ENERGY METER READING

FIG 2.2(B): STEP-DOWN TRANSFORMER: (MANY TURNS: FEW TURNS)

A transformer designed to increase voltage from primary to secondary is called a step-up transformer. A transformer designed to reduce voltage from primary to secondary is called a step-down transformer.

2.3 RECTIFIER:
There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is the most important and it produces full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce halfwave varying DC. A circuit which is used to convert AC to DC is known as RECTIFIER. The process of conversion AC to DC is called rectification

2.3.1 TYPES OF RECTIFIERS:


Half wave Rectifier Full wave rectifier 1. Centre tap full wave rectifier. 2. Bridge type full bridge rectifier.

SRTIST/ECE

Page 9

MEASUREMENT OF ENERGY METER READING

2.3.2 COMPARISON OF RECTIFIER CIRCUITS:

Type of Rectifier Parameter Half wave Full wave Bridge

Number of Diodes

PIV of Diodes

Vm

2 Vm

Vm

D.C Output Voltage

Vm/

2Vm/

2Vm/

Vdc, at No-Load

0.318Vm

0.636Vm

0.636Vm

Ripple Factor

1.21

0.482

0.482

Ripple Frequency

2f

2f

Rectification Efficiency Transformer Utilization Factor(TUF)

0.406

0.812

0.812

0.287

0.693

0.812

RMS voltage Vrms

Vm/2

Vm/2

Vm/2

TABLE 2.1 COMPARISION OF RECTIFIER CIRCUITS

SRTIST/ECE

Page 10

MEASUREMENT OF ENERGY METER READING

2.3.3 FULL-WAVE RECTIFIER:


From the above comparison we came to know that full wave bridge rectifier as more advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit.

2.3.4 BRIDGE RECTIFIER:


A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally. A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig (a) to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.

FIG 2.3 BRIDGE RECTIFIER

2.4 FILTER (Capacitor filter-smoothing): Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The diagram shows the unsmoothed varying DC

SRTIST/ECE

Page 11

MEASUREMENT OF ENERGY METER READING

(dotted line) and the smoothed DC (solid line). The capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output.

The smoothing block smoothes the DC from varying greatly to a small ripple and the ripple voltage is defined as the deviation of the load voltage from its DC value. Smoothing is also named as filtering.

Fig 2.4: CHARGING AND DISCHARGING OF CAPACITOR

2.5 REGULATORS:
A voltage regulator is a circuit that supplies a constant voltage regardless of changes in load currents. Although voltage regulators can be designed using op-amps, it is quicker and easier to use IC voltage regulators. Line regulation is defined as the change in output voltage for a change in the input voltage and is usually expressed in milli volts or as a percentage of Vo. Ripple rejection is the measure of a regulators ability to reject ripple voltage. It is usually expressed in decibels. The smaller the values of line regulation, load regulation and temperature stability the better the regulation.

SRTIST/ECE

Page 12

MEASUREMENT OF ENERGY METER READING

FIG 2.5: REGULATOR 7805

PIN DESCRIPTION: Pin No 1 2 3 Function Input voltage (5V-18V) Ground (0V) Regulated output; 5V (4.8V-5.2V)
TABLE 2.2: PIN DESCRIPTION OF 7805

Name Input Ground Output

78XX:
The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages.

Features:
Output Current of 1.5A. Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V.

SRTIST/ECE

Page 13

MEASUREMENT OF ENERGY METER READING

2.6 LED(Light Emitting Diode):


A Light-Emitting Diode (LED) in essence is a P-N junction solid-state semiconductor diode that emits light when a current is applied though the device. By scientific definition, it is a solid-state device that controls current without the deficiency of having heated filaments.

Fig 2.6: Light Emitting Diode

The essential portion of the Light Emitting Diode is the semiconductor chip. Semiconductors can be either intrinsic or extrinsic.

ADVANTAGES:
Low working voltages and currents Less power consumption Extremely long life

APPLICATIONS OF LEDs:
In 7-segment, 16-segment & dot matrix displays 1. In optical switching applications. 2. For Image sensing circuits in picture phones. 3. In burglar alarm systems

SRTIST/ECE

Page 14

MEASUREMENT OF ENERGY METER READING

CHAPTER-3 MICROCONTROLLER

3.1 INTRODUCTION TO AT89S52:


The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin out. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt.

FIG: 3.1 PIN DIAGRAM OF8052.

The system requirements and control specifications clearly rule out the use of 16, 32 or 64 bit micro controllers or microprocessors. They are also faster and more reliable but, the above application is satisfactorily served by 8-bit micro controller.

SRTIST/ECE

Page 15

MEASUREMENT OF ENERGY METER READING

FEATURES: 8K Bytes of In-System Reprogrammable Flash Memory. Fully Static Operation: 0 Hz to 33 MHz 256 x 8-bit Internal RAM. 32 Programmable I/O Lines. Three 16-bit Timer/Counters. Eight Interrupt Sources. 4.0V to 5.5V Operating Range.

3.2 PIN DIAGRAM:

FIG: 3.2 PIN DIAGRAM OF 89S52 IC.

SRTIST/ECE

Page 16

MEASUREMENT OF ENERGY METER READING

3.3 PIN DESCRIPTION:


Pin Description:
VCC - (Supply voltage). GND - (Ground).

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 highimpedance inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory.

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.

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.

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.

SRTIST/ECE

Page 17

MEASUREMENT OF ENERGY METER READING

TABLE 3.1 FUNCTIONS OF PORT PIN-3

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 96 oscillator periods after the Watchdog times out.

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.

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.

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

XTAL2:
It is output from the inverting oscillator amplifier.
SRTIST/ECE Page 18

MEASUREMENT OF ENERGY METER READING

3.4 ARCHITECTURE OF MICROCONTROLLER:

FIG-3.3 FUNCTIONAL BLOCK DIAGRAM OF MICRO CONTROLLER.

3.5 THE 8052 OSCILLATOR:


The heart of the 89S52 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 and XTAL2 is provided for connecting a resonant network to form an oscillator.

Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 6.2.4.There are no requirements on the duty cycle of the external clock signal, since the
SRTIST/ECE Page 19

MEASUREMENT OF ENERGY METER READING

input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

FIG 3.4.1 OSCILLATOR CONNECTIONS

FIG 3.4.2 EXTERNAL CLOCK DRIVE CONFIGURATION

3.6 MEMORIES: Types of memory:


The 89S52 have three general types of memory. They are on-chip memory, external Code memory and external Ram. On-Chip memory refers to physically existing memory on the micro controller itself. External code memory is the code memory that resides off chip. This is often in the form of an external EPROM

Code Memory:
Code memory is the memory that holds the actual 89S52 programs that is to be run. This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 4K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA

a) Internal Ram:
The 89S52 have a bank of 128 of internal RAM. The internal RAM is found onchip. So it is the fastest Ram available. And also it is most flexible in terms of reading

SRTIST/ECE

Page 20

MEASUREMENT OF ENERGY METER READING

and writing. Internal Ram is volatile, so when 89S52 is reset, this memory is cleared. 128 bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers. Internal RAM also contains 128 bits, which are addressed from 20h to 2Fh.

b) FLASH MEMORY:
Flash memory (sometimes called "flash RAM") is a type of constantly-powered non volatile that can be erased and reprogrammed in units of memory called blocks. It is a variation of electrically erasable programmable read-only memory (EEPROM) which, unlike flash memory, is erased and rewritten at the byte level, which is slower than flash memory updating. Flash memory is often used to hold control code such as the basic input/output system (BIOS) in a personal computer.

MEMORY TYPE

FEATURES

Low-cost, high-density, high-speed architecture; FLASH low power; high reliability

Mature, high-density, reliable, low cost; timeROM Read-Only Memory consuming mask required, suitable for high production with stable code

SRAM Static Random-Access Memory

Highest speed, high-power, low-density memory; limited density drives up cost

EPROM Electrically Programmable Read-Only Memory High-density memory; must be exposed to ultraviolet light for erasure

SRTIST/ECE

Page 21

MEASUREMENT OF ENERGY METER READING

EEPROMorE2PROM Electrically Erasable Programmable ReadOnly Memory Electrically byte-erasable; lower reliability, higher cost, lowest density

DRAM Dynamic Random Access Memory High-density, low-cost, high-speed, high-power

TABLE 3.2 TYPES OF MEMORIES

3.7 REGISTERS:
In the CPU, registers are used to store information temporarily. That information could be a byte of data to be processed, or an address pointing to the data to be fetched. The vast majority of 8052 registers are 8bit registers. In the 8052 there is only one data type: 8bits. The 8bits of a register are shown in the diagram from the MSB (most significant bit) D7 to the LSB (least significant bit) D0. With an 8-bit data type, any data larger than 8bits must be broken into 8-bit chunks before it is processed.
D7 D6 D5 D4 D3 D2 D1 D0

The most widely used registers of the 8051 are A (accumulator), B, R0, R1, R2, R3, R4, R5, R6, R7, DPTR (data pointer), and PC (program counter). All of the above registers are 8bits, except DPTR and the program counter. arithmetic and logic instructions. The accumulator, register A, is used for all

3.8 SFRs (Special Function Registers):


Among the registers R0-R7 is part of the 128 bytes of RAM memory. What about registers A, B, PSW, and DPTR? Do they also have addresses? The answer is yes. In the 8051, registers A, B, PSW and DPTR are part of the group of registers commonly referred to as SFR (special function register. The SFR can be accessed by the names

SRTIST/ECE

Page 22

MEASUREMENT OF ENERGY METER READING

(which is much easier) or by their addresses. For example, register A has address E0h, and register B has been ignited the address F0H, as shown in table. The following two points should noted about the SFR addresses. 1. The Special function registers have addresses between 80H and FFH. These addresses are above 80H, since the addresses 00 to 7FH are addresses of RAM memory inside the 8052. 2. Not all the address space of 80H to FFH is used by the SFR. The unused locations 80H to FFH are reserved and must not be used by the 8052 programmer. Regarding direct addressing mode, notice the following two points: (a) The address value is limited to one byte, 00-FFH, which means this addressing mode is limited to accessing RAM locations and registers located inside the 8052. (b) If you examine the 1st file for an assembly language program, you will see that the SFR registers names are replaced with their addresses as listed in table.
Symbol ACC B PSW SP DPTR DPL DPH P0 Name Accumulator B register Program status word Stack pointer Data pointer 2 bytes Low byte High byte Port0 82H 83H 80H Address 0E0H 0F0H 0D0H 81H

SRTIST/ECE

Page 23

MEASUREMENT OF ENERGY METER READING

P1 P2 P3 IP IE TMOD TCON T2CON T2MOD TH0 TL0 TH1 TL1 TH2 TL2 RCAP2H RCAP2L SCON SBUF PCON

Port1 Port2 Port3 Interrupt priority control Interrupt enable control Timer/counter mode control Timer/counter control Timer/counter 2 control Timer/counter mode2 control Timer/counter 0high byte Timer/counter 0 low byte Timer/counter 1 high byte Timer/counter 1 low byte Timer/counter 2 high byte Timer/counter 2 low byte T/C 2 capture register high byte T/C 2 capture register low byte Serial control Serial data buffer Power control

90H 0A0H 0B0H 0B8H 0A8H 89H 88H 0C8H 0C9H 8CH 8AH 8DH 8BH 0CDH 0CCH 0CBH 0CAH 98H 99H 87H

TABLE 3.3 8052 SPECIAL FUNCTION REGISTER ADDRESS

SRTIST/ECE

Page 24

MEASUREMENT OF ENERGY METER READING

3.9 COUNTERS and TIMERS:


Two 16-bit Microprocessor Counters named T0 and T1 are provided for the general use of the programmer. Each counter may be programmed to count internal clock pulses acting as a timer or programmed to count external pulses as counter. The counters are divided in three 8-bit registers called timer low (TL0, TL1, TL2) and high (TH0, TH1, TH2) bytes.

A) Timer 0 Registers:
The 16-bit register of Timer 0 is accessed as low byte and high byte. The low byte register is called TL0 (Timer 0 low byte) and the high byte register is referred to as TH0 (Timer 0 high byte). These register can be accessed like any other register, such as A,B,R0,R1,R2,etc.

A) Timer 1 Registers:
These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR.

B) Timer 2 Registers:
Control and status bits are contained in registers T2CON (shown in Table) and T2MOD (shown in Table) for Timer 2. The register pair (RCAP2H, RCAP2L) is the Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode.

SRTIST/ECE

Page 25

MEASUREMENT OF ENERGY METER READING

CHAPTER-4 LIQUID CRYSTAL DISPLAY


4.1 INTRODUCTION TO LCD:
Liquid crystal displays (LCDs) have materials which combine the properties of both liquids and crystals. Rather than having a melting point, they have a temperature range within which the molecules are almost as mobile as they would be in a liquid, but are grouped together in an ordered form similar to a crystal. An LCD consists of two glass panels, with the liquid crystal material sand witched in between them. The inner surface of the glass plates are coated with transparent electrodes which define the character, symbols or patterns to be displayed polymeric layers are present in between the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined orientation angle.

FIG: 4.1 LCD DISPLAY When sufficient voltage is applied to the electrodes, the liquid crystal molecules would be aligned in a specific direction. The light rays passing through the LCD would be rotated by the polarizers, which would result in activating / highlighting the desired characters. The LCDs are lightweight with only a few millimeters thickness. Since the LCDs consume less power, they are compatible with low power electronic circuits, and can be powered for long durations.

SRTIST/ECE

Page 26

MEASUREMENT OF ENERGY METER READING

4.2 LCD OPERATION:


In recent years the LCD is finding widespread use replacing LED s (sevensegment LED s or other multi-segment LED s).This is due to the following reasons: 1. The declining prices of LCDs. 2. The ability to display numbers, characters and graphics. This is in contrast to LED which is limited to numbers and a few characters. 3. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the LCD.

4. Ease of programming for characters and graphics. 4.3 LCD PIN DESCRIPTION:
The LCD discussed in this section has 14 pins. The function of each pin is given in table.

Fig 4.2 LCD PIN DESCRIPTION


SRTIST/ECE Page 27

MEASUREMENT OF ENERGY METER READING

Pin
1 2

symbol
Vss Vcc

I/O
---

Description
Ground +5V power supply Power supply to control

VEE

--

contrast

RS=0 to select command register. RS=1 to select data 4 RS I register R/W=0 for write 5 6 7 8 9 10 11 12 13 14 R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 I I/O I/O I/O I/O I/O I/O I/O I/O I/O R/W=1 for read Enable The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus The 8-bit data bus

TABLE 4.1: PIN DESCRIPTION FOR LCD

SRTIST/ECE

Page 28

MEASUREMENT OF ENERGY METER READING

The LCD can display a character successfully by placing the 1. Data in Data Register

2. Command in Command Register of LCD Data corresponds to the ASCII value of the character to be printed. This can be done by placing the ASCII value on the LCD Data lines and selecting the Data Register of the LCD by selecting the RS (Register Select) pin. Each and every display location is accessed and controlled by placing respective command on the data lines and selecting the Command Register of LCD by selecting the (Register Select) RS pin.

4.4 USES:
The LCDs used exclusively in watches, calculators and measuring instruments are the simple seven-segment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCDs being extensively used in telecommunications and entertainment electronics. So in this project, the LCD is used to display the instantaneous information. The information may be prompting or alerting or instructing the user.

SRTIST/ECE

Page 29

MEASUREMENT OF ENERGY METER READING

CHAPTER-5 RELAYS
5.1 DEFINITION:
Relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts. The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches. Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits; the link is magnetic and mechanical.

FIG: 5.1 RELAY The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. Relays are usually
SRTIST/ECE Page 30

MEASUREMENT OF ENERGY METER READING

SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches.

5.2 WORKING OF RELAY:


The animated picture shows a working relay with its coil and switch contacts. You can see a lever on the left being attracted by magnetism when the coil is switched on. This lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground and another behind them, making the relay DPDT.

FIG 5.2 WORKING OF RELAY The relay's switch connections are usually labeled COM, NC and NO:

COM = Common, always connect to this; it is the moving part of the switch. NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on. Connect to COM and NO if you want the switched circuit to be on when the relay coil is on.

Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.

SRTIST/ECE

Page 31

MEASUREMENT OF ENERGY METER READING

5.3 PROTECTION DIODES FOR RELAYS:


Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (e.g. 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt.

5.4 RELAYS AND TRANSISTORS COMPARED:


Like relays, transistors can be used as an electrically operated switch. For switching small DC currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors cannot switch AC or high voltages (such as mains electricity) and they are not usually a good choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a low power transistor may still be needed to switch the current for the relay's coil! The main advantages and disadvantages of relays are listed below:

Advantages of Relays:

Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once. In this project 4 relays are used to connect 4 loads of which 3 are Loads i.e.

normal and emergency loads whereas the other one is to switch the Energy Meter.

SRTIST/ECE

Page 32

MEASUREMENT OF ENERGY METER READING

CHAPTER-6 EEPROM
6.1 INTRODUCTION:
EEPROM is to store the no. of units consumed. This section acts as a backend database for the project. This section is realized using an EEPROM integrated circuit chip. The IS24C02 is a low cost 2,048-bit serial EEPROM. It is fabricated using ISSIs advanced CMOS EEPROM technology and operates from a single supply. The IS24C02 is internally organized as a 256 x 8 memory bank. The IS24C02 features a serial interface and software protocol allowing operation on a simple 2-wire bus.

6.2 PIN CONFIGURATION:

6.3 PIN DESCRIPTIONS:


A0-A2 SDA SCL WC VCC GND Address Inputs Serial Data I/O Serial Clock Input Write Control Input Power Supply Ground

SRTIST/ECE

Page 33

MEASUREMENT OF ENERGY METER READING

A0, A1, AND A2 - The address inputs are used to set the least significant three bits of
the slave address. These inputs may be tied HIGH or LOW, or they may be actively driven. These inputs allow up to eight IS24C02 devices to be connected together on the bus. When left floating, A0, A1 and A2 are pulled to ground. The default values are zeros.

SERIAL DATA (SDA) - The SDA pin is a bidirectional pin used to transfer data into
and out of the device. Data may change only when SCL is LOW. It is an open-drain output, and may be wired with any number of open-drain or open-collector outputs.

SERIAL CLOCK (SCL) - The SCL input is used to clock all data into and out of the
device. In the WRITE mode, data must remain stable when SCL is HIGH. In the READ mode, data is clocked out on the falling edge of SCL.

Write Control (WC) - The Write Control input is used to disable any attempt to write
to the memory. When HIGH, the memory is protected; when LOW, the write function is normal. The part can be read independent of the state of WC pin. When not connected, this pin will be pulled LOW.

6.4 FEATURES:
Low power CMOS

Active current less than 2 mA Standby current less than 8 mA Hardware writes protection Write control pin Internally organized as 256 x 8 Two-wire serial interface Bidirectional data transfer protocol

SRTIST/ECE

Page 34

MEASUREMENT OF ENERGY METER READING

8-Byte page-write mode Minimized total write time per byte Automatic word address incrementing Sequential register read Self-timed write cycle Maximum write cycle time is of 10 ms 400 KHz Compatibility Endurance: 1, 000,000 cycles per byte 8-pin PDIP, TSSOP, MSOP or SOIC packages Filtered inputs for noise suppression.

6.5 GENERAL DESCRIPTION:


The IS24C02 features a SERIAL communication, and supports bidirectional data transmission protocol allowing operation on a simple two-wire bus between the different devices connected somewhere on the system bus. The two-wire bus is defined as a serial data line (SDA), and a serial clock line (SCL).

FIG 6.1 WORKING OF IS24C02

SRTIST/ECE

Page 35

MEASUREMENT OF ENERGY METER READING

The protocol defines any device that sends data onto the SDA bus as a transmitter, and the receiving device as a receiver. The device controlling the data transmission is named MASTER device, and the controlled device is named SLAVE device. In all cases, the IS24C02 will be a slave device, since it never initiates any data transfers. Up to eight IS24C02 can be connected to the bus. Device's physical address inputs A0-A2 must be connected to either VCC or GND. When left floating, A0, A1 and A2 are pulled to ground. The default values are zeros. Following a START condition, the MASTER (transmitter) device must initiate the Device Addressing Byte including device type identifier, device address, and a read or write operation to select a slave device (receiver) connected to the system bus. The receiver will then respond with an Acknowledge by pulling the SDA line LOW. The Acknowledge is used to indicate successful data transfers. The transmitting device will release the data bus (SDA goes HIGH) after transmitting eight bits (one data bit is transferred at the falling edge of each clock cycle).

6.6APPLICATIONS:
The IS24C02 is ideal for high volume applications requiring low power and low density storage. This device uses a low-cost, space-saving 8-pin plastic package. Candidate applications include robotics, alarm devices, electronic locks, meters and instrumentation.

SRTIST/ECE

Page 36

MEASUREMENT OF ENERGY METER READING

CHAPTER-7 RTC (REAL TIME CLOCK)


7.1 DESCRIPTION:
The DS1307 serial Real-Time Clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense circuit that detects power failures and automatically switches to the backup supply. Time keeping operation continues while the part operates from the backup supply.

7.2 FEATURES:

Real-Time Clock (RTC) Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the week, and Year with Leap-Year Compensation Valid Up to 2100.

56-Byte, Battery-Backup, General-Purpose RAM with Unlimited Writes Automatic Power-Fail Detect and Switch Circuitry Consumes Less than 500nA in Battery-Backup Mode with Oscillator Running Optional Industrial Temperature Range: -40C to +85C Available in 8-Pin Plastic DIP or SO Underwriters Laboratories (UL) Recognized

7.3 PIN ASSIGNMENT:


The chip DS1307 real time clock (RTC: Real-time clock), real-time concept is used here to mean absolute time that people are using, in seconds, minutes, hours. The sensor has seven 8-bit register contains the time: seconds, minutes, hours, second (in weeks), day, month and year. Also DS1307 also has a control output registers and 56 sub

SRTIST/ECE

Page 37

MEASUREMENT OF ENERGY METER READING

spec sheet can be used as RAM. Appears in the second DS1307 SOIC and DIP packages have 8 legs.

FIG 7.1 PIN ASSIGNMENT OF RTC

7.4 PIN DESCRIPTION: Pins 1, 2 X1, X2 Pin 3 VBAT Pin 4 - GND (Ground) Pin 5 - SDA Serial Data Input/output. Pin 6 - SCL Serial Clock Input. Pin 7 - SWQ/OUT Square Wave/Output Driver. Pin 8 - VCC (5 volts) 7.5OPERATION:
DS1307 operates slave device serial bus. Access obtained implementing START condition providing device identification code followed register address. Subsequent registers accessed sequentially until STOP condition executed. When falls below 1.25 VBAT devices terminates access progress resets device address counter. Inputs device
SRTIST/ECE Page 38

MEASUREMENT OF ENERGY METER READING

will recognized this time prevent erroneous data from being written device from tolerance system. When falls below VBAT device switches into low-current battery backup mode. Upon power-up, device switches from battery when greater than VBAT 0.2V recognizes inputs when greater than 1.25 VBAT.

FIGS 7.2 BLOCK DIAGRAM SHOWING MAIN ELEMENTS OF SERIAL RTC

7.6 SIGNAL DESCRIPTIONS:


X1, X2 - Connections for a Standard 32.768 kHz Quartz Crystal. No capacitor or other parts needed. The Internal oscillator circuitry is designed for operation with a crystal having a specified load capacitance (CL) of 12.5pF.

SRTIST/ECE

Page 39

MEASUREMENT OF ENERGY METER READING

VBAT - Battery input for any standard 3 volt lithium cell or any other energy source. Battery voltage must be held between 2.0V to 3.5V for proper operation. The nominal write protect trip point voltage at which access to the RTC and user RAM is denied is set by the internal circuitry as 1.25 VBAT nominal. A lithium battery with 48mAhr or greater will back the DS1307 for more than 10 years in the absence of power at 25 degrees C. VCC, GND - DC power is provided to the devices on these pins. Vcc is the +5volt input. When 5 volts is applied within normal limits, the device is fully accessible and the data can be written and read. When a 3- volt battery is connected to the device below 1.25 VBAT, reads and writes are inhibited. However, the timekeeping function continues unaffected by the lower input voltage. SDA Serial Data Input/output - SDA is the data input/output for the I2C serial interface. The SDA pin is open drain and requires an external pull-up resistor. SCL Serial Clock Input - SCL is the clock input for the I2C interface and is used to synchronize data movement on the serial interface. SQW/OUT Square Wave/Output Driver - When enabled, the SQWE bit set to 1, the SQW/OUT pin outputs one of four square-wave frequencies (1Hz, 4 kHz, 8 kHz, and 32 kHz). SQW/OUT operates with either VCC or VBAT applied. An LED and 220 ohm resistor in series tied to VCC will produce a 1 HZ blink. This is a good way to tell if the clock chip is working.

7.7 RTC AND RAM ADDRESS MAP:


The memory contains all 64 DS1307 8-bit registers are addressed from 0 to 63 (from 00H to 3FH the hexadecimal system). However, actually only the first eight registers is used for the "clock" (RTC) register the remaining 56 vacant can be used as RAM contains temporary variable if desired. The first seven registers contain information about the time of the clock including: seconds (SECONDS), minutes (MINUTES), hours (HOURS), secondary (DAY), date (DATE), month (MONTH) and year (YEAR). The
SRTIST/ECE Page 40

MEASUREMENT OF ENERGY METER READING

values recorded in the register 7 are equivalent to the "install" boot time for the RTC. The read register values are read from 7 real-time chips created. For example, at launch, we recorded in the register "seconds" value 42, then the 12s we read this register, we obtain the value 54. For the first seven registers are most important in the operation of the DS1307. First observation held each bit of this register as shown in Figure

FIG 7.3 DS1307 ADDRESS MAP 7.8 CLOCK AND CALENDER: The time and calendar information is obtained by reading the appropriate register bytes. The clock and calendar is a full binary-coded decimal (BCD) clock/calendar format. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. Bit7 of register 0 is the clock halt (CH) bit. When this bit is set to a 1, the oscillator is disabled. When cleared to a 0, the oscillator is enabled. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator. The DS1307 has a built-in power-sense circuit that detects power failures and

SRTIST/ECE

Page 41

MEASUREMENT OF ENERGY METER READING

automatically switches to the backup supply. Time keeping operation continues while the part operates from the backup supply.

7.8.1 DS1307 TIMEKEEPER REGISTERS:

FIG 7.4 RTC TIMEKEEPER REGISTERS

7.8.2 CONTROL REGISTER: The DS1307 control register is used to control the operation of SQW/OUT pin. BIT7 OUT BIT6 X BIT5 X BIT4 SQWE BIT3 X BIT2 X BIT1 RS1 BIT0 RS0

TABLE 7.1 CONTROL REGISTER

SRTIST/ECE

Page 42

MEASUREMENT OF ENERGY METER READING

OUT (Output control): This BIT controls the output level of the SQW/OUT pin when the square wave output is disabled. If SQWE=0 the logic level on the SQW/OUT pin is 1 if OUT=1 and is0 if OUT=0. SQWE (Square Wave Enable): This bit, when set to logic 1 will enable the oscillator output. The frequency of the square wave output depends upon the value of the RS0 and RS1 bits. With square wave output 1Hz, clock registers update falling edge square wave. RS (Rate Select): These bits control the frequency of the square wave output when the square wave output has been enabled. The below table lists the square wave frequencies that can be selected with the RS bits. SQUAREWAVE OUTPUT FREQUENCY: SQW RS1 RS0 OUTPUT FREQUENCY 1 Hz 4.096kHz 8.192kHz 32.768kHz

0 0 1 1

0 1 0 1

TABLE 7.2 SQUAREWAVE OUTPUT FREQUENCY

SRTIST/ECE

Page 43

MEASUREMENT OF ENERGY METER READING

CHAPTER-8 OPTO COUPLERS


8.1 CHOOSING AN OPTOCOUPLER:
There are many situations where signals and data need to be transferred from one system to another within a piece of electronics equipment, or from one piece of equipment to another, without making a direct economic electrical connection. Often this is because the source and destination are (or may be at times) at very different voltage levels, like a microprocessor which is operating from 5V DC but being used to control a energy meter which is switching 230V AC. In such situations the link between the two must be an isolated one, to protect the microprocessor from over voltage damage. Relays can of course provide this kind of isolation, but even small relays tend to be fairly bulky compared with ICs and many of todays other miniature circuit components. Because they are electro-mechanical, relays are also not as reliable and only capable of relatively low speed operation. Where small size, higher speed and greater reliability are important, a much better alternative is to use an Optocoupler.

FIG 8.1 SCHEMATIC CIRCUIT SYMBOL REPRESENTATION

Optocoupler typically come in a small 6-pin or 8-pin IC package, but are essentially a combination of two distinct devices: an optical transmitter, typically a
SRTIST/ECE Page 44

MEASUREMENT OF ENERGY METER READING

gallium arsenide LED (light-emitting diode) and an optical receiver such as a phototransistor or light-triggered diac. The two are separated by a transparent barrier which blocks any electrical current flow between the two, but does allow the passage of light. Usually electrical connections to the LED section are brought out to the pins on one side of the package and those for the phototransistor or diac to the other side, to physically separate them as much as possible. This usually allows Optocoupler to withstand voltages of anywhere between 500V and 7500V between input and output.

8.2 KEY PARAMETERS:


The most important parameter for most Optocouplers is their transfer efficiency, usually measured in terms of their current transfer ratio or CTR. This is simply the ratio between a current change in the output transistor and the current change in the input LED which produced it. Typical values for CTR range from 10% to 50% for devices with an output phototransistor and up to 2000% or so for those with a Darlington transistor pair in the output. Note, however that in most devices CTR tends to vary with absolute current level. Typically it peaks at a LED current level of about 10mA, and falls away at both higher and lower current levels.

SRTIST/ECE

Page 45

MEASUREMENT OF ENERGY METER READING

CHAPTER-9 KEYPAD
This section basically consists of a Linear Keypad. Basically a Keypad can be classified into 2 categories. One is Linear Keypad and the other is Matrix keypad. 1. Matrix Keypad. 2. Linear Keypad.

1. Matrix Keypad: This Keypad got keys arranged in the form of Rows and Columns. That is why the name Matrix Keypad. According to this keypad, In order to find the key being pressed the keypad need to be scanned by making rows as i/p and columns as output or vice versa. This Keypad is used in places where one needs to connect more no. of keys with less no. of data lines. 2. Linear Keypad: This Keypad got n no. of keys connected to n data lines of microcontroller. This Keypad is used in places where one needs to connect less no. of keys. Generally, in Linear Keypads one end of the switch is connected to Microcontroller (Configured as i/p) and other end of the switch is connected to the common ground. So whenever a key of Linear Keypad is pressed the logic on the microcontroller pin will go LOW.

SRTIST/ECE

Page 46

MEASUREMENT OF ENERGY METER READING

Here in this project, a linear keypad is used with switches connected in a serial manner. Linear keypad is used in this project because it takes less no. of port pins. The Linear Keypad with 4 Keys is shown below.

FIG 9.1 LINEAR KEYPAD WITH 4 KEYS

SRTIST/ECE

Page 47

MEASUREMENT OF ENERGY METER READING

CHAPTER-10 BUZZER CIRCUIT


A Piezo buzzer made from two conductors that are separated by Piezo crystals. When a voltage is applied to these crystals, they push on one conductor and pull on the other. The result of this push and pull is a sound wave. These buzzers can be used for many things, like signaling when a period of time is up or making a sound when a particular button has been pushed. The process can also be reversed to use as a guitar pickup. When a sound wave is passed, they create an electric signal that is passed on to an audio amplifier27 mm dia of piezo.

FIG 10.1: BUZZER

Detailed Product Description:


TYPE Sound pressure Level Resonant Frequency Current at rated Voltage Rated Voltage Dimensions(mm)
SRTIST/ECE

MSPS22A45W12 95 Min. at 12Vdc/10cm 4.50.5kHz 5mA Max. 12Vdc 22*10.8


Page 48

MEASUREMENT OF ENERGY METER READING

CHAPTER-11 ZIGBEE TRANSCEIVER


Transceiver is a device which acts as both transmitter and receiver. This operates with 2.8-3.4V. Range of the transceiver module is 30-70m in urban areas and 1-1.5km in outdoor (LOS). The transceiver has an on-chip wire antenna and it operates at a frequency of 2.4GHz.The data received from the microcontroller is organized based on the ZIGBEE protocol standards and then modulated. Along with the data, source address and destination address are added and sent. This organized data is send to the receiver through RF antenna.

11.1 PIN DIAGRAM:

FIG: 11.1 PIN DIAGRAM OF X-BEE TRANSCEIVER

SRTIST/ECE

Page 49

MEASUREMENT OF ENERGY METER READING

11.2 PIN DESCRIPTION OF X-BEE TRANSCEIVER:


Pin
1 2 3 4 5 6 7 8 9 10 11 12 13 14

Name
Vcc DOUT DIN/CONFIG DO8 RESET PWM0/RSSI PWM1 [reserved] DDR/SLEEP_RQ/DI8 GND AD4/DIO4 CTS/DIO7 ON/SLEEP VREF

Direction
Output Input Output Input Output Output Input Either Either Output Input

Description
Power Supply UART Data Out UART Data In Digital Output 8 Module Reset PWM Output 0/RX Signal Strength Indicator PWM Output 1 Do not connect Pin Sleep Control Line or Digital Input 8 Ground Analog Input 4 or Digital I/O 4 Clear-to-Send Flow Control or Digital I/O 7 Module Status Indicator Voltage Reference for A/D Inputs Associated Indicator, Analog Input 5 or Digital

15

Associate/AD5/DIO5

Either

I/O 5 Request-to-Send Flow Control, Analog Input 6 or

16 17 18 19 20

RTS/AD6/DIO6 AD3/DIO3 AD2/DIO2 AD1/DIO1 AD0/DIO0

Either Either Either Either Either

Digital I/O 6 Analog Input 3 or Digital I/O 3 Analog Input 2 or Digital I/O 2 Analog Input 1 or Digital I/O 1 Analog Input 0 or Digital I/O 0

TABLE: 11.1 PIN DESCRIPTION OF X-BEE TRANSCEIVER

SRTIST/ECE

Page 50

MEASUREMENT OF ENERGY METER READING

11.3 FEATURES:
a) Performance: Parameters Indoor/Urban Range Outdoor RF (LOS) Transmit Power Output RF Data Rate Serial Interface Data Rate Receiver Sensitivity Value 30m 100m 1mW (0dBm) 250,000bps 1200-115200bps -92dBm

TABLE: 11.2 PERFORMANCE CHARACTERISTICS

b) POWER REQUIREMENTS:

Parameters
Supply Voltage Transmit Current Receive Current

Value
2.8 - 3.4V 45mA 50mA

TABLE: 11.3 POWER REQUIREMENT CHARACTERISTICS

SRTIST/ECE

Page 51

MEASUREMENT OF ENERGY METER READING

C) General: Parameters
Operating Frequency Dimensions Operating Temperature Antenna Options

Value
ISM 2.4GHz 2.468 x 2.761 -40o to 85o C Integrated Chip Antenna

TABLE: 11.4 GENERAL CHARACTERISTICS

d) Networking and Security: Parameters Value


Point-to-point, Point-to-multipoint, Supported Network Topologies Number of Channels Addressing Options Peer-to-peer 16 Direct Sequence Channels PAN ID, Channel and Addresses

TABLE: 11.5 NETWORKING AND SECURITY CHARACTERISTICS

11.4 ZIGBEE ARCHITECTURE:


The IEEE 802.15.4 standard and Zigbee wireless network technology are ideal for the implementation of a wide range of low cost, low power and reliable control and

SRTIST/ECE

Page 52

MEASUREMENT OF ENERGY METER READING

monitoring applications within the private home and industrial environment. The working model of the IEEE 802.15.4 and Zigbee is illustrated in Figure 6.9.

FIG: 11.2 ZIGBEE ARCHITECTURE . The software and hardware vendor will provide the software stack with appropriate tools to allow an OEM to create applications, which are added to the APL. The Physical (PHY) layer and Medium Access Control (MAC) layer are based on the IEEE802.15.4 PAN standard. This includes the actual radio hardware. Above the MAC and PHY are the Network (NWK) and application layers defined by Zigbee. The first two layers, the physical (PHY) and Medium Access Control (MAC) are defined in the IEEE standard. The other layers that build on the PHY and MAC layers are defined by the Zigbee alliance.
SRTIST/ECE Page 53

MEASUREMENT OF ENERGY METER READING

The PHY layer contains the RF transceiver and access to the other hardware and control mechanisms. The function of the PHY is to activate and deactivate the radio transceiver and other hardware specific services such as access to the channels. The MAC layer is as described by the name a controlling device for radio medium. It controls access to the physical radio channel and other services defined by the PHY service. The network (NWK) layer is responsible for the network controlling functions. It controls the mechanism for joining and leaving a network and for creating a network for those devices which have the capability to do so. The NWK layer applies also security to what is going to be data packets. The NWK layer is responsible for discovery and storing information about the neighbors in the network. The application layer (APL) consists of three different blocks which have different functionalities and responsibilities. The application support sub-layer (APS) is responsible for maintaining a table of devices that are connected to each other, a binding table. The APS layer provides an interface between the NWK layer and the APL with its set of services.

11.5MODES OF OPERATION:
The Transceiver operates in five modes .They are 1. Idle Mode 2. Receive mode 3. Transmit Mode 4. Sleep Mode 5. Command Mode

SRTIST/ECE

Page 54

MEASUREMENT OF ENERGY METER READING

FIG: 11.3 DIFFERENT MODES OF OPERATION The operation of Transceiver in each mode is explained below

11.5.1 Idle Mode:


When not receiving or transmitting data, the RF module is in Idle Mode. The module shifts into the other modes of operation under the following conditions:

11.5.2 Transmit Mode:


RF data packets:
When not receiving or transmitting data, the RF module is in Idle Mode. The module shifts into the each transmitted data packet contains a Source Address and Destination Address field.

1. Direct Transmission:
Once the End Device either transmits data to the Coordinator or polls the Coordinator for data, the Coordinator will use direct transmission for all subsequent data transmissions to that module address until ST time (or number of beacons) occurs with no

SRTIST/ECE

Page 55

MEASUREMENT OF ENERGY METER READING

activity (at which point it will revert to using indirect transmissions for that module address).

2. Indirect Transmission:
A packet is retained for a period of time and is only transmitted after the destination module (Source Address = Destination Address) requests the data. To configure Indirect Transmissions in a PAN (Personal Area Network), the SP (Cyclic Sleep Period) parameter value on the Coordinator must be set to match the longest sleep value of any End Device.

11.5.3 SLEEP MODE:


Sleep Modes enable the RF module to enter states of low-power consumption when not in use. In order to enter Sleep Mode, one of the following conditions must be met (in addition to the module having a non-zero SM parameter value):

11.5.4 Command mode:


To modify or read RF Module parameters, the module must first enter into Command Mode a state in which incoming characters are interpreted as commands. Two Command Mode options are supported: AT Command Mode and API Command Mode.

SRTIST/ECE

Page 56

MEASUREMENT OF ENERGY METER READING

SOURCE CODE
#include<reg52.h> #include<serial.h> #include<lcd216.h> sbit Mains = P2^2; sbit K_Inc = P3^7; sbit K_Dec = P3^6; sbit K_Ent = P3^5; bit v_msg,flag2,flag3,msgrx_flag=0; unsigned char idata str[6],v_id[6]; int count; void Display_Amt(unsigned int); unsigned char Pay_Bill(); bit ZigBee_Flag=0; unsigned char idata a[50],i=0,Meter_No[5]; void intr(void) interrupt 4 using 2 { if(RI==1) { RI=0; a[i]=SBUF; a[i]='\0'; i=0; i++; }
SRTIST/ECE Page 57

MEASUREMENT OF ENERGY METER READING

} void ex_int0(void) interrupt 0 { meter_flag=1; } void main() { int amount,amount_pre,ZigBee_Data,CU; unsigned char j=0; bit Demo_flag = 0,Demo_Mode_Flag = 0; Mains=0; LCD_Init(); LCD_Cmd(0x80); Disp_Str(" Wireless Power "); LCD_Cmd(0xC0); Disp_Str(" Meter Reading"); Delay(100); SConfig(); ES=0;Send("AT+DMODE");Send_Char(0X0D);Delay(10);ES=1; Delay(100); LCD_Cmd(0x80); Disp_Str(" ZigBee "); // converting

LCD_Cmd(0xC0); Disp_Str(" Connected "); Mains = 1; CU = amount/2; while(1) { if( ZigBee_Flag==1)

SRTIST/ECE

Page 58

MEASUREMENT OF ENERGY METER READING

{ if(strcmp(&a[0],"2222")==0) { LCD_Cmd(0x80); Disp_Str("Sending Last Mth"); LCD_Cmd(0xC0); Disp_Str("Bill to the HHD "); Delay (200); EEPROM_Read(0x04,4); ZigBee_Data = atoi(eeprom_data); LCD_Cmd(0xC0); Disp_Str(eeprom_data); Send (eeprom_data); Send_Char(0x0D); Delay (200); } if(strcmp(&a[0],"0000")==0) { LCD_Cmd(0x80); Disp_Str("Sending Last Mth"); LCD_Cmd(0xC0); Disp_Str("Bill paid "); Delay (200); EEPROM_Read (0x04,4); ZigBee_Data = atoi(eeprom_data); LCD_Cmd(0xC0); Disp_Str(eeprom_data); Send (eeprom_data); Send_Char(0x0D); Delay (200); } else {

SRTIST/ECE

Page 59

MEASUREMENT OF ENERGY METER READING

LCD_Cmd(0x80); Disp_Str(" Invalide msg "); LCD_Cmd(0xC0); Disp_Str(" Format Delay(200); } } } } void convert_disp_new(unsigned char mybyte) { unsigned char lsb,msb; msb = mybyte/10; lsb = mybyte%10; LCD_Data(msb+0x30); LCD_Data(lsb+0x30); } unsigned char convert_disp(unsigned char value) { unsigned char y,x,temp; x=value&0x0F; y=value&0xF0; y=y>>4; temp = (y*10) + x; x=x+0x30; y=y+0x30; LCD_Data(y); LCD_Data(x); return temp; } ");

SRTIST/ECE

Page 60

MEASUREMENT OF ENERGY METER READING

RESULT

CONSUMER SECTION:

SRTIST/ECE

Page 61

MEASUREMENT OF ENERGY METER READING

SUBSTATION SECTION:

SRTIST/ECE

Page 62

MEASUREMENT OF ENERGY METER READING

APPLICATIONS
This project improves customer services by reducing the maltreatment of data and replaces the difficulties like involvement of distance and accessibility of measurement points. With the system described, customer service is improved through remote and automated meter reading, more credible utility bills and efficient data management. Provides security Saves time Highly reliable The meter reading and management processes are free from human errors.

SRTIST/ECE

Page 63

MEASUREMENT OF ENERGY METER READING

FUTURE SCOPE
For paying electricity bills we have to go to e-seva, this is very time consuming process and in electrical department side there may be a chance of errors in noting the units and issue of monthly bills. This can be overcome in our project. A further improvement can be made by adding a prepaid system, so that the consumers dont need to go to e-seva to pay the bill. Here we use an access card to pay the bill. As there is a chance of malfunction, the consumer is identified by inserting a plastic access card with a magnetic stripe or a plastic smart card with a chip that contains a unique card number and some security information. Authentication is provided by the customer entering a pin number (code) to pay the bill. By scratching the card and entering the code, the consumer can pay the bill. New features such as multi-tariff billing, reactive energy management and power quality monitoring are also possible in this system to improve generation, distribution, customer service and billing. This will not only help the service providers of power to offload the manpower, the trouble to collect energy meter readings and organizing bill preparation, but also provide consumers an online tracking system to regulate the energy bill ultimately.

SRTIST/ECE

Page 64

MEASUREMENT OF ENERGY METER READING

CONCLUSION
The project Intelligent Online Measurement and Management of Energy Meter Data through Advanced Wireless Network has been successfully designed and tested. Integrating features of all the hardware components used have developed it. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented. The objective of developing a wireless energy meter-reading system is not only to have high accuracy over a wide current dynamic range, better reliability and robustness but also to face the weakening competence in meter reading in localities such as increasingly over crowded big cities, overpopulated rural, sub urban regions and remote or snowy districts. In order to accommodate the advanced requirements not available in electromechanical meters, manufacturers have begun adopting all-electronic solutions. With the system described, customer service is improved through remote and automated meter reading, more credible utility bills and efficient data management.

SRTIST/ECE

Page 65

MEASUREMENT OF ENERGY METER READING

BIBLIOGRAPHY
TEXT BOOKS:
The 8052 Micro controller and Embedded Systems by -Muhammad Ali Mazidi, Janice Gillispie Mazidi Electronic Components -D.V.Prasad Wireless Communications - Theodore S. Rappaport Power systems by C.L. Wadhwa Electrical Machines by J.B. Gupta

WEB REFERENCES:
www.citeseerx.ist.psu.edu/viewdoc/download . http://focus.ti.com/docs/prod.html . www.8052.com www.electronicstutorial.com www.electronicsforyou.com www.abcofelectronics.com

SRTIST/ECE

Page 66

Das könnte Ihnen auch gefallen