Professional Documents
Culture Documents
PROJECT BACKGROUND
1.1 PROBLEM
The present system of energy billing is error prone and also time and labor consuming. Errors get
introduced at every stage of energy billing like errors with electro-mechanical meters, human
errors while noting down the meter reading, and errors while processing the paid bills and the
due bills. Due to the increase in the development of residential building and commercial building
the meter reading task increases which require more number of human operator. There are many
cases where the bill is paid and then is shown as a due amount in the next bill. The major
drawback of a post paid system is that there is no control of usage from the consumer’s side.
There is a lot of wastage of power due to the consumer’s lack of planning of electrical
consumption in an efficient way. Since the supply of power is limited, as a responsible citizen,
there is a need to utilize electricity in a better and efficient way. The distribution company has to
receive huge amounts in the form of pending bills, which results in substantial revenue losses
and also hurdles to modernization because of lack of funds.
In order to achieve efficient meter reading, reduce billing error and operation cost, automatic
meter reading system play an important role. Electric energy meters is the direct billing interface
between utility grid and consumers and it undergone several advancements in the last decade. In
1
postpaid system, there is no control use of electricity from the consumer’s side. There is a lot of
wastage of power in the consumer’s side due to lack of planning of electrical consumption in an
efficient way.
• Prepaid energy meter is used to improve the operational efficiency as there is no need of
men for meter reading .The disconnection & reconnection is automatic. It can help to control
appropriation of electricity in a better way than traditional metering.
• As the payment is online/by recharge voucher, it improve the cash flows and also improved
revenue management system, which will reduces the financial risk.
• Customer service is also improved by using this. By the use of prepaid energy meter the
billing delay and extra cost due to disconnection/reconnection can be removed and we can
use the electrical energy in a controlled manner which helps the consumer to save their
money through better energy management.
• Metering errors, tampering with meters is belongs to non-technical losses which leads to low
registration and calibration related frauds. In India it is greater than 10 percent. By using
prepaid meters we can control non-technical losses in a better way than conventional ones.
• Most of the Asian countries do not have 100% electrification; hence by the increasing
generating capacity new markets are being created. The Prepaid energy meter unit can be
more easily introduced in such type of new markets rather than the existing ones for enhance
the electrification.
2
CHAPTER 2
PROPOSED SOLUTION
The conventional Electrical billing system where the Electric Power bill given at the end of the
month can be paid at Power distribution offices or at e-seva centers. This billing system is quite
time consuming and even expensive (in issuing bills at door to door). This traditional Electrical
billing system can be replaced with Prepaid Electricity billing system. This Prepaid billing
system is based on Smart Card technology.
A smart card is used as an energy card just as a Sim card in mobiles. Before using this card we
have to recharge it. Whenever we want to use the power then we have to place this card in the
card reader, which is interfaced to the microcontroller with the serial interfacing. The
microcontroller reads the data from the smartcard reader and asks how many KWh you require,
which is displayed on the LCD display.
Another advantage of this project is that we (electricity department) can overcome the illegal
power consumption due to the theft identification system. If anyone tries to remove the smart
card and tries to connect the supply directly, then the theft identification circuit identifies it and
do not supply the power. By this we can save the power by illegal consumption. This is the main
advantage of this project with the theft circuit and to save power.
2.2 ALGORITHM
• When we enter a charged card in to a card reader of our main circuit, micro controller will
take data and store it inside a memory of microcontroller.
3
o Micro controller also takes the pulses from the energymeter via optocoupler IC
MCT2E and counts the pulses upto 3200 because of the meter specifications are
3200 pulses/KWh.
• And whenever the pulse count reaches the 3200 then it decreases the charged amount and it
will increases the meter reading by 1 and displays it on the LCD screen.
• And whenever the charged amount reading reaches the minimum amount then it will send
pulse to the ULN 2003 driver IC and it will turn of the relay and when relay off then the
power will off.
• If the user does not recharge the card then we will not get the energy.
2.3 EXECUTION
4
2.4 IT IS AN OPTIMIZED SOLUTION OF THE PROBLEM
Over the last few years, Prepaid Energy Meter has been proposed as an innovative solution
aimed at facilitating affordability and reducing the cost of utilities. This mechanism, essentially,
requires the users to pay for the electricity before its consumption. In this way, consumers hold
credit and then use the electricity until the credit 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 of prepaid meters claim
that they benefit both consumers and utilities because they help users to consume more
efficiently and to improve the management of their budget, while allowing 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 is expensive for firms and risky for low income
consumers, as the insecurity and volatility of their income may force them to make little use of
the service, or ultimately, bring about involuntary self-disconnection. Prepaid meters are usually
installed by electricity supplier, if it feels that the customer cannot keep up payments on their
energy bill. However, they can also be requested by the customer themselves - and are often seen
as a good method of budgeting. Generally speaking 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 well differentiated
components. The first is a service meter installed at the unit where energy will be consumed,
such as a household dwelling or a store. In general, these meters are of the “two-gang” type, and
consist of a user’s interface unit and a current measuring set. The interface unit is a device
installed inside the building, which allows the user to “interact” with the meter. The metering
unit, on the other hand, is the intelligent component that stores credit and consumption
information, and makes up the element that either clears or switches off electricity supply. The
second component of the system is the so-called credit dispensing unit, which is the vending
machine where consumers can purchase electricity credit. In general, these sales outlets are
located at the utility’s commercial offices, as well as in stores with long opening hours. The third
component is the supporting device that links the various sales outlets to the utility’s
management system
5
CHAPTER 3
CIRCUIT DETAILS
6
3.1.2Function of Each Block
Digital Energy-Meter
Current and Voltage signal is taken as Input signal.
Energy meter measures power in Digital form.
Gives Output in form of Pulses.
Microcontroller
LCD initialization
Monitoring power consumption
Controlling Relay & Buzzer
Reading amount from card reader
EEPROM
Stores recharge value
Acts as Smart card
LCD
Displays status of system
Gives professional look
Helpful to consumers
Smart Card
Same size as a standard credit card
A microchip embedded in a plastic card to store information.
The chip can be programmed to carry out specific functions
7
3.2 CIRCUIT DIAGRAM
• AT 89C51 Micro-Controller
• IC ULN2003
• 16*2 LCD display
• MCT2E Opto Coupler IC
• Buzzer
• Crystal Oscillator
• Resisters, capacitors
• 12 v/30 A Relay
• RFID
8
3.3 CIRCUIT DIAGRAM PROCESS FLOW
9
CHAPTER 4
COMPONENT DETAILS
The micro controller generic part number actually includes a whole family of micro
controllers that have numbers ranging from 8031 to 8751 and are available in N-
Channel Metal Oxide Silicon (NMOS) and Complementary Metal Oxide Silicon
(CMOS) construction in a variety of package types.
4.1.1.1 FEATURES
• Compatible with MCS® -51 Products
• 4K Bytes of In-System Programmable (ISP) Flash Memory
• Endurance: 1000 Write/Erase Cycles
• 4.0V to 5.5V Operating Range
• Fully Static Operation: 0 Hz to 33 MHz
• Three-level Program Memory Lock
• 128 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Two 16-bit Timer/Counters
• Six Interrupt Sources
• Full Duplex UART Serial Channel
• Low-power Idle and Power-down Modes
• Interrupt Recovery from Power-down Mode
• Watchdog Timer
• Dual Data Pointer
• Power-off Flag
10
• Fast Programming Time
• Flexible ISP Programming (Byte and Page Mode)
• Each port can be used as input or output (bi-direction)
4.1.1.2 DESCRIPTION
The AT89C51 is a low power , high performance CMOS 8-bit microcomputer with 4K bytes of
Flash Programmable and Erasable Read Only Memory(PEROM). The device is manufactured
using Atmel’s high density non-volatile memory technology and is compatible with the industry
standard MCS-51 instruction set pin out. The on-chip Flash allows the program memory to be
reprogrammed in system or by a conventional non-volatile memory programmer.
By combining aversatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a
powerful microcomputer which provides a highly flexible and cost effective solution many
embedded control applications. The AT89C51 provides the two 16-bit timer/counters, five vector
two-level interrupt architecture, a full duplex serial port and on- chip oscillator and clock
circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode stops the
CPU while allowing the RAM, timer/counters, serial poert and interrupt system to continue
functioning. The power down Mode saves the RAM contents But freezes the oscillator disabling
chip function until the next hardware reset.
4 . 1 . 1 .4 PIN DESCRIPTION
12
Each port has 8 pins.
Named P0.X (X=0,1,...,7), P1.X, P2.X, P3.X
PSEN (Pin 29): Program store enable .This is an output pin and is connected to the OE pin of the
ROM.
ALE (Pin 30): Address latch enable .It is an output pin and is active high. 8051 port 0 provides
both address and data. The ALE pin is used for de-multiplexing the address and data by
connecting to the G pin of the 74LS373 latch.
PIN 18,19 ------- XTAL2,XTAL1
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open drain bi-directional 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.
13
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
Port 1 is an 8-bit bi-directional 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.
Port 1 also receives the low-order address bytes during Flash programming and verification.
Port Pin Alternate Functions
P1.5- MOSI (used for In-System Programming)
P1.6 -MISO (used for In-System Programming)
P1.7 -SCK (used for In-System Programming)
Port 2
Port 2 is an 8-bit bi-directional 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 use 16-bit addresses (MOVX @ DPTR).
In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to
external data memory that use 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.
14
Port 3
Port 3 is an 8-bit bi-directional 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. Port 3 also serves
the functions of various special features of the AT89S51, as shown in the following table.
Port Pin Alternate Functions
RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the
device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DIS-
RTO 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.
15
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
AT89S51 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. This pin also receives the 12-volt programming enable voltage
(VPP) during Flash programming.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier
16
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, as shown in Figure1. 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. T h e r e a r e n o
r e q u i r e m e n t s o n t h e d u t y c yc l e o f t h e e x t e r n a l c l o c k s i g n a l , s i n c e t h e
input to the internal clocking circuitry is through a divide-by-two flip-
f l o p , b u t minimum and maximum voltage high and low time specifications must be observed.
Internal Memory
The 89C51 has internal RAM and ROM memory for the functions.
Additionalm e m o r y c a n b e a d d e d e x t e r n a l l y u s i n g s u i t a b l e c i r c u i t s .
T h i s h a s a H a r d w a r e architecture, which uses the same address, in different memories,
for code and data.
Internal RAM
A bit addressable area of 16 bytes occupie s RAM byte addresses 20H to2FH,
forming a total of 128 addressable bits. An addressable bit may be s p e c i f i e d b y
i t s b i t a d d r e s s o f 0 0 H t o 7 F H , o r 8 b i t s m a y f o r m a n y b y t e address form
20H to 2FH.
A general purpose RAM area above the bit area, from 30H to &7FH addressable as bytes.
17
Internal ROM
The 89C51 is organized so that data memory and program code memory can b e i n
t w o e n t i r e l y d i f f e r e n t p h ys i c a l m e m o r y e n t i t i e s . E a c h h a s t h e s a m e a d d r e s s
r a n g e s . P r o g r a m a d d r e s s e s h i gh e r t h a n 0 F F F H , w h i c h e x c e e d s t h e i n t e r n a l
R O M c a p a c i t y, w i l l c a u s e t h e 8 9 C 5 1 t o a u t o m a t i c a l l y f e t c h c o d e b yt e s f r o m
external program m e m o r y. C o d e b yt e s c a n a l s o be fetched exclusively
f r o m a n e x t e r n a l memory by connecting the external access pin to ground.
Special Function Registers (SF Rs) are areas of memory that control specific
functionality of the 89C51 processor. For example, four SFRs permit access to
the89C51’s 32 input/output lines. Another SFR allows a program to read or write
to the89C51’s serial port. Other SFRs allow the user to set the serial baud rate,
control and access timers, and configure the 89C51’s interrupt system.
SFRs are accessed as if they were normal Internal RAM. The only difference is
that Internal RAM is from address 00H through 7FH whereas SFR registers exist in the
address range of 80H through FFH. Each SFR has an address (80H through FFH)
and a name. Although the address range 80h through FFH offers 128 possible
addresses, t h e r e a r e o n l y 2 1 S F R s i n a s t a n d a r d 8 9 C 5 1 . A l l o t h e r
a d d r e s s e s i n t h e S F R r a n g e (80h through FFH) are considered invalid.
Writing to or reading from these registers may produce undefined values or
behaviour. The following table lists the symbols, names and addresses of the 89C51
SFR.
SFR Description
There are four I/O ports of 8 bits each for a total of 32 I/O lines. The four ports are called P0, P1,
P2 and P3.16
18
SP (stack pointer)
This is the stack pointer of the micro controller. This SFR indicates where the
next value to be taken from the stack will be read from in Internal RAM. Pushing
a value onto the stack, the value will be written to the address of SP + 1. That is
to say, if SP holds the value 07h, a PUSH instruction will push the value onto the
stack at address 08h. This SFR is modified by all instruct ions that modify the
stack, such as PUSH, POP, and LCALL, RET, RETI, and whenever interrupts are provoked
by the micro controller. The SP SFR, on start up, is initialized to 07h. This means
the stack will start at 08h and start expanding upward in internal RAM. Since
alternate register b and 1, 2, and 3 as well as the user bit variables occupy internal RAM from
addresses08h through 2Fh, it is necessary to initialize SP in program to some other
value such as 2F, using the alternate register banks and/or bit memory.
The SFRs DPL and DPH work together to represent a 16 -bit value called the Data
Pointer. The data pointer is used in operations regarding external RAM and some instructions
involving code memory. Since it is an unsigned two-byte integer value, it c a n r e p r e s e n t
values from 0000H to FFFFH (0 through 65,535 decimal). DPTR is
really DPH and DPL taken together as a 16 -bit value. For example, to push
DPTR onto the stack first push DPL and then DPH. Additionally, there i s an
instruction to “increment DPTR.” On executing this instruction, the two bytes are
operated upon as a 16-bit value. However, there is no instruction to decrement DPTR.
The Power Control SFR is used to control the 89C51’s power con trol modes.
Certain operation modes of the 89C51 allow the 89C51 to go into a type of
“sleep” mode that requires much less power. These modes of operation are controlled through
PCON. Additionally, one of the bits in PCON is used to double the effective baud rate of the
89C51’s serial port.
19
TCON (Timer control)
The Timer Control SFR is used to configure and modify the way in which
the8 9 C 5 1 ’ s t w o t i m e r s o p e r a t e . T h i s S F R c o n t r o l s w h e t h e r e a c h o f t h e
two timers is running or stopped and contains a flag to ind icate that
e a c h t i m e r h a s o v e r f l o w e d . Additionally, some non-timer related bits are located in the
TCON SFR. These bits are used to configure the way in which the external interrupts are
activated.
The Timer Mode SFR is used to configure the mode of operation of each of the
two timers. Using this SFR the program may configure each timer to be a 16 -
bittimer, an 8-bit auto reload timer, a 13-bit timer, or two separate timers.
Additionally, the program may configure the timers to only count when
an external pin is activated or to count “events” that are indicated on an external pin.
These two SFRs, taken together, represent timer 0. Their exact behavio
r depends on how the timer is configured in the TMOD SFR; h owever, these
timers always count up. Increment in value is configurable.
20
SCON (Serial control)
The Serial Control SFR is used to configure the behaviour of the 89C51’s on-
board serial port. This SFR controls the baud rate of the serial port, whether the
serial p o r t i s a c t i v a t e d t o r e c e i v e d a t a , a n d a l s o c o n t a i n s f l a g s t h a t a r e
s e t w h e n a b y t e i s successfully sent or received. To use the 89C51’s on -board
serial port, it is generally necessary to initialize the following SFRs: SCON, TCON, and
TMOD.18
This is because SCON controls the serial port. However, in most cases
t h e program will wish to use one of the timers to establish the serial port’s baud
rate. In this case, it is necessary to configure timer 1 by initializing TCON and TMOD.
The Serial Buffer SFR is used to send and receive data via the on-board serial port. Any value
written to SBUF will be sent out the serial port’s TXD pin. Likewise, any value, which the
89C51 receive via the serial port’s RXD pin, will be delivered to the user program via BUF. In
other words, when written to SBUF serves as the output port and when read from as an input
port.
IE (Interrupt enable)
The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of
the SFR are used to enable/disabl e the specific interrupts, where as the highest bit
is used to enable or disable ALL interrupts. Thus, if the high bit of IE is 0all
interrupts are disabled regardless of whether an individual interrupt is enabled by
setting a lower bit.
21
NAME FUNCTION
A Accumulator
B Arithmetic
DPH Addressing External Memory
DPL Addressing External Memory
IE Interrupt Enable Control
IP Interrupt Priority
P0 Input/output Port Latch
P1 Input/output Port Latch
P2 Input/output Port Latch
P3 Input/output Port Latch
PCON Power Control
PSW Program Status Word
SCON Serial Port Control
SBUF Serial Port Data Buffer
SP Stack Pointer
TMOD Timer/Counter Mode Control
TCON Timer/Counter Control
TL0 Timer 0 Low Byte
TH0 Timer 0 High Byte
TL1 Timer 1 Low Byte
TH1 Timer 1 High Byte
22
IP (Interrupt priority)
Power supply is a reference to a source 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. the term is most commonly applied to electrical energy supplies, less often to mechanical
ones, and rarely to others. here in our application we need a 5v dc power supply for all
electronics involved in the project. this requires step down transformer, rectifier, voltage
regulator, and filter circuit for generation of 5v dc power.
4.1.3 RFID
23
identification system uses tags, or labels attached to the objects to be identified. Two-way radio
transmitter-receivers called interrogators or readers send a signal to the tag and read its
response. The readers generally transmit their observations to a computer system running RFID
software or RFID middleware.
RFID systems typically come in three configurations. One is a Passive Reader Active
Tag (PRAT) system that has a passive reader which only receives radio signals from active tags
(battery operated, transmit only). The reception range of a PRAT system reader can be adjusted
from 1-2,000 feet. Thereby allowing for great flexibility in applications such as asset protection
and supervision. Another configuration is an Active Reader Passive Tag (ARPT) system that
has an active reader, which transmits interrogator signals and also receives authentication replies
from passive tags. Finally, there is the Active Reader Active Tag (ARAT) system in which
active tags are awoken with an interrogator signal from the active reader. A variation of this
system could also use a Battery Assisted Passive (BAP) tag which acts like a passive tag but has
a small battery to power the tag's return reporting signal.
RFID tags can be either passive, active or battery assisted passive. An active tag has an on-board
battery and periodically transmits its ID signal. A battery assisted passive (BAP) has a small
battery on board and is activated when in the presence of a RFID reader. A passive tag is cheaper
and smaller because it has no battery. Instead, the tag uses the radio energy transmitted by the
reader as its energy source. The interrogator must be close for RF field to be strong enough to
transfer sufficient power to the tag. Since tags have individual serial numbers, the RFID system
design can discriminate several tags that might be within the range of the RFID reader and read
them simultaneously.
Tags may either be read-only, having a factory-assigned serial number that is used as a key into a
database, or may be read/write, where object-specific data can be written into the tag by the
system user. Field programmable tags may be write-once, read-multiple; "blank" tags may be
written with an electronic product code by the user.
The tag's information is stored electronically in a non-volatile memory. The RFID tag includes a
small RF transmitter and receiver. An RFID reader transmits an encoded radio signal to
interrogate the tag. The tag receives the message and responds with its identification information.
This may be only a unique tag serial number, or may be product-related information such as a
24
stock number, lot or batch number, production date, or other specific information. RFID tags
contain at least two parts: an integrated circuit for storing and processing
information, modulating and demodulating a radio-frequency (RF) signal, collecting DC power
from the incident reader signal, and other specialized functions; and an antenna for receiving and
transmitting the signal.
Fixed readers are set up to create a specific interrogation zone which can be tightly controlled.
This allows a highly defined reading area for when tags go in and out of the interrogation zone.
Mobile readers may be hand-held or mounted on carts or vehicles.
Signaling between the reader and the tag is done in several different incompatible ways,
depending on the frequency band used by the tag. Tags operating on LF and HF frequencies are,
in terms of radio wavelength, very close to the reader antenna, only a small percentage of a
wavelength away. In this near field region, the tag is closely coupled electrically with the
transmitter in the reader. The tag can modulate the field produced by the reader by changing the
electrical loading the tag represents. By switching between lower and higher relative loads, the
tag produces a change that the reader can detect. At UHF and higher frequencies, the tag is more
than one radio wavelength away from the reader, requiring a different approach. The tag
can backscatter a signal. Active tags may contain functionally separated transmitters and
receivers, and the tag need not respond on a frequency related to the reader's interrogation signal.
An Electronic Product Code (EPC) is one common type of data stored in a tag. When written
into the tag by an RFID printer, the tag contains a 96-bit string of data. The first eight bits are a
header which identifies the version of the protocol. The next 28 bits identify the organization that
manages the data for this tag; the organization number is assigned by the EPC Global
consortium. The next 24 bits are an object class, identifying the kind of product; the last 36 bits
are a unique serial number for a particular tag. These last two fields are set by the organization
that issued the tag. Rather like a URL, the total electronic product code number can be used as a
key into a global database to uniquely identify a particular product. RFID can be used in a
variety of applications such as:
• Access management
• Tracking of goods
• Tracking of persons and animals
25
• Toll collection and contactless payment
• Machine readable travel documents
• Smart dust (for massively distributed sensor networks)
• Tracking sports memorabilia to verify authenticity
• Airport baggage tracking logistics
4.1.3.1 ANTENNA
The antenna emits radio signals to activate the tag and read and write data to it. Antennas are the
conduits between the tag and the transceiver, which controls the system's data acquisition and
communication. Antennas are available in a variety of shapes and sizes they can be built into a
door frame to receive tag data from persons or things passing through the door, or mounted on an
interstate tollbooth to monitor traffic passing by on a freeway. The electromagnetic field reduced
by an antenna can be constantly present when multiple tags are expected continually. If constant
interrogation is not required, a sensor device can activate the field. Often the antenna is packaged
26
Figure 4.3 RFID
with the transceiver and decoder to become a reader (a.k.a. interrogator), which can be
configured either as a handheld or a fixed-mount device. The reader emits radio waves in ranges
of anywhere from one inch to 100 feet or more, depending upon its power output and the radio
frequency used. When an RFID tag passes through the electromagnetic zone, it detects the
reader's activation signal. The reader decodes the data encoded in the tag's integrated circuit
(silicon chip) and the data is passed to the host computer for processing.
An RFID tag is comprised of a microchip containing identifying information and an antenna that
transmits this data wirelessly to a reader. At its most basic, the chip will contain a serialized
identifier, or license plate number, that uniquely identifies that item, similar to the way many bar
codes are used today. A key difference, however is that RFID tags have a higher data capacity
than their bar code counterparts. This increases the options for the type of information that can
27
Figure 4.4 RFID TAG
be encoded on the tag, including the manufacturer, batch or lot number, weight, ownership,
destination and history (such as the temperature range to which an item has been exposed). In
fact, an unlimited list of other types of information can be stored on RFID tags, depending on
application needs. An RFID tag can be placed on individual items, cases or pallets for
identification purposes, as well as on fixed assets such as trailers, containers, totes, etc.
4.1.3.3 RF TRANSCEIVER
The RF transceiver is the source of the RF energy used to activate and power the passive RFID
tags. The RF transceiver may be enclosed in the same cabinet as the reader or it may be a
separate piece of equipment. When provided as a separate piece of equipment, the transceiver is
commonly referred to as an RF module. The RF transceiver controls and modulates the radio
frequencies that the antenna transmits and receives. The transceiver filters and amplifies the
backscatter signal from a passive RFID tag.
28
• Document/ Jewellery tracking
• Patient Monitoring
4.1.4 ULN2003 (D
D R I V E R I C FO R R E L A Y )
4.1.4.1 DESCRIPTION
The ULN2003 is a monolithic high voltage and high current Darlington transistor arrays. It
consists of seven NPN Darlington pairs that feature high-voltage outputs with common-cathode
clamp 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, lamp drivers, display drivers (LED gas
discharge),line drivers, and logic buffers. normally the output current from the micro
controller is of 30mA. So by using this IC i.e.ULN2003 we can boost the current
signal up to 600mA. So this IC generates required voltages
4.1.4.2 FEATURES
29
Applications
• Relays
• Hammer
• Lamps
• Display (LED) drivers
Pin Description
For high input impedance we may use two transistors to form a Darlington pair. This pair in CC
configuration provides input impedance as high as 2Mohms. The input s i g n a l v a r i e s t h e
30
base current of the first transistor this produces variation in the
collector current in the first transistor. The emitter load of the first stage is the
input resistance o f t h e s e c o n d stage. T h e e m i t t e r c u r r e n t o f t h e f i r s t
t r a n s i s t o r i s t h e b a s e current of the second transistor.
Gallium Arsenide Diode Infrared Source Optically Coupled to a Silicon npn Phototransistor
High Direct-Current Transfer Ratio Base Lead Provided for Conventional Transistor Biasing
High-Voltage Electrical Isolation. or 3.55-kV Rating Plastic Dual-In-Line Package High-Speed
Switching: = 5 µs, 5 µs Typical Designed to be Interchangeable with General Instruments MCT2
and MCT2E.
31
4.1.5.1 Features
4.1.5.2 Description
Standard Single Channel Phototransistor Couplers. The MCT2/ MCTE family is an Industry
Standard Single Channel Phototransistor. The MCT2/ MCTE family is an Industry Standard
Single Channel Phototransistor .Each optocoupler consists of gallium arsenide infrared LED and
a silicon NPN phototransistor. MCT2E Optocoupler, Phototransistor Output, With Base
Connection Features Interfaces with common logic families Input-output coupling capacitance <
0.5 pF Industry Standard Dual-in line 6-pin package. MCT2/ MCT2E Absolute Maximum
Ratings Tamb = 25 °C, unless otherwise specified Stresses in excess of the absolute Maximum
Ratings can cause permanent damage to the device. Functional operation of the device is not
implied at these or any other conditions in excess of those given in the operational sections of
this document. Exposure to absolute Maximum Rating for extended periods of the time can
adversely affect reliability.
32
4.1.6 LCD
LCD used has 14 pins. Functions of each pin are given in below tables.
While Vcc and Vss provides +5volts and ground respectively.VEE is used for
Controlling LCD contrast.
There are two very important registers inside the LCD. RS pin is used for their Selection as
follow. If RS = 0 the instruction command code register is selected allowing user to send a
33
command such as a clear display cursor at home, etc. If RS=1 the data register is selected
allowing use to send data to be displaying on the LCD.
R/W input allows the user to write information to the LCD or read information
from it. R/W =1 when reading. R/W =0 when writing.
E, Enable:
LCD to latch information presented to its data pins uses the enable pin. When data is supplied to
data pins a high to low pulse must be supplied to these pins in order for the LCD to latch in the
data present at the data pins. This pulse must be of 450 ns wide.
D0 - D7:
The 8 bit data pins are used to send information to LCD or read the content of LCD internal
registers to display letters and numbers we send ASCII code for the numbers A-Z, a-z and 0-9 to
these pins while making RS=1.There also instructions commands codes that can be send to LCD
to clear display or force the cursor to home position or blinking the cursor.
34
4.1.7 RELAY
35
Figure 4.10 Relay
4.2.1 CAPACITOR
This article is about the electronic component. For the physical phenomenon, see capacitance.
For an overview of various kinds of capacitors,
36
When there is a potential difference (voltage) across the conductors, a static electric field
develops across the dielectric, causing positive charge to collect on one plate and negative charge
on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized
by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge
on each conductor to the potential difference between them. The capacitance is greatest when
there is a narrow separation between large areas of conductor; hence capacitor conductors are
often called plates, referring to an early means of construction. In practice, the dielectric between
the plates passes a small amount of leakage current and also has an electric field strength limit,
resulting in a breakdown voltage, while the conductors and leads introduce an undesired
inductance and resistance. Capacitors are widely used in electronic circuits for blocking direct
current while allowing alternating current to pass, in filter networks, for smoothing the output of
power supplies, in the resonant circuits that tune radios to particular frequencies, in electric
power transmission systems for stabilizing voltage and power flow, and for many other purposes.
4.2.2 RESISTOR
A resistor is a two-terminal electrical or electronic component that resists the flow of current,
producing a voltage drop between its terminals in accordance with Ohm's law.
R=V/I
The electrical resistance is equal to the voltage drop across the resistor divided by the current
that is flowing through the resistor.
Identifying resistors
Most axial resistors use a pattern of colored stripes to indicate resistance. SMT ones follow a
numerical pattern. Cases are usually brown, blue, or green, though other colors are occasionally
found like dark red or dark gray. 4 band identification is the most commonly used color coding
scheme on all resistors. It consists of four colored bands that are painted around the body of the
resistor. The scheme is simple: The first two numbers are the first two significant digits of the
resistance value, the third is a multiplier, and the fourth is the tolerance of the value. Each color
corresponds to a certain number, shown in the chart below. The tolerance for a 4-band resistor
will be 2%, 5%, or 10%..
37
The Standard EIA Color Code Table per EIA-RS-279 is as follows:
Black 0 0 ×100
White 9 9 ×109
38
Resistors use specific values, which are determined by their tolerance. These values repeat for
every exponent; 6.8, 68, 680, etc. This is useful because the digits, and hence the first two or
three stripes, will always be similar patterns of colors, which make them easier to recognize.
39
CHAPTER 5
SOFTWARE VALIDATION
Once a guideline for a condition has been created, it can be executed to provide stepwise advice
for any patient having that condition.
The Proteus guidelines are created with modular entities called Knowledge Components (KCs).
Each KC represents a clinical activity and is available to the clinician as a module of executable
knowledge with its own intelligence.
Proteus is an ambitious approach with a potential to touch many aspects of healthcare. Several
prototype software tools developed have validated the core features of the Proteus approach. The
experience of development carried out to date suggests that a more exhaustive implementation be
created and tested with healthcare professionals.
▪ An optimizing assembler
▪ Includes support for 24-bit and 32-bit IEEE floating point and 32-bit long data types
40
▪ Unlimited number of source files
You can compile, assemble and link your embedded application with a single step. Optionally,
the compiler may be run directly from the command line, allowing you to compile, assemble and
link using one command. This enables the compiler to be integrated into third party development
environments, such as Microchip's MPLAB IDE.
5.3.1 Assembler
• Speed: Assembly language programs are generally the fastest programs around.
• Capability: You can do things in assembly, which are difficult or impossible in High-level
languages.
41
5.3.2 Simulator
Simulator is a machine that simulates an environment for the purpose of training or research.
5.3.3 Compiler
A compiler is a program that reads a program in one language, the source language and translates
into a equivalent program in another language, the target.
5.4 CODING
Config Lcd = 16 * 2
Config Lcdpin = Pin, Db4 = P2.4, Db5 = P2.5, Db6 = P2.6, Db7 = P2.7, E = P2.3, Rs = P2.2
$crystal = 11059200
$baud = 9600
$timeout
Dim C1 As Word
Dim I As String * 4
Dim Tm As Integer
C1 = 1000
Do
Do
If P3.2 = 0 Then
Bal = Bal – 1
Gosub Bal
42
End If
Do
Tm = Len(i)
Loop Until Tm = 4
If I = "1111" Then
Gosub R1
End If
If I = "1234" Then
Cls
Gosub R2
End If
Loop
R1:
C1 = C1 - 100
Cls
Waitms 400
Lowerline
43
Lcd "c1 amount=" ; C1
Wait 1
Return
R2:
C1 = C1 - 100
Cls
Waitms 600
Lowerline
Wait 1
Cls
Return
Bal:
Cls
If Bal = 0 Then
P0.1 = 0
Cls
44
Waitms 400
Lowerline
Wait 1
Else
P0.1 = 1
End If
Return
45
46
5.6 SNAP OF WORKING MODEL PROJECT
47
CHAPTER 6
CONLUSION AND FUTURE WORK
Prepaid energy meter with tariff indicator is a concept to minimize the Electricity theft with a
cost efficient manner.This output is then calculated in the micro-controller and displayed on the
LCD and based on the amount of power consumed, micro controller calculates the units used and
compares it with the recharged amount. Based on this the relay operation takes place.
We are successfully able to get the output of the Energy meter and also the relay operation is
successfully done based on the microcontroller programmed circuit. Also, we have designed a
numeric keypad and a card programmer circuit with which we are able to program the smart card.
The users are not bound to pay excesses amount of money, users have to pay according to their
requirement. It can reduce problem associated with billing consumer living in isolated area and
reduces deployment of manpower for taking meter
readings. Prepaid energy meter with tariff indicator is more reliable and user friendly.
REFERENCES
• www.datasheets4u.com
• www.8051.com
• www.google.com
• www.primegroupindia.com
• www.indianengineer.wordpress.com
• www.wikipedia.org
• http://proteme.org/
48