STPM01 Programmable single phase energy metering IC with tamper detection Features ■ Active, reactive, apparent energies and RMS values ■ Ripple free active energy pulsed output ■ Live and neutral monitoring for tamper detection ■ Easy and fast digital calibration in only one point over the whole current range ■ OTP for calibration and configuration ■ Integrated linear VREGs for digital and analog supply ■ Selectable RC or crystal oscillator ■ Support 50 ÷ 60 Hz – IEC62052-11, IEC620532x spec
Contents STPM01 Contents 1 Schematic diagram ......................................... 5 2 Pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 Maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5 Electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . .
STPM01 Contents 8.12.1 RC Startup procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 8.13 Resetting the STPM01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.14 Energy to frequency conversion (standalone) . . . . . . . . . . . . . . . . . . . . . 28 8.15 Driving a stepper motor (standalone) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 8.16 Using STPM01 in microcontroller based meter (peripheral) . . . . . . . .
List of tables STPM01 List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Table 12. Table 13. Table 14. Table 15. Table 16. Table 17. Table 18. Table 19. Table 20. Table 21. Table 22. 4/60 Device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STPM01 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. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Schematic diagram STPM01 1 Schematic diagram Figure 1.
STPM01 Pin configuration 2 Pin configuration Figure 2. Pin connections (top view) Table 2.
Maximum ratings STPM01 3 Maximum ratings Table 3. Absolute maximum ratings Symbol Parameter Value Unit -0.3 to 6 V ± 150 mA -0.3 to VCC + 0.3 V VCC DC Input voltage IPIN Current on any pin (sink/source) VID Input voltage at digital pins (SCS, MOP, MON, SYN, SDATD, SCLNLC, LED) VIA Input voltage at analog pins (IIP1, IIN1, IIP2, IIN2, VIP, VIN) -0.7 to 0.7 V VOTP Input voltage at OTP pin -0.3 to 25 V ESD Human body model (all pins) ± 3.
STPM01 Functions 4 Functions Table 5. Programmable pin functions Programmable pin Stand-alone mode (APL register=2 or 3) Peripheral mode (APL register=0 or 1) MON Output for Stepper’s node (MB) If APL=0 then Watchdog signal. If APL=1 then ΔΣ signal of current channel MOP Output for Stepper’s node (MA) If APL=0 then ZCR If APL=1 then ΔΣ signal of voltage channel LED If APL=2 then LED provides high frequency pulses proportional to Active Energy with 50% duty cycle.
Functions Table 6.
STPM01 5 Electrical characteristics Electrical characteristics VCC = 5 V, TA = 25 °C, 100 nF to 1 uF between VDDA and VSS, 100 nF to 1 uF between VDDD and VSS, 100 nF to 1 uF between VCC and VSS unless otherwise specified. Table 7. Electrical characteristics Symbol Parameter Test conditions Min. Typ. Max. Unit 400 Hz Energy measurement accuracy fBW Effective bandwidth Limited by digital filtering 5 eAW Accuracy of active power Over 1 to 1000 of dynamic range 0.
Electrical characteristics Table 7. Symbol Electrical characteristics (continued) Parameter IOTP OTP programming current per bit tOTP OTP programming time per bit ILATCH STPM01 Test conditions Min. Typ. Max. 2.5 100 Unit mA 300 µs 300 mA -0.3 0.3 V Gain 8X -0.15 0.15 Gain 16X -0.075 0.075 Gain 24X -0.05 0.05 Gain 32X -0.035 0.
STPM01 Table 7. Electrical characteristics Electrical characteristics (continued) Symbol Parameter Test conditions Min. Typ. Max. Unit 1 µA 4 MΩ Crystal oscillator (see circuit Figure 20) II Input current on CLKIN RP External resistor CP External capacitors fCLK Nominal output frequency 1 22 4 4.194 8 8.192 pF MHz RC oscillator (see circuit Figure 20) ICLKIN Settling current RSET Settling resistor tJIT Frequency jitter 40 fCLK= 4 MHz 60 µA 12 kΩ 1 ns 1.
Terminology 6 Terminology 6.1 Measurement error STPM01 The error associated with the energy measurement made by the STPM01 is defined as: Percentage error = [STPM01 (reading) - true energy] / true energy 6.2 ADC offset error This is the error due to the DC component associated with the analog inputs of the A/D converters. Due to the internal automatic DC offset cancellation the STPM01 measurement is not affected by DC components in voltage and current channel.
STPM01 Typical performance characteristics 7 Typical performance characteristics Figure 3. Supply current vs. supply voltage, TA = 25 °C Figure 4. RC oscillator frequency vs. VCC, R = 12 kΩ, TA = 25 °C Figure 5. RC oscillator: frequency jitter vs. temperature Figure 6. Analog voltage regulator: line - load regulation Figure 7. Digital voltage regulator: line - load Figure 8.
Typical performance characteristics Figure 9. STPM01 Power supply AC rejection vs. VCC Figure 11. Error over dynamic range gain dependence Figure 10. Power supply DC rejection vs. VCC Figure 12. Primary current channel linearity at different VCC Figure 13.
STPM01 Theory of operation 8 Theory of operation 8.1 General operation description The STPM01 is able to perform active, reactive and apparent energy measurements, RMS and instantaneous values for voltage and current, line frequency information. Most of the functions are fully programmable using internal configuration bits accessible through SPI interface. The most important configuration bits are the two application bits (APL - see Table 16 for configuration register).
Theory of operation STPM01 The maximum differential input voltage is dependent on the selected gain according to the following table. Table 8. Gain of voltage and current channels Voltage channels Gain Current channels Max Input voltage (V) ±0.30 4 Gain Max input voltage (V) 8X ±0.15 16X ±0.075 24X ±0.05 32X ±0.035 The gain register is included in the device configuration register with the address names PST and ADDG.
STPM01 8.3 Theory of operation ∑Δ A/D converters The analog to digital conversion in the STPM01 is carried out using two first order ∑ Δ converters. The device performs A/D conversions of analog signals on two independent channels in parallel. The current channel is multiplexed as primary or secondary current channel in order to be able to perform a tamper function, if it is enabled.
Theory of operation STPM01 Figure 15. ZCR signal 8.5 Period and line voltage measurement The period module measures the period of the base frequency of the voltage channel and checks if the voltage signal frequency is within the fCLK/217 to fCLK/215 band. To do this, the LIN signal is produced, which is low when the line voltage is rising, and high when the line voltage is falling. This means that the LIN signal is the sign of dv/dt. With further elaboration, the ZCR signal is also produced.
STPM01 Theory of operation Figure 16. LIN and BFR signal The BFR flag is also set if the register value of the RMS voltage drops below 64. BFR is cleared when the register value goes above 128. The BFR, then, also gives information about the presence of the line voltage within the meter. When the BFR error is set, the computation of power is zero unless the FRS bit is set or the single wire mode operation is selected (see Section 8.6).
Theory of operation STPM01 for tampering purposes or in case the line voltage is very stable, it is possible to use a predefined value for computing the energy without sensing it. In order to enable the SWM mode, the STPM01 must be configured with PST values of 4 or 5, (tamper enabled-Rogowsky coils). In this way, if the BFR error is detected, STPM01 enters in SWM.
STPM01 Theory of operation capacitor should be connected between VCC and VSS, VDDA and VSS, VDDD and VSS. All these capacitors must be located very close to the device. The STPM01 contains a power on reset (POR) detection circuit. If the VCC supply is less than 2.5 V then the STPM01 goes into an inactive state, all the functions are blocked asserting a reset condition. This is useful to ensure correct device operation at power-up and during power-down.
Theory of operation STPM01 When a no load condition occurs (BIL=1) the integration of power is suspended and the tamper module is disabled. In standalone mode, if a no load condition is detected, the BIL signal blocks generation of pulses for stepper and forces SCLNLC pin to be low. If APL = 2 (see Section 8.14) the LED pin continues providing the high frequency pulses, while if APL = 3, the pulses are stopped as happens for MOP and MON.
STPM01 Theory of operation The tamper circuit works if the energies associated with the two current channels are both positive or negative, if the two energies have different sign, the tamper is on all the time however, the channel with the associated higher power is selected for the final computation of energy. In single wire mode, the apparent energy rather than the active is used for tamper detection. When internal signals are not good enough to perform the calculations, i.e.
Theory of operation STPM01 samples, called B and A respectively, the criteria of tamper is calculated and the channel with higher current is selected, resulting in a new tamper state. If four consecutive new results of criteria happen, i.e. after elapsed 5.12 s at 50 Hz, the meter will enter into tamper state. Thus, the channel with the higher current will be selected for the energy calculation.
STPM01 Theory of operation the nominal frequency value of CLKOUT. Two nominal frequency ranges are expected, from 4.000 MHz to 4.194 MHz (MDIV = 0) or from 8.000 MHz to 8.192 MHz (MDIV = 1). Figure 20. Different oscillator circuits (a): with quartz; (b): internal oscillator; (c): with external source 8.12.1 RC Startup procedure To use the device with RC oscillator the configuration bit RC (see Table 16) must be set.
Theory of operation 8.13 STPM01 Resetting the STPM01 The STPM01 has no reset pin. The device is automatically reset by the POR circuit when the VCC crosses the 2.5 V value but it can be reset also through the SPI interface giving a dedicated command (see SPI section for remote reset command details).
STPM01 Theory of operation In a practical example where APL = 2, and the desired P is 64000 pulses/kWh (= 17.7 Hz*kW), we have: KAW = 7.63*10-6 Wh This means that the reading of 0x00001 in the active energy register represents 7.63 µWh, while 0xFFFFF represents 8 Wh. 8.15 Driving a stepper motor (standalone) When used in standalone mode (APL = 2 or APL = 3), the STPM01 is able to directly drive a stepper motor.
Theory of operation STPM01 Figure 21. Positive energy stepper driving signals Hi MON Lo Hi MOP Lo Figure 22. Negative energy stepper driving signals Hi MON Lo Hi MOP Lo When a no-load condition is detected MOP and MON are held low. 8.16 Using STPM01 in microcontroller based meter (peripheral) The higher flexibility of STPM01 allows its use in very high end microcontroller based energy meters.
STPM01 Theory of operation It is expected that an application microcontroller should access the data in the metering device on regular basis at least 1/s (recommended is 32/s). Every latching of results in the metering device requested from the microcontroller also resets the watchdog. If latching requests does not follow each other within 1.6 second, an active high pulse on MON is produced, because device assumes that microcontroller does not operate properly.
Theory of operation Table 15.
STPM01 Theory of operation The first 6 registers are read-only except for the 8 bit mode signals in the DFP register (the mode signals will be described later in this paragraph). The last two registers CFL and CFH can be also written because they contain the configuration bits. Among these last 64 bits (32 of CFL and 32 of CFH), 8 bits are used for parity nibbles, then only 56 bits are used for configuring and programming the STPM01. Figure 23.
Theory of operation STPM01 The very first CFG bit, called TSTD, is used to disable any change of system signals after it was permanently set. During the configuration phase, each bit set to logic level 1 will increase the supply current of STPM01 of about 120 µA, until the TSTD bit is set to 1. The residual increase of supply current is 2 µA per each bit set to 1. It is then recommended to set the TSTD bit to 1 after the configuration procedure in order to keep the supply current as low as possible.
STPM01 Theory of operation Table 16. Configuration bits map (continued) Address n.
Theory of operation Table 16. STPM01 Configuration bits map (continued) Address Name 6-bit binary DEC 010000 16 RESERVED BGTC 2 Bandgap Temperature compensation bits. See Figure 17 for details. CPH 4 4-bit unsigned data for compensation of phase error, 0°+0.576°. 16 values are possible with a compensation step of 0.0384°. When CPH=0 the compensation is 0°, when CPH=15 the compensation is 0.576°. 8 8-bit unsigned data for voltage channel calibration. 256 values are possible.
STPM01 Theory of operation Table 16. Configuration bits map (continued) Address Name 6-bit binary DEC 110000 48 110001 49 (1) 110010 n. of bits CRC 2 2-bit unsigned data for calibration of RC oscillator. CRC=0, or CRC=3 cal=0% CRC=1, cal=+10%; CRC=2, cal=-10%. NOM 2 2-bit modifier of nominal voltage for Single Wire Meter. NOM=0: KNOM=0.3594 / NOM=1: KNOM=0.3906 / NOM=2: KNOM=0.4219 / NOM=3: KNOM=0.
Theory of operation Table 17.
STPM01 Theory of operation – BANK: it is used to activate RC oscillator (see Chapter 8.12.1). 8.21 SPI interface The SPI interface supports a simple serial protocol, which is implemented in order to enable a communication between some master system (microcontroller or PC) and the device.
Theory of operation 8.21.1 STPM01 Remote reset The timing diagram of the operation is shown on the Figure 24. The time step can be as short as 30 ns. The internal reset signal is named RRR. Unlike the POR, the RRR signal does not cause the 30 ms retard restart of analog module and the 120 ms retard restart of digital module. This signal doesn’t clear the mode signals. Figure 24. Timing for providing remote reset request (1) SCS SYN SCLNLC SDATD t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 1.
STPM01 Theory of operation division makes sense with the MSB of data value because the MSN of it holds the parity code rather than useful data. Figure 25. Data records reconstruction The sequence of data record during the reading operation is fixed. Normally, an application will read 1st,.., 6th data record, the 7th and 8th data record would read only when it need to fetch the configuration data. However, an application may apply a precharge command (see Table 17) prior reading phase.
Theory of operation STPM01 t1 → t2: Latching phase. Interval value > 2/fCLK t2 → t3: Data latched, SPI idle. Interval value > 30 ns t3 → t4: Enable SPI for read operation. Interval value > 30 ns t4 → t5: Serial clock counter is reset. Interval value > 30 ns t5 → t6: SPI reset and enabled for read operation.
STPM01 Theory of operation t1 → t2 (> 30 ns): SPI out of idle state t2 → t3 (> 30 ns): SPI enabled for write operation t3: data value is placed in SDA t4: SDA value is stable and shifted into the device t3 → t5 (> 10 µs): writing clock period t3 → t5: 1 bit data value t5 → t6: 6 bits address of the destination latch t6 → t7: 1 bit EXE command t8: end of SPI writing t9: SPI enters idle state The same procedure should be applied for the mode signals, but in this case the 6-bits address must be taken from the
Theory of operation STPM01 1. activate SYN first in order to latch the results; 2. after at least 1µs activate SCS; 3. write one byte to the transmitter of SPI (this will produce 8 pulses on SCL with SDI=1); 4. deactivate SYN; 5. optionally read the data records (the sequence of reading will be altered; 6. deactivate SCS; Permanent writing of the CFG bits In order to make a permanent set of some CFG bits, the following procedure should be conducted: 1.
STPM01 Theory of operation Equation 3 i(t) = I • sin (ωt + ϕ); where I is the peak current, ω is related to the line frequency and ϕ is the phase difference between voltage and current. 8.24.1 Active power Figure 28.
Theory of operation STPM01 Equation 6 dv/dt → v(t) = V ⋅sin ωt; [see Figure 28 - 7] i(t) → ∫ I( t ) = i( t ) ⋅ dt = − I ⋅ cos( ω t + ϕ ) ω [see Figure 28 - 8] Now four signals are available.
STPM01 Theory of operation Equation 11 ∫ V(t) = v(t) ⋅ dt = − V ⋅ cos ωt ω Equation 12 [ (t) = ∫ i′( t ) ⋅ dt = i( t ) = − I ⋅ sin( ω t + ϕ ) The signals process flow will be the same as shown in the previous case, and even with the formulas above, the result will be the same.
Theory of operation STPM01 Equation 16 Q 3 ( t) = 1 VI ⋅ Q1(t) ⋅ ω = ⋅ (sin ϕ − sin(2ωt + ϕ)) 2 2 The reactive power will present then a ripple at twice the line frequency. Since the average value of a sinusoid is 0, this ripple does not contribute to the reactive energy calculation over time, moreover, in the STPM01 the reactive power is not used for meter calibration or to generate the stepper pulses, then this ripple will not affect the overall system performances.
STPM01 Theory of operation Equation 21 I IRMS = 2 The RMS voltage value is obtained as: Equation 22 1 T VRMS = T ∫v 2 V ( t )dt = 2 0 For the apparent power another value is produced: Equation 23 1 T T ∫ v′ 2 ( t )dt = V ⋅ω 2 0 Multiplying Equation 20: and Equation 23: , the apparent power is produced: Equation 24 S= I ω⋅ 2 ⋅ V⋅ω 2 = VI 2 Rogowsky coil In this case we have: Equation 25 IRMS = 1 T T ∫ i′′ 0 2 ( t )dt = I 2 while VRMS is calculated as in Equation 22: .
STPM01 calibration 9 STPM01 STPM01 calibration Energy meters based on STPM01 device are calibrated in a fast and easy way. The calibration is essentially based on the single calibration of the voltage and current channel considering their RMS values rather than on the frequency of output pulse signal. When the two channel are calibrated all the other measurement are calibrated too. This allows the calibration to be performed in only one point shortening the production time of the meter.
STPM01 STPM01 calibration As shown in Table 18, only analog parameter are object of calibration because introduce a certain error. Voltage ADC amplification Av is constant, while Ai is chosen according to used sensors. The calibration algorithm will firstly calculate the voltage divider ratio and, as final result, the correction parameters, called Kv and Ki, which applied to STPM01 voltage and current measures compensate small tolerances of analog components that affect energy calculation.
STPM01 calibration STPM01 VDIV = (XV * VBG)/ (2 * GDIF * AV * Kv * GDF * GINT * BV)= 145,6 mV Choosing R2 = 500 Ω (connected between VI and VSS), the R1 resistor (connected between VLINE and VIP) value is obtained: R1 = R2 * (Vn - VDIV) / VDIV = 789,3 Ω Indicating with IA and VA the real readings on the STPM01 RMS registers of voltage and current, and with XI and XV ideal values of RMS current and voltage readings already calculated, the final values for calibrators can be calculated as: XV = (Kv * VA) /
STPM01 10 Application design Application design The choice of the external components in the transduction section of the application is a crucial point in the application design, affecting the precision and the resolution of the whole system. Among the several considerations, a compromise has to be found between the following needs: 1. Maximize the signal to noise ratio in the voltage channel, 2.
Application design STPM01 Figure 29.
STPM01 Application design Figure 30.
Package mechanical data 11 STPM01 Package mechanical data In order to meet environmental requirements, ST offers these devices in different grades of ECOPACK® packages, depending on their level of environmental compliance. ECOPACK® specifications, grade definitions and product status are available at: www.st.com. ECOPACK® is an ST trademark.
STPM01 Package mechanical data TSSOP20 mechanical data mm. inch. Dim. Min. Typ. Max. A Min. Typ. Max. 1.2 A1 0.05 A2 0.8 b 0.047 0.15 0.002 0.004 0.006 1.05 0.031 0.039 0.041 0.19 0.30 0.007 0.012 c 0.09 0.20 0.004 0.0079 D 6.4 6.5 6.6 0.252 0.256 0.260 E 6.2 6.4 6.6 0.244 0.252 0.260 E1 4.3 4.4 4.48 0.169 0.173 0.176 1 e 0.65 BSC K 0° L 0.45 A 0.0256 BSC 0.60 8° 0° 0.75 0.018 8° 0.024 0.
Package mechanical data STPM01 Tape & reel TSSOP20 mechanical data mm. inch. Dim. Min. A Max. Min. 330 13.2 Typ. Max. 12.992 C 12.8 D 20.2 0.795 N 60 2.362 T 58/60 Typ. 0.504 22.4 0.519 0.882 Ao 6.8 7 0.268 0.276 Bo 6.9 7.1 0.272 0.280 Ko 1.7 1.9 0.067 0.075 Po 3.9 4.1 0.153 0.161 P 11.9 12.1 0.468 0.
STPM01 Revision history 12 Revision history Table 22. Document revision history Date Revision Changes 28-Sep-2004 1 Preliminary data. 22-Dec-2005 2 Document updated. 24-Oct-2006 3 The chapter 9 updated. 06-Feb-2006 4 Modified Figure 11. 12-Jan-2009 5 Modified address 11 Table 16 on page 34. 03-Apr-2009 6 Modified Figure 20 on page 27. 19-Oct-2010 7 Added Chapter 8.12.1: RC Startup procedure on page 27, Chapter 10: Application design on page 53, modified Chapter 8.
STPM01 Please Read Carefully: 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 ST’s terms and conditions of sale.