MCP39F511
Power-Monitoring IC with Calculation and Energy Accumulation
Features
Description
• Power Monitoring Accuracy Capable of 0.1%
Error Across 4000:1 Dynamic Range
• Built-In Calculations on Fast 16-Bit Processing
Core
- Active, Reactive, Apparent Power
- True RMS Current, RMS Voltage
- Line Frequency, Power Factor
• 64-bit Wide Import and Export Active Energy
Accumulation Registers
• 64-bit Four Quadrant Reactive Energy
Accumulation Registers
• Signed Active and Reactive Power Outputs
• Dedicated Zero Crossing Detection (ZCD) Pin
Output with Less than 200 µs Latency
• Dedicated PWM Output Pin with Programmable
Frequency and Duty Cycle
• Automatic Event Pin Control through Fast Voltage
Surge Detection Less than 5 ms Delay
• Two Wire Serial Protocol with Selectable Baud
Rate Up to 115.2 kbps using Universal
Asynchronous Receiver/Transmitter (UART)
• Four Independent Registers for Minimum and
Maximum Output Quantity Tracking
• Fast Calibration Routines and Simplified
Command Protocol
• 512 Bytes User-Accessible EEPROM through
Page Read/Write Commands
• Low-Drift Internal Voltage Reference, 10 ppm/°C
Typical
• 28-lead 5x5 QFN Package
• Extended Temperature Range -40°C to +125°C
The MCP39F511 is a highly integrated, complete
single-phase power-monitoring IC designed for
real-time measurement of input power for
AC/DC power supplies, power distribution units,
consumer and industrial applications. It includes
dual-channel Delta-Sigma ADCs, a 16-bit calculation
engine, EEPROM and a flexible 2-wire interface. An
integrated low-drift voltage reference with 10 ppm/°C in
addition to 94.5 dB of SINAD performance on each
measurement channel allows for better than 0.1%
accurate designs across a 4000:1 dynamic range.
Applications
• Power Monitoring for Home Automation
• Industrial Lighting Power Monitoring
• Real-Time Measurement of Input Power for
AC/DC Supplies
• Intelligent Power Distribution Units
2015 Microchip Technology Inc.
Package Types
ZCD
REFIN+/OUT
MCLR
DVDD
DGND
DGND
DR
MCP39F511
5x5 QFN*
28 27 26 25 24 23 22
21 AGND
EVENT1 1
NC 2
20 AN_IN
NC 3
19 V1+
EP
29
UART_RX 4
COMMONA 5
18 V117 I116 I1+
OSCI 6
15 EVENT2
OSCO 7
PWM
COMMONB
UART_TX
AVDD
RESET
NC
9 10 11 12 13 14
NC
8
*Includes Exposed Thermal Pad (EP);
see Table 3-1.
DS20005393B-page 1
MCP39F511
Functional Block Diagram
I1+
I1-
V1+
V1-
+
PGA
-
+
PGA
-
AN_IN
DS20005393B-page 2
AVDD
AGND
DVDD
DGND
Internal
Oscillator
24-bit Delta-Sigma
Multi-level
Modulator ADC
24-bit Delta-Sigma
Multi-level
Modulator ADC
10-bit SAR
ADC
SINC3
Digital Filter
OSCO
Timing
Generation
SINC3
Digital Filter
OSCI
UART
Serial
Interface
16-BIT
CORE
FLASH
UART_TX
UART_RX
PWM
EVENT1
Calculation
Engine
(CE)
EVENT2
Digital Outputs
ZCD
2015 Microchip Technology Inc.
MCP39F511
MCP39F511 Typical Application – Single Phase, Two-Wire Application Schematic
10
1 µF
LOAD
0.1 µF
0.1 µF
AVDD DVDD RESET
1 k
REFIN/OUT+
I1+
+
+3.3V
0.1 µF
33 nF
2 m
-
UART_TX
1 k
to MCU UART
I133 nF
1 k
UART_RX
V1-
to MCU UART
33 nF
MCP39F511
499 k 499 k
(OPTIONAL)
V1+
1 k
33 nF
N.C.
Leave Floating
Connect on PCB
+3.3V
MCP9700A
NC
NC
NC
NC
DR
COMMONA,B
EVENT1
EVENT2
ZCD
AN_IN
PWM
OSCO
4 MHz
OSCI
22 pF
DGND
AGND
22 pF
(OPTIONAL)
+3.3V
0.47 µ F 470
MCP1754
0.01 µF
N
L
DGND
470 µF
AGND
Note 1: The MCP39F511 demonstration board uses a switching power supply, however a low-cost
capacitive-based supply, as shown here, is sufficient for many applications.
2: The external sensing components shown here, a 2 mΩ shunt, two 499 kΩ and 1 kΩ resistors for the
1000:1 voltage divider, are specifically chosen to match the default values for the calibration registers
defined in Section 6.0 “Register Descriptions”. By choosing low-tolerance components of these
values (e.g. 1% tolerance), measurement accuracy in the 2-3% range can be achieved with zero
calibration. See Section 9.0 “MCP39F511 Calibration” for more information.
2015 Microchip Technology Inc.
DS20005393B-page 3
MCP39F511
1.0
ELECTRICAL
CHARACTERISTICS
Absolute Maximum Ratings †
DVDD .................................................................. -0.3 to +4.5V
AVDD .................................................................. -0.3 to +4.0V
Digital inputs and outputs w.r.t. AGND ............... -0.3V to +4.0V
Analog Inputs (I+,I-,V+,V-) w.r.t. AGND ............... ....-2V to +2V
VREF input w.r.t. AGND ........................ ....-0.6V to AVDD +0.6V
Maximum Current out of DGND pin..............................300 mA
Maximum Current into DVDD pin .................................250 mA
Maximum Output Current Sunk by Digital IO ................25 mA
Maximum Current Sourced by Digital IO.......................25 mA
Storage temperature .....................................-65°C to +150°C
Ambient temperature with power applied......-40°C to +125°C
Soldering temperature of leads (10 seconds) ............. +300°C
ESD on the analog inputs (HBM,MM) .................4.0 kV, 200V
ESD on all other pins (HBM,MM) ........................4.0 kV, 200V
1.1
† Notice: Stresses above those listed under “Maximum
Ratings” may cause permanent damage to the device.
This is a stress rating only and functional operation of
the device at those or any other conditions above those
indicated in the operation listings of this specification is
not implied. Exposure to maximum rating conditions for
extended periods may affect device reliability.
Specifications
TABLE 1-1:
ELECTRICAL CHARACTERISTICS
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to +3.6V, TA = -40°C to +125°C,
MCLK = 4 MHz, PGA GAIN = 1.
Characteristic
Sym.
Min.
Typ.
Max.
Units
Test Conditions
Active Power (Note 1)
P
—
±0.1
—
%
4000:1 Dynamic Range
on Current Channel
(Note 2)
Reactive Power (Note 1)
Q
—
±0.1
—
%
4000:1 Dynamic Range
on Current Channel
(Note 2)
Apparent Power (Note 1)
S
—
±0.1
—
%
4000:1 Dynamic Range
on Current Channel
(Note 2)
Current RMS (Note 1)
IRMS
—
±0.1
—
%
4000:1 Dynamic Range
on Current Channel
(Note 2)
Voltage RMS (Note 1)
VRMS
—
±0.1
—
%
4000:1 Dynamic Range
on Voltage Channel
(Note 2)
Power Measurement
Power Factor (Note 1)
—
±0.1
—
%
Line Frequency (Note 1)
LF
—
±0.1
—
%
Note 1:
2:
Calculated from reading the register values with no averaging, single computation cycle with accumulation interval of 4
line cycles.
Specification by design and characterization; not production tested.
3:
N = Value in the Accumulation Interval Parameter register. The default value of this register is 2 or TCAL = 80 ms for
50 Hz line.
4:
5:
Applies to Voltage Sag and Voltage Surge events only.
Applies to all gains. Offset and gain errors depend on the PGA gain setting. See Section 2.0 “Typical Performance
Curves” for typical performance.
VIN = 1VPP = 353 mVRMS @ 50/60 Hz.
6:
7:
Variation applies to internal clock and UART only. All calculated output quantities are temperature compensated to the
performance listed in the respective specification.
8:
Lower baud rates selectable only on system versions 0xFA14 and later.
DS20005393B-page 4
2015 Microchip Technology Inc.
MCP39F511
TABLE 1-1:
ELECTRICAL CHARACTERISTICS (CONTINUED)
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to +3.6V, TA = -40°C to +125°C,
MCLK = 4 MHz, PGA GAIN = 1.
Characteristic
Sym.
Min.
Typ.
Max.
Units
Test Conditions
2N x (1/fLINE)
—
ms
Note 3
see
—
ms
Note 4
Calibration, Calculation and Event Detection Times
Auto-Calibration Time
tCAL
—
Minimum Time
for Voltage Surge/Sag
Detection
tAC_SASU
—
Section 7.0
24-Bit Delta-Sigma ADC Performance
Analog Input
Absolute Voltage
VIN
-1
—
+1
V
Analog Input
Leakage Current
AIN
—
1
—
nA
Differential Input
Voltage Range
(I1+ – I1-),
(V1+ – V1-)
-600/GAIN
—
+600/GAIN
mV
VOS
-1
—
+1
mV
Offset Error
Offset Error Drift
Gain Error
—
0.5
—
µV/°C
GE
-4
—
+4
%
—
1
—
ppm/°C
ZIN
232
—
—
k
142
—
—
k
G=2
72
—
—
k
G=4
Gain Error Drift
Differential Input
Impedance
Signal-to-Noise
and Distortion Ratio
VREF = 1.2V,
proportional to VREF
SINAD
Note 5
G=1
38
—
—
k
G=8
36
—
—
k
G = 16
33
—
—
k
G = 32
92
94.5
—
dB
Note 6
Total Harmonic Distortion
THD
—
-106.5
-103
dBc
Note 6
Signal-to-Noise Ratio
SNR
92
95
—
dB
Note 6
SFDR
—
111
—
dB
Note 6
Spurious Free
Dynamic Range
Crosstalk
CTALK
—
-122
—
dB
AC Power
Supply Rejection Ratio
AC PSRR
—
-73
—
dB
AVDD and
DVDD = 3.3V + 0.6VPP,
100 Hz, 120 Hz, 1 kHz
DC Power
Supply Rejection Ratio
DC PSRR
—
-73
—
dB
AVDD and DVDD = 3.0 to
3.6V
Note 1:
2:
Calculated from reading the register values with no averaging, single computation cycle with accumulation interval of 4
line cycles.
Specification by design and characterization; not production tested.
3:
N = Value in the Accumulation Interval Parameter register. The default value of this register is 2 or TCAL = 80 ms for
50 Hz line.
4:
5:
Applies to Voltage Sag and Voltage Surge events only.
Applies to all gains. Offset and gain errors depend on the PGA gain setting. See Section 2.0 “Typical Performance
Curves” for typical performance.
VIN = 1VPP = 353 mVRMS @ 50/60 Hz.
6:
7:
Variation applies to internal clock and UART only. All calculated output quantities are temperature compensated to the
performance listed in the respective specification.
8:
Lower baud rates selectable only on system versions 0xFA14 and later.
2015 Microchip Technology Inc.
DS20005393B-page 5
MCP39F511
TABLE 1-1:
ELECTRICAL CHARACTERISTICS (CONTINUED)
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to +3.6V, TA = -40°C to +125°C,
MCLK = 4 MHz, PGA GAIN = 1.
Characteristic
DC Common
Mode Rejection Ratio
Sym.
Min.
Typ.
Max.
Units
DC CMRR
—
-105
—
dB
Test Conditions
VCM varies
from -1V to +1V
10-Bit SAR ADC Performance for Temperature Measurement
Resolution
NR
—
10
—
bits
Absolute Input Voltage
VIN
DGND - 0.3
—
DVDD + 0.3
V
Recommended
Impedance of
Analog Voltage Source
RIN
—
—
2.5
k
Integral Nonlinearity
INL
—
±1
±2
LSb
Differential Nonlinearity
DNL
—
±1
±1.5
LSb
Gain Error
GERR
—
±1
±3
LSb
Offset Error
EOFF
—
±1
±2
LSb
—
fLINE/2N
—
sps
Note 7
See Section 3.2 for
protocol details
Temperature
Measurement Rate
Clock and Timings
UART Baud Rate
UDB
1.2 (8)
—
115.2
kbps
Master Clock
and Crystal Frequency
fMCLK
-2%
4
+2%
MHz
Capacitive Loading
on OSCO pin
COSC2
—
—
15
pF
When an external clock is
used to drive the device
Internal Oscillator
Tolerance
fINT_OSC
—
2
—
%
-40 to +85°C only
(Note 7)
VREF
-2%
1.2
+2%
V
TCVREF
—
10
—
ZOUTVREF
—
2
—
k
AIDDVREF
—
40
—
µA
—
—
10
pF
VREF+
AGND + 1.1V
—
AGND + 1.3V
V
Internal Voltage Reference
Internal Voltage
Reference Tolerance
Temperature Coefficient
Output Impedance
Current, VREF
ppm/°C TA = -40°C to +85°C,
VREFEXT = 0
Voltage Reference Input
Input Capacitance
Absolute Voltage on
VREF+ Pin
Note 1:
2:
Calculated from reading the register values with no averaging, single computation cycle with accumulation interval of 4
line cycles.
Specification by design and characterization; not production tested.
3:
N = Value in the Accumulation Interval Parameter register. The default value of this register is 2 or TCAL = 80 ms for
50 Hz line.
4:
5:
Applies to Voltage Sag and Voltage Surge events only.
Applies to all gains. Offset and gain errors depend on the PGA gain setting. See Section 2.0 “Typical Performance
Curves” for typical performance.
VIN = 1VPP = 353 mVRMS @ 50/60 Hz.
6:
7:
Variation applies to internal clock and UART only. All calculated output quantities are temperature compensated to the
performance listed in the respective specification.
8:
Lower baud rates selectable only on system versions 0xFA14 and later.
DS20005393B-page 6
2015 Microchip Technology Inc.
MCP39F511
TABLE 1-1:
ELECTRICAL CHARACTERISTICS (CONTINUED)
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to +3.6V, TA = -40°C to +125°C,
MCLK = 4 MHz, PGA GAIN = 1.
Characteristic
Sym.
Min.
Typ.
Max.
Units
AVDD, DVDD
2.7
—
3.6
V
DVDD Start Voltage
to Ensure Internal
Power-On Reset Signal
VPOR
DGND
—
0.7
V
DVDD Rise Rate to
Ensure Internal
Power-On Reset Signal
SDVDD
0.05
—
—
V/ms
AVDD Start Voltage to
Ensure Internal
Power-On Reset Signal
VPOR
AGND
—
2.1
V
SAVDD
0.042
—
—
V/ms
IDD
—
13
—
mA
Cell Endurance
EPS
100,000
—
—
E/W
Self-Timed
Write Cycle Time
TIWD
—
4
—
ms
Number of Total
Write/Erase Cycles
Before Refresh
RREF
—
10,000,000
—
E/W
TRETDD
40
—
—
years
IDDPD
—
7
—
mA
Test Conditions
Power Specifications
Operating Voltage
AVDD Rise Rate to
Ensure Internal Power On
Reset Signal
Operating Current
0 – 3.3V in 0.1s, 0 – 2.5V
in 60 ms
0 – 2.4V in 50 ms
Data EEPROM Memory
Characteristic Retention
Supply Current during
Programming
Note 1:
2:
Provided no other
specifications are violated
Calculated from reading the register values with no averaging, single computation cycle with accumulation interval of 4
line cycles.
Specification by design and characterization; not production tested.
3:
N = Value in the Accumulation Interval Parameter register. The default value of this register is 2 or TCAL = 80 ms for
50 Hz line.
4:
5:
Applies to Voltage Sag and Voltage Surge events only.
Applies to all gains. Offset and gain errors depend on the PGA gain setting. See Section 2.0 “Typical Performance
Curves” for typical performance.
VIN = 1VPP = 353 mVRMS @ 50/60 Hz.
6:
7:
Variation applies to internal clock and UART only. All calculated output quantities are temperature compensated to the
performance listed in the respective specification.
8:
Lower baud rates selectable only on system versions 0xFA14 and later.
2015 Microchip Technology Inc.
DS20005393B-page 7
MCP39F511
TABLE 1-2:
SERIAL DC CHARACTERISTICS
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to+ 3.6V,
TA = -40°C to +125°C, MCLK = 4 MHz
Characteristic
Sym.
Min.
High-Level Input Voltage
VIH
0.8 DVDD
Low-Level Input Voltage
VIL
0
High-Level Output Voltage
VOH
3
Low-Level Output Voltage
VOL
—
ILI
—
Input Leakage Current
TABLE 1-3:
Typ.
Max.
Units
Test Conditions
—
DVDD
V
—
0.2 DVDD
V
—
—
V
IOH = -3.0 mA, VDD = 3.6V
—
0.4
V
IOL = 4.0 mA, VDD = 3.6V
—
1
µA
0.050
0.100
Digital Output pins only
(ZCD, PWM, EVENT1,
EVENT2)
TEMPERATURE SPECIFICATIONS
Electrical Specifications: Unless otherwise indicated, all parameters apply at AVDD, DVDD = +2.7 to +3.6V.
Parameters
Sym.
Min.
Typ.
Max.
Units
Operating Temperature Range
TA
-40
—
+125
°C
Storage Temperature Range
TA
-65
—
+150
°C
JA
—
36.9
—
°C/W
Conditions
Temperature Ranges
Thermal Package Resistances
Thermal Resistance, 28LD 5x5 QFN
DS20005393B-page 8
2015 Microchip Technology Inc.
MCP39F511
2.0
TYPICAL PERFORMANCE CURVES
The graphs and tables provided following this note are a statistical summary based on a limited number of
samples and are provided for informational purposes only. The performance characteristics listed herein
are not tested or guaranteed. In some graphs or tables, the data presented may be outside the specified
operating range (e.g., outside specified power supply range) and therefore outside the warranted range.
Note:
0.50%
0.40%
0.30%
0.20%
0.10%
0.00%
-0.10%
-0.20%
-0.30%
-0.40%
-0.50%
0.01
0.1
1
10
100
1000
Current Channel Input Amplitude (mVPEAK)
FIGURE 2-1:
Active Power, Gain = 1.
0
fIN = -60 dBFS @ 60 Hz
fD = 3.9 ksps
16384 pt FFT
OSR = 256
-20
-40
Amplitude (dB)
Measurement Error (%)
Note: Unless otherwise indicated, AVDD = +3.3V, DVDD = +3.3V, TA = +25°C, GAIN = 1, VIN = -0.5 dBFS at 60 Hz.
-60
-80
-100
-120
-140
-160
-180
-200
0
200 400 600 800 1000 1200 1400 1600 1800 2000
Frequency (Hz)
FIGURE 2-4:
Spectral Response.
RMS Current, Gain = 1.
1
0.8
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
1
10
100
1000
10000
-105.8
-105.9
-106.1
-106.2
Total Harmonic Distortion (-dBc)
FIGURE 2-5:
Total HDrmonic Distortion(dBc)
Energy Accumulation Error (%)
FIGURE 2-2:
1000
-106.4
1
10
100
Input Voltage RMS (mVPP)
-106.5
0.1
-106.7
-0.100%
-106.8
-0.050%
-107.0
0.000%
-107.1
0.050%
-107.3
Frequency of Occurrence
RMS Current Error (%)
0.100%
100000
THD Histogram.
0
-10
-20
-30
-40
-50
-60
-70
-80
-90
-100
-110
-120
G=1
G=8
-50
-25
0
G=2
G = 16
25
50
75
Temperature (°C)
G=4
G = 32
100
125
150
Energy Accumulation (Watt-Hours)
FIGURE 2-3:
Energy, Gain = 8.
2015 Microchip Technology Inc.
FIGURE 2-6:
THD vs. Temperature.
DS20005393B-page 9
MCP39F511
Note: Unless otherwise indicated, AVDD = 3.3V, DVDD = 3.3V, TA = +25°C, GAIN = 1, VIN = -0.5 dBFS at 60 Hz.
Frequency of Occurrence
Internal Voltage Reference (V)
1.2008
94.2 94.3 94.5 94.6 94.8 94.9 95.1 95.2 95.4 95.5
Signal-to-Noise and Distortion Ratio (dB)
Signal-to-Noise and Distortion
Ratio (dB)
FIGURE 2-7:
SNR Histogram.
100
90
80
70
60
50
40
30
20
10
0
G=1
G=8
-50
-25
0
FIGURE 2-8:
G=2
G = 16
1.2007
1.2006
1.2005
1.2004
1.2003
1.2002
1.2001
1.2000
1.1999
-50
FIGURE 2-10:
vs. Temperature.
0
50
100
Temperature (C)
150
Internal Voltage Reference
G=4
G = 32
25
50
75 100 125 150
Temperature (°C)
SINAD vs. Temperature.
5
4
Gain Error (%)
3
2
1
0
-1
-2
-3
G=1
G=8
-4
-5
-50
-25
0
25
G=2
G = 16
50
75
G=4
G = 32
100
125
150
Temperature (°C)
FIGURE 2-9:
DS20005393B-page 10
Gain Error vs. Temperature.
2015 Microchip Technology Inc.
MCP39F511
3.0
PIN DESCRIPTION
The description of the pins are listed in Table 3-1.
TABLE 3-1:
PIN FUNCTION TABLE
MCP39F511
5x5 QFN
Symbol
1
EVENT1
2, 3, 8, 9
NC
Function
Event 1 Output pin
No Connect (must be left floating)
4
UART_RX
UART Communication RX pin
5
COMMONA
Common pin A, to be connected to pin 13 (COMMONB)
6
OSCI
Oscillator Crystal Connection pin or External Clock Input pin
7
OSCO
Oscillator Crystal Connection pin
10
RESET
Reset pin for Delta-Sigma ADCs
11
AVDD
12
UART_TX
Analog Power Supply pin
UART Communication TX pin
Common pin B, to be connected to pin 5 (COMMONA)
13
COMMONB
14
PWM
15
EVENT2
16
I1+
Noninverting Current Channel Input for 24-bit ADC
17
I1-
Inverting Current Channel Input for 24-bit ADC
18
V1-
Inverting Voltage Channel Input for 24-bit ADC
Pulse-Width Modulation (PWM) Output pin
Event 2 Output pin
Noninverting Voltage Channel Input for 24-bit ADC
19
V1+
20
AN_IN
Analog Input for SAR ADC
21
AGND
Analog Ground Pin, return path for internal analog circuitry
22
ZCD
Zero Crossing Detection Output
23
REFIN+/OUT
Noninverting Voltage Reference Input and Internal Reference Output Pin
24, 27
DGND
Digital Ground pin, return path for internal digital circuitry
25
DVDD
Digital Power Supply pin
26
MCLR
Master Clear for device
28
DR
Data Ready (must be left floating)
29
EP
Exposed Thermal Pad (to be connected to pins 24 and 27 (DGND))
2015 Microchip Technology Inc.
DS20005393B-page 11
MCP39F511
3.1
Event Output Pins (EVENTn)
These digital output pins can be configured to act as
output flags based on various internal raise conditions.
Control is modified through the Event Configuration
register.
3.2
UART Communication Pins
(UART_RX, UART_TX)
The MCP39F511 device contains an asynchronous
full-duplex UART. The UART communication is eight
bits with Start and Stop bit. See Section 4.3 “UART
Settings” for more information.
3.3
Common Pins (COMMONA and B)
COMMONA and COMMONB pins are internal
connections for the MCP39F511. These two pins
should be connected together in the application.
3.4
Oscillator Pins (OSCI/OSCO)
3.8
24-Bit Delta-Sigma ADC
Differential Current Channel
Input Pins (I1+/I1-)
I1- and I1+ are the two fully-differential current-channel
inputs for the Delta-Sigma ADCs.
The linear and specified region of the channels are
dependent on the PGA gain. This region corresponds
to a differential voltage range of ±600 mVPEAK/GAIN
with VREF = 1.2V.
The maximum absolute voltage, with respect to AGND,
for each In+/- input pin is ±1V with no distortion
and ±6V with no breaking after continuous voltage.
3.9
24-Bit Delta-Sigma ADC
Differential Voltage Channel
Inputs (V1-/V1+)
V1- and V1+ are the two fully-differential
voltage-channel inputs for the Delta-Sigma ADCs.
The linear and specified region of the channels are
dependent on the PGA gain. This region corresponds
to a differential voltage range of ±600 mVPEAK/GAIN
with VREF = 1.2V.
OSCI and OSCO provide the master clock for the
device. Appropriate load capacitance should be
connected to these pins for proper operation. An
optional 4 MHz crystal can be connected to these pins.
If a crystal of external clock source is not detected, the
device will clock from the internal 4 MHz oscillator.
The maximum absolute voltage, with respect to AGND,
for each VN+/- input pin is ±1V with no distortion
and ±2V with no breaking after continuous voltage.
3.5
3.10
Reset Pin (RESET)
This pin is active-low and places the Delta-Sigma
ADCs, PGA, internal VREF and other blocks associated
with the analog front-end in a Reset state when pulled
low. This input is Schmitt-triggered.
3.6
Analog Power Supply Pin (AVDD)
AVDD is the power supply pin for the analog circuitry
within the MCP39F511.
This pin requires appropriate bypass capacitors and
should be maintained to +2.7V and +3.6V for specified
operation. It is recommended to use 0.1 µF ceramic
capacitors.
3.7
Pulse Width Modulator (PWM)
This digital output is a dedicated PWM output that can
be controlled through the PWM Frequency and PWM
Duty Cycle registers. See Section 8.0 “Pulse Width
modulation (PWM)” for more information.
DS20005393B-page 12
Analog Input (AN_IN)
This is the input to the analog-to-digital converter that
can be used for temperature measurement and
compensation. If temperature compensation is
required in the application, it is advised to connect the
low-power active thermistor IC MCP9700A to this pin.
If temperature compensation is not required, this can
be used as a general purpose analog-to-digital
converter input.
3.11
Analog Ground Pin (AGND)
AGND is the ground connection to internal analog
circuitry (ADCs, PGA, voltage reference, POR). If an
analog ground pin is available on the PCB, it is
recommended that this pin be tied to that plane.
3.12
Zero Crossing Detection (ZCD)
This digital output pin is the output of the zero crossing
detection circuit of the IC. The output here will be a
logic output with edges that transition at each zero
crossing of the voltage channel input. For more
information see Section 5.13 “Zero Crossing
Detection (ZCD)”.
2015 Microchip Technology Inc.
MCP39F511
3.13
Noninverting Reference
Input/Internal Reference Output
Pin (REFIN+/OUT)
This pin is the noninverting side of the differential
voltage reference input for the Delta-Sigma ADCs or
the internal voltage reference output.
For optimal performance, bypass capacitances should
be connected between this pin and AGND at all times,
even when the internal voltage reference is used.
However, these capacitors are not mandatory to
ensure proper operation.
3.14
Digital Ground Connection Pins
(DGND)
DGND is the ground connection to internal digital
circuitry (SINC filters, oscillator, serial interface). If a
digital ground plane is available, it is recommended to
tie this pin to the digital plane of the PCB. This plane
should also reference all other digital circuitry in the
system.
3.15
Digital Power Supply Pin (DVDD)
DVDD is the power supply pin for the digital circuitry
within the MCP39F511. This pin requires appropriate
bypass capacitors and should be maintained between
+2.7V and +3.6V for specified operation. It is
recommended to use 0.1 µF ceramic capacitors.
3.16
Data-Ready Pin (DR)
The data-ready pin indicates if a new Delta-Sigma A/D
conversion result is ready to be processed. This pin is
for indication only and should be left floating. After each
conversion is finished, a low pulse will take place on the
data-ready pin to indicate the conversion result is ready
and an interrupt is generated in the calculation engine
(CE). This pulse is synchronous with the line frequency
to ensure an integer number of samples for each line
cycle.
Note:
3.17
This pin is internally connected to the IRQ
of the calculation engine and should be
left floating.
Exposed Thermal Pad (EP)
This pin is the exposed thermal pad. It must be
connected to pin 24 (DGND).
2015 Microchip Technology Inc.
DS20005393B-page 13
MCP39F511
NOTES:
DS20005393B-page 14
2015 Microchip Technology Inc.
MCP39F511
4.0
COMMUNICATION PROTOCOL
4.1
After the reception of a communication frame, the
MCP39F511 has three possible responses, which will
be returned with or without data, depending on the
frame received. These responses are either:
The communication protocol for the MCP39F511
device is based on the Simple Sensor Interface (SSI)
protocol. This protocol is used for point-to-point
communication from a single-host MCU to a
single-slave MCP39F511.
• Acknowledge (ACK, 0x06): Frame received with
success, commands understood and commands
executed with success.
• Negative Acknowledge (NAK, 0x15): Frame
received with success, however commands not
executed with success, commands not
understood or some other error in the command
bytes.
• Checksum Fail (CSFAIL, 0x51): Frame received
with success, however the checksum of the frame
did not match the bytes in the frame.
All communication to the device occurs in frames. Each
frame consists of a header byte, the number of bytes in
the frame, command packet (or command packets)
and a checksum. It is important to note that the
maximum number of bytes in either a receive or
transmit frame is 35.
Note:
Device Responses
If a custom communication protocol is
desired, please contact a Microchip sales
office.
Note:
This approach allows for single, secure transmission
from the host processor to the MCP39F511 with either
a single command or multiple commands. No command in a frame is processed until the entire frame is
complete and the checksum and number of bytes are
validated.
The number of bytes in an individual command packet
depend on the specific command. For example, to set
the instruction pointer, three bytes are needed in the
packet: the command byte and two bytes for the
address you want to set to the pointer. The first byte in
a command packet is always the command byte.
There is one unique device ID response
which is used to determine which
MCP39FXXX
device
is
present:
[NAK(0x15) + ID_BYTE]. If the device is
interrogated with 0x5A, i.e. it receives 0x5A
as the first byte instead of the standard
0xA5 first header byte, a special NAK is
returned followed by an ID_BYTE. For the
MCP39F511 the ID_BYTE is 0x01. This
functionality is only present on system versions 0xFA14 and later.
This protocol can also be used to set up transmission
from the MCP39F511 on specific registers. A
predetermined single-wire transmission frame is
defined for one-wire interfaces. The Auto-transmit
mode can be initiated by setting the SINGLE_WIRE bit
in the System Configuration register, allowing for
single-wire communication within the application. See
Section 4.8 “Single-Wire Transmission Mode” for
more information on this communication.
Frame
Header Byte (0xA5) Number of Bytes
Command Packet1 Command Packet2
...Command Packet n
Checksum
Command BYTE1 BYTE2 BYTE N
BYTE0
BYTE N
FIGURE 4-1:
Communication Frame.MCP39F511
2015 Microchip Technology Inc.
DS20005393B-page 15
MCP39F511
4.2
Checksum
The checksum is generated using simple byte addition
and taking the modulus to find the remainder after
dividing the sum of the entire frame by 256. This operation is done to obtain an 8-bit checksum. All the bytes
of the frame are included in the checksum, including
the header byte and the number of bytes. If a frame
includes multiple command packets, none of the commands will be issued if the frame checksum fails. In this
instance, the MCP39F511 will respond with a CSFAIL
response of 0x51.
On commands that are requesting data back from the
MCP39F511, the frame and checksum are created in
the same way, with the header byte becoming an
Acknowledge (0x06). Communication examples are
given in Section 4.5 “Example Communication
Frames and MCP39F511 Responses”.
4.3
UART Settings
The default baud rate is 115. 2 kbps and can be
changed using the UART bits in the System
Configuration Register. This is only available on
system versions 0xFA14 and later. For previous
versions the baud rate is fixed at 115.2k. Note that the
baud rate is changed at system power-up, so when
changing the baud rate, a Save To Flash command
followed by a power-on cycle is required. The UART
operates in 8-bit mode, plus one start bit and one stop
bit, for a total of 10 bits per byte, as shown in
Figure 4-2.
IDLE
START
D0 D1
D2
FIGURE 4-2:
DS20005393B-page 16
D3 D4
D5
D6 D7
STOP IDLE
UART Transmission, N-8-1.
2015 Microchip Technology Inc.
MCP39F511
4.4
Command List
The following table is a list of all accepted command
bytes for the MCP39F511. There are 10 possible
accepted commands for the MCP39F511.
TABLE 4-1:
MCP39F511 INSTRUCTION SET
Command
#
Command
Command
ID
Instruction
Parameter
Number
of bytes
Successful
Response
UART_TX
1
Register Read, N bytes
0x4E
Number of bytes
2
ACK, Data,
Checksum
2
Register Write, N bytes
0x4D
Number of bytes
1+N
ACK
3
Set Address Pointer
0x41
ADDRESS
3
ACK
4
Save Registers To Flash
0x53
None
1
ACK
5
Page Read EEPROM
0x42
PAGE
2
ACK, Data,
Checksum
6
Page Write EEPROM
0x50
PAGE
18
ACK
7
Bulk Erase EEPROM
0x4F
None
1
ACK
8
Auto-Calibrate Gain
0x5A
None
Note 1
9
Auto-Calibrate Reactive Gain
0x7A
None
Note 1
Auto-Calibrate Frequency
0x76
None
Note 1
10
Note 1:
4.5
See Section 9.0, MCP39F511 Calibration for more information on calibration.
Example Communication Frames
and MCP39F511 Responses
Tables 4-2 to 4-11 show exact hexadecimal
communication frames as recommended to be sent to
the MCP39F511 from the system MCU. The values
here can be used as direct examples for writing the
code to communicate to the MCP39F511.
TABLE 4-2:
REGISTER READ, N BYTES COMMAND (Note 1)
Byte #
Value
Description
1
0xA5
Header Byte
2
0x08
Number of Bytes in Frame
3
0x41
Command (Set Address Pointer)
4
0x00
Address High
5
0x02
Address Low
6
0x4E
Command (Register Read, N Bytes)
7
0x20
Number of Bytes to Read (32)
8
0x5E
Checksum
Response from MCP39F511
ACK + Number of Bytes (35) + 32 bytes + Checksum
Note 1: This example Register Read, N bytes frame, as it is written here, can be used to poll a subset of the
output data, starting at the top, address 0x02, and reading 32 data bytes back or 35 bytes total in the frame.
2015 Microchip Technology Inc.
DS20005393B-page 17
MCP39F511
TABLE 4-3:
REGISTER WRITE, N BYTES COMMAND (Note 1)
Byte #
Value
Description
Response from MCP39F511
1
0xA5
2
0x25
Number of Bytes in Frame
3
0x41
Command (Set Address Pointer)
4
0x00
Address High
5
0x82
Address Low
6
0x4D
Command (Register Write, N Bytes)
7
0x14
Number of Bytes to Write (20)
Header Byte
8-36
*Data*
37
Checksum
Data Bytes (20 total data bytes)
Checksum
ACK
Note 1: This Register Write, N Bytes frame, as it is written here, can be used to write the entire set of
calibration target data, starting at the top, address 0x82, and continuing to write until the end of this set of
registers, 20 bytes later. Note these are not the calibration registers, but the calibration targets which need
to be written prior to issuing the auto-calibration target commands. See Section 9.0 “MCP39F511
Calibration” for more information.
TABLE 4-4:
SET ADDRESS POINTER COMMAND (Note 1)
Byte #
Value
Description
Response from MCP39F511
1
0xA5
Header Byte
2
0x06
Number of Bytes in Frame
3
0x41
Command (Set Address Pointer)
4
0x00
Address High
5
0x02
Address Low
6
0xF8
Checksum
ACK
Note 1: The Set Address Pointer command is typically included inside of a frame that includes a read or write
command, as shown in Tables 4-2 and 4-3. There is typically no reason for this command to have its own
frame, but is shown here as an example.
TABLE 4-5:
SAVE TO FLASH COMMAND
Byte #
Value
1
0xA5
Header Byte
2
0x04
Number of Bytes in Frame
3
0x53
Command (Save To Flash)
4
0xFC
Checksum
TABLE 4-6:
Description
Response from MCP39F511
ACK
PAGE READ EEPROM COMMAND
Byte #
Value
Description
1
0xA5
Header Byte
2
0x05
Number of Bytes in Frame
3
0x42
Command (Page Read EEPROM)
4
0x01
Page Number (e.g. 1)
5
0xF8
Checksum
DS20005393B-page 18
Response from MCP39F511
ACK + EEPROM Page Data + Checksum
2015 Microchip Technology Inc.
MCP39F511
TABLE 4-7:
PAGE WRITE EEPROM COMMAND
Byte #
Value
Description
1
0xA5
Header Byte
2
0x15
Number of Bytes in Frame
3
0x50
Command (Page Write EEPROM)
Page Number (e.g. 1)
4
0x01
5-20
*Data*
21
Checksum
TABLE 4-8:
EEPROM Data (16 bytes/Page)
Checksum
ACK
BULK ERASE EEPROM COMMAND
Byte #
Value
1
0xA5
Header Byte
2
0x04
Number of Bytes in Frame
3
0x4F
Command (Bulk Erase EEPROM)
4
0xF8
Checksum
TABLE 4-9:
Response from MCP39F511
Description
Response from MCP39F511
ACK
AUTO-CALIBRATE GAIN COMMAND
Byte #
Value
Description
1
0xA5
Header Byte
2
0x04
Number of Bytes in Frame
3
0x5A
Command (Auto-Calibrate Gain)
4
0x03
Checksum
Response from MCP39F511
ACK (or NAK if unable to
calibrate)1
Note 1: See Section 9.0 “MCP39F511 Calibration” for more information.
TABLE 4-10:
AUTO-CALIBRATE REACTIVE GAIN COMMAND
Byte #
Value
Description
1
0xA5
Header Byte
2
0x04
Number of Bytes in Frame
3
0x7A
Command (Auto-Calibrate Reactive Gain)
4
0x23
Checksum
Response from MCP39F511
ACK (or NAK if unable to
calibrate)1
Note 1: See Section 9.0 “MCP39F511 Calibration” for more information.
TABLE 4-11:
AUTO-CALIBRATE FREQUENCY COMMAND
Byte #
Value
Description
1
0xA5
Header Byte
2
0x04
Number of Bytes in Frame
3
0x76
Command (Auto-Calibrate Frequency)
4
0x1F
Checksum
Response from MCP39F511
ACK (or NAK if unable to
calibrate)1
Note 1: See Section 9.0 “MCP39F511 Calibration” for more information.
2015 Microchip Technology Inc.
DS20005393B-page 19
MCP39F511
4.6
4.6.1
Command Descriptions
REGISTER READ, N BYTES (0x4E)
The Register Read, N bytes command returns
the N bytes that follow whatever the current address
pointer is set to. It should typically follow a
Set Address Pointer command and can be used
in conjunction with other read commands. An
Acknowledge, Data and Checksum is the response for
this command. The maximum number of bytes that can
be read with this command is 32. If there are other
read commands within a frame, the maximum number
of bytes that can be read is 32 minus the number of
bytes being read in the frame. With this command, the
data is returned LSB first.
4.6.2
REGISTER WRITE, N BYTES (0x4D)
The Register Write, N bytes command is
followed by N bytes that will be written to whatever the
current address pointer is set to. It should typically
follow a Set Address Pointer command and can
be used in conjunction with other write commands. An
Acknowledge is the response for this command. The
maximum number of bytes that can be written with this
command is 32. If there are other write commands
within a frame, the maximum number of bytes that can
be written is 32 minus the number of bytes being
written in the frame. With this command, the data is
written LSB first.
4.6.3
SET ADDRESS POINTER (0x41)
This command is used to set the address pointer for all
read and write commands. This command is expecting
the address pointer as the command parameter in the
following two bytes, Address High Byte followed by
Address Low Byte. The address pointer is two bytes in
length. If the address pointer is within the acceptable
addresses of the device, an Acknowledge will be
returned.
4.6.4
SAVE REGISTERS TO FLASH (0x53)
The Save Registers To Flash command makes
a copy of all the calibration and configuration registers
to flash. This includes all R/W registers in the register
set. The response to this command is an Acknowledge.
4.6.5
4.6.6
PAGE WRITE EEPROM (0x50)
The Page Write EEPROM command is expecting
17 additional bytes in the command parameters, which
are EEPROM page plus 16 bytes of data. A more
complete description of the memory organization of the
EEPROM can be found in Section 10.0 “EEPROM”
The response to this command is an Acknowledge.
4.6.7
BULK ERASE EEPROM (0x4F)
The Bulk Erase EEPROM command will erase the
entire EEPROM array and return it to a state of 0xFFFF
for each memory location of EEPROM. A more
complete description of the memory organization of the
EEPROM can be found in Section 10.0 “EEPROM”.
The response to this command is Acknowledge.
4.6.8
AUTO-CALIBRATE GAIN (0x5A)
The Auto-Calibrate Gain command initiates the
single-point calibration that is all that is typically
required for the system. This command calibrates the
RMS current, RMS voltage and Active power based on
the target values written in the corresponding registers.
See Section 9.0 “MCP39F511 Calibration” for more
information on device calibration. The response to this
command is Acknowledge.
4.6.9
AUTO-CALIBRATE REACTIVE
POWER GAIN (0X7A)
The Auto-Calibrate Reactive Gain command
initiates a single-point calibration to match the
measured Reactive power to the target Reactive
power. This is typically done at PF = 0.5. See section
Section 9.0 “MCP39F511 Calibration” for more
information on device calibration.
4.6.10
AUTO-CALIBRATE FREQUENCY
(0x76)
For applications not using an external crystal and
running the MCP39F511 off the internal oscillator, a
gain calibration to the line frequency indication is
required. The Gain Line Frequency register is set such
that the frequency indication matches what is set in the
Line Frequency Reference register. See Section 9.0
“MCP39F511 Calibration” for more information on
device calibration.
PAGE READ EEPROM (0x42)
The Page Read EEPROM command returns 16 bytes
of data that are stored in an individual page on the
MCP39F511. A more complete description of the memory organization of the EEPROM can be found in
Section 10.0 “EEPROM”. This command is expecting
the EEPROM page as the command parameter or the
following byte. The response to this command is an
Acknowledge, 16-bytes of data and CRC Checksum.
DS20005393B-page 20
2015 Microchip Technology Inc.
MCP39F511
4.7
Notation for Register Types
The following notation has been adopted for describing
the various registers used in the MCP39F511:
TABLE 4-12:
Notation
SHORT-HAND NOTATION
FOR REGISTER TYPES
Description
u64
Unsigned, 64-bit register
u32
Unsigned, 32-bit register
s32
Signed, 32-bit register
u16
Unsigned, 16-bit register
s16
Signed, 16-bit register
b32
32-bit register containing discrete
Boolean bit settings
4.8
Single-Wire Transmission Mode
In Single-Wire Transmission mode, at the end of each
computation cycle, the device automatically transmits a
frame of power data. This allows for single-wire communication after the device has been configured.
The single-wire transmission frame consists of
20 bytes: three Header Bytes, one Checksum and
16 bytes of power data (including RMS current, RMS
voltage, Active Power, Reactive Power and Line
Frequency).
TABLE 4-13:
#
Byte
1
HEADERBYTE (0xAB)
2
HEADERBYTE2 (0xCD)
3
HEADERBYTE3 (0xEF)
4
CURRENT RMS – Byte 0
5
CURRENT RMS – Byte 1
6
CURRENT RMS – Byte 2
7
CURRENT RMS – Byte 3
8
VOLTAGE RMS – Byte 0
9
VOLTAGE RMS – Byte 1
10
ACTIVE POWER – Byte 0
11
ACTIVE POWER – Byte 1
12
ACTIVE POWER – Byte 2
13
ACTIVE POWER – Byte 3
14
REACTIVE POWER – Byte 0
15
REACTIVE POWER – Byte 1
16
REACTIVE POWER – Byte 2
17
REACTIVE POWER – Byte 3
18
LINE FREQUENCY – Byte 0
19
LINE FREQUENCY – Byte 1
20
CHECKSUM
2:
2015 Microchip Technology Inc.
SINGLE-WIRE
TRANSMISSION FRAME
(Note 2)
For custom single-wire transmission
packets, contact a Microchip sales office.
DS20005393B-page 21
MCP39F511
NOTES:
DS20005393B-page 22
2015 Microchip Technology Inc.
MCP39F511
5.0
CALCULATION ENGINE (CE)
DESCRIPTION
5.1
Computation Cycle Overview
The MCP39F511 uses a coherent sampling algorithm
to phase lock the sampling rate to the line frequency
with an integer number of samples per line cycle, and
reports all power output quantities at a 2N number of
line cycles. This is defined as a computation cycle and
is dependent on the line frequency, so any change in
the line frequency will change the update rate of the
power outputs.
5.2
Accumulation Interval Parameter
The accumulation interval is defined as an 2N number
of line cycles, where N is the value in the Accumulation
Interval Parameter register.
5.3
For DC applications, offset can be removed by using
the DC Offset Current register. To compensate for any
external phase error between the current and voltage
channels, the Phase Compensation register can be
used.
See Section 9.0 “MCP39F511 Calibration” for more
information on device calibration.
5.4
RMS Current and RMS Voltage
The MCP39F511 device provides true RMS
measurements. The MCP39F511 device has two
simultaneous sampling 24-bit A/D converters for the
current and voltage measurements. The root mean
square calculations are performed on 2N current and
voltage samples, where N is defined by the register
Accumulation Interval Parameter.
EQUATION 5-1:
Raw Voltage and Currents Signal
Conditioning
I1+
+
PGA
-
I1-
24-bit ADC
Multi-Level
Modulator
SINC3
Digital Filter
The first set of signal conditioning that occurs inside the
MCP39F511 is shown in Figure 5-1. All conditions set
in this diagram effect all of the output registers (RMS
current, RMS voltage, Active power, Reactive power,
Apparent power, etc.). The gain of the PGA, the
Shutdown and Reset status of the 24-bit ADCs are all
controlled through the System Configuration Register.
CHANNEL I1
RMS CURRENT AND
VOLTAGE
N
2 –1
I RMS =
+
N
2 –1
in
2
n=0
----------------------------N
2
V RMS =
vn
2
n=0
-----------------------------N
2
HPF 1
i
+
DCOffsetCurrent:s16
SystemConfiguration:b32
+
PGA
-
V1+
V1-
24-bit ADC
Multi-Level
Modulator
SINC3
Digital Filter
PhaseCompensation:s16
HPF 1
v
CHANNEL V1
Note
1:
FIGURE 5-1:
High-Pass Filters (HPFs) are automatically disabled in the absence of an AC signal on the voltage channel.
Channel I1 and V1 Signal Flow.
2015 Microchip Technology Inc.
DS20005393B-page 23
MCP39F511
Range:b32
X
i
2N-1
0 ÷ 2
ACCU
N
+
X
÷2RANGE
CurrentRMS:u32
+
GainCurrentRMS:u16
OffsetCurrentRMS:s32
X
ApparentPower:u32
GainVoltageRMS:u16
X
v
2N-1
0 ÷ 2
N
X
ACCU
÷2RANGE
VoltageRMS:u16
Range:b32
FIGURE 5-2:
5.5
RMS Current and Voltage Calculation Signal Flow.
Power and Energy
The MCP39F511 offers signed power numbers for
Active and Reactive power, import and export registers
for active energy, and four-quadrant Reactive power
measurement. For this device, import power or energy
is considered positive (power or energy being
consumed by the load), and export power or energy is
considered negative (power or energy being delivered
by the load). The following figure represents the
measurements obtained by the MCP39F511.
Import Reactive Power
Consume, Inductive
Generate, Inductive
-P, +Q
Quadrant II
Quadrant I
+P, +Q
S
Q
P
Import Active Power
Export Active Power
Quadrant III
Generate, Capacitive
Quadrant IV
Consume, Capacitive
+P, -Q
-P, -Q
Export Reactive Power
FIGURE 5-3:
DS20005393B-page 24
The Power Circle and Triangle (S = Apparent, P = Active, Q = Reactive).
2015 Microchip Technology Inc.
MCP39F511
5.6
Energy Accumulation
Energy accumulation for all four energy registers
(import/export, active/reactive) occurs at the end of
each computation cycle, if the energy accumulation
has been turned on. See Section 6.3 “System Status
Register” on the energy control register. A no-load
threshold test is done to make sure the measured
energy is not below the no-load threshold, if it is above,
the accumulation occurs with a default energy
resolution of 1mWh for all of the energy registers.
5.6.1
For scaling of the Apparent power indication, the calculation engine uses the register Apparent Power Divisor.
This is described in the following register operations,
per Equation 5-3.
EQUATION 5-3:
CurrentRMS VoltageRMS
S = --------------------------------------------------------------------ApparentPowerDivisor
10
5.8
NO-LOAD THRESHOLD
APPARENT POWER (S)
Active Power (P)
The no-load threshold is set by modifying the value in
the No-Load Threshold register. The unit for this
register is power with a default resolution of 0.01W. The
default value is 100 or 1.00W. Any power that is below
1W will not be accumulated into any of the energy
registers.
The MCP39F511 has two simultaneous sampling A/D
converters. For the Active power calculation, the
instantaneous current and instantaneous voltages are
multiplied together to create instantaneous power.
This instantaneous power is then converted to Active
power by averaging or calculating the DC component.
5.7
Equation 5-4 controls the number of samples used in
this accumulation prior to updating the Active Power
output register.
Apparent Power (S)
This 32-bit register is the output register for the final
Apparent power indication. It is the product of RMS
current and RMS voltage as shown in Equation 5-2.
EQUATION 5-2:
APPARENT POWER (S)
S = I RMS VRMS
Please note that although this register is unsigned, the
direction of the Active power (import or export) can be
determined by the Active Power Sign bit located in the
System Status Register.
EQUATION 5-4:
ACTIVE POWER
1
P = ------N
2
N
k=2 –1
Vk Ik
k=0
GainActivePower:u16
i
Range:b32
X
0 ÷ 2
ACCU
N
+
X
÷2RANGE
ActivePower:u32
+
OffsetActivePower:s32
v
FIGURE 5-4:
2N-1
Active Power Calculation Signal Flow.
2015 Microchip Technology Inc.
DS20005393B-page 25
MCP39F511
5.9
Please note that although this register is unsigned, the
direction of the power can be determined by the
reactive power sign bit in the system status register.
Power Factor (PF)
Power factor is calculated by the ratio of P to S or
Active power divided by Apparent power.
EQUATION 5-5:
POWER FACTOR
P
PF = --S
The Power Factor Reading is stored in a signed 16-bit
register (Power Factor). This register is a signed, 2's
complement register with the MSB representing the
polarity of the power factor. A positive power factor
means Active power is being imported, negative power
factor represents export Active power. The sign of the
reactive power component is used to tell if the current
is lagging the voltage, with a positive sign meaning an
inductive load, and a negative sign meaning capacitive.
Each LSB is then equivalent to a weight of 2-15. A
maximum register value of 0x7FFF corresponds to a
power factor of 1. The minimum register value of
0x8000 corresponds to a power factor of -1.
5.10
Reactive Power (Q)
In the MCP39F511, Reactive Power is calculated using
a 90 degree phase shift in the voltage channel. The
same accumulation principles apply as with active
power where ACCU acts as the accumulator. Any light
load or residual power can be removed by using the
Offset Reactive Power register. Gain is corrected by
the Gain Reactive Power register. The final output is an
unsigned 32-bit value located in the Reactive Power
register.
GainReactivePower:u16
i
HPF
Range1,2:b32
X
v
FIGURE 5-5:
DS20005393B-page 26
2N-1
0 ÷ 2
N
ACCU1
+
-
X
÷2RANGE
ReactivePower:u32
OffsetReactivePower:s32
HPF (+90deg.)
Reactive Power Calculation Signal Flow.
2015 Microchip Technology Inc.
MCP39F511
5.11
10-Bit Analog Input
The least 10 significant bits of the 16-bit Analog Input
register contain the output of the 10-bit ADC. The
conversion rate of the analog input occurs once every
computation cycle.
The Thermistor Voltage can be used for temperature
compensation of the calculation engine. See
Section 9.7 “Temperature Compensation” for more
information.
MCP9700
10-bit
ADC
AnalogInput:u16
5.13
Zero Crossing Detection (ZCD)
The zero crossing detection block generates a
logic pulse output on the ZCD pin that is coherent with
the zero crossing of the input AC signal present on
voltage input pins (V1+, V1-). The ZCD pin can be
enabled and disabled by the corresponding bit in the
System Configuration Register register. When
enabled, this produces a square wave with a frequency
that is equivalent to that of the AC signal present on the
voltage input. Figure 5-7 represents the signal on the
ZCD pin superimposed with the AC signal present on
the voltage input in this mode.