|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
september 2012 doc id 022901 rev 1 1/35 UM1524 user manual steval-ipe012v2: single-phase energy meter with 80 a maximum current based on the stpm10 metering ic and stm8l152c6 mcu introduction this document describes the functions of a single-phase energy meter based on the stpm10 metering ic and stm8l152c6 microcontroller. the demonstration board solution is a fully functional single-phase solution with parameter display, tamper management, maximum demand (md) calculation, eeprom data logging and low-power management. the meter specifications are: accuracy: class 1 with dynamic range 200:1 nominal voltage: 240 v nominal current: 10 a (ityp) maximum current: 80 a (i max ) operating range: 0.6 vb to 1.2 vb meter constant: 1600 impulses/kwh power frequency range: 45 hz to 65 hz sensor: primary side ct and secondary side shunt communication interface: irda figure 1. single-phase energy meter solution based on stpm10 and stm8l152c6 www.st.com
contents UM1524 2/35 doc id 022901 rev 1 contents 1 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1 safety rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 recommended reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 getting technical support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1 package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.3.1 system requirements for demonstration gui . . . . . . . . . . . . . . . . . . . . . 10 4 hardware layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5 hardware details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1 metering ic u1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1.1 clocking y1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2 microcontroller u2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2.1 led d10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2.2 switch sw1, sw2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2.3 jumper j2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.2.4 clocking y2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.3 power supply section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.3.1 programmable voltage reference u5 . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.3.2 current sensor ct1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.3.3 shunt rs1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.4 neutral missing power supply section . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.4.1 current sensor ct2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.5 eeprom u3 section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.6 lcd section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.7 battery management section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.7.1 coin cell bt1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 UM1524 contents doc id 022901 rev 1 3/35 5.7.2 rechargeable battery bt2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.7.3 small signal schottky diode d11, d12, d13, d14, d5 . . . . . . . . . . . . . . 14 5.7.4 switch sw3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.8 irda section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.8.1 irda transceiver u6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.8.2 jumper j6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5.9 magnetic sensor u4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.10 connector section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 6 single-phase energy meter features . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6.1 auto-calibration mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6.1.1 steps for auto-calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 6.2 eeprom data log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.3 power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.3.1 meter run mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.3.2 meter low-power mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6.4 lcd display modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.4.1 meter run mode display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.4.2 auto-scroll mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.4.3 pushbutton mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 6.4.4 meter low-power mode display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.5 tamper detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.5.1 tamper types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.5.2 lcd symbol for tamper condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 6.6 62056-21 irda protocol mode c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6.6.1 irda modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6.6.2 serialio gui . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6.7 pulse-out led . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 appendix a eeprom log data structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 6.8 size overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6.9 entry structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 appendix b tamper definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 b.1 schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 contents UM1524 4/35 doc id 022901 rev 1 appendix c bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 UM1524 list of tables doc id 022901 rev 1 5/35 list of tables table 1. 3-pin jumper header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 2. pin jumper headers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 table 3. 4-pin jumper headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 4. j7 stpm connector, 10-pin jumper header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 5. eeprom parameter size overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 6. calibration data log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 7. total cumulative energy log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 8. cumulative energy till last month . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 9. monthly maximum demand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 10. current monthly cumulative energy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 11. monthly average pf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 12. monthly tamper log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 13. bom list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 14. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 list of figures UM1524 6/35 doc id 022901 rev 1 list of figures figure 1. single-phase energy meter solution based on stpm10 and stm8l152c6 . . . . . . . . . . . . 1 figure 2. electricity meter connection diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 3. hardware layout: top view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 4. hardware layout: bottom view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 5. auto-calibration mode connection diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 figure 6. serialio gui hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 7. serialio gui with protocol mode c settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 8. schematics (1 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 9. schematics (2 of 2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 UM1524 features doc id 022901 rev 1 7/35 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 on board 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 a reference meter, only a reference source is required microcontroller built-in 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. overview UM1524 8/35 doc id 022901 rev 1 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 installati on, mounting, commissioning and operation of power electronic systems and have the qualifications needed to perform these functions, may use this prototype. 2.2 recommended reading this document 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. UM1524 getting started doc id 022901 rev 1 9/35 3 getting started 3.1 package the demonstration kit package includes the following items: hardware content ? steval-ipe012v2 demonstration board software ? serialio gui for irda communication testing documentation: ? user manual ? presentation ? schematic ?bom list. 3.2 hardware installation connect the steval-ipe012v2 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 ! - v 0 h a s e . e u t r a l , o a d , o a d , # $ 0 h a s e . e u t r a l getting started UM1524 10/35 doc id 022901 rev 1 3.3 software installation the demonstration kit supports the serialio gui for rs232 testing to check 62056-21 irda 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 the pc can be determined by clicking on the system icon in the control panel. UM1524 hardware layout doc id 022901 rev 1 11/35 4 hardware layout the demonstration kit hardware is designed in a sectional approach to offer multiple functions to users. figure 3. hardware layout: top view figure 4. hardware layout: bottom view hardware details UM1524 12/35 doc id 022901 rev 1 5 hardware details 5.1 metering ic u1 the programmable single-phase energy metering ic stpm10btr (package: tssop20) is interfaced to the microcontroller using a 3-wire spi interface. active energy, apparent energy, instantaneous voltage, and instantaneous current values are obtained from the stpm10 metering ic. for calibration of the stpm10, auto-calibration is implemented. 5.1.1 clocking y1 a 4.194mhz crystal is used as the 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 the microcontroller stm8l152c6t6 (package: lqfp48, 32k flash, 2kb ram, 48-pin) is responsible for all the data management and power management tasks. mcu consumes very low power and has built-in rtc for date and time management. 5.2.1 led d10 led d10 is the pulse-out led for cumulative energy. this is used for testing energy meter energy calculation accuracy. 5.2.2 switch sw1, sw2 switch sw1 is the reset switch for the microcontroller. switch sw2 is the case tamper switch. this is used to detect case tampering of the energy meter solution. for more details, refer to section 6.4: lcd display modes . 5.2.3 jumper j2 5.2.4 clocking y2 a 32.768 khz crystal is used as clock input for lse (low speed external) for the microcontroller rtc block. the microcontroller core is clocked by a hsi (high speed internal) clock. table 1. 3-pin jumper header jumper close : 1-2 close : 2- 3 default j2 microcontroller pin pa1 is connected to reset switch sw1. microcontroller pin pa1 is connected to led d10. close : 2-3 UM1524 hardware details doc id 022901 rev 1 13/35 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 the 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 case of neutral missing tamper. in case of a neutral missing tamper condition, neutral is disconnected from the energy meter. therefore, there is no voltage input and so 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 the stpm10 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 eeprom m24c32-rmn6tp (package: so8, 32 kbit) is interfaced to the microcontroller using an i 2 c bus. 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. hardware details UM1524 14/35 doc id 022901 rev 1 5.7 battery management section two batteries are used in the circuit. 5.7.1 coin cell bt1 bt1 cr2032 (3 v, 225 mah) is the microcontroller power source in halt mode to keep rtc running. 5.7.2 rechargeable battery bt2 bt2 vl2330 (3 v, 50 mah) for pushbutton and irda operation when mains power is off. rechargeable battery acts as power source for microcontroller section when pushbutton is pressed during mains power-off. rechargeable battery is charged based on trickle charging mode during mains power on. 5.7.3 small signal schottky diode d11, d12, d13, d14, d5 diodes (d11, d12, d13, d14, d5) bat30kfilm (sod - 523) based circuit is used to select the power source for the microcontroller. 5.7.4 switch sw3 switch sw3 is the pushbutton switch. sw3 is used to control lcd display modes. when mains power is on, on pressing the pushbutton, the lcd display is executed as per the pushbutton run mode. when mains power is off, on pressing the pushbutton, the lcd display is executed as per the pushbutton low-power mode. 5.8 irda section 5.8.1 irda transceiver u6 the irda transceiver tfdu6300 is used for irda communication. 5.8.2 jumper j6 using jumper j6, irda transmit and receive pins allow the testing of the irda section using the serialio gui. for more details, refer to section 6.6.2: serialio gui . table 2. pin jumper headers jumper pin1 pin 2 j6 pc3_irda_tx irda transmit pin pc2_irda_rx irda receive pin UM1524 hardware details doc id 022901 rev 1 15/35 5.9 magnetic sensor u4 the magnetic sensor ah180 (sc59-3l) is used to detect magnetic interference in the energy meter solution. magnetic sensor outputs low on magnetic interference on the board. 5.10 connector section the connector section comprises four test points for different signals. table 3. 4-pin jumper headers jumper pin1 pin2 pin3 pin4 j1 vdd pa 0 _ s w i m swim interface data pin gnd pa1_nrst_pulse_led led pulse output/reset signal j5 pa 0 _ s w i m swim interface data pin pe6 gpio gnd pe7_stpm_zcr metering ic zcr signal j4 gnd vdd pc1_eeprom_scl pc0_eeprom_sda table 4. j7 stpm connector, 10-pin jumper header pin number details 1votp 2 sbs 3gnd 4 pb7_stpm_sda 5 pb6_stpm_scs 6 pb5_stpm_scl 7pd6_stpm_led 8 pa3_stpm_syn 9 sbs 10 vdd single-phase energy meter features UM1524 16/35 doc id 022901 rev 1 6 single-phase energy meter features 6.1 auto-calibration mode the steval-ipe012v2 demonstration board supports auto-calibration using an ideal reference source for 10 a and 240 v. calibration is performed to minimize measurement errors and to increase the accuracy of the meter. using auto-calibration mode, calibration parameters (chv, chs, and chp) are calculated and programmed in metering ic registers. the procedure for meter calibration is explained below by firstly giving an overview of the hardware setup, and then by describing 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 push button 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 for more details of calibration parameters, refer to the metering ic datasheet on www.st.com. ! - v 6 ! # 3 o u r c e 3 4 0 - 0 . ! 3 o u r c e # 4 3 ( 5 . 4 UM1524 single-phase energy meter features doc id 022901 rev 1 17/35 6.2 eeprom data log total eprom 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 more details, refer to appendix a . 6.3 power management the steval-ipe012v2 demonstration board is designed with board power consumption 4 va. the board supports two modes of operation: meter run mode meter low-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, 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 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 supply input of the microcontroller and irda section. therefore, in a button pressed condition, bt2 is the main supply source. single-phase energy meter features UM1524 18/35 doc id 022901 rev 1 now, the meter low-power lcd display and irda communication are operational till pushbutton sw3 is operational. 6.4 lcd display modes the steval-ipe012v2 demonstration board offers the user different parameters. the metering parameters display is configured in a specific manner based upon the power mode of the meter. meter run mode lcd display meter low-power lcd display. 6.4.1 meter run mode display during the main power-on condition, all the critical parameters with details of last month?s 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 the 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 the 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. UM1524 single-phase energy meter features doc id 022901 rev 1 19/35 when the pushbutton sw3 is released, the lcd display returns to auto-scroll mode after a pushbutton mode interval (10sec). note: a pushbutton mode interval (8sec) is configurable in ?pushbutton_display.h? in the firmware. 6.4.4 meter low-power mode display in low-power mode, display is off till pushbutton sw3 is pressed. when pushbutton sw3 is pressed in low-power mode, display is on in auto-scroll display mode. the display is active till pushbutton sw3 is in the pressed condition. 6.5 tamper detection the steval-ipe012v2 demonstration board supports multiple tamper detection and their logging in eeprom. 6.5.1 tamper types the five types of tamper detection are: earth tamper reverse tamper neutral missing tamper case tamper magnetic interference. 6.5.2 lcd symbol for tamper condition earth tamper: reverse tamper: neutral missing tamper: case tamper: magnetic interference: three of the above tampers (earth, reverse and neutral missing) are detected using a software algorithm based on meter readings from the 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. symbol 'bp' is shared for displaying case tamper as well as magnetic interference. it means if any of the tampers are detected, symbol 'bp' is displayed on the lcd. for tamper definitions, refer to appendix b . note: in the present solution, magnetic tamper is not logged in eeprom. for logging, it can be easily done by modifying the eeprom log structure. single-phase energy meter features UM1524 20/35 doc id 022901 rev 1 6.6 62056-21 irda protocol mode c the steval-ipe012v2 demonstration board supports 62056-21 irda protocol mode c. irda is used as the 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 user manual 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.6.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 ). 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.6.2 serialio gui the serialio gui can be used as 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 pc serial data signals to 3.4 v data signals of the board. steps for serial communication based protocol testing: demount 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 serialio gui data box and send. UM1524 single-phase energy meter features doc id 022901 rev 1 21/35 figure 6. serialio gui hardware setup figure 7. serialio gui with protocol mode c settings note: for more details about irda mode c, refer to 62056-21 irda protocol mode c document. 6.7 pulse-out led led d10 is used as pulse-out for cumulative energy. it works on a meter constant of 1600 impulses/kwh. led output can be used to test the accuracy of the meter. ! - v 0 # 3 e r i a l # o m m u n i c a t i o n 3 4 4 x 2 x 3 4 % 6 ! , ) 0 % 6 % n e r g y - e t e r 4 x 0 # 2 x 0 # * u m p e r * 4 x 2 x / p t o # o u p l e r 6 # # 6 eeprom log data structure UM1524 22/35 doc id 022901 rev 1 appendix a eeprom log data structure all the parameters below 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 the last six months and current month) maximum demand (month-wise for the last six months and current month) cumulative energy (month-wise for the last six months and current month) average pf and averaging count (month-wise for the last six months and current month) tamper information - earth, reverse, neutral missing, case tamper (month-wise for the 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 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 one current 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 hrs of last date of each calendar month. UM1524 eeprom log data structure doc id 022901 rev 1 23/35 6.8 size overview note: eeprom data structuring is done in a modular way to support future updates. reconfigure parameters in header file ?emeter_datamgmt.h? to modify log structure entry count. 6.9 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 the valid value. table 5. eeprom parameter size overview parameter size (in bytes) calibration data 10 (3 bytes (chv, chp, chs +7 dummy bytes for future use)) total cumulative energy duplicate entry 1 7(4 bytes + 2byte + 1 byte (crc)) cumulative energy till last month 42(7*6): without crc maximum demand log 63(7*(3+3+3)) monthly cumulative energy 42(7*6) average pf log 42(7*4+7*2) earth tamper log 175 (7*((4*(3+3)) +1)) reverse log 175 (7*((4*(3+3)) +1)) neutral missing log 175 (7*((4*(3+3)) +1)) case tamper log 175 (7*((4*(3+3)) +1)) total cumulative energy duplicate entry 2 7(4 bytes + 2byte+ 1 byte (crc)) count for ce overflow 1 byte power-down entry 6 byte table 6. calibration data log calibration data start address size (chv, chp, chs, 7 times 0x00) 0x00 10 eeprom log data structure UM1524 24/35 doc id 022901 rev 1 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 the sum of pf readings and pf averaging count is the number of pf readings. table 7. total cumulative energy log 7 bytes (4 bytes: kwh, 2byte: impulse count & 1byte: crc) total cumulative energy entry table 8. cumulative energy till last month 6 bytes (4 bytes: kwh & 2byte: impulse count) cumulative energy entry till last month table 9. monthly maximum demand 3 bytes (1 byte: integer value & 2byte: impulse count) 3 bytes 3 bytes md value date time table 10. current monthly cumulative energy 6 bytes (4 bytes: kwh & 2byte: impulse count) current cumulative energy entry table 11. monthly average pf 4 bytes 2 bytes pf average value pf averaging value UM1524 eeprom log data structure doc id 022901 rev 1 25/35 monthly tamper log for the monthly tamper log, the following four types of tamper data are 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 a month. d: date and t: time each is of 3 bytes. table 12. monthly tamper log 1 byte 3 bytes 3 bytes tamper count date time tamper definitions UM1524 26/35 doc id 022901 rev 1 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. UM1524 tamper definitions doc id 022901 rev 1 27/35 b.1 schematics figure 8. schematics (1 of 2) ! - v 0 ! ? 3 7 ) - 6 $ $ 0 ! ? 3 7 ) - ' . $ 0 # ? # ! 3 % ? 4 ! - 0 % 2 0 ! ? . 2 3 4 ? 0 5 , 3 % ? , % $ 0 ! ? . 2 3 4 ? 0 5 , 3 % ? , % $ 0 ! ? . 2 3 4 ? 0 5 , 3 % ? , % $ 0 ! ? " ! 4 ? % 8 4 ? , # $ ? 0 5 3 ( 0 ! ? 3 4 - ? 3 9 . 0 ! ? , # $ ? # / - 0 ! ? , # $ ? # / - 0 ! ? , # $ ? # / - 0 ! ? , # $ ? 3 % ' ' . $ 6 $ $ 6 $ $ ! 6 $ $ 6 $ $ ! 6 , # $ 0 % ? , # $ ? 3 % ' 0 % ? , # $ ? 3 % ' 0 % ? , # $ ? 3 % ' 0 % ? , # $ ? 3 % ' 0 % ? , # $ ? 3 % ' 0 % ? , # $ ? 3 % ' 0 $ ? , # $ ? 3 % ' 0 $ ? , # $ ? # / - 0 $ ? , # $ ? 3 % ' 0 $ ? , # $ ? 3 % ' 0 " ? , # $ ? 3 % ' 0 % 0 $ ? , # $ ? 3 % ' 0 $ ? , # $ ? 3 % ' 0 $ ? 3 4 - ? , % $ 0 $ ? ( : ? 0 7 - 0 " ? , # $ ? 3 % ' 0 " ? , # $ ? 3 % ' 0 " ? , # $ ? 3 % ' 0 " ? , # $ ? 3 % ' 0 " ? 3 4 - ? 3 # , 0 " ? 3 4 - ? 3 # 3 0 " ? 3 4 - ? 3 $ ! 0 # ? % % 0 2 / - ? 3 $ ! 0 # ? % % 0 2 / - ? 3 # , 6 $ $ ' . $ 0 # ? ) 2 $ ! ? 2 8 0 # ? ) 2 $ ! ? 4 8 0 # ? # ! 3 % ? 4 ! - 0 % 2 0 # ? , 3 % ? ) . 0 # ? , 3 % ? / 5 4 0 # ? , # $ ? 3 % ' 0 # ? , 3 % ? ) . 0 # ? , 3 % ? / 5 4 0 & |