PREPAID ENERGY METER USING PIC
MICROCONTROLLER
INTRODUCTION
• The scope of the project work is to introduce advanced
technology in converting dc voltage in to ac voltage and
introducing prepaid energy metering concept.
• The energy meter used in this project work produces pulses
according to the load and this meter is converted as prepaid
energy meter using smart card, hence this meter can be
called smart energy meter.
• This kind of smart energy meters also can be installed at each
and every house, where the state electricity department
going to supply the conventional energy. Now a days energy
Measurement and electric energy pilferage detection has
become prime importance for the state electricity
department.
INTRODUCTION
• With the help of this project work lot of Manpower can be
reduced and power pilferage can be controlled.
• The overall system can be called as AMR (Automatic
Meter reading) system, the main advantage of AMR
system is that the consumed energy price can be
calculated and at the same time price (amount in
rupees) can be displayed automatically.
• Finally the simplest form of smart metering is a display meter,
which allows consumers to monitor consumption in money
terms rather than kWh.
Outlook
• Monitor Unit of Split Meter
LCD
Button
IC card
socket
CIRCUIT DIAGRAM
RA0/AN0
2
RA1/AN1
3
RA2/AN2/VREF-/CVREF
4
RA4/T0CKI/C1OUT
6
RA5/AN4/SS/C2OUT
7
RE0/AN5/RD
8
RE1/AN6/WR
9
RE2/AN7/CS
10
OSC1/CLKIN
13
OSC2/CLKOUT
14
RC1/T1OSI/CCP2
16
RC2/CCP1
17
RC3/SCK/SCL
18
RD0/PSP0
19
RD1/PSP1
20
RB7/PGD
40
RB6/PGC
39
RB5
38
RB4
37
RB3/PGM
36
RB2
35
RB1
34
RB0/INT
33
RD7/PSP7
30
RD6/PSP6
29
RD5/PSP5
28
RD4/PSP4
27
RD3/PSP3
22
RD2/PSP2
21
RC7/RX/DT
26
RC6/TX/CK
25
RC5/SDO
24
RC4/SDI/SDA
23
RA3/AN3/VREF+
5
RC0/T1OSO/T1CKI
15
MCLR/Vpp/THV
1
U1
PIC16F877A
D7
14
D6
13
D5
12
D4
11
D3
10
D2
9
D1
8
D0
7
E
6
RW
5
RS
4
VSS
1
VDD
2
VEE
3
LCD1
LM016L
RV1(2)
51%
RV1
1k
X1
CRYSTAL
C1
22p
C2
22p
R1(1) R1
10k
C3
10u
D1
LED-BIRG
D2
LED-BIRG
OUT IR
T1IN
11
R1OUT
12
T2IN
10
R2OUT
9
T1OUT
14
R1IN
13
T2OUT
7
R2IN
8
C2+
4
C2-
5
C1+
1
C1-
3
VS+
2
VS-
6
U2
MAX232
C4
1u
C5
1u
C6
1u
C7
1u
C7(-)
from RF reader
TO reader
A1
1
A2
2
A3
3
A4
4
A5
5
D6
6
D7
7
D8
9
D9
10
TE
14
DOUT
15
RS
11
CTC
12
RTC
13
U3
M145026
to RF transmitter
CIRCUIT DIAGRAM
RA0/AN0
2
RA1/AN1
3
RA2/AN2/VREF-/CVREF
4
RA4/T0CKI/C1OUT
6
RA5/AN4/SS/C2OUT
7
RE0/AN5/RD
8
RE1/AN6/WR
9
RE2/AN7/CS
10
OSC1/CLKIN
13
OSC2/CLKOUT
14
RC1/T1OSI/CCP2
16
RC2/CCP1
17
RC3/SCK/SCL
18
RD0/PSP0
19
RD1/PSP1
20
RB7/PGD
40
RB6/PGC
39
RB5
38
RB4
37
RB3/PGM
36
RB2
35
RB1
34
RB0/INT
33
RD7/PSP7
30
RD6/PSP6
29
RD5/PSP5
28
RD4/PSP4
27
RD3/PSP3
22
RD2/PSP2
21
RC7/RX/DT
26
RC6/TX/CK
25
RC5/SDO
24
RC4/SDI/SDA
23
RA3/AN3/VREF+
5
RC0/T1OSO/T1CKI
15
MCLR/Vpp/THV
1
U1
PIC16F877A
D7
14
D6
13
D5
12
D4
11
D3
10
D2
9
D1
8
D0
7
E
6
RW
5
RS
4
VSS
1
VDD
2
VEE
3
LCD1
LM016L
RV1(2)
51%
RV1
1k
X1
CRYSTAL
C1
22p
C2
22p
R1(1) R1
10k
C3
10u
FROM RF transmitter
A1
1
A2
2
A3
3
A4
4
A5
5
D6
15
D7
14
D8
13
D9
12
VT
11
R2/C2
10
C1
7
R1
6
DIN
9
U2
M145027
BLOCK DIAGRAM
PIC16F877A
CARD READER
UNIT
GSM
POWER SUPPLY
RF RECEIVER
LCD DISPLAY
LOAD
BLOCK DIAGRAM EXPLANATION
• In this system the user has to purchase an EEPROM based recharge card
and it should be inserted in the slot provided on prepaid energy meter kit.
After inserting the recharge card into the system, Then the system will be
loaded with specific units as per the recharge card value. A 16X2 LCD is
provided to read units available. Here the system is connected with three to
four loads. If the load increases in the system, current also increases and is
calculated by an ADC and its corresponding count is also calculated.
Whenever the count value reaches one thousand, 1unit is decremented
from EEPROM and these values are displayed on LCD.
• An EEPROM is provided on the board to store the updated recharge units
and energy meter pulse count. At every instant the count value and units
values are stored in EPROM so that the data will not be lost even in power
failure cases. When 1 unit is decremented from EEPROM the system will
give a beep sound. If recharge value below 10 units the GSM modem send
alert message to owner .When the recharged units become zero on power
consumption, the system shutdown all the loads connected to it by giving a
continuous beep sound.
Hardware Components
• Power supply[5v]
• PIC16F877A microcontroller
• GSM modem
• Current Transformer
• Voltage Transformer
• Max232 – serial communication
Power Supply Circuit
VDD
VDD
C7
0.1 uF
JP2
220 VAC
1
2
- +
D1
1
4
3
2
U2
7805
1
3
2
VIN
G
ND
VOUT
C6
100 uF
C5
470 uF
R4
220 ohm
D2
LED
Power Supply – Circuit Description
• The operation of power supply circuits built using
filters, rectifiers, and then voltage regulators. Starting
with an AC voltage, a steady DC voltage is obtained by
rectifying the AC voltage, Then filtering to a DC level,
and finally, regulating to obtain a desired fixed DC
voltage. The regulation is usually obtained from an IC
voltage regulator Unit, which takes a DC voltage and
provides a somewhat lower DC voltage, Which remains
the same even if the input DC voltage varies, or the
output Load connected to the DC voltage changes.
About Microcontroller
• PIC16F877A microcontroller is used for this
project
• It is 8-bit Microcontroller
• System is RISC Architecture
• It has Small set of Instruction set
• It has 35-Instructions only
• Compatibility: avail 28/40 Pin ICs
Microcontroller overview
• Operating Speed Max 20 MHz, Voltage-(2-
5.5)v
• Memory:
Flash Program 8Kx14 Words,
RAM 368 Bytes,
EEPROM Data Memory 256 Bytes
• Low power, High speed Flash/EEPROM
Technology
Features of Microcontroller
• It has 5 Ports for Internal and External usage
• It has on chip Timers. 3 Timers are avail
• It has in built Analog to Digital Converter
• In built Multiplexer availability for signal Selection
• It has serial as well as Parallel Communication
facilities
• In built Capture, Compare and Pulse width
modulation
UART pins inPIC16f877A
• The UART always transmits data on pin RC6/TX
• The UART always receives data on pin RC7/RX
• The RS-232 standard defines lots of other
signals other than TX and RX used for
handshaking.
Voltages
• The UART input/output uses 0V for logic 0
and 5V for logic 1.
• The RS-232 standard (and the COM port) use
+12V for logic 0 and –12V for logic 1.
• To convert between these voltages levels we
need an additional integrated circuit (such as
Maxim’s MAX232).
MAX232
VD D
R X
TX
T2O U T
R 2IN
U 1
MAX232
13
8
11
10
1
3
4
5
2
6
12
9
14
7
16
15
R 1IN
R 2IN
T1IN
T2IN
C +
C 1-
C 2+
C 2-
V
+
V-
R 1O U T
R 2O U T
T1O U T
T2O U T
V
C
C
G
N
D
C 1 10 uF
C 4
10 uF
C 3
10 uF
C 2
10 uF
GSM modem
• A GSM modem is a wireless modem that works with a
GSM wireless network.
• A wireless modem behaves like a dial-up modem. The
main difference between them is that a dial-up modem
sends and receives data through a fixed telephone line
while a wireless modem sends and receives data through
radio waves.
• A GSM modem can be an external device or a PC Card /
PCMCIA Card. Typically, an external GSM modem is
connected to a computer through a serial cable or a USB
cable.
• Like a GSM mobile phone, a GSM modem requires a SIM
card from a wireless carrier in order to operate.
AT COMMANDS
• computers use AT commands to control modems. Both GSM
modems and dial-up modems support a common set of
standard AT commands.
• GSM modems support an extended set of AT commands.
Operations
• Reading, writing and deleting SMS messages.
• Sending SMS messages.
• Monitoring the signal strength.
• Monitoring the charging status and charge
level of the battery.
• Reading, writing and searching phone book
entries.
GSM phone or modem supports SMS text mode
Check if your GSM phone or modem supports SMS
text mode
To check if your modem supports this text mode,
you can try the following command:
AT+CMGF=1 <ENTER>
If the modem responds with "OK" this mode is
supported.
Software Tools
• MPLAB IDE
• Hitech c compiler
• Win pic programmer
• ORCAD design
MPLAB IDE
Winpic800 Programmer
Prepaid meters advantages
• High accuracy over a wide current dynamic range
• Reliability and robustness
• Flexibility of design
• Automatic Meter Reading (AMR)
• More easily enable new functionalities
• Multi tariff billing
• Tamper proofing
• Prepayment meters
• Power out range detection
• Power factor detection
• Easily reconfiguration, upgrade
• Do not use gears that wear out or magnets that saturate with DC
current
• Do not require precision mechanics or have large tolerance variations
over temperature
• Pay before use
• Keep customers on supply
• Recover money owed (debt)
• Lower Overheads
• No bill production
• No bill distribution
• No need to chase payments
• No further actions such as disconnections
Why Prepayment – Energy
Supplier?
Why Prepayment – Energy
Supplier?
• Social Acceptability
• Customer responsible for
Disconnection
• Load and Demand Side Management
• Limit load
• Load based
• Time based
Why Prepayment – The Customer?
• >80% Mobile phones used in India are
prepaid
• Flexible Payment Solution
• Pay to suit your income status
• Daily, Weekly , Monthly
Budgeting
• Show true cost of consumption and money
Left
• Reduce consumption when income is tight– make money last
• Reduce waste – conserve energy
• No Bills
• No hidden surprises
• No having to find the money
• No billing errors
• No socially unacceptable
• disconnections
Why Prepayment – The Customer?
CONCLUSIONS
• Advanced electricity meters that generate consumption data enabling
customers to see when they are using energy, to manage that use more
efficiently
• To save money by adjusting energy use in response to price signals.
• To save money, the consumed energy corresponding price is displayed for the
consumer benefits.
• This project work has been taken up which serves the purpose of energy
monitoring and controlling by implementing prepaid system.
• It is hoped that this work helps the electrical engineers for better energy
management and its utility in the distribution system for economic liability of the
electrical companies.
THANK YOU

129703339-Prepaid-Energy-Meter-Using-Pic-Microcontroller.pptx

  • 1.
    PREPAID ENERGY METERUSING PIC MICROCONTROLLER
  • 2.
    INTRODUCTION • The scopeof the project work is to introduce advanced technology in converting dc voltage in to ac voltage and introducing prepaid energy metering concept. • The energy meter used in this project work produces pulses according to the load and this meter is converted as prepaid energy meter using smart card, hence this meter can be called smart energy meter. • This kind of smart energy meters also can be installed at each and every house, where the state electricity department going to supply the conventional energy. Now a days energy Measurement and electric energy pilferage detection has become prime importance for the state electricity department.
  • 3.
    INTRODUCTION • With thehelp of this project work lot of Manpower can be reduced and power pilferage can be controlled. • The overall system can be called as AMR (Automatic Meter reading) system, the main advantage of AMR system is that the consumed energy price can be calculated and at the same time price (amount in rupees) can be displayed automatically. • Finally the simplest form of smart metering is a display meter, which allows consumers to monitor consumption in money terms rather than kWh.
  • 4.
    Outlook • Monitor Unitof Split Meter LCD Button IC card socket
  • 5.
    CIRCUIT DIAGRAM RA0/AN0 2 RA1/AN1 3 RA2/AN2/VREF-/CVREF 4 RA4/T0CKI/C1OUT 6 RA5/AN4/SS/C2OUT 7 RE0/AN5/RD 8 RE1/AN6/WR 9 RE2/AN7/CS 10 OSC1/CLKIN 13 OSC2/CLKOUT 14 RC1/T1OSI/CCP2 16 RC2/CCP1 17 RC3/SCK/SCL 18 RD0/PSP0 19 RD1/PSP1 20 RB7/PGD 40 RB6/PGC 39 RB5 38 RB4 37 RB3/PGM 36 RB2 35 RB1 34 RB0/INT 33 RD7/PSP7 30 RD6/PSP6 29 RD5/PSP5 28 RD4/PSP4 27 RD3/PSP3 22 RD2/PSP2 21 RC7/RX/DT 26 RC6/TX/CK 25 RC5/SDO 24 RC4/SDI/SDA 23 RA3/AN3/VREF+ 5 RC0/T1OSO/T1CKI 15 MCLR/Vpp/THV 1 U1 PIC16F877A D7 14 D6 13 D5 12 D4 11 D3 10 D2 9 D1 8 D0 7 E 6 RW 5 RS 4 VSS 1 VDD 2 VEE 3 LCD1 LM016L RV1(2) 51% RV1 1k X1 CRYSTAL C1 22p C2 22p R1(1) R1 10k C3 10u D1 LED-BIRG D2 LED-BIRG OUTIR T1IN 11 R1OUT 12 T2IN 10 R2OUT 9 T1OUT 14 R1IN 13 T2OUT 7 R2IN 8 C2+ 4 C2- 5 C1+ 1 C1- 3 VS+ 2 VS- 6 U2 MAX232 C4 1u C5 1u C6 1u C7 1u C7(-) from RF reader TO reader A1 1 A2 2 A3 3 A4 4 A5 5 D6 6 D7 7 D8 9 D9 10 TE 14 DOUT 15 RS 11 CTC 12 RTC 13 U3 M145026 to RF transmitter
  • 6.
  • 7.
    BLOCK DIAGRAM PIC16F877A CARD READER UNIT GSM POWERSUPPLY RF RECEIVER LCD DISPLAY LOAD
  • 8.
    BLOCK DIAGRAM EXPLANATION •In this system the user has to purchase an EEPROM based recharge card and it should be inserted in the slot provided on prepaid energy meter kit. After inserting the recharge card into the system, Then the system will be loaded with specific units as per the recharge card value. A 16X2 LCD is provided to read units available. Here the system is connected with three to four loads. If the load increases in the system, current also increases and is calculated by an ADC and its corresponding count is also calculated. Whenever the count value reaches one thousand, 1unit is decremented from EEPROM and these values are displayed on LCD. • An EEPROM is provided on the board to store the updated recharge units and energy meter pulse count. At every instant the count value and units values are stored in EPROM so that the data will not be lost even in power failure cases. When 1 unit is decremented from EEPROM the system will give a beep sound. If recharge value below 10 units the GSM modem send alert message to owner .When the recharged units become zero on power consumption, the system shutdown all the loads connected to it by giving a continuous beep sound.
  • 9.
    Hardware Components • Powersupply[5v] • PIC16F877A microcontroller • GSM modem • Current Transformer • Voltage Transformer • Max232 – serial communication
  • 10.
    Power Supply Circuit VDD VDD C7 0.1uF JP2 220 VAC 1 2 - + D1 1 4 3 2 U2 7805 1 3 2 VIN G ND VOUT C6 100 uF C5 470 uF R4 220 ohm D2 LED
  • 11.
    Power Supply –Circuit Description • The operation of power supply circuits built using filters, rectifiers, and then voltage regulators. Starting with an AC voltage, a steady DC voltage is obtained by rectifying the AC voltage, Then filtering to a DC level, and finally, regulating to obtain a desired fixed DC voltage. The regulation is usually obtained from an IC voltage regulator Unit, which takes a DC voltage and provides a somewhat lower DC voltage, Which remains the same even if the input DC voltage varies, or the output Load connected to the DC voltage changes.
  • 12.
    About Microcontroller • PIC16F877Amicrocontroller is used for this project • It is 8-bit Microcontroller • System is RISC Architecture • It has Small set of Instruction set • It has 35-Instructions only • Compatibility: avail 28/40 Pin ICs
  • 13.
    Microcontroller overview • OperatingSpeed Max 20 MHz, Voltage-(2- 5.5)v • Memory: Flash Program 8Kx14 Words, RAM 368 Bytes, EEPROM Data Memory 256 Bytes • Low power, High speed Flash/EEPROM Technology
  • 14.
    Features of Microcontroller •It has 5 Ports for Internal and External usage • It has on chip Timers. 3 Timers are avail • It has in built Analog to Digital Converter • In built Multiplexer availability for signal Selection • It has serial as well as Parallel Communication facilities • In built Capture, Compare and Pulse width modulation
  • 15.
    UART pins inPIC16f877A •The UART always transmits data on pin RC6/TX • The UART always receives data on pin RC7/RX • The RS-232 standard defines lots of other signals other than TX and RX used for handshaking.
  • 16.
    Voltages • The UARTinput/output uses 0V for logic 0 and 5V for logic 1. • The RS-232 standard (and the COM port) use +12V for logic 0 and –12V for logic 1. • To convert between these voltages levels we need an additional integrated circuit (such as Maxim’s MAX232).
  • 17.
    MAX232 VD D R X TX T2OU T R 2IN U 1 MAX232 13 8 11 10 1 3 4 5 2 6 12 9 14 7 16 15 R 1IN R 2IN T1IN T2IN C + C 1- C 2+ C 2- V + V- R 1O U T R 2O U T T1O U T T2O U T V C C G N D C 1 10 uF C 4 10 uF C 3 10 uF C 2 10 uF
  • 18.
    GSM modem • AGSM modem is a wireless modem that works with a GSM wireless network. • A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. • A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. • Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.
  • 19.
    AT COMMANDS • computersuse AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. • GSM modems support an extended set of AT commands.
  • 20.
    Operations • Reading, writingand deleting SMS messages. • Sending SMS messages. • Monitoring the signal strength. • Monitoring the charging status and charge level of the battery. • Reading, writing and searching phone book entries.
  • 21.
    GSM phone ormodem supports SMS text mode Check if your GSM phone or modem supports SMS text mode To check if your modem supports this text mode, you can try the following command: AT+CMGF=1 <ENTER> If the modem responds with "OK" this mode is supported.
  • 22.
    Software Tools • MPLABIDE • Hitech c compiler • Win pic programmer • ORCAD design
  • 23.
  • 24.
  • 25.
    Prepaid meters advantages •High accuracy over a wide current dynamic range • Reliability and robustness • Flexibility of design • Automatic Meter Reading (AMR) • More easily enable new functionalities • Multi tariff billing • Tamper proofing • Prepayment meters • Power out range detection • Power factor detection • Easily reconfiguration, upgrade • Do not use gears that wear out or magnets that saturate with DC current • Do not require precision mechanics or have large tolerance variations over temperature
  • 26.
    • Pay beforeuse • Keep customers on supply • Recover money owed (debt) • Lower Overheads • No bill production • No bill distribution • No need to chase payments • No further actions such as disconnections Why Prepayment – Energy Supplier?
  • 27.
    Why Prepayment –Energy Supplier? • Social Acceptability • Customer responsible for Disconnection • Load and Demand Side Management • Limit load • Load based • Time based
  • 28.
    Why Prepayment –The Customer? • >80% Mobile phones used in India are prepaid • Flexible Payment Solution • Pay to suit your income status • Daily, Weekly , Monthly Budgeting • Show true cost of consumption and money Left • Reduce consumption when income is tight– make money last • Reduce waste – conserve energy
  • 29.
    • No Bills •No hidden surprises • No having to find the money • No billing errors • No socially unacceptable • disconnections Why Prepayment – The Customer?
  • 30.
    CONCLUSIONS • Advanced electricitymeters that generate consumption data enabling customers to see when they are using energy, to manage that use more efficiently • To save money by adjusting energy use in response to price signals. • To save money, the consumed energy corresponding price is displayed for the consumer benefits. • This project work has been taken up which serves the purpose of energy monitoring and controlling by implementing prepaid system. • It is hoped that this work helps the electrical engineers for better energy management and its utility in the distribution system for economic liability of the electrical companies.
  • 31.