MICROCHIP PIC18F87J72_11

PIC18F87J72
Single-Phase Energy Meter
Reference Design
© 2011 Microchip Technology Inc.
DS51931A
Note the following details of the code protection feature on Microchip devices:
•
Microchip products meet the specification contained in their particular Microchip Data Sheet.
•
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•
Microchip is willing to work with the customer who is concerned about the integrity of their code.
•
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
KEELOQ, KEELOQ logo, MPLAB, PIC, PICmicro, PICSTART,
PIC32 logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
© 2011, Microchip Technology Incorporated, Printed in the
U.S.A., All Rights Reserved.
Printed on recycled paper.
ISBN: 978-1-61341-075-2
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
DS51931A-page 2
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Table of Contents
Preface ........................................................................................................................... 7
Introduction............................................................................................................ 7
Document Layout .................................................................................................. 8
Conventions Used in this Guide ............................................................................ 9
Recommended Reading...................................................................................... 10
The Microchip Web Site ...................................................................................... 10
Customer Support ............................................................................................... 10
Document Revision History ................................................................................. 10
Chapter 1. Product Overview
1.1 Introduction ................................................................................................... 11
1.2 What the PIC18F87J72 Single-Phase Energy Meter Reference Design Kit
Includes .................................................................................................. 12
1.3 Getting Started ............................................................................................. 12
Chapter 2. Hardware
2.1 Overview ...................................................................................................... 13
2.2 Input and Analog Front End ......................................................................... 16
2.3 Power Supply Circuit .................................................................................... 17
Chapter 3. Calculation Engine and Register Description
3.1 Calculation Engine Signal Flow Summary ................................................... 19
3.2 Complete Register List ................................................................................. 20
3.3 MODE ........................................................................................................... 21
3.4 STATUS ....................................................................................................... 22
3.5 CAL_CONTROL ........................................................................................... 23
3.6 LINE_CYC ................................................................................................... 24
3.7 LINE_CYC_CNT ......................................................................................... 24
3.8 RAW2_I_RMS .............................................................................................. 24
3.9 RAW_I_RMS ................................................................................................ 24
3.10 I_RMS ........................................................................................................ 25
3.11 RAW2_V_RMS ......................................................................................... 25
3.12 RAW_V_RMS ........................................................................................... 25
3.13 V_RMS ....................................................................................................... 25
3.14 LINE_FREQUENCY ................................................................................... 25
3.15 RAW_POWER_ACT ................................................................................. 26
3.16 POWER_ACT ............................................................................................. 26
3.17 POWER_APP ............................................................................................ 26
3.18 RAW_POWER_REACT ............................................................................. 26
© 2011 Microchip Technology Inc.
DS51931A-page 3
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.19 POWER_REACT ........................................................................................ 27
3.20 PERIOD ...................................................................................................... 27
3.21 ENERGY_ACT ........................................................................................... 27
3.22 ENERGY_APP .......................................................................................... 27
3.23 I_ABS_MAX ............................................................................................... 28
3.24 V_ABS_MAX .............................................................................................. 28
3.25 ENERGY_REACT ...................................................................................... 28
3.26 PHASE_COMPENSATION ........................................................................ 28
3.27 OFFSET_I_RMS ....................................................................................... 28
3.28 OFFSET_V_RMS ...................................................................................... 29
3.29 GAIN_I_RMS ............................................................................................. 29
3.30 GAIN_V_RMS ............................................................................................ 29
3.31 OFFSET_POWER_ACT .......................................................................... 29
3.32 GAIN_POWER_ACT .................................................................................. 29
3.33 OFFSET_POWER_REACT ...................................................................... 30
3.34 GAIN_POWER_REACT ............................................................................. 30
3.35 GAIN_ENERGY_ACT ................................................................................ 30
3.36 GAIN_ENERGY_APP ................................................................................ 30
3.37 GAIN_ENERGY_REACT ........................................................................... 30
3.38 CF_PULSE_WIDTH ................................................................................... 31
3.39 GAIN_DENR_ENERGY_ACT .................................................................... 31
3.40 GAIN_NUMR_ENERGY_ACT ................................................................... 31
3.41 METER_CONFIG ..................................................................................... 31
3.42 CAL_STATUS ............................................................................................ 32
3.43 MAXIMUM CURRENT ............................................................................. 32
3.44 CALIBRATION_VOLTAGE ...................................................................... 32
3.45 CALIBRATION_CURRENT ...................................................................... 32
3.46 CALIBRATION_FREQUENCY .................................................................. 33
3.47 METER_CONSTANT ................................................................................ 33
3.48 CALIBRATION_LINE_CYCLE .................................................................. 33
3.49 GAIN_DENR_ENERGY_REACT .............................................................. 33
3.50 GAIN_NUMR_ENERGY_REACT ............................................................. 33
3.51 PHASE_COMPENSATION_90 ................................................................. 33
3.52 CREEP_THRSHOLD_MINUTE ................................................................. 34
3.53 CREEP_THRSHOLD_SECOND ................................................................ 34
3.54 ENERGY_ACT_FORWARD ...................................................................... 34
3.55 ENERGY_ACT_REVERSE ........................................................................ 34
3.56 ENERGY_REACT_INDUCTIVE ................................................................. 34
3.57 ENERGY_REACT_CAPACITIVE ............................................................... 35
DS51931A-page 4
© 2011 Microchip Technology Inc.
Appendix A. Schematic and Layouts
A.1 Introduction .................................................................................................. 37
A.2 Schematics and PCB Layout ....................................................................... 37
A.3 Board – Schematic ....................................................................................... 38
A.4 Board – Schematic Top Silk and Boarder Outline ...................................... 39
A.5 Board – Top Silk .......................................................................................... 40
A.6 Board – Top Trace and Pads ...................................................................... 41
A.7 Board – Bottom Silk ..................................................................................... 42
A.8 Board – Bottom Trace and Pads .................................................................. 43
Appendix B. Bill of Materials (BOM)
Worldwide Sales and Service .................................................................................... 50
© 2011 Microchip Technology Inc.
DS51931A-page 5
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
DS51931A-page 6
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Preface
NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
For the most up-to-date information on development tools, see the MPLAB® IDE on-line help.
Select the Help menu, and then Topics to open a list of available online help files.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
PIC18F87J72 Single-Phase Energy Meter Reference Design. Items discussed in this
chapter include:
•
•
•
•
•
•
Document Layout
Conventions Used in this Guide
Recommended Reading
The Microchip Web Site
Customer Support
Document Revision History
© 2011 Microchip Technology Inc.
DS51931A-page 7
PIC18F87J72 Single-Phase Energy Meter Reference Design
DOCUMENT LAYOUT
This document describes how to use the PIC18F87J72 Single-Phase Energy Meter
Reference Design as a development tool to emulate and debug firmware on a target
board. The manual layout is as follows:
• Chapter 1. “Product Overview” – Important information on using the
PIC18F87J72 Single-Phase Energy Meter Reference Design including a getting
started section that describes wiring the line and load connections.
• Chapter 2. “Hardware” – Includes detail on the function blocks of the meter
including the analog front end design, and power supply design.
• Chapter 3. “Calculation Engine and Register Description” – This section
describes the digital signal flow for all power output quantities such as RMS
current, RMS voltage, active power, and apparent power. This section also
includes the calibration registers detail.
• Appendix A. “Schematic and Layouts” – Shows the schematic and layout
diagrams
• Appendix B. “Bill of Materials (BOM)” – Lists the parts used to build the
PIC18F87J72 Single-Phase Energy Meter Reference Design.
DS51931A-page 8
© 2011 Microchip Technology Inc.
Preface
CONVENTIONS USED IN THIS GUIDE
This manual uses the following documentation conventions:
DOCUMENTATION CONVENTIONS
Description
Arial font:
Italic characters
Initial caps
Quotes
Underlined, italic text with
right angle bracket
Bold characters
N‘Rnnnn
Text in angle brackets < >
Courier New font:
Plain Courier New
Represents
Referenced books
Emphasized text
A window
A dialog
A menu selection
A field name in a window or
dialog
A menu path
MPLAB® IDE User’s Guide
...is the only compiler...
the Output window
the Settings dialog
select Enable Programmer
“Save project before build”
A dialog button
A tab
A number in verilog format,
where N is the total number of
digits, R is the radix and n is a
digit.
A key on the keyboard
Click OK
Click the Power tab
4‘b0010, 2‘hF1
Italic Courier New
Sample source code
Filenames
File paths
Keywords
Command-line options
Bit values
Constants
A variable argument
Square brackets [ ]
Optional arguments
Curly brackets and pipe
character: { | }
Ellipses...
Choice of mutually exclusive
arguments; an OR selection
Replaces repeated text
Represents code supplied by
user
© 2011 Microchip Technology Inc.
Examples
File>Save
Press <Enter>, <F1>
#define START
autoexec.bat
c:\mcc18\h
_asm, _endasm, static
-Opa+, -Opa0, 1
0xFF, ‘A’
file.o, where file can be
any valid filename
mcc18 [options] file
[options]
errorlevel {0|1}
var_name [,
var_name...]
void main (void)
{ ...
}
DS51931A-page 9
PIC18F87J72 Single-Phase Energy Meter Reference Design
RECOMMENDED READING
This user’s guide describes how to use the PIC18F87J72 Single-Phase Energy Meter
Reference Design. Other useful documents are listed below. The following Microchip
documents are available and recommended as supplemental reference resources.
PIC18F87J72 Family Data Sheet – “80-Pin, High-Performance Microcontrollers
with Dual Channel AFE, LCD Driver and nanoWatt Technology“ (DS39979)
This data sheet provides detailed information regarding the PIC18F87J72 device.
“Single-Phase Energy Meter Calibration User’s Guide” (DS51964)
THE MICROCHIP WEB SITE
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite Internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
•
•
•
•
Distributor or Representative
Local Sales Office
Field Application Engineer (FAE)
Technical Support
Customers should contact their distributor, representative or field application engineer
(FAE) for support. Local sales offices are also available to help customers. A listing of
sales offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com
DOCUMENT REVISION HISTORY
Revision A (March 2011)
• Initial Release of this Document.
DS51931A-page 10
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Chapter 1. Product Overview
1.1
INTRODUCTION
The PIC18F87J72 Single-Phase Energy Meter Reference Design is a fully functional
single-phase meter based on the highly integrated PIC18F87J72 single-chip energy
meter IC. This low-cost design does not use any transformers and requires few external components. The PIC18F87J72 directly drives the LCD, and includes both an isolated USB connection and a non-isolated RS-232 interface for meter calibration and
access to the device power calculations. The system calculates active energy, active
power, reactive energy, reactive power, RMS current, RMS voltage and other typical
power quantities.
The Microchip Energy Meter 1-Phase Software is used to calibrate and monitor the
system, and can be used to create custom calibration setups. For some accuracy
requirements, only a single-point calibration may be needed. The energy meter
software offers an automated step by step calibration process that can be used to
quickly calibrate energy meters.
FIGURE 1-1:
© 2011 Microchip Technology Inc.
PIC18F87J72 Single-Phase Energy Meter.
DS51931A-page 11
PIC18F87J72 Single-Phase Energy Meter Reference Design
1.2
WHAT THE PIC18F87J72 SINGLE-PHASE ENERGY METER REFERENCE
DESIGN KIT INCLUDES
The PIC18F87J72 Single-Phase Energy Meter Reference Design kit includes:
• PIC18F87J72 Single-Phase Energy Meter Reference Design (102-00280)
• Important Information Sheet
1.3
GETTING STARTED
To describe how to use the PIC18F87J72 Single-Phase Energy Meter Reference
Design, the following example is given using a two-wire 1-phase, 220VAC line voltage
and connections using an energy meter calibrator equipment, or other programmable
load source. The meter design uses a 5A load for calibration current, and a maximum
current (IMAX) of 60A.
All connections described in this section are dependent upon the choice of the current
sensing element. A secondary external transformer may be required in higher current
meter designs.
To test a calibrated meter, the following connections apply for a two-wire connection.
1.3.1
Step 1: Wiring Connections
Figure 1-2 is identifying the line and load connections of the PIC18F87J72 Single-Phase Energy Meter Reference Design.
1
2
3
4
Line
Line
Neutral
Neutral
MAIN
LOAD
FIGURE 1-2:
1.3.2
Example Connections using a Two-Wire System.
Step 2: Turn On Line/Load Power to the Meter (Power the Meter)
The meter will turn on when the line connection has 220V connected. The LCD display
will show the total energy accumulated.
DS51931A-page 12
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Chapter 2. Hardware
2.1
OVERVIEW
Figures 2-1 and 2-2 show the PIC18F87J72 Single-Phase Energy Meter Reference
Design:
11
9
10
D9D8
1
U1
J1
D1
D3
J4
J3
D2
P1
2
LCD1
8
SW3
3
7
SW1
SW2
4
J2
DANGER
HIGH VOLTAGE
PIC18F87J72 SHUNT METER
Legend:
5
6
1 = IR for meter communication
7
=
Push button switches
2 = USB or RS-232 selection
8
=
9-digit LCD Display with icons for kWh and
kVARh
3 = Test Points
9
=
Pulse Output for active and reactive
(isolated)
4 = +9V DC Input (non-isolated)
10
=
RS-232 Connection (non-Isolated)
5 = Connections to shunt
current sensing resistor
11
=
USB Connection (Isolated)
6 = Connections to Line and Neutral
© 2011 Microchip Technology Inc.
DS51931A-page 13
PIC18F87J72 Single-Phase Energy Meter Reference Design
FIGURE 2-1:
Top View – Hardware Components.
.
17
18
C40
X2
R27 R26
C7
R28
C24 C25
R29
U2
C32
R19
R17
R21
R20
U7
R23
U4
C37
R36
C29 C33
U10
U9
U5
R30
12
16
R33
C39
R34
U8
DANGER
HIGH VOLTAGE
C41
C5
R14
R12
C2
Q1
C19
C6
D6
C8
C9
C38
C10
R18
D5
14
R31
C23
C17
C16
U6
U3
R32
15
C30
C27
C21
C22
D7
R15
R11
C1
13
L2
L1
L3
R24 R25
C4
D4
MOV1
Legend:
FIGURE 2-2:
DS51931A-page 14
12
=
Opto-isolators for Pulse Outputs
13
=
Power Supply
14
=
Non-volatile memory for calibration constants and energy usage data
15
=
PIC18F87J72
16
=
Isolation IC
17
=
MCP2200 for USB connection
18
=
RS-232 Device (not-populated)
Bottom View – Hardware Components.
© 2011 Microchip Technology Inc.
Hardware
PIC18F87J72
RD5
RD6
RB3
SWITCH
RB4
SWITCH
Active
Power
RS-232
Transceiver
J6
MAX3232
(Not Populated)
Reactive
Power
DB-9 Connector
(NON-ISOLATED)
RC7/RX
RC6/TX
USB to UART
Converter
Mini – USB Connector
MCP2200
(ISOLATED)
RC4/SDI
SCK
SDO
RC5/SDO
SDI
RC3/SCK
RA1
CS
25LC256
SPI – EEPROM
FIGURE 2-3:
Digital Connections.
© 2011 Microchip Technology Inc.
DS51931A-page 15
PIC18F87J72 Single-Phase Energy Meter Reference Design
2.2
INPUT AND ANALOG FRONT END
The PIC18F87J72 Single-Phase Energy Meter Reference Design comes populated
with components designed for 220V line voltage. At the bottom of the main board are
the high voltage line and neutral connections. There are four connections that are
made from the PCB to the meter casing. They are labeled LINE, NEUTRAL, SHUNT1,
and SHUNT2. The shunt sits on the high or line side of a two-wire system and the meter
employes a hot or “live” ground. The wires going into the shunt to SHUNT1 and
SHUNT2 should be twisted together. The wires going into the LINE and NEUTRAL side
of the meter should be twisted together, and also kept away from the SHUNT1 and
SHUNT2 wires if possible.
The neutral side of the two-wire system goes into a resistor divider on the voltage channel input. Anti-aliasing low-pass filters will be included on both differential channels.
The voltage channel uses two 332 kΩ resistors to achieve a divider ratio of 664:1. For
a line voltage of 230 VRMS, the channel 1 input signal size will be 490 mVPEAK. The current channel of each phase uses current transformer with a turns ratio of 2000:1 and
burden resistance of 56.4 kΩ. The resulting channel 0 signal size is 340 mVPEAK for
20A, or twice the rated maximum current of the meter, still within the input range of the
A/D converter of the PIC18F87J72.
150 FB (Note)
1.0 kΩ
CH0+
LINE_SHUNT1
68 nF
Shunt
(external to
PCB part of
meter case)
150 FB (Note)
1.0 kΩ
CH0-
LINE_SHUNT2
68 nF
PIC18F87J72
330 kΩ 330 kΩ
0Ω
NEUTRAL
CH1+
68 nF
1.0 kΩ
1.0 kΩ
CH1+
68 nF
Note:
FB = ferrite beads. Ferrite beads have an impedance of the
specified value at 100 MHz.
FIGURE 2-4:
DS51931A-page 16
Analog Input Circuitry.
© 2011 Microchip Technology Inc.
Hardware
2.3
POWER SUPPLY CIRCUIT
The power supply circuit for the PIC18F87J72 Single-Phase Energy Meter Reference
Design uses a half-wave rectified signal, a single +5V voltage regulator and a 3.3V
LDO.
.
1
3
2
+9V DC Power In
(DO NOT USE WHILE
METER IS CONNECTED
TO MAINS!)
+5V
150 FB
470Ω
1 µF
N
470 µF +
+ 470 µF
IN OUT
GND
100 nF
A
B
10 µF
L
A
A
A
A
A
+3.3V
+5V
IN OUT
MCP1700
100 nF
GND
100 nF
B
FIGURE 2-5:
A
A
B
10 µF
B
B
Low-Cost Power Supply Circuit.
© 2011 Microchip Technology Inc.
DS51931A-page 17
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
DS51931A-page 18
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Chapter 3. Calculation Engine and Register Description
3.1
CALCULATION ENGINE SIGNAL FLOW SUMMARY
RMS voltage, RMS current, Active Power and Apparent Power, and the calibration output pulse are all calculated through the following process described in Figure 3-1. The
calibration registers for each calculation are shown as well as the output registers.
OFFSET_I_RMS:16
16/24-bit ΔΣ ADC
2
Apparent Power
RMS Current
X
Σ
Reactive Power
GAIN_
COMPENSATION
_90:8
90° with
Φ Correction
OFFSET_POWER_REACT:32
X
Σ
Active Power
16/24-bit DS ADC
Φ
ADC
PHASE_COMPENSATION:8
VOLTAGE
OFFSET_POWER_ACT:32
OFFSET_V_RMS:16
GAIN_DENR_ENERGY_ACT:8
GAIN_NUMR_ENERGY_ACT:16
X2
Σ
RMS Voltage
Digital to
Frequency
Converter
/
FIGURE 3-1:
X
GAIN_ENERGY_APP:16
X
GAIN_ENERGY_ACT:16
X
GAIN_POWER_APP:16
X
GAIN_POWER_ACT:16
X
GAIN_I_RMS:16
X
GAIN_V_RMS:16
GAIN_ENERGY_REACT:16
GAIN_POWER_REACT:16
X
X
kVAh
ENERGY_APP:32
kWh
ENERGY_ACT:32
kVA
POWER_APP:32
kW
POWER_ACT:32
A
I_RMS:16
V
V_RMS:16
ENERGY_REACT:32
POWER_REACT:32
kVAR
kVARh
Σ
imp/kVARh
imp/kWh
Σ
1/METER_CONSTAT
Digital to
Frequency
Converter
GAIN_DENR_ENERGY_REACT:8
GAIN_NUMR_ENERGY_REACT:16
/
1/METER_CONSTAT
X
Σ
X
ADC
CURRENT
PIC18F87J72 Calculation Engine Signal Flow
© 2011 Microchip Technology Inc.
DS51931A-page 19
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.2
COMPLETE REGISTER LIST
TABLE 3-1:
INTERNAL REGISTER SUMMARY
Name
Bits
MODE
8
STATUS
8
R/W
Description
R/W Configuration register for operating mode of the meter.
R
STATUS register.
CAL_CONTROL
8
R/W Configuration register for calibration control.
LINE_CYC
16
R/W 2n number of line cycles to be used during energy accumulation.
LINE_CYC_CNT
16
R
Counter for number of line cycles.
RAW2_I_RMS
64
R
Raw2 RMS value from the current A/D converter in LSBs.
RAW_I_RMS
16
R
Raw RMS value from the current A/D converter in LSBs.
I_RMS
16
R
RMS value of the current, post Calibration.
RAW2_V_RMS
64
R
Raw2 RMS value from the voltage A/D converter in LSBs.
RAW_V_RMS
16
R
Raw RMS value from the voltage A/D converter in LSBs.
V_RMS
16
R
RMS value of the voltage, post Calibration.
LINE_FREQUENCY
16
R
Line Frequency.
RAW_POWER_ACT
64
R
Raw Active Power.
POWER_ACT
32
R
Final Active Power, units in watts (W).
POWER_APP
32
R
Final Apparent Power, units in volt-amperes (VA).
RAW_POWER_REACT
64
R
Raw Reactive Power.
POWER_REACT
32
R
Final Reactive Power, units in volt-amperes-reactive (VAR).
PERIOD
32
R
Period register.
ENERGY_ACT
32
R
Final Active Energy accumulated.
RAW_ENERGY_ACT
64
R
Raw Active Energy accumulated.
ENERGY_APP
32
R
Final Apparent Energy accumulated.
RAW_ENERGY_APP
64
R
Raw Apparent Energy accumulated.
I_ABS_MAX
8
R
Not implemented.
V_ABS_MAX
8
R
Not implemented.
ENERGY_REACT
32
R
Final Reactive Energy accumulated.
RAW_ENERGY_REACT
64
R
Final Reactive Energy accumulated.
PHASE_COMPENSATION
OFFSET_I_RMS
8
16
R/W Phase compensation between voltage and current.
R/W Offset adjustment for RMS current reading.
OFFSET_V_RMS
16
R/W Offset adjustment for RMS voltage reading.
GAIN_I_RMS
16
R/W Gain adjustment for RMS current.
GAIN_V_RMS
16
R/W Gain adjustment for RMS voltage.
OFFSET_POWER_ACT
32
R/W Active Power offset.
GAIN_POWER_ACT
16
R/W Active Power gain adjust.
OFFSET_POWER_REACT
32
R/W Offset correction for Reactive Power.
GAIN_POWER_REACT
16
R/W Reactive Power gain adjust to produce X VAR/LSB.
GAIN_ENERGY_ACT
16
R/W Not implemented.
GAIN_ENERGY_APP
16
R/W Not implemented.
GAIN_ENERGY_REACT
16
R/W Not implemented.
CF_PULSE_WIDTH
8
R/W Defines CF pulse width from 0 to 255 x 0.8192 ms (0.209s).
GAIN_DENR_ENERGY_ACT
8
R/W Active Energy Pulse Output correction factor.
GAIN_NUMR_ENERGY_ACT
16
R/W Active Energy Pulse Output correction factor.
MODE1_DEF
16
R/W Power-Up Configuration Register.
CAL_STATUS
16
R/W Calibration Status.
DS51931A-page 20
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
TABLE 3-1:
INTERNAL REGISTER SUMMARY (CONTINUED)
Name
Bits
R/W
Description
MAXIMUM CURRENT
16
R/W Maximum current of the meter (IMAX).
CALIBRATION_VOLTAGE
16
R/W Calibration Voltage of the meter (VCAL).
CALIBRATION_CURRENT
16
R/W Calibration Current of the meter (ICAL).
CALIBRATION_FREQUENCY
16
R/W Calibration Frequency of the meter.
METER_CONSTANT
16
R/W Meter Constant in imp/kWh or imp/kVARh.
CALIBRATION_LINE_CYCLE
16
R/W Number of line cycles for calibration.
GAIN_DENR_ENERGY_REACT
8
R/W Reactive Energy Pulse Output correction factor.
GAIN_NUMR_ENERGY_REACT
16
R/W Reactive Energy Pulse Output correction factor.
PHASE_COMPENSATION_90
8
R/W Phase delay for Reactive Power.
CREEP_THRSHOLD_MINUTE
8
R/W No Load threshold time (minutes).
CREEP_THRSHOLD_SECOND
ENERGY_ACT_FORWARD
8
32
R/W No Load threshold time (seconds).
R/W Forward Active Energy.
ENERGY_ACT_REVERSE
32
R/W Reverse Active Energy.
ENERGY_REACT_INDUCTIVE
32
R/W Inductive Reactive Energy.
ENERGY_REACT_CAPACITIVE
32
R/W Capacitive Reactive Energy.
3.3
MODE
The MODE register controls the operation of the energy meter. The bit functions are
defined by the table below.
REGISTER 3-1:
MODE REGISTER
U-0
U-0
U-0
U-0
R/W-0
R/W-0
R/W-0
R/W-0
—
—
—
—
CREEP
PHASE
ABSOLUTE
CF
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-4
Unimplemented: Read as ‘0’
bit 3
CREEP: No-Load Threshold bit
1 = Enabled
0 = Disabled
bit 2
PHASE: Phase bit
1 = Single-Point Phase Correction
0 = Multi-Point Phase Correction (future)
bit 1
ABSOLUTE: Positive Only Energy Accumulation Mode bit
1 = Positive energy only
0 = Both negative and positive energy accumulated (negative energy is subtracted)
bit 0
CF: Active Energy CF Phase Enable bit
1 = Phase is enabled to be accumulated into the total energy registers or CF pulse output
0 = Phase is DISABLED and is not accumulated into the total energy registers or CF pulse output
© 2011 Microchip Technology Inc.
DS51931A-page 21
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.4
STATUS
The STATUS register contains the operational status of the energy meter. The bit
functions are defined in the table below.
REGISTER 3-2:
STATUS REGISTER
U-0
U-0
U-0
U-0
U-0
R
U-0
U-0
—
—
—
—
—
PH_S
—
—
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
bit 7-3
Unimplemented: Read as ‘0’
bit 2
PH_S: Phase Sign bit
1 = CT may be in backward (if enabled)
0 = Operation normal
bit 1-0
Unimplemented: Read as ‘0’
DS51931A-page 22
x = Bit is unknown
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.5
CAL_CONTROL
This is the CAL_CONTROL Calibration mode control register. Bit 0 enables the Calibration mode. In this mode, the power meter operates as normal, but no updates are
made to the voltage, current, power or energy registers as long as bit 1 is low. When
bit 1 is set high, the registers are updated for LINE_CYC line cycles (only power and
energy registers are updated). After this time, bit 1 is set low by the PIC18F87J72 and
the update of the registers will stop. This allows the calibration software to set bit 0,
clear the registers, set bit 1 and start reading the desired registers, as well as the
CAL_CONTROL register, to check the status of bit 1. When bit 1 goes low, the
LINE_CYC line cycles have passed and the registers are final. Note that bit 0 takes
effect immediately, and bit 1 will take effect on the very next line cycle. When bit 1 goes
low, all registers will be ready to read.
REGISTER 3-3:
CAL_CONTROL REGISTER
U-0
U-0
U-0
U-0
U-0
U-0
—
—
—
—
—
Reserved
R/W-0
R/W-0
CAL_UPDATE CAL_MODE
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7-3
Unimplemented: Read as ‘0’
bit 2
Reserved:
bit 1
CAL_UPDATE: Calibration Update bit
Power and energy registers are updated for LINE_CYC line cycles when cleared. Bit must be set for
registers to begin updating, which starts on the next line cycle after bit is set.
1 = When CAL_MODE bit is set, set CAL_UPDATE bit to enable update of power and energy
registers starting on next line cycle. Bit = 1 Single-Point Phase Correction
0 = When CAL_MODE bit and CAL_UPDATE bit have been set, CAL_UPDATE bit will be cleared
after the LINE_CYC line cycles. At that point, all registers will be updated and no further updates
will be done until CAL_UPDATE bit is set again or CAL_MODE bit is cleared.
bit 0
CAL_MODE: Calibration Mode bit
This bit enables Calibration mode.
1 = Calibration mode enabled
0 = Calibration mode disabled
Note:
This register is used in “Multi-Point and Single-Point Calibration” modes only.
© 2011 Microchip Technology Inc.
DS51931A-page 23
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.6
LINE_CYC
Name
Bits
Cof
16
R/W
LINE_CYC
Number of line cycles as a power of two. A setting of 0 indicates 20 or one line cycle.
A setting of 1 is two line cycles (21), a setting of 2 is four line cycles (22), up to a setting
of eight which is 256 line cycles. When written, this register will not take effect until the
previous number of line cycles has been acquired.
3.7
LINE_CYC_CNT
Name
Bits
Cof
16
R
LINE_CYC_CNT
This register counts from 0 and finishes at 2 (LINE_CYC - 1). Then re-starts at 0, where
LINE_CYC represents the value in the LINE_CYC register.
3.8
RAW2_I_RMS
Name
RAW2_I_RMS
Bits
Cof
64
R
This register is the square of the raw RMS value from the current A/D converter in
LSBs. By definition, this register will always contain a positive value, including the situation where power is negative from a backwards CT or otherwise. This register is
overwritten every LINE_CYC line cycle (written only once if the calibration is enabled).
3.9
RAW_I_RMS
Name
Bits
Cof
RAW_I_RMS
16
R
This register is the raw RMS value from the current A/D converter in LSBs (square root
of the top 32-bits of (RAW2_I_RMS + OFFSET_I_RMS). By definition, this register will
always contain a positive value (even if the CT is in backwards). This register is overwritten every LINE_CYC line cycle (written only once if the calibration is enabled).
3.10
I_RMS
Name
I_RMS
Bits
Cof
16
R
This register is the RMS value of phase A current in X A/LSB, as determined by the
value in the GAIN_I_RMS register. When displaying the RMS current, multiply the (decimal) value in these registers by X to get the display value in Amperes. This register is
overwritten every LINE_CYC line cycle (written only once if the calibration is enabled).
DS51931A-page 24
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.11
RAW2_V_RMS
Name
RAW2_V_RMS
Bits
Cof
64
R
This register is the square of the raw RMS value from the voltage A/D converter in
LSBs. By definition, it will always contain a positive value. This register is overwritten
every LINE_CYC line cycle (written only once if the calibration is enabled).
3.12
RAW_V_RMS
Name
Bits
Cof
RAW_V_RMS
16
R
This is the raw RMS value from the voltage A/D converter in LSBs (square root of the
top 32-bits of RAW2_V_RMS + OFFSET_V_RMS. By definition, this register will
always contain a positive value. The register is overwritten every LINE_CYC line cycle
(written only once if the calibration is enabled).
3.13
V_RMS
Name
V_RMS
Bits
Cof
16
R
This register is the RMS value of the voltage, in X 0.01 V/LSB, as determined by the
value in the GAIN_V_RMS register. When displaying the RMS voltage, assume a calibrated meter exists and multiply the (decimal) value in these registers by X to get the
display value in Volts. This register is overwritten every LINE_CYC line cycle (written
only once if the calibration is enabled).
3.14
LINE_FREQUENCY
Name
Bits
Cof
LINE_FREQUENCY
16
R
This register holds the measured line frequency using the zero crossing technique.
© 2011 Microchip Technology Inc.
DS51931A-page 25
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.15
RAW_POWER_ACT
Name
Bits
Cof
RAW_POWER_ACT
64
R
This register is the raw active power, as it represents the sum of current A/D value times
voltage A/D value results over LINE_CYC line cycles (each line cycle has 128 results).
Each current times voltage multiplication results in a 32-bit word. There are up to 256
line cycles with each line cycle being 128 results, and each result being 32-bit. Thus,
48 bits are needed. This is the register to be read during calibration for calculating the
offset and gain values associated with active power, OFFSET_POWER_ACT and
GAIN_POWER_ACT. This register is overwritten every line cycle, however if the calibration is enabled, the updates will stop once the LINE_CYC line cycles have elapsed.
3.16
POWER_ACT
Name
Bits
Cof
POWER_ACT
32
R
This register is the value for active power. The goal of the calibration is to get this register value to equal X W/LSB. This is done with the OFFSET_POWER_ACT and
GAIN_POWER_ACT registers. When displaying the power, multiply the (decimal)
value in this register by X to get the display value in Watts. This register is overwritten
every LINE_CYC line cycle (written only once if the calibration is enabled).
3.17
POWER_APP
Name
Bits
Cof
POWER_APP
32
R
This is the value of the apparent power. The goal of the calibration is to get this value
to equal X VA/LSB. This is done with the GAIN_POWER_APP registers. When displaying the power for phase A, multiply the (decimal) value in this register by X to get the
display value in Watts. This register is overwritten every LINE_CYC line cycle (written
only once if the calibration is enabled).
3.18
RAW_POWER_REACT
Name
Bits
Cof
RAW_POWER_REACT
64
R
This is the raw reactive power. This register is read during the calibration for calculating
the gain values associated with the reactive power and GAIN_POWER_REACT. This
register is overwritten every LINE_CYC line cycle (written only once if the calibration is
enabled). This register is accumulated once a line-cycle basis.
DS51931A-page 26
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.19
POWER_REACT
Name
POWER_REACT
Bits
Cof
32
R
This is the value for reactive power. The goal is to get this value to equal X VAR/LSB.
This is done with the GAIN_POWER_REACT register. When displaying the power,
multiply the (decimal) value in this register by X to get the display value in Watts. This
register is overwritten every LINE_CYC line cycle (written only once if the calibration is
enabled).
3.20
PERIOD
Name
PERIOD
Bits
Cof
32
R
This 32-bit register represents the total number of clock ticks that elapsed over the most
recent LINE_CYC line cycle. Each LSB represents 1.6 µs with a 40 MHz clock on the
microcontroller. This register is overwritten every LINE_CYC line cycle (written only
once if the calibration is enabled).
3.21
ENERGY_ACT
Bits
Cof
ENERGY_ACT
Name
32
R
RAW_ENERGY_ACT
64
R
The design updates the Energy register using the CF Pulse blink output count. In this
method, the Energy registers increments every pulse by a value equal to
1/(METER_CONSTANT).
ENERGY_W = ENEGRY_W + (1/METER_CONSTANT)
The gain calibration registers GAIN_NUMR_ENERGY_ACT and
GAIN_DENR_ENERGY_ACT hold good for this method also.
3.22
ENERGY_APP
Name
Bits
Cof
ENERGY_APP
32
R
RAW_ENERGY_APP
64
R
These two registers represent the total apparent energy accumulated so far.
© 2011 Microchip Technology Inc.
DS51931A-page 27
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.23
I_ABS_MAX
Name
Bits
Cof
8
R
I_ABS_MAX
NOT IMPLEMENTED IN THIS FIRMWARE/SOFTWARE RELEASE.
3.24
V_ABS_MAX
Name
Bits
Cof
8
R/W
V_ABS_MAX
NOT IMPLEMENTED IN THIS FIRMWARE/SOFTWARE RELEASE.
3.25
ENERGY_REACT
Bits
Cof
ENERGY_REACT
Name
32
R
RAW_ENERGY_REACT
64
R
The design updates the reactive energy registered using the CF Pulse blink output
count too. In this method, the Energy registers increments every pulse by a value equal
to 1/(METER_CONSTANT).
ENERGY_REACT = ENERGY_REACT + (1/METER_CONSTANT)
The gain calibration registers GAIN_NUMR_ENERGY_ACT and
GAIN_DENR_ENERGY_ACT hold good for this method also.
3.26
PHASE_COMPENSATION
Name
Bits
Cof
PHASE_COMPENSATION
8
R/W
Phase delay, signed 8-bit value, provides the phase compensation by ± sampling
time/2.
3.27
OFFSET_I_RMS
Name
OFFSET_I_RMS
Bits
Cof
16
R/W
Square of the offset for RMS current reading, signed 16-bit value. Note that this value
should be similar to the ADCs noise squared. At a gain of 1, the noise will be about
1 LSB, 2 LSBs at a gain of 2, 6 LSBs at a gain of 8, 11 LSBs at a gain of 16, and
22 LSBs at a gain of 32. There may be other sources of noise. Using the square of the
offset allows for higher accuracy. The value will be added before the square root is
taken when calculating the final RMS value.
DS51931A-page 28
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.28
OFFSET_V_RMS
Name
OFFSET_V_RMS
Bits
Cof
16
R/W
Square of offset for RMS voltage reading, signed 8-bit value. Note that this value
should be similar to the ADCs noise squared. For the voltage channel, the noise will be
about 1 LSB. There may be other sources of noise. Using the square of the offset
allows for higher accuracy. The value will be added before the square root is taken
when calculating the final RMS value.
3.29
GAIN_I_RMS
Name
Bits
Cof
GAIN_I_RMS
16
R/W
Current gain to produce X A/LSB. The value is always less than one (for example,
32,767 = 0.9999695).
3.30
GAIN_V_RMS
Name
GAIN_V_RMS
Bits
Cof
16
R/W
Voltage gain to produce 0.1 V/LSB in the V_RMS register. The value is always less than
one (for example, 32,767 = 0.9999695).
3.31
OFFSET_POWER_ACT
Name
Bits
Cof
OFFSET_POWER_ACT
32
R/W
Active power offset (this is a straight offset, not the square, as with voltage and current).
A much larger value is needed because the power is a running sum. This is a 32-bit
signed value.
3.32
GAIN_POWER_ACT
Name
Bits
Cof
GAIN_POWER_ACT
16
R/W
Active power gain to produce X W/LSB. The value is always less than one (for example,
32,767 = 0.9999695).
© 2011 Microchip Technology Inc.
DS51931A-page 29
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.33
OFFSET_POWER_REACT
Name
Bits
Cof
OFFSET_POWER_REACT
32
R/W
Reactive power offset (this is a straight offset, not the square, as with voltage and current). A much larger value is needed because the power is a running sum. This is a
32-bit signed value.
3.34
GAIN_POWER_REACT
Name
GAIN_POWER_REACT
Bits
Cof
16
R/W
Reactive power gain to produce X W/LSB. The value is always less than one (for example, 32,767 = 0.9999695).
3.35
GAIN_ENERGY_ACT
Name
GAIN_ENERGY_ACT
Bits
Cof
16
R/W
Active energy gain to produce X Wh/LSB. The value is always less than one (for example, 32,767 = 0.9999695).
3.36
GAIN_ENERGY_APP
Name
GAIN_ENERGY_APP
Bits
Cof
16
R/W
Apparent energy gain to produce X VAh/LSB. The value is always less than one (for
example, 32,767 = 0.9999695).
3.37
GAIN_ENERGY_REACT
Name
Bits
Cof
GAIN_ENERGY_REACT
16
R/W
Reactive energy gain to produce X VARh/LSB. The value is always less than one (for
example, 32,767 = 0.9999695).
DS51931A-page 30
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.38
CF_PULSE_WIDTH
Name
Bits
Cof
CF_PULSE_WIDTH
8
R/W
Defines the CF pulse width, from 0 to 255. Length of width is valued
* 8 * (1/LINE_FREQUENCY)/128) ms. A maximum of 0.266 seconds for 60 Hz and
0.319 seconds for 50 Hz.
If the value is 0, no CF pulse is produced.
3.39
GAIN_DENR_ENERGY_ACT
Name
Bits
Cof
GAIN_DENR_ENERGY_ACT
8
R/W
8-bit signed value. Represents the number of shifts for active power energy register
ENERGY_ACT before GAIN_DENR_ENERGY_ACT is applied.
3.40
GAIN_NUMR_ENERGY_ACT
Name
Bits
Cof
GAIN_NUMR_ENERGY_ACT
16
R/W
Active power gain to produce a specified pulses-per-watt-hour. The value is always
less than one (for example, 32,767 = 0.9999695).
3.41
MODE1_DEF
Name
Bits
Cof
MODE1_DEF
16
R/W
MODE default power-up settings. On power-up, this register will be read and placed
into the MODE register.
© 2011 Microchip Technology Inc.
DS51931A-page 31
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.42
CAL_STATUS
The CAL_STATUS register holds the calibration status for each individual phase. Broken down by phase, these are the values that can be calibrated. Each bit has the status
of 0 = NOT Calibrated, 1 = CALIBRATED.
REGISTER 3-4:
R/W-0
CAL_STATUS REGISTER
R/W-0
PHASE_COMP OFFSET_I_RMS
ENSATION
R/W-0
U-0
U-0
R/W-0
R/W-0
R/W-0
OFFSET_V_R
MS
—
—
GAIN_I_RMS
GAIN_V_RMS
OFFSET_
POWER_ACT
bit 15
bit 8
U-0
R/W-0
U-0
U-0
U-0
R/W-0
U-0
U-0
—
GAIN_POWER_
ACT
—
—
—
GAIN_POWER
_REACT
—
—
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
bit 15-0
3.43
x = Bit is unknown
All bits: Calibration Register Status bits
1=
This register has been calibrated
0=
This register is NOT calibrated
MAXIMUM CURRENT
Name
MAXIMUM_CURRENT
Bits
Cof
16
R/W
This register holds the maximum current for the meter (IMAX).
3.44
CALIBRATION_VOLTAGE
Name
Bits
Cof
CALIBRATION_VOLTAGE
16
R/W
This register holds the calibration voltage of the meter (VCAL).
3.45
CALIBRATION_CURRENT
Name
Bits
Cof
CALIBRATION_CURRENT
16
R/W
This register holds the calibration current of the meter (ICAL).
DS51931A-page 32
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.46
CALIBRATION_FREQUENCY
Name
Bits
Cof
CALIBRATION_FREQUENCY
16
R/W
This register holds the calibration frequency of the meter.
3.47
METER_CONSTANT
Name
Bits
Cof
16
R/W
METER_CONSTANT
This register holds the meter constant in imp/kWh or imp/kVARh.
3.48
CALIBRATION_LINE_CYCLE
Name
Bits
Cof
CALIBRATION_FREQUENCY
16
R/W
This register holds the number of line cycles used during the calibration.
3.49
GAIN_DENR_ENERGY_REACT
Name
Bits
Cof
GAIN_DENR_ENERGY_REACT
8
R/W
8-bit signed value. Represents the number of shifts for reactive power energy register,
before GAIN_NUMR_ENERGY_REACT is applied.
3.50
GAIN_NUMR_ENERGY_REACT
Name
Bits
Cof
GAIN_NUMR_ENERGY_REACT
16
R/W
Reactive power gain to produce a specified pulse per VAR-hour. The value is always
less than one (for example, 32,767 = 0.9999695).
3.51
PHASE_COMPENSATION_90
Name
Bits
Cof
PHASE_COMPENSATION_90
8
R/W
Phase delay for reactive power, signed 8-bit value, ± sampling time/2 µs.
© 2011 Microchip Technology Inc.
DS51931A-page 33
PIC18F87J72 Single-Phase Energy Meter Reference Design
3.52
CREEP_THRSHOLD_MINUTE
Name
Bits
Cof
CREEP_THRSHOLD_MINUTE
8
R/W
This 8-bit register holds the decimal representation of the creep threshold time in minutes (total creep is minutes + seconds register).
3.53
CREEP_THRSHOLD_SECOND
Name
Bits
Cof
CREEP_THRSHOLD_SECOND
8
R/W
This 8-bit register holds the decimal representation of the creep threshold time in seconds (total creep is minutes + seconds register).
3.54
ENERGY_ACT_FORWARD
Name
ENERGY_ACT_FORWARD
Bits
Cof
32
R/W
This 32-bit register is the accumulated active energy in the forward direction only.
The design updates the Energy register using the CF Pulse blink output count. In this
method, the Energy registers increments every pulse by a value equal to
1/(METER_CONSTANT).
3.55
ENERGY_ACT_REVERSE
Name
ENERGY_ACT_REVERSE
Bits
Cof
32
R/W
This 32-bit register is the accumulated active energy in the reverse direction only.
The design updates the Energy register using the CF Pulse blink output count. In this
method, the Energy registers increments every pulse by a value equal to
1/(METER_CONSTANT).
3.56
ENERGY_REACT_INDUCTIVE
Name
Bits
Cof
ENERGY_REACT_INDUCTIVE
32
R/W
This 32-bit register is the accumulated reactive energy in the inductive quadrants only.
The design updates the Energy register using the CF Pulse blink output count. In this
method, the Energy registers increments every pulse by a value equal to
1/(METER_CONSTANT).
DS51931A-page 34
© 2011 Microchip Technology Inc.
Calculation Engine and Register Description
3.57
ENERGY_REACT_CAPACITIVE
Name
Bits
Cof
ENERGY_REACT_CAPACITIVE
32
R/W
This 32-bit register is the accumulated reactive energy in the capacitive quadrants only.
The design updates the Energy register using the CF Pulse blink output count. In this
method, the Energy registers increments every pulse by a value equal to
1/(METER_CONSTANT).
© 2011 Microchip Technology Inc.
DS51931A-page 35
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
DS51931A-page 36
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Appendix A. Schematic and Layouts
A.1
INTRODUCTION
This appendix contains the following schematics and layouts for hardware revision two
of the PIC18F87J72 Energy Meter Reference Design:
•
•
•
•
•
•
A.2
Board – Schematic
Board – Schematic
Board – Top Silk
Board – Top Trace and Pads
Board – Bottom Silk
Board – Bottom Trace and Pads
SCHEMATICS AND PCB LAYOUT
The layer order is shown in Figure A-1.
Top Layer
Bottom Layer
FIGURE A-1:
© 2011 Microchip Technology Inc.
Layer Order.
DS51931A-page 37
5
6
7
8
LCD_8A/8F/8E/8D
9
LCD_8B/8G/8C/NC
10
LCD_7A/7F/7E/7D
11
LCD_7B/7G/7C/NC
12
LCD_6A/6F/6E/6D
13
LCD_6B/6G/6C/NC
14
LCD_5A/5F/RE/5D
15
LCD_5B/5G/5C/NC
16
LCD_4A/4F/4E/4D
17
LCD_4B/4G/4C/4P
18
LCD_3A/3F/3E/3D
19
LCD_3B/3G/3C/3P
20
LCD_V/K2/R/H2
HIGH
LOW
275VAC
MOV1
A
CP4
L2
150
LCD_COM3
27
C4
1uF
A
D5
2
1
A
+
MRA4005T3G
D6
D7
R18
470
C38
470uF
1
A
+
U6
470uF
C10
A
GND
1
L1
150
B
L4
300mA/150 1K TF R41
A
100NF
C9
A
+5V
10uF
C8
+5V
100NF
C6
B
3
A
Q1
A
NPO
68NF
C28
NPO
68NF
C26
A
A
A
NPO
68NF
C31
B
GND
1
OUT
MCP1700T-3302E/TT
A
IN
R37
1K
R38
1K
1K TF R42
300mA/150
R44
L5
CP1
NONE
NPO
68NF
A
C35
A
CP3
L3
R24 R25
300mA/150 330K 330K
(LOW)
(LOW)
TP1
HIGH
LINE_SHUNT2
LINE_SHUNT1
R39
CP2 NONE
LCD
3 LM1117-SOT223 2
OUT
IN
Power
A
2
MRA4005T3G
BZG03C15G
2
3
1
RAPC722
J2
1 D4
2
25
MRA4005T3G
26
LCD_COM1
28
LCD_COM2
B
100NF
C5
2
B
B
47NF
47NF
C17
C16
C41
10uF
+3.3V
LCD_7A/7F/7E/7D
LCD_7B/7G/7C/NC
LCD_6A/6F/6E/6D
LCD_6B/6G/6C/NC
LCD_5A/5F/RE/5D
LCD_5B/5G/5C/NC
C19
10uF
LCD_4A/4F/4E/4D
MPU_MCLR
+
47NF
23
C13
47NF C14
24
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
22
21
2B/2G/2C/2P
1B/1G/1C/1P
2A/2F/2E/2D
1A/1F/1E/1D
B
COM1
LCD_1A/1F/1E/1D
COM2
47NF
C11
B
SEG22/AN9/C2INA/RF4
SEG23/AN10/C1INB/CVR
SDCH1+
SDCH1-
SEG20/AN7/C1OUT/RF2
SEG21/AN8/C2INB/RF3
+5V
10
R40
A
100NF
C34
B
B
+3.3V
U8
R43
100NF
C36
10
+3.3V
MPU_SDO
LCD_COM1
LCD_COM3
PIC18F87J72-80TQFP
SEG24/AN11/C1INA/RF6
SEG25/AN5/SS/RF7
VDDCORE/VCAP
VSS
RG4/SEG26
MCLR
VLCAP2/RG3
VLCAP1/RX2/DT2/RG2
RG1/TX2/CK2
LCDBIAS0/RG0
LCDBIAS1/RE0
LCDBIAS2/RE1
SDCH0-
SDCH0+
R22
DNP
LCD_2A/2F/2E/2D
COM3
LCD_2B/2G/2C/2P
COM4
+3.3V
LCD_V/K1/H1/A/W
LCD_COM4
4
AFE_SYNC
3
LCD_COM2
AVDD
LCD_1B/1G/1C/1P
B
AFE_SYNC
2
B
B
LCD_1A/1F/1E/1D
5A/5F/5E/5D
6A/6F/6E/6D
7A/7F/7E/7D
8A/8F/8E/8D
3A/3F/3E/3D
11A/11F/11E/11D 10A/10F/10E/10D 9A/9F/9E/9D
4A/4F/4E/4D
V/K2/r/h2
3B/3G/3C/3P
11B/11G/11C/NC 10B/10G/10C/NC 9B/9G/9C/NC
4B/4G/4C/4P
6B/6G/6C/NC
5B/5G/5C/NC
7B/7G/7C/NC
8B/8G/8C/NC
B
A
100NF
C30
A
A
100NF
C27
B
PIC18F87J72
A
B
NET00007
J6
RX
TX
6
5
4
3
2
1
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
USB_RX
USB_TX
SDCLKI
SEG13/CCP1/RC2
SEG17/SCK/SCL/RC3
SEG16/SDI/SDA/RC4
SEG12/SDO1/RC5
PGD/KBI3/RB7
VDD
OSC1/CLKI/RA7
OSC2/CLKO/RA6
VSS
PGC/KBI2/RB6
SEG29/KBI1/RB5
SEG11/KB10/RB4
SEG10/CTED2/INT3/RB3
SEG9/CTED1/INT2/RB2
SEG8/RTCC/INT1/RB1
SEG30/INT0/RB0
SDCS
SDSCK
SDSDO
MPU_PGC
LCD_8A/8F/8E/8D
LCD_3A/3F/3E/3D
LCD_3B/3G/3C/3P
AFE_DR
AFE_F0/CS
MPU_SCK
MPU_SDI
+3.3V
AFE_CLKIN
AFE_CLKIN
MPU_SCK
MPU_SDI
MPU_SDO
MPU_PGD
3
100NF
C3
R16
R13
4.7K
SW3
X2
GND
2
MOM-NC
B
10 MHZ
X1
PUSH = HI
1
B
R26
470
18PF
C15
1K
B
VBUS
B
SW1
1
2
3
4
5
6
7
8
9
10
B
100NF
C40
C39
ISO_GND
6.8uF
ACTIVE
POWER
ISO_GND
270
100NF
C7
ISO_GND
R33
5
4
3
2
1
B
6
4
3
2
1
ISO_GND
ISO_GND
ISO_TX
J5
HDR2X1
J4
1
HDR2X1
J3
2
1
Shield
GND
ID
D+
D-
VBUS
2
VBUS
R19
100
B
R20
100
ISO_RX
R29
4.7K
VBUS
ISO_GND
D+
D-
VBUS
D3
GM1JR35200AE
RED
NET00000
D2
GM1JR35200AE
RED
NET00007
AN2
VDD1
VO1
GND1
3
4
3
4
2
1
2
1
R21
698
MPU_MCLR
ACSL-6210
U5
U4
PC365N
U7
PC365N
Pulse Outputs
REACTIVE
POWER
20
VSS
D+ 19
D- 18
VUSB 17
16
GPO/SSPND
15
GP1/UPLOAD
14
GP2
13
CTS
12
RX 11
RTS
U2
MCP2200
VDD
OSC1
OSC2
RST
GP7/TXLED
GP6/RXLED
GP5
GP4
GP3
TX
ISO_GND
VBUS
MOM-NC
PUSH = HI
B3S-1002P
RED
GM1JR35200AE
D9
R27
470
R28
470
VBUS
VBUS
R12
4.7K
+3.3V
100NF
C2
R14
100NF
C22
+3.3V
RED
GM1JR35200AE
D8
OSC1
ISO_GND
OSC2
B
100NF
C18
+3.3V
B3S-1002P
18PF
C20
B
+3.3V
B
100NF
C21
+3.3V
CSTCE12M0G15L99-R0
1K
B
100NF
C12
+3.3V
B
1
R17
698
GND2
VO2
VDD2
AN1
5
6
7
8
R15
B
R11
4.7K
R34
C25
100NF
USB_RX
+3.3V
B
C29
100NF
100NF
C1
R30
4.7K
120
+3.3V
1K
SWR
11
10
1
3
4
5
2
6
12
9
+3.3V
B
C32
C24
100NF 100NF
RX
TX
MOM-NC
PUSH = HI
B3S-1002P
USB_TX
+3.3V
B
+3.3V
100NF
C23
B
K1/h1/A/W
21
LCD_1B/1G/1C/1P
SEG15/AN4/RA5
80
LCD_2B/2G/2C/2P
SEG32/T1OSI/CCP2(1)/
LCDBIAS3/RE2
75
LCD_COM4
AN3/VREF+/RA3
25
SDAVSS
26
AVSS
24
AN2/VREF-/RA2
27
SDREFIN+/SDOUT
28
SDREFIN29
ENVREG
22
+3.3V
23
+3.3V
30
AN0/RA0
31
SEG18/AN1/RA1
MEM_CS
VSS
32
SEG19/AN6/RF1
LCD_8B/8G/8C/NC
79
COM0/RE3
78
COM1/RE4
77
COM2/RE5
76
COM3/RE6
74
SDAVDD
73
SEG0/RD0
LCD_4B/4G/4C/4P
SEG31/CCP2(1)/RE7
72
VDD
71
VSS
70
SDVDD
69
SDMCLR
68
SEG1/RD1
67
SEG2/RD2
66
SEG3/RD3
65
36
SEG14/T0CKI/RA4
34
IR_RX
33
LCD_V/K2/R/H2
35
LCD_V/K1/H1/A/W
AFE_F0/CS
61
NET00000
63
SEG5/RD5
62
SEG6/RD6
SEG28/RX1/DT1/RC7
SEG27/TX1/CK1/RC6
LCD_2A/2F/2E/2P
SEG4/RD4
SDVSS
B
B
64
SDSDI
37
B
SEG7/RD7
SDDR
40
AFE_DR
T1OSO/T13CLKI/RC0
IR_TX
38
MPU_TX
39
MPU_RX
WP
VSS
VCC 8
7
HOLD
6
SCK
5
SI
U3
25AA256
SO
CS
4
5
6
3
1
2
P1
HDR6X1
+3.3V
R23
10K
+3.3V
MPU_PGD
MPU_PGC
MPU_MCLR
MPU_SDO
MPU_SCK
+3.3V
R32
4.7K
+3.3V
EEPROM
B
4
3
1
2
ROUT1
ROUT2
100NF
C33
14
7
MAX3232
R36
698
3
2
4
9
5
J1
PC SIDE
_
< (1) DATA CARRIER DETECT
_
< (6) DATA SET READY
_
< (2) RECEIVE DATA
(7) REQUEST TO SEND
B
+3.3V
100NF
C37
(3) TRANSMIT DATA
_
< (8) CLEAR TO SEND
(4) DATA TERMINAL READY
_
< (9) RING INDICATOR
(5) SIGNAL GROUND
D09S24A4GV00LF
B
3
8
1
6
2
7
IR_TX
IR_RX
AFE_CLKIN
AFE_SYNC
AFE_FO/CS
MPU_SDI
MPU_SCK
MPU_SDO
TP2
TP6
TP7
TP4
TP5
TP3
Comm./Cal.
B
+3.3V
IR
B
B B
4
1
+3.3V
Test Points
16
VCC
15
GND
13
RIN1
8
RIN2
DOUT1
DOUT2
U10
B
+3.3V
D1
GL100MN1MP1
U1
GP1US301XP
In-Circuit Debug/
Programming Header
DIN1
DIN2
C1+
C1C2+
C2V+
V-
+3.3V
R31
4.7K
MEM_CS
MPU_SDI
_
_
MPU_TX
_
MPU_RX
<
<
DS51931A-page 38
B
A.3
<
LCD1
INDIA LCD
PIC18F87J72 Single-Phase Energy Meter Reference Design
BOARD – SCHEMATIC
© 2011 Microchip Technology Inc.
Schematic and Layouts
A.4
BOARD – SCHEMATIC TOP SILK AND BOARDER OUTLINE
© 2011 Microchip Technology Inc.
DS51931A-page 39
PIC18F87J72 Single-Phase Energy Meter Reference Design
A.5
BOARD – TOP SILK
D8
U1
D9
J1
D1
P1
J4
J3
D2
D3
LCD1
SW3
SW1
SW2
J2
DANGER
HIGH VOLTAGE
PIC18F87J72 SHUNT METER
DS51931A-page 40
© 2011 Microchip Technology Inc.
Schematic and Layouts
A.6
BOARD – TOP TRACE AND PADS
© 2011 Microchip Technology Inc.
DS51931A-page 41
PIC18F87J72 Single-Phase Energy Meter Reference Design
A.7
BOARD – BOTTOM SILK
C40
C7
R28
R27 R26
C24
C25
R29
C32
C39
C33
R17
R20
U7
C37
C29
R19
R21
R33
R36
U9
R23
U4
R30
R34
X1
C20
C15
C12
U8
R16
R43
R13
C36
C3
C30
C18
C34
R40
C27
C21
U3
C22
R32
R22
C11
DANGER
HIGH VOLTAGE
C13
C14
R31
C19
C23
C17
C16
U6
R37
C6
C5
C26
D6
Q1
C41
R38
C28
C8
C9
R14
C38
R12
C10
C2
R18
D5
D7
C35
C31
R15
R41
R42
R11
C1
C4
R25
R39
L5
L4
R44
L2
L3
R24
L1
D4
MOV1
DS51931A-page 42
© 2011 Microchip Technology Inc.
Schematic and Layouts
A.8
BOARD – BOTTOM TRACE AND PADS
© 2011 Microchip Technology Inc.
DS51931A-page 43
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
DS51931A-page 44
© 2011 Microchip Technology Inc.
PIC18F87J72 SINGLE-PHASE ENERGY
METER REFERENCE DESIGN
Appendix B. Bill of Materials (BOM)
TABLE B-1:
BILL OF MATERIALS (BOM)
Qty
Reference
Description
Manufacturer
Part Number
23
C1, C2,
C3, C5,
C6, C7,
C9, C12,
C18, C21,
C22, C23,
C24, C25,
C27, C29,
C30, C32,
C33, C34,
C36, C40
CAP .10UF 16V CERAMIC Y5V 0603 Kemet
C0603C104Z4VACTU
1
C4
CAP 1.0UF 630V METAL POLYPRO
EPCOS Inc
B32614A6105J008
2
C8, C19
CAP CER 10UF 6.3V X5R 0603
Murata
GRM188R60J106ME47D
Manufacturing Co., Ltd.
2
C10, C38
CAP 470UF 25V ELECT FC SMD
Panasonic® – ECG
5
C11, C13,
C14, C16,
C17
CAP CER 47000PF 25V 10% X7R
0603
Murata
GRM188R71E473KA01D
Manufacturing Co., Ltd.
2
C15, C20
CAP CER 18PF 50V 5% C0G 0603
Murata
GRM1885C1H180JA01D
Manufacturing Co., Ltd.
4
C26, C28,
C31, C35
CAP CER 6800PF 50V 5% C0G 1206 Murata
GRM3195C1H682JA01D
Manufacturing Co., Ltd.
1
C39
CAP CERAMIC 6.8UF 6.3V X5R
0805
1
C41
CAP 10UF 16V ELECT FC SMD
10
CP1, CP2, DO NOT INSTALL
CP3, CP4,
TP2, TP3,
TP4, TP5,
TP6, TP7
EEV-FC1E471P
Kemet
C0805C685K9PACTU
Panasonic – ECG
EEE-FC1C100R
—
—
1
D1
DO NOT INSTALL
—
—
4
D2, D3,
D8, D9
LED 1.6X0.8MM 625NM RED CLR
SMD
Kingbright Electronics
Co., Ltd.
APT1608EC
3
D4, D5, D6 DIODE SCHOTTKY 40V 1A SMB
ON Semiconductor®
MRA4005T3G
1
D7
DIODE ZENER 15V 1.5W SMA
ON Semiconductor
1
J1
CONN DSUB RCPT 9POS STR PCB FCI
SLD
D09S24A4GV00LF
1
J2
CONN POWERJACK MINI R/A T/H
CUI Inc.
PJ-102B
2
J3, J4
"DO NOT INSTALL
—
—
1
J5
CONN MINI USB RCPT RA TYPE B
SMD
Tyco Electronics
1734035-2
Note 1:
BZG03C15G
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
© 2011 Microchip Technology Inc.
DS51931A-page 45
PIC18F87J72 Single-Phase Energy Meter Reference Design
TABLE B-1:
BILL OF MATERIALS (BOM) (CONTINUED)
Qty
Reference
Description
2
(two
Shunts) at
J6
SHUNT LP W/HANDLE 2 POS 30AU
Tyco Electronics
881545-2
1
J6
CONN HDR DUAL 6POS .100 SRT
AU
Molex® Connector
Corporation
10-89-7062
2
L1,L2
EMI/RFI Suppressors and Ferrites
150ohms 100 MHz .3A Monolithic
1806 SMD
Laird Technologies®
LI1806C151R-10
3
L3, L4, L5
EMI/RFI Suppressors and Ferrites
150ohms 100 MHz .8A Monolithic
0805 SMD
Laird Technologies
LI0805H151R-10
1
LCD 1
LCD Glass size 65.00 x 18.00
Xiamen Ocular
Optics Co., Ltd.
DP076P
1
MOV 1
VARISTOR 275V RMS 20MM
RADIAL
EPCOS Inc.
S20K275E2
1
P1
6 X 1 Header 2.54mm on center 6
mm/2.5mm
Samtec
TSW-106-07-G-S
1
PCB
RoHS Compliant Bare PCB,
PIC18F87J72 Energy Meter Reference Design
—
104-00280
1
Q1
IIC LDO REG 200MA 3.3V SOT-23-3
Microchip
Technology Inc.
MCP1700T-3302E/TT
5
R11, R12,
R13, R31,
R32
RES 4.70K OHM 1/10W 1% 0603
SMD
ROHM Co., Ltd.
MCR03EZPFX4701
3
R14, R15,
R16
RES 1.00K OHM 1/10W 1% 0603
SMD
ROHM Co., Ltd.
MCR03EZPFX1001
3
R17, R21,
R36
RES 698 OHM 1/10W 1% 0603 SMD
ROHM Co., Ltd.
MCR03EZPFX6980
1
R18
RES 470 OHM 1W 5% 2512 SMD
Panasonic – ECG
ERJ-1TYJ471U
2
R19, R20
RES 100 OHM 1/10W 1% 0603 SMD
ROHM Co., Ltd.
MCR03EZPFX1000
1
R22
DO NOT INSTALL
—
—
1
R23
RES 10.0K OHM 1/10W 1% 0603
SMD
ROHM Co., Ltd.
MCR03EZPFX1002
2
R24, R25
RES 330K OHM 1/4W 5% 1206 SMD Stackpole
Electronics Inc.
RMCF 1/8 330K 5% R
3
R26, R27,
R28
RES SMT, 470-OHM 1/10W 5% 0603 Panasonic – ECG
ERJ-3GEYJ471V
2
R29, R30
RES 2.70K OHM 1/10W 1% 0603
SMD
MCR03EZPFX2701
1
R33
RES SMT, 270-OHM 1/10W 5% 0603 Panasonic – ECG
ERJ-3GEYJ271V
1
R34
RES SMT, 120-OHM 1/10W 5% 0603 Panasonic – ECG
ERJ-3GEYJ121V
2
R37, R38
RES 1.00K OHM 1/8W 1% 0805 SMD ROHM Co., Ltd.
MCR10EZHF1001
2
R39, R44
DO NOT INSTALL
2
R40, R43
RES 10.0 OHM 1/10W 1% 0603 SMD ROHM Co., Ltd.
MCR03EZPFX10R0
2
R41, R42
RES 1.0K OHM .1% 1/4W 0805 SMD Susumu Co., Ltd.
RGH2012-2E-P-102-B
3
SW1,
SWITCH TACT 6MM 230GF
SW2, SW3 H=4.3MM
Note 1:
Manufacturer
ROHM Co., Ltd.
—
OMRON
Part Number
—
B3S-1002 BY OMZ
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
DS51931A-page 46
© 2011 Microchip Technology Inc.
Bill of Materials (BOM)
TABLE B-1:
Qty
BILL OF MATERIALS (BOM) (CONTINUED)
Reference
Description
Manufacturer
Part Number
1
TP1
Wire Test Point 0.3" Length
Component Corporation PJ-202-30
1
U1
DO NOT INSTALL
—
—
1
U2
MCP2200 USB to UART Serial
Converter
Microchip Technology
Inc.
MCP2200-I/SS
1
U3
IC EEPROM 256 KBIT 10 MHZ
8-SOIC
Microchip Technology
Inc.
25AA256-I/SN
2
U4, U7
PHOTOCOUPLER DARL OUT
4-SMD
Sharp Electronic
Corporation
PC365NJ0000F
1
U5
OPTOCOUPLER DUAL BI 15MBD
8-SOIC
Avago Technologies
ACSL-6210-00RE
1
U6
IC REG LDO 800MA 5.0V SOT-223
National Semiconductor LM1117MP-5.0/NOPB
1
U8
PIC18F Microcontroller with 32K
bytes of Flash, 2048 bytes of RAM
Microchip Technology
Inc.
PIC18F87J72-80I/PT
1
U10
IC DRVR/RCVR MULTCH RS-232
16-SSOP
Texas Instruments
MAX3232CDBR
1
X1
CRYSTAL 10.0000 MHZ 10PF SMD
Abracon™ Corporation
ABM3B-10.000MHZ-10-1-U-T
1
X2
RESONATOR 12.0 MHZ CERAMIC
Murata Manufacturing
Co., Ltd.
CSTCE12M0G55-R0
Note 1:
The components listed in this Bill of Materials are representative of the PCB assembly. The
released BOM used in manufacturing uses all RoHS-compliant components.
© 2011 Microchip Technology Inc.
DS51931A-page 47
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
DS51931A-page 48
© 2011 Microchip Technology Inc.
PIC18F87J72 Single-Phase Energy Meter Reference Design
NOTES:
© 2011 Microchip Technology Inc.
DS51931A-page 49
Worldwide Sales and Service
AMERICAS
ASIA/PACIFIC
ASIA/PACIFIC
EUROPE
Corporate Office
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 480-792-7200
Fax: 480-792-7277
Technical Support:
http://www.microchip.com/
support
Web Address:
www.microchip.com
Asia Pacific Office
Suites 3707-14, 37th Floor
Tower 6, The Gateway
Harbour City, Kowloon
Hong Kong
Tel: 852-2401-1200
Fax: 852-2401-3431
India - Bangalore
Tel: 91-80-3090-4444
Fax: 91-80-3090-4123
India - New Delhi
Tel: 91-11-4160-8631
Fax: 91-11-4160-8632
Austria - Wels
Tel: 43-7242-2244-39
Fax: 43-7242-2244-393
Denmark - Copenhagen
Tel: 45-4450-2828
Fax: 45-4485-2829
India - Pune
Tel: 91-20-2566-1512
Fax: 91-20-2566-1513
France - Paris
Tel: 33-1-69-53-63-20
Fax: 33-1-69-30-90-79
Japan - Yokohama
Tel: 81-45-471- 6166
Fax: 81-45-471-6122
Germany - Munich
Tel: 49-89-627-144-0
Fax: 49-89-627-144-44
Atlanta
Duluth, GA
Tel: 678-957-9614
Fax: 678-957-1455
Boston
Westborough, MA
Tel: 774-760-0087
Fax: 774-760-0088
Chicago
Itasca, IL
Tel: 630-285-0071
Fax: 630-285-0075
Cleveland
Independence, OH
Tel: 216-447-0464
Fax: 216-447-0643
Dallas
Addison, TX
Tel: 972-818-7423
Fax: 972-818-2924
Detroit
Farmington Hills, MI
Tel: 248-538-2250
Fax: 248-538-2260
Indianapolis
Noblesville, IN
Tel: 317-773-8323
Fax: 317-773-5453
Los Angeles
Mission Viejo, CA
Tel: 949-462-9523
Fax: 949-462-9608
Santa Clara
Santa Clara, CA
Tel: 408-961-6444
Fax: 408-961-6445
Toronto
Mississauga, Ontario,
Canada
Tel: 905-673-0699
Fax: 905-673-6509
Australia - Sydney
Tel: 61-2-9868-6733
Fax: 61-2-9868-6755
China - Beijing
Tel: 86-10-8528-2100
Fax: 86-10-8528-2104
China - Chengdu
Tel: 86-28-8665-5511
Fax: 86-28-8665-7889
Korea - Daegu
Tel: 82-53-744-4301
Fax: 82-53-744-4302
China - Chongqing
Tel: 86-23-8980-9588
Fax: 86-23-8980-9500
Korea - Seoul
Tel: 82-2-554-7200
Fax: 82-2-558-5932 or
82-2-558-5934
China - Hong Kong SAR
Tel: 852-2401-1200
Fax: 852-2401-3431
Malaysia - Kuala Lumpur
Tel: 60-3-6201-9857
Fax: 60-3-6201-9859
China - Nanjing
Tel: 86-25-8473-2460
Fax: 86-25-8473-2470
Malaysia - Penang
Tel: 60-4-227-8870
Fax: 60-4-227-4068
China - Qingdao
Tel: 86-532-8502-7355
Fax: 86-532-8502-7205
Philippines - Manila
Tel: 63-2-634-9065
Fax: 63-2-634-9069
China - Shanghai
Tel: 86-21-5407-5533
Fax: 86-21-5407-5066
Singapore
Tel: 65-6334-8870
Fax: 65-6334-8850
China - Shenyang
Tel: 86-24-2334-2829
Fax: 86-24-2334-2393
Taiwan - Hsin Chu
Tel: 886-3-6578-300
Fax: 886-3-6578-370
China - Shenzhen
Tel: 86-755-8203-2660
Fax: 86-755-8203-1760
Taiwan - Kaohsiung
Tel: 886-7-213-7830
Fax: 886-7-330-9305
China - Wuhan
Tel: 86-27-5980-5300
Fax: 86-27-5980-5118
Taiwan - Taipei
Tel: 886-2-2500-6610
Fax: 886-2-2508-0102
China - Xian
Tel: 86-29-8833-7252
Fax: 86-29-8833-7256
Thailand - Bangkok
Tel: 66-2-694-1351
Fax: 66-2-694-1350
Italy - Milan
Tel: 39-0331-742611
Fax: 39-0331-466781
Netherlands - Drunen
Tel: 31-416-690399
Fax: 31-416-690340
Spain - Madrid
Tel: 34-91-708-08-90
Fax: 34-91-708-08-91
UK - Wokingham
Tel: 44-118-921-5869
Fax: 44-118-921-5820
China - Xiamen
Tel: 86-592-2388138
Fax: 86-592-2388130
China - Zhuhai
Tel: 86-756-3210040
Fax: 86-756-3210049
02/18/11
DS51931A-page 50
© 2011 Microchip Technology Inc.