Professional Documents
Culture Documents
MCP3905/6 MICRO
Reference Design
Digital
MCP3905/6 Analog
MCP3905/6
current-sensing current-sensing
element element
Direct-Connect Meters
Direct-connect meters are those meters connected
directly to the power lines using a shunt resistor on the
current channel and/or a voltage divider on the voltage
channel. Those isolated using a current transformer
are not direct-connect meters and some accuracies are
defined separately in the IEC standards. The direct-
connect or shunt meters have slightly reduced
accuracy requirements, as shown in Table 2.
Magnitude (dB)
The MCP3905/6 devices contain two 16-bit delta- -15 -30
Phase (°)
sigma ADCs that oversample at MCLK/4. Using the -20 -40
NTSC, the standard video subcarrier frequency of -25
Phase
-50
3.579 MHz makes a good low-cost clock source. The -30 -60
MCP3905/6 devices are designed to operate from a -35 -70
clock source of 1 MHz to 4 MHz, with all data sheet -40 -80
specifications and device characterization performed -45 -90
using a frequency of 3.579 MHz. At this frequency, the 100
1.E+02 1k
1.E+03 10k
1.E+04 100k
1.E+05 1M
1.E+06
sampling rate is approximately 900 kHz. (MCLK/4). Frequency (Hz)
Any frequencies above half this should be eliminated
by at least -40 dB using an anti-aliasing filter. FIGURE 5: FilterLab® Software
Showing Magnitude and Phase Response.
The goal of this design choice is to eliminate signals
above the Nyquist frequency (half of the sampling
frequency). With a 3.58 MHz oscillator, this is COMPENSATING FOR PARASITIC
~450 kHz. SHUNT INDUCTANCE
The bandwidth of interest depends on the number of
harmonics included in the conversion. A channel-to- Note: An Excel worksheet that includes complex
channel difference in phase of 0.1 degree can cause frequency has been created to assist in
>0.5% error. Microchip’s FilterLab software design tool the calculation and to show graphically the
is used to compare these trade-offs in filter design. effects of component values in the
frequency domain. The filename is “s-
domain shunt compensation for
? phase shift ?
MCP3905.xls” and can be downloaded
at www.microchip.com in the MCP3905/6
-3dB pt. Simple RC
product folder.
Bandwidth
of ? -dB The anti-aliasing filter design in the previous section is
Interest intended to keep any noise at and above the Nyquist
frequency (450 kHz) attenuated below our accuracy
50(60) fs/2 fs threshold (40 dB). The most prevalent noise in this
NTH ??
Hz (1 MHz) bandwidth comes from AM radio (or other RF signals)
Harmonic coupled through the power transmission lines. When a
shunt is directly connected to this input network, the
FIGURE 4: Filter Attenuation versus frequency response of the shunt must be included in
Phase-Shift Trade-off. the analysis of the input network.
The goal is to determine the attenuation at fs/2 and With shunt values much less than 1 ohm, and induc-
compare that to the phase delay around 50/60Hz, and tances between 1-5 nH, a high-pass filter is created
how component-matching will cause problems in that offsets the low-pass, anti-aliasing filter design that
channel-to-channel phase-matching. attenuates high-frequency signals. The use of Excel
Using the FilterLab software, change the filter order to and complex frequency analysis will be required to
1 by clicking up on the filter order box. Part 21 of the cancel out this high-pass filter effect from the shunt.
standard (Class 1 and Class 2 meters) requires The addition of the shunt creates a high-pass filter in
accuracy in the presence of up to the 5th harmonic. front of our previously designed anti-aliasing filter
The MCP3905/6 devices have an input bandwidth of represented by the circuit in Figure 6.
R
0 0
VIN VOUT
-5
RSH -5
Phase (degree)
-10
Mag(dB)
-15
C -10
LSH -20
-25
-15
-30
-20 -35
1
1.E+0 10 1.E+2
1.E+1 100 1.E+3
1k 1.E+4
10k 100k 1M 10M
1.E+5 1.E+6 1.E+7
FIGURE 6: Shunt Inductance Causes Frequency (Hz)
Zero, Possibly Cancelling RC, Depending On
RSH and LSH Values. FIGURE 7: Frequency Response With
RSH and LSH Zero Close to RC Pole.
The transfer function for this circuit contains a zero
from the shunt and a pole from our anti-aliasing filter, As you can see from the plot generated with the Excel
represented by: spreadsheet, an addition of a zero from the shunt any-
where around the pole of the anti-aliasing RC causes
⎛ RSH⎞ problems at higher frequencies (1 MHz). There is now
⎜ s + -----------⎟ only -10 dB of attenuation above the zero frequency
⎝ L ⎠
SH
H ( s ) = -------------------------- caused by the shunt. Note that the parasitic
⎛ s + ------- 1 -⎞ capacitances associated with the system would cause
⎝ RC⎠ another zero higher out, with the frequency response
coming back down past 100 MHz. However, this is not
Excel can be used to perform complex number included with the transfer function supplied in the Excel
operations using a number of functions in the analysis spreadsheet.
toolkit. Some of these functions are IMDIV (division),
The addition of another pole to compensate for this
IMPRODUCT (multiplication), IMSUM (addition) and
zero is required. The least expensive solution would be
IMPOWER (exponent). The transfer function above is
to add another RC in series, as in Figure 8.
represented by the following complex formula in the
Excel spreadsheet:
=IMDIV(IMSUM(“s”,(“RSH”/”LSH”)),IMSUM(“s”,(1/(“R”*”C”)))) R VX R
VIN VOUT
Where the s, R, L and C values are to be changed to include
the proper R, L, C and s-domain numbers for your C C
application.
EQUATION 2:
( V x – V IN ) ( Vx – V OUT )
------------------------- + sC • V x + ------------------------------ = 0
R R
V OUT – V x
------------------------- + sCVOUT = 0
R
Phase (degree)
-40 -50
use of the quadratic formula:
Mag(dB)
-60
EQUATION 4: -80 -100
2
– b ± b – 4ac -100
s = -----------------------------------
2a -120 -150
1
1.E+0 10
1.E+1 100
1.E+2 1k 10k 100k
1.E+3 1.E+4 1M 10M
1.E+5 1.E+6 1.E+7
One of the two roots for the equation must be used to Frequency (Hz)
cancel the high-pass filter effect caused by the shunt
inductance and resistance. By using the shunt zero and FIGURE 9: Frequency Response With
picking an arbitrary capacitor value (C), solve for R: RSH and LSH Zero Being Compensated by
Second RC Pole.
EQUATION 5: As can be seen from this frequency response, the
2 2
second pole was able to bring the magnitude response
– 3RC ± ( 3RC ) – 4 ( RC ) - near 1 MHz back down to below -40 dB, proving the
s = -----------------------------------------------------------------
2
2 ( RC ) calculation. The spreadsheet should be used with your
own specific shunt values.
– 3RC- ---------------
5RC –3 5
s 1 = ---------------
2 2
+ 2 2- = ----------- + ----------- POWER SUPPLY DESIGN ANALYSIS
2R C 2R C 2RC 2RC
The power on the MCP3905 Energy Meter Reference
Design Demonstration Board comes from a LM7805
The location of the other pole is given by the other root
of the quadratic equation solution. +5V regulator driven by a half-wave rectified zener
diode limited AC signal. This circuit is represented in
the following figure:
EQUATION 6:
– 3RC 5RC –3 5 C17 R21 D2
s 2 = ---------------
2 2
- + ---------------- = ----------- – -----------
2 2
L1
2R C 2R C 2RC 2RC 7805
+5V REG.
C16 D3
The values for the second-order RC can now be calcu- C18
lated and put into the Excel spreadsheet to evaluate
the performance of the compensation circuit. A second-
order filter is also included in the transfer function in the
Excel spreadsheet that accompanies this application FIGURE 10: MCP3905/6 Energy Meter
note. The transfer function and formula using the Reference Design Power Supply Circuit
complex number Excel notion is shown here:
EQUATION 7:
⎛ R ⎞
SH
⎜ s + -----------⎟
⎝ L SH⎠
H ( s ) = ----------------------------------------------
⎛ s + ------- 1 -⎞ ⎛ s + ------- 1 -⎞
⎝ RC⎠ ⎝ RC⎠
EQUATION 10:
5V
I TOTAL = I DDA + I DDD + ILED + I STEPPER MOTOR 4.2V
= 3mA + 1.2mA + 4mA + 12.5mA 4V
= 20.7mA
1s
Where:
k = The meter constant in impulses per
FIGURE 12: Waveforms of power kilo-watt hour (im/kWh)
showing increased current demand effects on the Un = The reference voltage in volts
power supply. Imax = The maximum current of the meter
m = The number of measuring elements
Channel 2 is the unregulated voltage at the input to the
LM7805 (or the voltage on C18). The triangle waveform For example, using the calibration output pulse with a
was generated to simulate a sagging line voltage meter constant of 3200 imp/kWh, a line voltage of 220V
across a very long period (in this case, a period of 20 and a maximum current of 80A, the period is about 17
seconds). The pulses on channel 4 are the mechanical minutes.
standard states that the meter “shall start and continue 2.379
Voltage (V)
to register at the starting current values” defined. These
2.378
current values are shown in Table 9.
2.377
TABLE 9: STARTING CURRENT 2.376
Meter Type Class 1 Class 2 2.375
-45 -30 -15 0 15 30 45 60 75 90
Direct-connect Meters 0.004 IB 0.005 Ib
Temperature (°C)
Transformer Meters 0.002 In 0.003 In
As an example, for a Class 1 direct-connect meter with FIGURE 15: MCP3905/06 Tempco Post
a base current of 10 amperes, the starting current Trim.
would be 40 mA.
This device shows a 9.2 ppm/C temperature drift. The
typical specification given for the MCP3905/6 devices
MCP3905 VREF TEMPERATURE is 15 ppm/°C.
COEFFICIENT CURVE FITTING
IMMUNITY TO EXTERNAL INFLUENCES –
The MCP3905 contains a very low-drift voltage EMC
reference. The band gap is specially designed to allow
the signature bow across temperate to be trimmed-in to At the time of this writing, there were 16 ‘Influences’
give the lowest drift across the industrial temperature described in the IEC62053 Class 1 and Class 2
range. Figure 14 shows the effects of this curve fitting Standard, Section 8.2. These influences to the meter
and how the low tempco specification of the voltage are not meant to add additional percentage errors to
reference is achieved. the accuracy of the meter. Most of these influences
pertain to variations in either the frequency content of
VREF after trim the signal or variations in supply voltage or frequency
that are diffused by the MCP3905/6 PSRR, input band-
VREF Output (V)
TABLE 10: STANDARD POWER METER TESTING, NST-3500 POWER METER TESTING
EQUIPMENT
Power Factor Permission Error Actual Error (%)
Current
(cosφ) Change (%) No. 111003502194 No.111003502181 No.111003502956
0.05IB 1.0 ±2.5 0.0 0.0 0.1
0.1IB 1.0 ±2.0 0.1 0.0 0.1
0.5IB 1.0 ±2.0 0.1 0.0 0.0
IB 1.0 ±2.0 0.1 0.0 0.0
0.5Imax 1.0 ±2.0 0.1 0.1 0.0
Imax 1.0 ±2.0 0.1 0.0 0.0
0.1IB 0.5L ±2.5 0.0 0.0 0.1
0.2IB 0.5L ±2.0 0.1 0.0 0.1
0.5IB 0.5L ±2.0 0.1 0.0 0.1
IB 0.5L ±2.0 0.1 0.0 0.1
0.5Imax 0.5L ±2.0 0.1 0.0 0.1
Imax 0.5L ±2.0 0.1 0.0 0.1
Note: Reference Voltage: 220V Current: 5(20)A Reference Frequency: 50 Hz
Temperature: 23°C Humidity: 45%
TABLE 12: VOLTAGE ERROR TESTING RESULTS, NST-3500 METER TESTING EQUIPMENT
Power Factor Voltage Permission Error Actual Error Changing(%)
Current
(cosφ) (V) Change (%) #1
0.05IB 1.0 198 ±0.7 -0.071
IB 0.063
Imax 0.032
0.1IB 0.5L ±1.0 0.052
IB 0.030
Imax 0.016
0.05IB 1.0 242 ±0.7 -0.017
IB 0.000
Imax -0.030
0.1IB 0.5L ±1.0 -0.015
IB -0.014
Imax -0.047
Note: Reference Voltage: 220V Current (IB): 10A Reference Frequency: 50 Hz
Temperature: 23°C Humidity: 45%
• 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.
07/01/05