rfid project
Post on 30-May-2018
216 Views
Preview:
TRANSCRIPT
-
8/9/2019 RFID Project
1/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
1.1 INTRODUCTION:
In recent years, Indian power sector is facing serious problems in terms of lean revenue
collection in lieu of energy supplied and increasing energy requirements. All the steps
taken so far, regarding the improvement of the power scenario, are concerning the human
factor of the system but the metering and meter-reading system has to improve if revenue
collection is to be increased.
Electronic energy meters are replacing traditional electromechanical meters in
many residential, commercial and industrial applications because of the versatility and
low-cost afforded by electronic meter designs. In addition to that an electronic design can
protect against meter tampering and theft of service. An electronic energy meter can also
enable automatic meter reading (AMR), where energy metering data is transmitted to the
utility over an RF, power line or even infrared communications link. Improved accuracy
and lower power consumption are other benefits of electronic metering. With a
mechanical meter, the error in the basic energy usage measurement is on the order of 1%.
But with an electronic implementation, it is possible to reduce that error to less than
0.1%. Moreover, running the mechanical meter with its continuously spinning dial may
require hundreds of milliamps where as that power consumption can be reduced to a
couple milliamps in an electronic energy meter, producing big power savings for the
utility. Electronic meter designs also change the economics of manufacturing energy
meters. A single hardware design may be customized for different customers and markets
through changes in software. In addition, calibrating the finished meter is much easier
with an electronic meter design. Another consideration is the demand for mechanical-
meter replacements that are as inexpensive as possible. In parts of the developing world
where many new customers are being connected to the grid, the low cost of the electronic
meter is its main attraction.Electrical energy is measured by means of energy meter (watt-hour meter).
Energy meter is an integrating instrument and takes in to account both of the quantities
i.e. Power and time the product of which gives energy. Traditional energy monitoring
system is done through electromechanical energy meter installed in the premises of
customer. This present system is not to expected satisfaction to the energy supplying
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
1
-
8/9/2019 RFID Project
2/72
-
8/9/2019 RFID Project
3/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Applications VEMS is an intelligent solution to the revenue crisis and energy thefts
prevalent in Indian power sector. Technical advances in metering technology and the use
of information technology will result in enhanced efficiency, revenues, and better
management and customer services. It will also facilitate load forecasting and control,
identify potential areas of theft, losses and take measures to rectify it.
S.A. Al-Qatari and A.R. Nu-Ali [4] discuss about Microcontroller based
automated billing system they present digital energy modules equipped with credit card
reading capability and charge automatically. Also, all service metering modules are
facilitated with an automatic service connection and disconnection based on the available
credit. The software structure commands the whole process via the microcontroller
input/output ports.
I.Hakki Cavdar [5] identifies illegal electricity usage and present a paper on A
Solution to Remote Detection of Illegal Electricity Usage via Power Line
Communications where AMR system via PLC is set in a power delivery
system, a detection system for illegal electricity usage may be easily
added in the existing PLC network. In the detection system, the second
digitally energy meter chip is used and the value of energy is stored.
The recorded energy is compared with the value at the main kilowatt-
hour meter. In the case of the difference between two recorded energydata, an error signal is generated and transmitted via PLC network.
STATEMENT OF THE PROBLEM
1. Tradition energy monitoring system is done by electromechanical energy meter
where the consumer manipulate the meter to cause it under register or even run
backwards and in some cases tampering techniques will be employed like
breaking the housing , jamming the mechanism and bypassing the energy meter
to effectively use electric energy.
2. In this busy world consumer has to wait in a long queue to pay the electricity bill.
3. There is no protection to our house hold electrical equipment as well as our life
due to over load and over voltage condition respectively.
4. Automated meter reading is not available in present mechanical energy meter
which could convey theft message to power supplying authority.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
3
-
8/9/2019 RFID Project
4/72
-
8/9/2019 RFID Project
5/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
2.1 Block Diagram:
EMBED PBrush
Fig.2.1 Block diagram of embedded prepaid energy meter
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
5
-
8/9/2019 RFID Project
6/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
2.2 OPERATION:
The brief description and block diagram of the project is explained as below. The total
block diagram is divided in to various blocks as indicated below.
1. Microcontroller
2. Power supply unit
3. Keypad
4. Digital Display
5. RS 232 serial interface
6. Over voltage, under voltage and over load protection7. Theft detection and Isolation
Microcontroller
In this project work the micro controller part plays a major role, which is used to
read and store the data received from the Keypad. According to the received information,
the micro controller displays the consumable energy and at the same time energizes the
relay. In this project Micro-controller unit is constructed with PIC 16F877 Micro-
controller chip. The PIC 16F877 is a low power, higher performance CMOS 8-bit
microcomputer with 8K bytes of flash programmable and erasable read only memory
(EEPROM).All this provides highly flexible and cost effective solution to control
applications.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
6
-
8/9/2019 RFID Project
7/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Micro-controller works according to the program written in it. The program is
written in such a way, so that the controller output is used to drive the display as well as
relay and alarm.
Micro-controllers are "embedded" inside some other device so that they can
control the features or actions of the product. Another name for a micro-controller is
"embedded controller". Micro-controllers are dedicated to one task and run one specific
program. The program is stored in ROM (read-only memory) and generally does not
change.
Micro-controllers are often low-power devices. A battery-operated Micro
controller might consume 50 milli watts. A micro-controller also takes input from the
device it is controlling and controls the device by sending signals to different componentsin the device.
Power supply unit
This power supply section will provide different DC voltages required for
different section of circuit. This unit converts the available 230volts AC to
required DC voltage level with help of transformer and filtering circuit. Since
Microcontroller operates with +5volts, and that of relay unit with 12 volts we
have developed that required voltage level. Filtering is done through electrolytic
capacitor and R.F interference can be avoided using 0.1f capacitor. To avoid
change in output due to changes in the input we are using regulated I.C.
RFID Module : This is radio frequency identity module which can identify the
amount specified in the smart card and transfers the coded information to
Microcontroller.It is a wireless system with a small range .
Digital Display:
Digital display is constructed using 7-segment common cathode unit. This is a
dynamic display or time multiplexed display that means each display unit will
display one after the other for 20msec but out eye cannot recognize it, so it looks
like ON for all period. Sinking unit (ULN 2003) is used with 7 segment common
cathode unit.
Over voltage, under voltage and over load protection:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
7
-
8/9/2019 RFID Project
8/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
When the voltage variation is beyond the working range the equipments
connected may get damaged. To solve this problem we have provided this a
solution in this unit by cutting of the supply. Where predetermined voltage levels
are set by software or hardware.
Every device will have specific handling capacity which is in the range of few
milliamps to few amps. When the current flow through these devices exceeds the
maximum current capacity the device will damage immediately. This condition
may damage other circuitry & supporting units. Hence we are using this unit
which is going to measure current flow & switches off the load during overload
conditions.
It consists of current transformer which develops secondary voltage which
is proportional to load current which is then rectified, filtered & scaled before
connecting to analog input of microcontroller. Microcontroller will select this
analog input & converts it into digital value by using internal ADC. This digital
value is compared with the standard reference value to take decision about normal
or overload condition. If load current is abnormal the relay will turn off the load
& provides overload protection.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
8
-
8/9/2019 RFID Project
9/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
3.1 Power supply unit:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
9
-
8/9/2019 RFID Project
10/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Fig.3.1 Power Supply Unit
The Power Supply Section is used to provide different DC voltages to different
sections of circuit. In our project we have design power supply to give +5v regulated
voltage at the output and also +12v and 12v regulated voltage at the output.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
10
-
8/9/2019 RFID Project
11/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
We are converting the 230v AC into required DC voltage. We have a step down
transformer at the input. The Switch controls the ON and OFF condition of the power
supply. The fuse of 1 Ampere safeguards the power supply for over current flow theoutput voltage at the secondary of the transformer is 9v as shown in the circuit. This
AC voltage is given to rectifier circuit constructed by using bridge rectifier.
Electrolytic capacitor of 1000 mf is used as filter to give pure DC. The advantages offull wave rectifier are low ripple factor (0.48) high ratio of rectification (0.812) and
peak inverse voltage (PIV=Vm) the output of rectifier is given to capacitor filter
polarity. This smoothens the rectified voltage and gives pure DC.
The output of the filter is a pure DC but unregulated. The output voltage changes withvariations in Input voltage and load current. To obtain the regulated output voltage we
are using 3 pin IC voltage regulators. We have used 7805 fixed positive voltage
regulator to give +5v and other ICs are 7812 and 7912 voltage regulators to give+12v and 12v respectively. These regulators are provided with built in heat sink and
have internal circuitry to provide short circuit protection. The regulator output is
connected to output terminal as shown to indicate the presence of voltage at output
terminals we have connected a LED.
Power supply unit voltage is present. We have connected a 0.1 f capacitor acrossthe output terminals to suppress the effect of RF interference
3.2 LIQUID CRYSTAL DISPLAY (LCD):
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
11
-
8/9/2019 RFID Project
12/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
The LCD panel used in this block interfaced with micro-controller through the
output port. This is a 16 character x 3Line LCD module, capable of display
numbers, characters, and graphics. The display contains two internal byte-wide
registers, one for commands (RS=0) and the second for characters to be
displayed (RS=1). It also contains a user. Programmed RAM area (the
character RAM) that can be programmed to generate any desired character that
can be formed using a dot matrix. To distinguish between these two data areas,
the hex command byte 80 will be used to signify that the display RAM address
00h is chosen.
LCDs can add a lot to your application in terms of providing a useful interface for theuser, debugging an application or just giving it a "professional" look. The most common
type of LCD controller is the Hitachi 44780 which provides a relatively simple interfacebetween a processor and an LCD. Using this interface is often not attempted by
inexperienced designers and programmers because it is difficult to find good
documentation on the interface, initializing the interface can be a problem and thedisplays themselves are expensive.
Connection to a standard PC parallel port is mostly simple. Those displays can handle
eight bit input directly. They also need two extra lines to control which kind of data has
just arrived and when the data is meant to be stable. Those signals are called RS(Register
Select, i.e. instruction or data register) and EN(enable).
So we have to connect ten data lines (8 bits + RS + EN) and one common ground (GND)
line, which makes eleven lines to the parallel port. Data read back is not supported by the
driver and so we do not need extra lines for this.
The follwing table shows the needed connections:
25 pin par.port function LCD pin Function
1 STROBE 6 EN
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
12
-
8/9/2019 RFID Project
13/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
2 Data 0 8 D0
3 Data 1 9 D1
4 Data 2 10 D2
5 Data 3 11 D3
6 Data 4 12 D4
7 Data 5 13 D5
8 Data 6 14 D6
9 Data 7 15 D7
14 Feed 4 RS
18-25 GND 1 GND
And since we only want to write data another connection is required. Make a permanent
connection from GND to pin 5 of the LCD module.
That's it! You may also want to connect the displays power supply pins (1 = GND, 3 =
+5V) to your gameport or your favourite +5V source.
This discription is only valid for my version of LCD display module! I will not be
responsible for any damage you might do to your display, your computer or anything ifyour display is wired in another way. Please consult your databook, datasheet or the
LCD-module-FAQ for more information.
But anyway the above information should be correct for most display modules.
Block Diagram:
Fig.3.2 Block diagram of LCD Display
3.3 Key Pad Unit:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
13
Microcon
troller
ParallelPort
-
8/9/2019 RFID Project
14/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Fig.3.3.1 Key Pad Unit
Embedded systems which require user interaction must interface with devices that accept
user input (such as a keypad, bar code reader, or smart card acceptor), as well as devicesthat display information to the user (such as LED or LCD displays).
Figure above shows 44 Key pad interface to PIC 16F877 Microcontroller. In this 4 lines
of Port D is used as scan lines i.e., RD0-RD3 and remaining 4 lines are used as return
lines i.e., RD4-RD7. If no key is pressed in active scan row the return lines will be zero.
The scanning is repeated for all the rows sequentially. When scanning of all lines is
complete its start scanning the first row and repeats the operation until key depression is
found.
When any key is pressed the corresponding return line will have a high state and other
lines are zero. This is checked by scanning routine and identifies the pre determined key
position.
Block Diagram:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
14
-
8/9/2019 RFID Project
15/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Fig.3.3.2 Block diagram
Fig.3.3.3
3.4 Darlington Amplifier: -
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
15
Micro
controller
ParallelPort
-
8/9/2019 RFID Project
16/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
It is the name given to a pair of similar transistors so connected that emitter of one
is directly joined to the base of the other. These two transistors are mounted in a single
package that as only three leads normally as shown below-
1. Base. 2. Emitter. 3. Collector.
Fig.3.4 Darlington Amplifier
It forms a double collector stage in multistage amplifiers. It is so because a
Darlington connection can be considered equivalent to two cascaded emitter followers. In
our project we have TIP 127 IC as Darlington amplifier. It has two pins [base, collector &
emitter] and provide with built in heat sink. We have added an external heat sink with
pins to dissipate more heat easily. The Darlington transistor is used to drive the coils of
stepper motor.
The buffer supplies base current to transistor Q1 (which is equal to collector current)
becomes vase current of Q2 and is amplified by the current gain of Q2. The result of all
this is that the device acts likes a single transistor with a current gain ( of Q1 x of
Q2) and base to emitter voltage of about 1.4v. The internal resistors help in turning off
the transistors. We have used TIP 127 in our project that has a minimum of 1000 at
1Amp. If we assume 600mA as load current, then the constant base current must be
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
16
-
8/9/2019 RFID Project
17/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
supplied by the buffer is only 0.6mA, which it can easily do. If the drive current required
for the Darlington is too high for the output. You can add a resistor from the transistor
base to +5v to supply added current.
. The Darlington pair is most often used in an emitter follower configuration
because of the excellent buffering it provides between a high impedance source and
low load impedance load.
ADVANTAGES OF THE DARLINGTON AMPLIFIER:
It can be formed from two adjacent transistors in an IC.
It has enormous impedance transformation capability.
It can transform a low impedance load in to a high impedance load. Hence, it is
used in a high gain OP-AMP that depends on very high input impedance.
3.5 Buzzer:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
17
-
8/9/2019 RFID Project
18/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
The buzzer subsystem produces a 2 KHz audible tone when powered. The
buzzer will sound when the signal coming into the driver is high. It must be
connected to a transistor, Darlington ortransducerdriver subsystem.
The buzzer is connected between the supply rail (+ V) and the input
signal. This acts as load on the driver. When the input signal coming into the
buzzer subsystem is low, a potentialdifference across the buzzer causes current
to flow. It is this flow of current that causes the buzzer to sound.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
18
http://www.marconiect.org/display.php?document_id=84http://www.marconiect.org/display.php?document_id=20http://www.marconiect.org/display.php?document_id=85http://www.marconiect.org/display.php?document_id=84http://www.marconiect.org/display.php?document_id=20http://www.marconiect.org/display.php?document_id=85 -
8/9/2019 RFID Project
19/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
19
-
8/9/2019 RFID Project
20/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
3.6 Relays:
A relay is an electrical switch that opens and closes under control of another
electrical circuit. In the original form, the switch is operated by an electromagnet to open
or close one or many sets of contacts.. a relay is able to control an output circuit of higher
power than the input circuit, it can be considered, in a broad sense, to be a form of
electrical amplifier.
These contacts can be either Normally Open (NO), Normally Closed (NC), or change-
over contacts.
Normally-open contacts connect the circuit when the relay is activated; the circuit
is disconnected when the relay is inactive. It is also called Form A Contact Or "Make"
Contact. Form A contact is ideal for applications that require to switch a high-current
power source from a remote device.
Normally-closed contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called Form B Contact Or
"Break" Contact. Form B contact is ideal for applications that require the circuit to
remain closed until the relay is activated.
Change-over contacts control two circuits: one normally-open contact and one
normally-closed contact with a common terminal. It is also called Form C Contact.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
20
http://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Amplifierhttp://en.wikipedia.org/wiki/Switchhttp://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Amplifier -
8/9/2019 RFID Project
21/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
OPERATION:
Fig.3.6.1
Relay unit
When a current flows through the coil, the resulting magnetic field attracts an
armature that is mechanically linked to a moving contact. The movement either makes or
breaks a connection with a fixed contact. When the current to the coil is switched off, the
armature is returned by a force that is half as strong as the magnetic force to its relaxed
position. Usually this is a spring, but gravity is also used commonly in industrial motor
starters. The magnetic flux in the armature induces a current in opposition to the current
provided to the coil called 'back emf'. There is a rush of current to operate the coil and
move the contacts, but once the armature is closed, the current required to hold the
armature closed is a small fraction of that, typically a tenth. Relays are manufactured to
operate quickly. In a low voltage application, this is to reduce noise. In a high voltage or
high current application, this is to reduce arcing.
If the coil is energized with DC current, regardless of the current through the
contacts, a diode is generally installed across the coil. When the coil is energized, a
magnetic field is established. When the coil is de-energized, the collapsing magnetic field
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
21
http://en.wikipedia.org/wiki/Current_(electricity)http://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Spring_(device)http://en.wikipedia.org/wiki/Current_(electricity)http://en.wikipedia.org/wiki/Coilhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Spring_(device) -
8/9/2019 RFID Project
22/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
will generate a spike of current that could damage the rest of the circuit. If the coil is
energized with AC current, a small copper ring is crimped to the end of the solenoid.
Alternating current is at zero volts 120 times a second. At zero volts, there's no magnetic
force holding the contacts closed. The small copper ring provides a small out of phase
current called a shadow pole. The sum of the AC current and the shadow pole keeps the
armature engaged at all times.
Relays are used:
To control a high-voltage circuit with a low-voltage signal, as in some types of
modems,
To control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile,
To detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays),
To isolate the controlling circuit from the controlled circuit when the two are at
different potentials, for example when controlling a mains-powered device from a
low-voltage switch
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
22
http://en.wikipedia.org/wiki/Current_(electricity)http://en.wikipedia.org/wiki/Current_(electricity) -
8/9/2019 RFID Project
23/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Relay circuit:
Relay circuit is used to activate the relay through microcontroller. In this circuit we
have to use a Darlington transistor (Tip122) for switch on the relay. The relay is an
electromagnetic device which energies when the supply is given. In this circuit, relay is
working in the positive logic. That means when the microcontroller gives high to the relay
circuit the Darlington transistor is switched on and also the relay is ON. When themicrocontroller gives low to the relay circuit the Darlington transistor is switched off and
also the relay is OFF. The two diodes are used for protecting t
he microcontroller from the load due to back EMF and EMI problems.
Fig.3.6.2 Circuit Diagram
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
23
-
8/9/2019 RFID Project
24/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
3.7 MICRO SWITCH:
A micro switch is a generic term used to refer to an electric switch that is able tobe actuated by very little physical force. They are very common due to their low cost and
extreme durability, typically greater than 1 million cycles and up to 10 million cycles for
heavy duty models. This durability is a natural consequence of the design. Internally a
stiff metal strip must be bent to activate the switch. This produces a very distinctive
clicking sound and a very crisp feel. When pressure is removed the metal strip springs
back to its original state. Common applications of micro switches include computer
mouse buttons and arcade game's joysticks and buttons. Micro switches are commonly
used in tamper switches on gate valves on fire sprinkler systems and other water pipe
systems, where it is necessary to know if a valve has been opened or shut. They have also
been used as anti-handling devices in booby trapped improvised explosive devices
manufactured by paramilitary groups.
The defining feature of micro switches is that a relatively small movement at the
actuator button produces a relative large movement at the electrical contacts, which
occurs at high speed (regardless of the speed of actuation). Most successful designs also
exhibit hysteresis, meaning that a small reversal of the actuator is insufficient to reverse
the contacts; there must be a significant movement in the opposite direction. Both of
these characteristics help to achieve a clean and reliable interruption to the switched
circuit.
The first micro switch was invented by Peter McGall in 1932 in Freeport, Illinois.
McGall was an employee of the Burgess Battery Company at the time. In 1937 he started
the company MICRO SWITCH, which still exists as of 2005. It is now owned by
Honeywell Sensing and Control.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
24
-
8/9/2019 RFID Project
25/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
25
-
8/9/2019 RFID Project
26/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
4.1 PIN CONFIGURATON OF PIC 16F874/7
4.0. Architecture of the PIC16F877 microcontroller
4.1. Overview of the File Registers
4.2. Overview of the 8-channel 10-bit ADC
4.3. Overview of the Hardware USART
4.3.1 Baud-Rate Generator, BRG
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
26
http://website.lineone.net/~colin_mccord/FYP/4.htm#4.0http://website.lineone.net/~colin_mccord/FYP/4.htm#4.1http://website.lineone.net/~colin_mccord/FYP/4.htm#4.2http://website.lineone.net/~colin_mccord/FYP/4.htm#4.3http://website.lineone.net/~colin_mccord/FYP/4.htm#4.3.1http://website.lineone.net/~colin_mccord/FYP/4.htm#4.0http://website.lineone.net/~colin_mccord/FYP/4.htm#4.0http://website.lineone.net/~colin_mccord/FYP/4.htm#4.1http://website.lineone.net/~colin_mccord/FYP/4.htm#4.2http://website.lineone.net/~colin_mccord/FYP/4.htm#4.3http://website.lineone.net/~colin_mccord/FYP/4.htm#4.3.1 -
8/9/2019 RFID Project
27/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Figure 4.1: PIC16F877 microcontroller [W9]
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
27
-
8/9/2019 RFID Project
28/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
The PIC16F877 is a high-performance FLASH microcontroller that providesengineers with the highest design flexibility possible. In addition to 8192x14words of FLASH program memory, 256 data memory bytes, and 368 bytes of
user RAM, PIC16F877 also features an integrated 8-channel 10-bit Analogue-to-Digital converter. Peripherals include two 8-bit timers, one 16-bit timer, aWatchdog timer, Brown-Out-Reset (BOR), In-Circuit-Serial Programming, RS-485 type UART for multi-drop data acquisition applications, and I2C or SPIcommunications capability for peripheral expansion. Precision timing interfacesare accommodated through two CCP modules and two PWM modules. [W3]
Overview of the File Registers
The data memory is partitioned into multiple banks which contain the generalpurpose registers and the special function registers. Bits RP1 and RP0 are the
bank select bits, these bits are found in the STATUS register (b6 & b5).
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
28
-
8/9/2019 RFID Project
29/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Figure 4.1a. PIC16F877 register file map
Each bank extends up to 7Fh (128 bytes). The lower locations of each bank are
reserved for the special function registers (shown in yellow). Above the specialfunction registers are general purpose registers (shown in blue), implemented asstatic RAM. All implemented banks contain special function registers. Some highuse special function registers from one bank may be mirrored in another bankfor code reduction and quicker access. Also notice that there are 16 generalpurpose global registers (shown in green), these registers can be accessed fromany bank.
Overview of the 8-Channel 10-bit ADC
At first it appears that the PIC16F877 has 8 built-in ADCs, but this is not the
case. Figure 4.2a shows a simplified block diagram of the analogue-to-digitalconverter module, clearly there is only one 10-bit ADC which can be connectedto only one of eight input pins at any one time.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
29
-
8/9/2019 RFID Project
30/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Figure 4.2a. Simplified block diagram of the PIC16F877 ADC module
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
30
-
8/9/2019 RFID Project
31/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
The input analogue channels AN4..0 are shared with port A, and channelsAN7..5 are shard with port E. If less than eight analogue channels are requiredthen some of the pins can be assigned as digital I/O port lines using PCFG3..0
bits (see datasheet). For example, if PCFG3..0 = 0010 then AN4..0 areconfigured as analogue inputs, while AN7..5 are digital (port E free), with VDDused as the reference.
On reset all pins are set to accept analogue signals. Pins that are reconfiguredas digital I/O should never be connected to an analogue signal. Such voltagemay bias the digital input buffer into its linear range and the resulting largecurrent could cause irreversible damage.[B3]
The 10-bit ADC uses a technique know as successive approximation, thefollowing mechanical analogy will help explain how it works. Suppose there is an
unknown weight, a balance scale and a set of precision known weights 1, 2, 4and 8 grams. A systemic technique can be used to calculate the unknownweight.
Place the 8g weight on the pan and remove if it is too heavy. Next place the 4gweight on the pan and remove if it is too heavy. Next place the 2g weight on thepan and remove if it is too heavy. Next place the 1g weight on the pan andremove if it is too heavy. The sum of the weights still on the pan yields thenearest lower value of the unknown weight. This is illustrated in figures 4.2b to4.2g.
Figure 4.2b. Unknown weight placed on the scales Figure 4.2c. 8g weight placed on the pan, not too heavy
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
31
-
8/9/2019 RFID Project
32/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Figure4.2d. 4g weight placed on thepan, Figure 4.2e. 2gweightplaced on the pan, not too heavytoo heavy (remove)
Figure 4.2f. 1g weight placed on the pan, Figure 4.2g. Unknown weight is about 10g (1010)too heavy (remove)
The electronic equivalent to this successive approximation technique uses anetwork of precision capacitors configured to allow consecutive halving of a fixedvoltage VREF to be switched in to an analogue comparator, which acts as thebalance scale.
Generally the network of capacitors are valued in powers of two to subdivide the
analogue reference voltage (e.g. 1,2,4,8,16, etc). This sampling acquisitionprocess takes a finite time due to the charging time constant and is specified inthe datasheet as 19.72S.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
32
-
8/9/2019 RFID Project
33/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Overview of the Hardware USART
The Universal Synchronous Asynchronous Receiver Transmitter (USART)
module is one of the two serial I/O modules. The USART can be configured forasynchronous operation (UART) for communication with a PC or synchronousoperation for communicating with peripheral devices such as DAC or DACintegrated circuit.
Note bit SPEN (RCSTA:7) and bits TRISC:7..6 have to be set in order toconfigure pin PC6/TX/CK and RC7/RX/DT for USART operation. CSS (Ccompiler) will automatically configure these bits, but it is important to be awarethat if using fast_io(C) mode to manually configure port C, bits 7 & 6 must also bemanually set if using the hardware UART.
Baud-Rate Generator, BRG
This is basically a programmable 8-bit counter followed by a switchable
frequency flip flop chain which can be set up to give the appropriate samplingand shifting rates for the desired baud rate, based on the PICs crystal frequencyXTAL (e.g. for 20MHz, XTAL = 20) giving: -
{4.3.1.1}
{4.3.1.2}
{4.3.1.3}
It may be advantageous to use the high baud rate (BRGH = 1) even for slowerbaud clocks as this may reduce baud rate error in some cases.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
33
-
8/9/2019 RFID Project
34/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
ADVANTAGES OF MICRO CONTROLLER:
Micro controller based system require less hard ware pcb size and cost is
less. Access time of on chip memory is less so speed of operation is more.
Less flexible.
Hard ware requirement is less.
More number of pins are multifunctional.
More number of bit handling instruction.
Less number of instruction refers to memory.
It consists of I/O ports, Memory,Timmer,Counter along with microprocessor circuit.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
34
-
8/9/2019 RFID Project
35/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
5.1 Circuit Diagram:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
35
-
8/9/2019 RFID Project
36/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
5.2 Circuit operation:
Analog signals obtained form C.T and P.T are connected to RA0 and RA1. These
voltages are proportional to AC mains voltage and the load current. This voltage is scaled
in such a way that the analog value will not exceed +5volts since this is the maximum
voltage microcontroller can handle. We have connected a zener diode of 5.1volts across
the preset so that even if the analog voltage increases the zener diode will not conduct
beyond 5.1v and thus protect the Microcontroller chip from damage. These analog
voltages are connected to mux. The channel select lines will select only one analog input
at a time and transfers analog voltage to input of 10 bit successive approximation ADC.
The channel number is selected in ADCONO register. Start of conversion is sent on GO
bit of ADCONO to start conversion process. When the conversion is complete this line
GO/DONE becomes zero and transfers the digital value in ADRES register CONVO this
value is saved in to data memory for processing.
The same operation is done for second analog input also by selecting channel lines. The
digital values are stored in to data memory CONV1 for further processing. The value
present in CONVO register is compared with pre determined min-max value to check for
under voltage and over voltage condition. If the digital value is below the minimum orbeyond the Max it indicates under voltage and over voltage indicator. The value of
CONV1 is checked for reference value which indicates Max load current if the value of
CONV1 exceeds this Max limit it indicates the overload condition.
The values of CONV0 and CONV1 indicate the voltage and current.
These values are processed by the software to calculate the energy consumed by the user
at that instant of time as the values of CONV0 and CONV1 changes the amount of
energy consumed will also change and indicate the same in display unit.
The key pad interfaced to microcontroller consisting of 16 keys, this is used for
recharging process.. In this 4 lines of Port D is used as scan lines i.e., RD0-RD3 and
remaining 4 lines are used as return lines i.e., RD4-RD7.This keyboard is designed so as
to form a matrix of rows and columns. When a key is pressed the contact gets closed and
generates a high signal to the controller. Finally, it is the function of the microcontroller
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
36
-
8/9/2019 RFID Project
37/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
to scan the keyboard continuously to detect and identify the key pressed.When a key is
pressed in the keypad the software will scan the key code & store the corresponding
value into register file of RAM. This value indicates the character to be printed.
Depending on the inputted character microcontroller will issue binary combination to
stepper motors for printing the character is specified by the keypad entry. 4X4 keypad is
used to enter the pass word & other details of the alphanumeric character . It consists of
16 push to on switches.
We are using 16f877 microcontroller in our project. We are using port A as input
port, Rc4-Rc7 as input ports. Port B, Rc0-Rc3 and port D lines are used as output ports.
The driving capability of each port is 25mA.we can use each pin of each port as either
input port or output port. It also has watchdog timer, power up timer, power on
reset,oscillator,start up timer,ICD(in circuit debugger),LVP(low voltage
programming),three timers, the CCP(compare,capture&PWM
modules),EEPROM,8kX14 program memory,368 byte data memory, parallel slave port
etc.
We are using power supply unit constructed by using 12-0-12, 1A transformer.
The secondary voltage is applied to rectifier to convert AC to DC and then applied to
capacitor filter to get pure DC. This unregulated 12 volts DC voltage is connected to
relay circuit.The unregulated voltage is given to 7805 regulator IC to get +5v respectively
from the power supply unit. These voltages are applied to microcontroller,
buffer,relay,display driver & other circuitry as shown in circuit diagram
The software of our project will perform the entire operation one after
the other. This software is designed by using a window based software
microprocessor lab (MPLAB) and stored in to program memory of
microcontroller using programmer. This software can be modified easily to
suit the demands of the system.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
37
-
8/9/2019 RFID Project
38/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
CURRENT TRANSFORMER (C.T):
Input turns =9 Turns, Gauge =18 S.W.G
Secondary =228 Turns, Gauge =32 S.W.G, Shell type
Maximum Input Current=10 A.
Current Transformer is connected in series to the lines. It is used to transform the high
current of a power line to a lower value of suitable voltage. The Primary winding has less
number of turns, which is constructed by using thick conductor to handle more current
and secondary winding is made of thin conductor with more number of turns.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
38
-
8/9/2019 RFID Project
39/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
Initialize the Scratch CardNumber
Initialize Counters and Data
Check For Over Voltage
Start
Initialize GPRS & SFRS
Display
ADC Routine
IsVoltage
>240vDisplay High
Voltage
Voltage OK
39
-
8/9/2019 RFID Project
40/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
40
Turn on Buzzer &Turn off Load
Delay
Delay
Enter Scratch Card Number
Check Whether CardNumber Is Valid Or Not
Is CardNumber Valid
Display Not A ValidNumber
Display a ValidNumber
Display Amount OfPower Which Can Be
Utilized
Turn On Load
Measure thePower Consumed
DisplayEnergy Consumed
-
8/9/2019 RFID Project
41/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
No
Yes
No
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
41
Display over Load
Is LoadCurrent
MaximumValue
Delay
Compare the LoadCurrent
Turn on Buzzer
Turn Off Load
Load Current OK
Is MoreThan TenUnits
-
8/9/2019 RFID Project
42/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
Display Ten UnitsRemaining and
Request ToRecharge
Is 00Units
42
DisplayValidity Over
Turn On Buzzer &Turn Off Load
Delay
-
8/9/2019 RFID Project
43/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
DELAY SUBROUTINE:
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
43
NO
Star
t
Is
Z=1
Clear watchdog timer initialize
temp register with 02
Initialize Step register with 10
Initialize FMS with Count
Is Z=1
Decrement temp by one and check for zero
Decrement step by one and check for zero
Is
Z=1
Return
YES
YES
NO
Decrement FMS by 1 check for zero result
Call monitor program to generate specific delay
NO
YES
-
8/9/2019 RFID Project
44/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
A D C ROUTINE
6.2 PROGRAMS
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
44
YES
Star
t
Configure Port A pins as analog Input pins
Select A/D input channel and turn on ADC
Select A/D Conversion clock
Issue start of conversion on GO bit and ADCONO
Wait for Conversion
Check for end of conversion by polling GO/DONE for zero
Isconversion
complete
Return
Read A/D result register for converted data memory
Save the contents into data memory
NO
-
8/9/2019 RFID Project
45/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
;project :pic based theft control system;Timebase:Crystal;Frequency:4 Mhz;device used : 16F877
;oscillator :xt;Watchdog :On
;------------------------------------------------
title" pic based theft control system"list p=16F877
;-----------------------------------------------timing EQU 01htmr0 equ 01h
pcl equ 02hstatus equ 03hfsr equ 04hporta equ 05hportb equ 06hportc equ 07hportd equ 08hporte equ 09hADCON1 equ 9fhADCON0 equ 1fh;---------------------------------------------------------
ram registersregreg1reg2tempdeldigitcountflags
msecondthridelytenhighermsblsblower
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
45
-
8/9/2019 RFID Project
46/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
convconv1high3high4high2
high1stepstep1stdeltdelnstep1estep1
;------------------------------------------------
org 00hgoto begin
begin;---------------------------------------------------------
clrf portaclrf portbclrf portcclrf portdclrf porte
goto start
seglut addwf pcl,1retlw 0b7hretlw 014hretlw 073hretlw 076hretlw 0d4hretlw 0e6hretlw 0e7hretlw 034h
retlw 0f7hretlw 0f6hretlw 00h
start
bsf status,5 ;select bank 1movlw 03fh ;port A < 0:4 > output
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
46
-
8/9/2019 RFID Project
47/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movwf porta ;configure port Amovlw 00h ;port B < 0: 7 > outputmovwf portb ;configure port Bmovlw 00hmovwf portc
movlw 00hmovwf portdmovlw 00hmovwf portebcf status,5
;-------------------------------------------movlw 0fhmovwf high4movlw 0ahmovwf high3
movlw 015hmovwf high2movlw 0ahmovwf high1movlw 01hmovwf msbmovlw 0ahmovwf lsbcall displaycall onesec ;delaymovlw 016h
movwf high4movlw 00hmovwf high3movlw 05hmovwf high2movlw 0dhmovwf high1movlw 01hmovwf msbmovlw 0ahmovwf lsb
call displaycall onesec
;1--------------------------------------------------------------see1; call onesec
movlw 01movwf time1nop
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
47
-
8/9/2019 RFID Project
48/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
nopnopmovlw 01movwf time2nop
nopmovlw 01movwf time3nopnopmovlw 01movwf time4nop
devtop1 movlw 0ehmovwf high4
movlw 0fhmovwf high3movlw 019hmovwf high2movlw 0ahmovwf high1movlw 01hmovwf msbmovlw 0ahmovwf lsbcall display
call onesec ;delaymovlw 00hmovwf high4movlw 019hmovwf high3movlw 0fhmovwf high2movlw 015hmovwf high1movlw 0ahmovwf msb
movlw 0ahmovwf lsbcall displaycall onesecnopnopbtfsc portc,2goto devtop1
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
48
-
8/9/2019 RFID Project
49/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
topp1 nopnopbtfss porta,3call incr1nop
nopbtfss porta,0call decr1nopnopbtfss porta,1goto nextdev2nopnopgoto topp1
incr1 incf time1movlw 0ahcall seglutmovwf high4movwf high3movwf high2movwf high1movwf msbmovf time1,0call convert ;displayreturn
decr1decf time1
movlw 0ahcall seglutmovwf high4movwf high3movwf high2movwf high1movwf msbmovf time1,0
call convert ;displayreturn
;2------------------
nextdev2 movlw 016hmovwf high4movlw 0bhmovwf high3
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
49
-
8/9/2019 RFID Project
50/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movlw 05hmovwf high2movlw 05hmovwf high1movlw 0ah
movwf msbmovlw 0ahmovwf lsbcall displaycall onesec
devtop2 movlw 0ehmovwf high4movlw 0fhmovwf high3
movlw 019hmovwf high2movlw 0ahmovwf high1movlw 02hmovwf msbmovlw 0ahmovwf lsbcall displaycall onesec ;delaymovlw 0ch
movwf high4movlw 014hmovwf high3movlw 00hmovwf high2movlw 015hmovwf high1movlw 0ahmovwf msbmovlw 0ahmovwf lsb
call displaycall onesecnopnopbtfsc porta,2goto devtop2
topp2 btfss porta,3call incr2
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
50
-
8/9/2019 RFID Project
51/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
btfss porta,0call decr2btfss porta,1goto nextdev3goto topp2
incr2 incf time2movlw 0ahcall seglutmovwf high4movwf high3movwf high2movwf high1movwf msbmovf time2,0call convert ;displayreturn
decr2 decf time2movlw 0ahcall seglutmovwf high4movwf high3movwf high2movwf high1movwf msbmovf time2,0call convert ;displayreturn
;3---------------------------------------nextdev3 movlw 016h
movwf high4movlw 0bhmovwf high3movlw 05hmovwf high2movlw 05hmovwf high1movlw 0ah
movwf msbmovlw 0ahmovwf lsbcall displaycall onesec
devtop3 movlw 0eh
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
51
-
8/9/2019 RFID Project
52/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movwf high4movlw 0fhmovwf high3movlw 019hmovwf high2
movlw 0ahmovwf high1movlw 03hmovwf msbmovlw 0ahmovwf lsbcall displaycall onesec ;delaymovlw 0dhmovwf high4movlw 014h
movwf high3movlw 0fhmovwf high2movlw 0bhmovwf high1movlw 015hmovwf msbmovlw 0ahmovwf lsbcall displaycall onesec
btfsc porta,2goto devtop3
topp3 nopbtfss porta,3call incr3btfss porta,0call decr3btfss porta,1goto nextdev4goto topp3
incr3 nopnopincf time3
nopnopmovlw 0ahcall seglutmovwf high4
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
52
-
8/9/2019 RFID Project
53/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movwf high3movwf high2movwf high1movwf msbmovf time3,0
call convert ;displayreturn
decr3 decf time3movlw 0ahcall seglutmovwf high4movwf high3movwf high2movwf high1movwf msb
movf time3,0call convert ;displayreturn
;4------------------------------------nextdev4 movlw 016h
movwf high4movlw 0bhmovwf high3movlw 05hmovwf high2movlw 05h
movwf high1movlw 0ahmovwf msbmovlw 0ahmovwf lsbcall displaycall onesec
devtop4 movlw 0ehmovwf high4movlw 0fh
movwf high3movlw 019hmovwf high2movlw 0ahmovwf high1movlw 04hmovwf msbmovlw 0ah
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
53
-
8/9/2019 RFID Project
54/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movwf lsbcall displaycall onesec ;delaymovlw 0ehmovwf high4
movlw 017movwf high3movlw 01hmovwf high2movlw 014hmovwf high1movlw 0ahmovwf msbmovlw 0ahmovwf lsbcall display
call onesecnopnopbtfsc porta,2goto devtop4
topp4 nopnopbtfss porta,3call incr4nopnop
btfss porta,0call decr4nopnopbtfss porta,1goto nextdev5nopnopgoto topp4
incr4 nop
nopincf time4nopnopmovlw 0ahcall seglutmovwf high4movwf high3
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
54
-
8/9/2019 RFID Project
55/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
movwf high2movwf high1movwf msbmovf time4,0call convert ;display
nopnopreturn
decr4 nop
nopdecf time4nopmovlw 0ahcall seglutmovwf high4
movwf high3movwf high2movwf high1movwf msbnopnopmovf time4,0call convert ;displaynopnopreturn
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
55
-
8/9/2019 RFID Project
56/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
7.1 ADVANTAGES
It is easy to operate, oneremaining
while some units. Inform to recharge before the disconnection.
It is rugged and reliable.
Protects an authorized usage of power.
Reduces the burden of vigilance system.
DIS-ADVANTAGES
It has limited memory size and hence less numbers can be saved
It is desired for single phase system.
APPLICATIONS
It can be used in houses, shops,banks hospitals and institutions. It can be used in commercial applications like small scale and medium
scale and large scale industries.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
56
-
8/9/2019 RFID Project
57/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
7.2 CONCLUSION:
The project MICRO CONTROLLER based prepaid energy meter withover voltage protection is working satisfactorily for different test conditions. Theperformance of the project can be improved by using hall ticket current relays forheavy loads and protecting the system from over load short circuit by providingelectric circuit breaker conditions. The same unit can be used to design 3 phaseenergy meter by making small modifications in the circuit.It can be designed toprevent power theft and unauthorized usage.
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
57
-
8/9/2019 RFID Project
58/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
7.3 BIBILIOGRAPHY
Books:
1. Industrial and power electronics; devices, circuits, systems and application by
Harish .C. Rai, umesh publication, 10th edition.
2. OP-AMPs and Linear integrated circuits, Ramakant .A.Gayakwad, pearson
education, 4th edition.
3. Design with PIC microcontrllers, John.B.Peatman
4. The 8051 Microcontrroller and embedded system by Muhammad Ali Mazidi and
Janice Gillespie Mazidi,Low price edition
5. Electrical Machine design by A.K.Sawhney.
6. Microprocessor and TTL hand Book, B.P.B publication.
7. Power Electronics by Rashid.
Web sites:
1. www.google.com2. www.fairchildsemicondutor.com
3. www.microchip.com
4. www.electronicprojects.com
5. www.ieeexplore.org
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
58
http://www.google.com/http://www.fairchildsemicondutor.com/http://www.microchip.com/http://www.electronicprojects.com/http://www.ieeexplore.org/http://www.google.com/http://www.fairchildsemicondutor.com/http://www.microchip.com/http://www.electronicprojects.com/http://www.ieeexplore.org/ -
8/9/2019 RFID Project
59/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
7.4 APPENDIX
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
59
-
8/9/2019 RFID Project
60/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
60
-
8/9/2019 RFID Project
61/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
61
-
8/9/2019 RFID Project
62/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
62
-
8/9/2019 RFID Project
63/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
63
-
8/9/2019 RFID Project
64/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
64
-
8/9/2019 RFID Project
65/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
65
-
8/9/2019 RFID Project
66/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
66
-
8/9/2019 RFID Project
67/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
67
-
8/9/2019 RFID Project
68/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
68
-
8/9/2019 RFID Project
69/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
69
-
8/9/2019 RFID Project
70/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
70
-
8/9/2019 RFID Project
71/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM
Dept.Electronics & comm. Engg Siddaganga polytechnic, Tumkur-3
71
-
8/9/2019 RFID Project
72/72
EMBEDDED PREPAID ENERGY METER WITH OVER
VOLTAGE AND OVERLOAD PROTECTION SYSTEM72
top related