AN2317 Application Note: STPM01 Programmable, Single-Phase Energy Metering IC External Circuits
AN2317 Application Note: STPM01 Programmable, Single-Phase Energy Metering IC External Circuits
AN2317 Application Note: STPM01 Programmable, Single-Phase Energy Metering IC External Circuits
a crystal oscillator, a power supply circuit, a voltage sensing circuit, and two current sensing circuits.
Note:
April 2006
Rev 1
1/27
www.st.com
Contents
AN2317 - Application
Contents
1 External Circuit Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1 Current Sensing Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.1.1 1.1.2 Primary Current Sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Secondary current sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Anti-aliasing Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Voltage Sensing Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Crosstalk Cancellation Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Capacitive Power Supply Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.5.1 1.5.2 1.5.3 Varistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Capacitive Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 EMC Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.6
Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2/27
AN2317 - Application
List of Figures
List of Figures
Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. STPM01 External Circuit Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Primary Current Sensing Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Current Sense Transformer-to-Power Line Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Shunt Module-to-Power Line Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Anti-aliasing Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Anti-aliasing Effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Anti-aliasing Filter Magnitude Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Anti-aliasing Filter Phase Response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Voltage Sensing Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Crosstalk Network. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Capacitive power supply (with EMC Filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Capacitive Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Internal RC Recommended Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Quartz Recommended Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 External Clock Source Recommended Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3/27
AN2317 - Application
a Current Sensing Circuit, an Anti-aliasing Filter on page 11, a Voltage Sensing Circuit on page 15, a Capacitive Power Supply Circuit on page 18, and a Clock Generation on page 24 (RC oscillator, quartz, or external clock).
4/27
2 1 2 Q3 BC8578 3 2
PI G08 10-2V
2 4 6 8 10
VDDA 7
9
1 1.0N C3 C2
1 1.0N C6
2 1MY C7
2 1MY C4
1 1.0N C5
2 1MY
2 1 2.4K
1 1 R19
1 1 R18
1 1 2.4K 2 R17
2.4K
2 1N4148
1 2
2
20
U1 STPM01E
1 2 4 5 6 LED MON MOP VDD VCC VDDA VOIP IIP1 IIN1 SDA SCL SCS SYN CLKIN VIN VIP IIN2 IIP2 19 18 3 15 17 16 14 13 12 11
2.4K
R20
1 VDD
D1
VSS CLKOUT
VDDA
8 7 9 10
1 R15 2 1M Y1
R2 1.0k
2 1 10N C8 2
21
R1 1.0k
ANTI-ALIASING FILTER
1 E4622/X503 4 TR2 1 R6 1 30.1R R3 1.0k C9 2 1 10N 1 R14 2 2M
21
R4 1.0k
CURRENT SENSING
VOLTAGE SENSING
R8 261K
R9 261K
1 R10 2 261K
R7 475R
1 W3 VODNIK 1
F 1 510V
L6
2 1
2 1 DIF60
D11 DIF60
220MYH C14 L3
W4 VODNIK 1
V4 2
220MYH
AI12296
5/27
AN2317 - Application
1.1
1.1.1
R1 1.0k
AI12297
6/27
AN2317 - Application Primary current sensing is calculated as follows: Equation 1 N1 I 2 = ------ I 1 N2 Equation 2
N1 R 23 R 25 R 23 R 25 U 0 U A = I 2 -------------------------------- = -------- I 1 -------------------------------N2 R 23 + R 25 R 23 + R 25 Assuming I1PEAK, the calculation will proceed as: Equation 3 I 1PEAK N 2 2000 ------------------ = ------ = -----------I 2PEAK N 1 1 Equation 4 I 1PEAK I 2PEAK = ------------------ = 3mA 2000 Equation 5 R 23 R 25 U 0PEAK = U APEAK = I 2PEAK ------------------------- = 2.6mV R 23 + R 25 The maximum differential input voltage between VIN1 and V IP1 is dependent on the Programmable Gain Amplifier (PGA) selection. For the purposes of this application, use 8x as the gain value, then U 0PEAK = 0.15V. Equation 6 U APEAK = U 0PEAK = 0.15V Equation 7 R 23 + R 25 I 2PEAK = U APEAK ------------------------- = 172mA R 23 R 25 Equation 8 I 1PEAK = 2000I 2 PEAK = 344A Equation 9 I 1PEAK I 1RMS = ------------------ = 243A 2
7/27
AN2317 - Application
The primary current sensing circuit can be connected to mains as follows (see Figure 3): 1. The hot line voltage wire must be connected to pin F of the module. Normally, this wire is also connected to the hot line current wire. However, during production or to verify phases, this wire may be connected to some other line voltage source. 2. 3. The neutral line voltage wire must be connected to pin N of the module. This wire is also connected to the neutral line current wire. The hot line current wire must be placed through the current transformer TR1 hole (becoming the hot load wire). Use insulated 4mm2 copper wire. 4. The neutral line current wire must be placed through the current transformer TR2 hole. Use insulated 4mm2 copper wire. Figure 3. Current Sense Transformer-to-Power Line Connections
Neutral Line Hot Line F N TR2 TR1 W6 W5 Neutral Load Hot Load
* Comp side
P1
AI12298
8/27
AN2317 - Application
1.1.2
The power dissipation in the shunt must be minimized. The maximum rated current for this design element is 20A, so the maximum power dissipated in the shunt is calculated as follows: ( 20A ) 420 = 168mW
2
The higher power dissipation may make it difficult to manage the thermal issues. Although the shunt is manufactured from manganin material, which is an alloy with a low thermal resistance, an apparent error may occur when it reaches a high temperature.
The shunt should be able to resist the shortage of the phase circuit. This reduces the shunt resistance is much as possible. The design values used are: Mains voltage = 220V RMS, Ib = 2A, and Shunt resistance = 420. Voltage across shunt: 2A 420 = 0.00084V Mains power dissipation: 220V 2A = 0.44kW Error: 1.68 10
3
The remaining design elements calculated from these values are as follows:
0.44 10
100percent = 0.0004percent
9/27
AN2317 - Application
The secondary current sensing circuit can be connected to the mains as shown in Figure 4: 1. The hot line voltage wire must be connected to pin N of the module. Normally, this wire is also connected to the hot line current wire. However, during production or to verify phases, this wire may be connected to some other line voltage source. 2. The neutral line voltage wire must be connected to pin F of the module. This wire is also connected to the neutral line current wire, which passes by the module. 3. The hot line current wire must be connected to the Shunt pole which is close to pin N of the module. Use insulated 4mm2 copper wire. 4. The hot load current wire must be connected to the Shunt pole which is close to the edge of the module. Use insulated 4mm2 copper wire. Figure 4. Shunt Module-to-Power Line Connections
Neutral Hot Line F N Shunt W6 W5 LED NLC TPR DIR
AI12299
Hot Load
* Comp side
P1
10/27
AN2317 - Application
1.2
Anti-aliasing Filter
The anti-aliasing filter (Figure 5) is a low-pass filter. It reduces high frequency levels which may cause distortion due to the sampling (aliasing) that occurs before the analog inputs of an analog-to-digital converter (ADC) are introduced into the application (see Figure 6). Filtering is easily implemented with a resistor-capacitor (RC) single-pole circuit which obtains an attenuation of 20dB/dec. Figure 5. Anti-aliasing Filter
R UO
C UI R
AI12900
Figure 6.
Anti-aliasing Effect
Image Frequencies
900
AI12901
11/27
AN2317 - Application
The anti-aliasing filter magnitude and phase response can be calculated as follows: Equation 10 1 -------UO jc 1 A u = ------- = ------------------- = -----------------------1 1 + jRC UI R + -------jc
Note:
12/27
AN2317 - Application
According to Equation 12 and Equation 13 on page 12, the filters magnitude and phase response can be seen in Figure 7 and Figure 8 on page 14.
When f = 50Hz:
When f = 60Hz:
Equation 16 = 0.43 and Equation 17 Au 1 Assume that the current lags the voltage by a phase angle, . After an anti-aliasing filter, a phase error () is introduced into the STPM01. The power factor (PF) error is calculated as: Equation 18 cos cos ( + ) error PF = ---------------------------------------------- 100percent cos When, = 60 (PF = 0.5), and f = 50Hz, according to Equation 14, a phase error, = 0.35 has occurred: Equation 19 cos ( 60 ) cos ( 60 0.35 ) error PF = ---------------------------------------------------------------------------------- 100percent = 1percent cos ( 60 )
This indicates that even a small phase error will translate into a significant measurement error at a low power factor. Thus correct phase matching is required in this situation.
13/27
AN2317 - Application
Decibels (dB)
20
40
60
10
100
100000
1000000
AI12902
Figure 8.
14/27
AN2317 - Application
1.3
C11 and (R 19+ R15) create a filter which prevents Electromagnetic Interference (EMI) created by the circuit from migrating onto the Line or Neutral busses (see Equation 20 through Equation 24 on page 16). Figure 9. Voltage Sensing Circuit
R' V1 783k R5 475 Z2 R19 42.2k C11 22n R6 475 R' 783k
AI12904
Z1
L2 1m
R15 100 V2
15/27
AN2317 - Application
Equation 22 Z2 ----= 110 2V , U 1 = 0.046V V 2 U 1 = U 2 = --------------------- V mains = m ains 2R + Z 2 V m ains = 220 2V , U 1 = 0.092V
Equation 23 Z2 ----= 110 2V , U 0 = 0.092V V 2 U 0 = U 1 U 2 = ------------------ V mains = mains Z2 V mains = 220 2V , U 0 = 0.185V R + ----- 2 Z1 has little influence on the U0, thus: Equation 24 R5 U 0 ------------------R + R 5
Note:
For a specific U 0, choose an appropriate combination of resistors (R5 and R) to get that particular U 0 value.
16/27
AN2317 - Application
1.4
Note:
This network must be applied to every STPM01 design, from the voltage channel to each current channel.
Figure 10. Crosstalk Network
+ R19 42.2k VVCI Voltage Channel Input R21 2M R15 100 R1 1k VCCI Current Channel Input +
AI12908
17/27
AN2317 - Application
1.5
a varistor, the capacitive power supply, and the Electromagnetic Compatibility (EMC) filter.
NEUTRAL
GND
AI12909
1.5.1
Varistor
The varistor is a surge protection device that is connected directly across the AC input. When a power surge or voltage spike exceeding a specified voltage (varistor voltage) is sensed, the varistor's resistance rapidly decreases, creating an instant shunt path for the overvoltage, thereby saving the sensitive control panel components. The varistor and the line fuse are subject to damage or weakened because the shunt path creates a short circuit. An essential point of varistor selection is that the varistor can handle the peak pulse current, which is 110% of the maximum current at which the varistor voltage does not change. If the peak pulse current rating is insufficient, then the varistor may be damaged. The main voltage is 220V RMS, and sometimes the maximum will reach 265VRMS.Thus, an MOKS K10*300V varistor is chosen for this application.
18/27
AN2317 - Application
1.5.2
NEUTRAL
GND
AI12914
19/27
AN2317 - Application
The input current (IIN) is limited by R 1 and the capacitive reactance of C2 (see Equation 28 and Equation 29), and is expressed as: Equation 27 V IN ( RMS ) I IN = -----------------------X C2 + R 1 where, XC2 = C2 reactance.
Note:
Equation 28 1 V PEAK V Z V IN ( RM S ) = -- -----------------------------2 2 where, VPEAK = mains peak voltage (i.e. United States = 115V/60Hz and Europe = 220V/50Hz), and VZ = the voltage drop across D1 and D 3.
Equation 29
By substituting the values expressed in Equation 27 with those in Equation 28 and Equation 29, the results are as follows: Equation 30 2V m ains V Z V PEAK V Z I IN = ---------------------------------------- = ---------------------------------------2 2 ( X C2 + R 1 ) 2 2 ( X C2 + R 1 ) Assuming that the voltage drop across each diode is 0.7V, then the total voltage drop is expressed as: Equation 31 V Z = V D1 + V D3 = 5 + 0.7 2 = 6.4V
20/27
AN2317 - Application When these application parameters are considered: Vmains = 220VAC, f = 50Hz, and VZ = 6.4V (see Equation 31), the calculated IIN would be: Equation 32 I IN = 15.7mA
Selecting components in the circuit is a critical consideration. As a general rule, components should be sized at twice the maximum power calculated for each device. For example, by using the IIN value in Equation 32 and VDD = 5V to choose an appropriate Zener diode, the results required to make the selection are expressed as follows: Equation 33 V DD = I IN R 1 = 0.02W and Equation 34 P D3 = V D3 I IN = 5.1 0.0157 = 0.08W Thus, a ZMM SOD 80*5.1V G Zener Diode is used.
2
21/27
AN2317 - Application
1.5.3
EMC Filter
EMC has become an important power supply parameter. In order to deal with common and differential mode noise, a two-part AC filter is added (see Figure 11 on page 18).
Differential filter (Filter 1) Inductors L1/L2, and C 1 represent a differential filter for DM (differential mode) noise trying to enter the power supply. DM noise is produced by current flowing along either the Line or Neutral conductor, and returning by the respective other. This produces a noise voltage between the Line and Neutral conductors. The filter will be designed for at least 10 times the line frequency, thereby resulting in a frequency of 600Hz. The indication is then, that the cutoff frequency (fC) must not be below 600Hz. Capacitor C1 is X Class capacitor, used to reduce differential noise. To ensure that C 1 does not fail because of the surge or short circuit current, it must be able to withstand twice the mains voltage value. Keeping this requirement in mind, fC is calculated as follows:
Note:
Generally, a specific f C value is chosen, then the inductors are tuned to that value.
22/27
AN2317 - Application
Capacitor filter (C3, Filter 2) Capacitor C3 is used as a filter. Considering load RL, the size of C3 must satisfy the requirements expressed in Equation 36:
Equation 36 R L C = ( 15 25 )T In fact, considering that the charge stored in the capacitor is: Equation 37 IL T = Q where, IL = the load current, and T = the AC sine wave period, and the output ripple voltage is expressed as: Equation 38 Q V = --C then the capacitor C value can be calculated by using a fixed voltage ripple value: Equation 39 IL T V = ------C then, fixing our ripple to V=200mV we can calculate C value accordingly. For the purposes of this application, C is calculated as follows: Equation 40 10mA C = ------------------------------------- = 1000F 200mV 50Hz The STPM01 power supply (VCC) configuration range is from 3.3V to 6V. While it seems to be enough to change the D3 diode (see Equation 34) from the previously selected ZMM SOD 80*5.1V G Zener Diode, if the output current is too high, then the C2 value must be reduced.
Note:
23/27
AN2317 - Application
1.6
Clock Generation
All of the STPM01 internal timing is based on the CLKOUT oscillation signal. This signal can be generated in three different ways:
RC (see Figure 13) This oscillator mode can be selected using the RC configuration bit. If RC = 1, then the STPM01 will run using the RC oscillator. A resistor connected between CLKIN and Ground will set the RC current.
Note:
For 4MHz operation, the suggested settling resistor is 12k. Quartz (see Figure 14)
The oscillator will work with an external crystal. Figure 13. Internal RC Recommended Connections
VSS
CLKIN
CLKOUT
12k
AI12915
VSS
CLKIN
CLKOUT
24/27
AN2317 - Application
External Clock (see Figure 15) The clock generator is powered from analog supply, and is responsible for two tasks: a) to retard the turning on of some of the function blocks after Power-on Reset (POR) in order to help smooth start the external power supply circuitry and keep all major loads off of the circuit, and to provide all necessary clocks for the analog and digital parts. Two nominal frequency ranges are expected,(1) from 4.000MHz to 4.194MHz, or (2) from 8.000MHz to 8.192MHz.
b)
VSS
CLKIN
CLKOUT
AI12917
25/27
Revision History
AN2317 - Application
Revision History
Table 1.
Date 14-Apr-2006
26/27
AN2317 - Application
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (ST) reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to STs terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN STS TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZE REPRESENTATIVE OF ST, ST PRODUCTS ARE NOT DESIGNED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS, WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
2006 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com
27/27