UM1529 STMICROELECTRONICS | Alldatasheet

Document overview

  • Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
  • PDF pages: 35

Technical content

Datasheet sections

  • 1 Features
  • 2 Overview
  • 2.1 Safety rules
  • 2.2 Recommended readings
  • 2.3 Getting technical support
  • 3 Getting started
  • 3.1 Package
  • 3.2 Hardware installation
  • 3.3 Software installation
  • 3.3.1 System requirements for demonstration GUI
  • 4 Hardware layout
  • 5 Hardware details
  • 5.1 Metering IC U1
  • 5.1.1 Clocking Y1
  • 5.2 Microcontroller U2
  • 5.2.1 LED D10
  • 5.2.2 Switch SW1, SW2
  • 5.2.3 Jumper J2
  • 5.2.4 Clocking Y2
  • 5.3 Power supply section
  • 5.3.1 Programmable voltage reference U5
  • 5.3.2 Current sensor CT1
  • 5.3.3 Shunt RS1
  • 5.4 Neutral missing power supply section
  • 5.4.1 Current sensor CT2
  • 5.5 EEPROM U3 section
  • 5.6 LCD section
  • 5.7 Battery management section
  • 5.7.1 Coin cell BT1
  • 5.7.2 Rechargeable battery BT2

Datasheet sections

STPM10 metering IC and STM8L152C6 microcontroller. Figure 1. Single-phase energy meter solution based on STPM10 and STM8L152C6

1 Features

  • Low cost single-phase energy meter solution
  • Supports IEC 61036:1996 + A1: 2000, static meter for active energy classes 1 for Ib=10 A
  • Less than 4 VA power consumption for voltage circuit at reference voltage
  • Less than 1 VA power consumption for current circuit at reference basic current
  • Multiple tamper detection: earth, neutral missing, reverse, case tamper, magnetic tamper detection
  • Case tamper detection in power-down also
  • Detects, signals and continues to measure accurately under tamper condition
  • Rechargeable battery is available onboard for showing LCD parameters in case of power-down mode
  • Active energy pulse output 1600 impulses/kWh
  • Software based auto-calibration without the need of reference meter, only reference source is required
  • Microcontroller in-built RTC for date and time display
  • Microcontroller STM8L152C6T6 is responsible for all the data management, display and power management
  • STPM10 metering IC with 1st order sigma-delta ADC for energy measurements
  • Single point and fast calibration of the STPM10 for class 1 meter
  • External EEPROM used to store calibration parameters, tampering information, cumulative energy, MD and power factor (PF) data
  • Active power, current, voltage, power factor and line frequency measurements
  • Numeric display precision (except cumulative energy): 5+2 digits
  • Numeric display precision for cumulative energy: 5+1 digits
  • Energy EEPROM log precision: 0.01 kWh.

2 Overview

2.1 Safety rules

This board can be connected to mains voltage (240 V). In the case of improper use, wrong installation or malfunction, there is a danger of serious personal injury and damage to property. All operations such as transport, installation and commissioning, as well as maintenance, should be carried out only by skilled technical personnel (regional accident prevention rules must be observed). Danger: Due to the risk of death when using this prototype on mains voltage (240 V), only skilled technical personnel who are familiar with the installation, mounting, commissioning and operation of power electronic systems and have the qualifications needed to perform these functions, may use this prototype.

2.2 Recommended readings

This documentation describes how to use the multi-tariff meter reference board. Additional information can be found in the following documents:

  • STPM10 datasheet
  • STM8L152C6T6 datasheet
  • Component datasheets
  • IEC 62056-21 IrDA protocol mode C.

2.3 Getting technical support

For technical assistance, documentation, information and updates about products and services, please refer to your local ST distributor/office.

3 Getting started

3.1 Package

  • Hardware content – STEVAL-IPE020V1 demonstration board
  • Software – SerialIO GUI for IRDA communication testing
  • Documentation: – User manual – Presentation – Schematic –B O M .

3.2 Hardware installation

Connect the STEVAL-IPE020V1 demonstration board with the mains supply before load. Please refer to Figure 2 for connection with mains power and load. Auto-scrolling LCD display indicates successful power-up of the board. Figure 2. Electricity meter connection diagram

3.3 Software installation

protocol mode C implementation.

3.3.1 System requirement s for demonstration GUI

For demonstration board communication with the GUI, a recent version of Windows®, Windows XP must be installed on the PC. The SerialIO GUI does not require any driver installation. The version of the Windows OS installed on PC can be determined by clicking on the system icon in the control panel.

4 Hardware layout

Figure 3. Hardware layout: top view Figure 4. Hardware layout: bottom view

5 Hardware details

5.1 Metering IC U1

metering IC. For calibration of the STPM10, auto-calibration is implemented.

5.1.1 Clocking Y1

A 4.194 MHz crystal is used as clock generator input for the metering IC. For more details about auto-calibration, please refer to Section 6.1: Auto-calibration mode.

5.2 Microcontroller U2

much lower power and has in-built RTC for date and time management.

5.2.1 LED D10

energy calculation accuracy.

5.2.2 Switch SW1, SW2

Switch SW1 is the reset switch for the microcontroller. meter solution. For more details, refer to Section 6.4: LCD display modes.

5.2.3 Jumper J2

5.2.4 Clocking Y2

Table 1. 3-pin jumper header

5.3 Power supply section

Capacitive power supply is used to build 3.6 V for the metering IC and microcontroller section.

5.3.1 Programmable voltage reference U5

U5 TL431AI (package TO-92) is used to regulate the 3.6 V supply.

5.3.2 Current sensor CT1

CT1 E4626-X002 (2500 turns, series resistance: 41.7 Ω) is the sensor for primary current channel.

5.3.3 Shunt RS1

RS1 300 µΩ is the sensor for the secondary current channel.

5.4 Neutral missing power supply section

The neutral missing power supply section is operational in the case of neutral missing tamper. In the case of neutral missing tamper condition, neutral is disconnected from the energy meter. Hence, there is no voltage input and therefore no output would be generated by the main capacitive power supply. However, in the case of load present, there would be a valid input signal on the current channel so energy would be consumed. Since the voltage on the neutral channel is zero, so is the power (P = V x I). In order to take account of energy consumed in this case, the neutral missing power supply section provides voltage supply to the STPM10 metering IC. A zero crossing signal of 50 Hz is provided to the VIP pin of the STPM10, so it now calculates the energy consumption at a nominal voltage level of 230 V.

5.4.1 Current sensor CT2

CT2 is used to develop the power supply for the board using a diode full-wave rectifier circuit in neutral missing condition.

5.5 EEPROM U3 section

Dual interface EEPROM M24LR64-RMN6T/2 (package: SO8, 64 Kbit) is interfaced to the microcontroller using the I2C bus. This is a dual interface EEPROM and we can communicate with this device using I2C communication (wired) as well as RF interface (wireless) using an RF reader. Cumulative energy, MD, average PF and tamper information for seven consecutive months are logged as months in EEPROM. For more details about EEPROM data logging, refer to Section 6.2: EEPROM data log.

5.6 LCD section

LCD J3 is the connector for external 18* 4 LCD glass. LCD glass OPT6089A (operating voltage 3 V, duty 1/4, Bias 1/3) offers various energy meter specific symbols. LCD glass is driven by the microcontroller internal LCD driver.

5.7 Battery management section

Two batteries are used in the circuit.

5.7.1 Coin cell BT1

5.7.2 Rechargeable battery BT2

BT2 VL2330 (3 V, 50 mAh) for pushbutton and IRDA operation when mains power is OFF .

  • The rechargeable battery acts as power source for the microcontroller section when the pushbutton is pressed during mains power-off.
  • It is charged based on trickle charging mode during mains power-on.

5.7.3 Small signal Schottky diode D11, D12, D13, D14, D5

power source for the microcontroller.

5.7.4 Switch SW3

Switch SW3 is the pushbutton switch. SW3 is used to control LCD display modes. the pushbutton low-power mode.

5.8 IRDA section

5.8.1 IRDA transceiver U6

IRDA transceiver TFDU6300 is used for IRDA communication.

5.8.2 Jumper J6

For more details, refer to Section 6.7.2: SerialIO GUI. Table 2. Pin jumper headers

5.9 Magnetic sensor U4

meter solution. Magnetic sensor outputs low on magnetic interference on the board.

5.10 Connector section

The connector section comprises test points for different signals. Table 3. 4-pin jumper headers Table 4. J7 STPM10 connector, 10-pin jumper header

2 SBS

4 PB7_STPM_SDA

5 PB6_STPM_SCS

6 PB5_STPM_SCL

8 PA3_STPM_SYN

9 SBS

10 VDD

6 Single-phase energy meter features

6.1 Auto-calibration mode

errors and to increase the accuracy of the meter. how to connect a calibration board.

6.1.1 Steps for auto-calibration

  • Connect 240 V voltage source to phase and neutral of board
  • Connect 10 A source to board
  • Pushbutton SW3 for more than 4 sec
  • Board enters auto-calibration mode; “CALIB ON” is displayed on the board
  • As calibration is complete, board returns to auto-scroll display mode.

Figure 5. Auto-calibration mode connection diagram

UM1529 Single-phase energy meter features Doc ID 022953 Rev 1 17/35

6.2 EEPROM data log

Total EEPROM data log size: 920 bytes. Multiple parameters are stored in EEPROM as below:

  • The following metering parameters are logged in EEPROM memory for the current month and last six months. – Cumulative energy (CE) till last month – Maximum demand (MD) – Cumulative energy (CE) consumed in current month – Average PF and averaging count – Tamper entries Four types of tamper data storage are done: earth, reverse, neutral, case tamper. For each type of tamper, the number of tamper entries per month is four.
  • Two duplicate entries of cumulative energy are stored with CRC-8 value for error detection
  • 10 bytes stored for calibration data @ start of EEPROM including 3 bytes of CHV, CHP , and CHS
  • Last power-down date and time log
  • Overflow count for cumulative energy – Number of times cumulative energy overflows from 99999.9 (maximum display precision), for further details, refer to Appendix A: EEPROM log data structure.

6.3 Power management

The STEVAL-IPE020V1 demonstration board is designed with board power consumption 4 VA. The board supports two modes of operation:

  • Meter run mode
  • Meter lower power mode.

6.3.1 Meter run mode

When mains power is ON, the board operates in run mode. The board components are powered using capacitive supply using the main power line as the source. In this mode, the rechargeable battery is in charging mode based on trickle charging technique.

6.3.2 Meter low-power mode

When mains power goes down, the onboard microcontroller enters halt mode and metering IC is off. In this mode, the microcontroller RTC is running and low, other peripherals are off. In halt mode, the microcontroller is powered using BT1. Therefore, pushbutton SW3 is pressed in low-power mode; BT2 supply connects to the supply input of the microcontroller and the IRDA section. So, in button pressed condition, BT2 is the main supply source. Now, the meter low-power LCD display and IRDA communication are operational till pushbutton SW3 is operational.

Single-phase energy meter features UM1529 18/35 Doc ID 022953 Rev 1

6.4 LCD display modes

The STEVAL-IPE020V1 demonstration board offers different parameters to the user. The metering parameters display is configured in a specific manner based on the power mode of the meter.

  • Meter run mode LCD display
  • Meter low-power LCD display.

6.4.1 Meter run mode display

During main power-on condition, all the critical parameters with details of last month logs for metering parameters are available on the display. Parameter display is classified in the manner below for mains ON condition:

  • Auto-scroll mode
  • Pushbutton display mode.

6.4.2 Auto-scroll mode

In auto-scroll mode, the following parameters are displayed on the LCD display one by one.

  • Cumulative active energy (kWh)
  • Max. demand (kW) of last month
  • Average PF of last consumption month. Note: Auto-scroll mode interval (8sec) is configurable in “autoscroll_display.h” in firmware.

6.4.3 Pushbutton mode

In pushbutton mode, the following parameters are displayed on the LCD on pressing pushbutton SW3. Each button push displays the next pushbutton parameter. If the pushbutton is in a pressed condition for 4sec, the board enters auto-calibration mode. For more details on auto-calibration, refer to Section 6.1: Auto-calibration mode. In pushbutton mode, the following parameters are displayed on the LCD.

  • All LCD segments ON
  • Date and time
  • Max. demand since last reset
  • Cumulative energy for last six months
  • Max. demand for last six months
  • Instantaneous PF
  • Instantaneous voltage
  • Instantaneous current
  • Instantaneous load in Watt. When the pushbutton SW3 is released, the LCD display returns to auto-scroll mode after pushbutton mode interval (10sec). Note: Pushbutton mode interval (8sec) is configurable in “pushbutton_display.h” in firmware.

UM1529 Single-phase energy meter features Doc ID 022953 Rev 1 19/35

6.5 Meter low-power mode display

In low-power mode, the display is OFF till pushbutton SW3 is pressed. When pushbutton SW3 is pressed in low-power mode, the display is ON in auto-scroll display mode. The display is active till pushbutton SW3 is in pressed condition.

6.6 Tamper detection

STEVAL-IPE020V1 demonstration board supports multiple tamper detection and their logging in EEPROM.

6.6.1 Tamper types

The following five types of tamper detection are:

  • Earth tamper
  • Reverse tamper
  • Neutral missing tamper
  • Case tamper
  • Magnetic interference.

6.6.2 LCD symbol for tamper condition

  • Earth tamper:
  • Reverse tamper:
  • Neutral missing tamper:
  • Case tamper:
  • Magnetic interference: The three tampers (earth, reverse and neutral missing) are detected using a software algorithm based on meter readings from metering IC. In the case of neutral missing tamper detection, the board starts recording energy when the load current is 2 A or higher. Case tamper is detected using switch SW2 and magnetic interference is detected using magnetic sensor U4. The symbol 'BP' is shared for displaying case tamper as well as magnetic interference. It means that if any of the tampers are detected, symbol 'BP' is displayed on the LCD. For tamper definitions, refer to Appendix B: Tamper definitions. Note: In the present solution, magnetic tamper is not logged in EEPROM. Logging can be easily done modifying the EEPROM log structure.

Single-phase energy meter features UM1529 20/35 Doc ID 022953 Rev 1 6.7 62056-21 IRDA protocol mode C The STEVAL-IPE020V1 demonstration board supports 62056-21 IRDA protocol mode C. IRDA is used as a communication channel for reading meter data. In such systems, a handheld unit (HHU) or a unit with equivalent functions is connected to a tariff device (energy meter). The protocol offers five alternative protocol modes, A, B, C, D and E. This solution covers mode C use. In mode C, data exchange is bi-directional and is always initiated by the HHU with the transmission of a request message. In this mode, the HHU acts as a master and the tariff device acts as a slave. These protocol modes permit meter reading, manufacturer specific operation and programming mode. It is designed to be highly suitable for electricity metering environments, particularly with regards to electrical isolation and data security.

6.7.1 IRDA modes

  • Data readout mode In data readout mode, the tariff device responds with all the data logged in EEPROM as per EEPROM data structure (refer to Appendix A: EEPROM log data structure). Each data block consists of a sequence of data lines separated by CR carriage return and LF linefeed.
  • Manufacturer specific mode In manufacturer specific mode, RTC date and time setting is done.
  • Programming mode In programming mode, as per the protocol, data read and write can be done at different locations of EEPROM.

6.7.2 SerialIO GUI

The SerialIO GUI can be used as the test GUI for 62056-21 IRDA protocol mode C implementation. Here, the protocol is tested using serial communication. For this testing, a daughterboard with an RS232 converter is required to map the PC serial data signals to 3.4 V data signals of the board. Steps for serial communication based protocol testing

  • Disconnect R41, R42 from board.
  • Comment “#defines IRDA_MODE_ENABLE” in “emter_irda.h”.
  • Connect the RS232 daughterboard as shown in Figure 6
  • Write data in the SerialIO GUI data box and send.

Figure 6. SerialIO GUI hardware setup Figure 7. SerialIO GUI with protocol mode C settings

6.8 Pulse-out LED

LED output can be used to test the accuracy of the meter.

EEPROM log data structure UM1529 22/35 Doc ID 022953 Rev 1 Appendix A EEPROM log data structure All the below parameters are stored in EEPROM

  • Calibration data (10 bytes) (3 bytes of CHV, CHP , CHS, then 7 times 0x00)
  • Total cumulative energy (at two locations - to keep duplicate entries)
  • Total cumulative till last month (month-wise for last six months and current month)
  • Maximum demand (month-wise for last six months and current month)
  • Cumulative energy (month-wise for last six months and current month)
  • Average PF and averaging count (month-wise for last six months and current month)
  • Tamper information - earth, reverse, neutral missing, case tamper (month-wise for last six months and current month and four entries per month with count for tamper and date and time details)
  • Count of cumulative energy overflow Count of cumulative energy overflow
  • Date and time of last power down Total size required: 920 bytes. Data storage structure in EEPROM as follows
  • Calibration data (CHV, CHP , CHS)
  • CE main entry with CRC
  • N month: CE till last month: MD: CE current month: average PF: tamper
  • N-1 month: CE till last month: MD: CE current month: average PF: tamper
  • N-2 month: CE till last month: MD: CE current month: average PF: tamper
  • N-3 month: CE till last month: MD: CE current month: average PF: tamper
  • N-4 month: CE till last month: MD: CE current month: average PF: tamper
  • N-5 month: CE till last month: MD: CE current month: average PF: tamper
  • N-6 month: CE till last month: MD: CE current month: average PF: tamper
  • CE duplicate copy with CRC
  • Count for cumulative energy overflow
  • Power-down date and time. Where N is the current month
  • All parameters are logged for a total of 7 months including the current month and the last 6 months
  • In current month log, data is updated at day end and on power-down
  • Total cumulative energy log is updated half-hourly
  • Month serial order is updated at 24:00 of last date of each calendar month.

6.9 Size overview

parameters in header file “emeter_datamgmt.h” to modify log structure entry count.

6.10 Entry structure

  • Calibration data log CHV, CHP , CHS are calibration parameters for current and voltage channel for metering IC. For more details on calibration parameters, refer to the metering IC datasheet on www.st.com.
  • Total cumulative energy log Two duplicate entries are stored. One at the start of EEPROM and another at the end of EEPROM. This is done to make sure that, if EEPROM is corrupted at one point, another entry with correct CRC is considered as valid value.

Table 5. EEPROM parameter size overview Table 6. Calibration data log

  • Cumulative energy till last month Cumulative energy till last month states energy consumed till the last calendar month reset.
  • Monthly maximum demand
  • Current monthly cumulative energy Current monthly cumulative energy states energy consumed in that particular current month till the last calendar month reset.
  • Monthly average PF PF average value is sum of PF readings and PF averaging count is number of PF readings.

Table 7. Total cumulative energy log Table 8. Cumulative energy till last month Table 9. Monthly maximum demand Table 10. Current monthly cumulative energy Table 11. Monthly average PF

  • Monthly tamper log For monthly tamper log, the following four types of tamper data is logged. – Earth tamper – Reverse tamper – Neutral missing tamper – Case tamper For each tamper, there are 4 entries per month. So, for each type of tamper, the storage per month is: – Tamper count: 1 byte – Four entries of date: 3 bytes x 4 : 12 bytes – Four entries of time: 3 bytes x 4 : 12 bytes In one tamper entry log, tamper count: number of tampers in month D: date and T: time each is of 3 bytes.

Table 12. Monthly tamper log

Appendix B Tamper definitions

  • Earth tamper – Using earth in place of neutral (load current is passed partially or fully through earth)
  • Reverse connection – Reversal of phase and neutral at mains
  • Neutral missing tamper – When neutral is disconnected, the board is not powered. During this condition (single wire conditions), power supply is generated by a CT for powering up the board.
  • Case tamper – If an attempt is made to open the meter body, the meter logs the date/time of meter opening tamper
  • Magnetic tamper – When a magnet comes near to the board, it pulls magnetic sensor output IO low.

Figure 8. Schematics (1 of 2)

Figure 9. Schematics (2 of 2)

Table 13. BOM

40 V 1 A DO-41 ST 1N5819 1N5819

Table 13. BOM (continued)

0 SMD0805 Any

1000 V DO41 Leaded Fairchild

Revision history

Table 14. Document revision history 18-Sep-2012 1 Initial release.