sames SA9109B MONOCHIP SINGLE PHASE BIDIRECTIONAL KILOWATT HOUR METERING IC Pulse output for calibration Power consumption rating below 40mW Adaptable to different types of current sensors Operates over a wide temperature range Precision voltage reference on-chip Protected against ESD n n n n n PIN CONNECTIONS PCLK PDTA PGM PB SR[0] SR[1] VBA V SS CIP CIN COP OSC2 S[13] S[12] S[11] S[10] S[9] S[8] S[7] S[6] DESCRIPTION The SAMES SA9109B Single Phase bidirectional energy metering integrated circuit has an integrated Liquid Crystal Display (LCD) driver for a 7 digit (7 segment) display as well as 4 multiple tariff registers. The SA9109B performs the active power calculation. The method of calculation takes the power factor into account. Two methods of energy measurement are available. One method results in energy values which take the direction of energy flow into account, a summation of signed integers. The alternative method measures energy regardless of the direction of energy flow, a summation of absolute values. The required measurement method may be selected when writing to the RAM of the device. n 39 37 36 35 34 33 32 31 30 29 40 28 41 27 42 26 43 25 44 24 23 1 2 22 3 21 4 20 5 19 6 18 7 DR-01252 38 8 9 10 11 12 13 14 15 16 S[5] S[4] S[3] S[2] S[1] S[0] COFF R[3] R[2] R[1] R[0] 17 IIN GND VREF CPON CPOP CPIN CPIP V DD Meets the IEC 521/1036 Specification requirements for Class 1 AC Watt hour meters Optical interface for electronic reading according to IEC1107 Mode D SDO OSC1 n n CON IVN IIP FEATURES n Performs bidirectional energy metering and directly drives a LCD with 7 digits display plus announciators n Programable method of energy addition n Pin compatible with SAMES SA9109A n 4 externally selectable on-chip tariff registers n An additional total energy register Package: PLCC-44 1/16 4482 PDS039-SA9109B-001 REV. B 13-06-1997 SA9109B DESCRIPTION (continued) The measured energy is displayed in kiloWatt hours (kWh). The SA9109B is capable of driving a display having a resolution of 1/10 kWh. This innovative universal energy metering integrated circuit is ideally suited for energy measurement in single phase systems. The SA9109B integrated circuit is available in a 44 pin plastic leaded chip carrier (PLCC44) package type. BLOCK DIAGRAM V BA R[0] R[1] R[2] R[3] S D0 CIP CON V SS S [0] SERIAL OUT INTERFACE CIN V DD S [1] S [2] COP S [3] S [4] TARIFF REGISTERS IV N GND ANALOG SIGNAL PROCESSING IIP S [5] S [6] LCD S [7] CONTROL S [8] S [9] IIN INT EG RAT . & P UL S E RAT E G ENE RAT IO N CPOP CPON CPIN S [10] S [11] S [12] S [13] COFF OSCI V RE F DR-01253 2/18 TIMING & CONTROL REF sames P GM PB P DTA P CLK OSC S R[0] S R[1] OSC2 SA9109B ABSOLUTE MAXIMUM RATINGS* Parameter Symbol Supply Voltage VDD -VSS Current on any pin IPIN Storage Temperature TSTG Operating Temperature TO Min -0.3 -150 -40 -40 Max 6.0 +150 +125 +85 Unit V mA °C °C * Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress rating only. Functional operation of the device at these or any other condition above those indicated in the operational sections of this specification, is not implied. Exposure to Absolute Maximum Ratings for extended periods may affect device reliability. ELECTRICAL CHARACTERISTICS (VDD = 2.5V, VSS = -2.5V, over the temperature range -10°C to +70°C#, unless otherwise specified.) Parameter Symbol Min Operating temperature range # To Supply Voltage: Positive VDD Supply Voltage: Negative VSS Supply Current: Positive IDD Supply Current: Negative ISS Current Sensor Inputs (Differential) Input Current Range III Voltage Sensor Inputs (Asymmetric) Input current Range IIV LCD backplane Voltage VB Typ Max Unit Condition 7 7 +85 2.75 -2.25 10 10 °C V V mA mA +25 µA +25 µA -25 2.25 -2.75 -25 -25 VDD & VSS V R[0] ... R3] V S[0] ...S[15] LCD segment Voltage VS 1/3VDD 2/3VDD Pin SDO Pulse rate fP 3.5 Pulse width Output Low Voltage Output High Voltage Oscillator tp VOL VOH 4.3 VDD-1 35 5.9 VSS+1 Hz Default1 Hz Programmed1 mS V IOL = 5mA V IOH = -2mA Recommended crystal: TV colour burst crystal f = 3.5795 MHz sames 3/18 SA9109B ELECTRICAL CHARACTERISTICS (continued) Parameter Symbol Min Typ Max Pin VREF Ref. Current Ref. Voltage 55 1.3 µA V With R7 = 24kΩ connected to VSS Referred to VSS 1 V V µA VIN = VSS V V µA VIN=VSS..VDD nA V Power down mode -IR VR 45 1.1 VIH VIL 4 50 Unit Condition Pins PB, SR[0], SR[1], PGM Input Voltage High Input Voltage Low Pullup Current Pin PCLK Input Voltage High Input Voltage Low Input Current High/ Low Pin VBA 30 VIH VIL 4 1 ±30 IMAX VMIN 1.1 50 5.5 # Extended Operating Temperature Range available on request Note 1: At rated conditions PIN DESCRIPTION Pin 11 17 3 2 8 10 9 38 37 18 19 20 21 4/18 Designation GND VDD VSS VBA IVN IIN IIP OSC1 OSC2 R[0] R[1] R[2] R[3] Type Supply Supply Supply Supply Analog in Analog in Analog in Input Output Output Output Output Output sames Description Ground Positive Supply Voltage sense Negative Supply Voltage sense Battery back-up. Negative Supply Voltage Analog input for Voltage Analog input for Current Connections for crystal or ceramic resonator (OSC1 = Input; OSC2 = Output) Liquid crystal display (LCD) backplane drivers SA9109B PIN DESCRIPTION (continued) Pin Designation Type 23 24 25 26 27 28 29 30 31 32 33 34 35 36 22 S[0] S[1] S[2] S[3] S[4] S[5] S[6] S[7] S[8] S[9] S[10] S[11] S[12] S[13] COFF Output Output Output Output Output Output Output Output Output Output Output Output Output Output Output 7 6 5 4 16 15 14 13 12 39 44 1 43 CON COP CIN CIP CPIP CPIN CPOP CPON VREF SDO SR[0] SR[1] PB 42 PGM 41 40 PDTA PCLK Description Liquid crystal display (LCD) segment drivers Connection for all unused LCD segments, to ensure off status Analog Connections for outer loop capacitor of A/D Analog converter (Current) Analog Connections for inner loop capacitor of A/D Analog converter (Current) Analog Connections for inner loop capacitor of A/D Analog converter (Voltage) Analog Connections for outer loop capacitor of A/D Analog converter (Voltage) Analog Connection for reference current setting resistor Open drain Pulse rate output. Serial data output when PB is low Input Control for tariff register selection (on-chip pull-up) Input Control for tariff register selection (on-chip pull-up) Input Push Button: Display select/start serial data transmission on SDO (on-chip pull-up) Input Programming Mode. It is recommended that pin PGM be connected to VDD via a 470Ω resistor to guard against transients or noise Input Programming Data (on-chip pull-down) Input Programming Clock sames 5/18 SA9109B FUNCTIONAL DESCRIPTION The SA9109B is a CMOS mixed signal Analog/Digital integrated circuit, which performs power calculations across a power range of 1000:1, to an overall accurancy of better than Class 1. An on-chip LCD driver directly drives a 7 digit (7 segment) LCD display. Also included on-chip, are 4 tariff registers externally selectable for multi-tariff energy metering applications and a fifth register which retains the total energy consumption. The integrated circuit includes all the required functions such as two oversampling A/D converters for the voltage and current sense inputs, power calculation and energy integration. Offset is eliminated through the use of internal cancellation procedures. 1. 2. 6/18 Power Calculation In the Application Circuit (Figure 1), the voltage drop across the shunt will be between 0 and 16mVRMS (0 to 80A through a shunt resistor of 200µΩ). This voltage is converted to a current of between 0 and 16µA RMS, by means of resistors R1 and R2. The current sense input saturates at an input current of ±25µA peak. The voltage level from the mains is divided down through a divider to 14V.This voltage is converted to a signal current of 14µA RMS into the voltage sensor input. A pulse rate output for calibration purposes is available on SDO (Pin 39), the pulse rate being proportional to the active energy consumption. The integrated anti-creep function ensures no metering when no line current is present. Analog Input Configuration The input circuitry of the current and voltage sensor inputs are illustrated below. These inputs are protected against electrostatic discharge through clamping diodes. The feedback loops from the outputs of the amplifiers AI and AV generate virtual shorts on the signal inputs. Exact duplications of the input currents are generated for the analog signal processing circuitry. sames SA9109B V DD IIN CURRENT S E N S OR IN P U TS V SS AI V DD IIP V SS V DD IV N V O LTA G E S E N S OR IN P U T V SS AV GN D DR-01254 3. LCD Driver The SA9109B has an on-chip LCD driver capable of driving a 4 backplane, 7 digit (7 segment) display, as well as 6 announciators. The backplane repetition frequency is approximately 90Hz. The most significant digit is addressed by columns S[13] and S[12] and the least significant digit by S[1] and S[0]. Announciators for the 4 tariff registers, the total register and energy direction are available on the `h' segment of the 6 least significant digits. The display segments are addressed via the column outputs given in the table below: sames 7/18 SA9109B LCD Segment Address Table Digit 10-1 LSD 100 Column S[0] S[1] S[2] S[3] S[4] S[5] S[6] S[7] S[8] S[9] S[10] S[11] S[12] S[13] 101 102 103 104 105 MSD R[0] Total d T4 d T3 d T2 d T1 d Dir d h d R[1] c e c e c e c e c e c e c e R[2] b g b g b g b g b g b g b g R[3] a f a f a f a f a f a f a f LCD Layout The LCD display is given in the diagram below: R [3] g. 6 b . . e 7 . . R [2] . R [1] c h d R [0] T4 S[13] S[12] S[3] C OLU M N S DR-01255 8/18 sames TOTAL S[2] S[1] S[0] B AC K PLAN ES 4 f SA9109B The kWh values of the LCD display digits, are given in the table below. The resolution of the Least Significant Digit is normally programmed to 0.1kWh: 105 4. 104 103 102 101 100 10-1 kWh Device Programming The SA9109B contains on-chip registers which enables the meter manufacturer to store various data: Slope Adjustment The slope of the device may be adjusted by programming a slope constant (KS) into the device during calibration. The output frequency at SDO (fP) is calculated by means of the following formula: FOSC II .IV 40062.5 fP = 11.16 * * * 3.5795MHz IR2 KS Where FOSC = Oscillator frequency (2MHz ...... 4MHz) II = Input current for current sensor input (16µA at rated line current) IV = Input current for voltage sensor input (14µA at rated line voltage) IR = Reference current (typically 50µA) KS = Slope constant (1025 ... 16384)) (The default value is 11389) By changing the slope of the device the resolution of the LCD, together with the pulse rate on SDO may be changed by up to an order. The block diagram below illustrates the display update rate. Programmable slope divider 40062.5* P ulses / s 1/K s 1 / 64 D R -0 1 2 5 6 D isplay Incr em ent fp * At rated conditions The display is incremented after every 64th pulse on SDO. sames 9/18 SA9109B Display resolution From the above formula for f P it can be derived that the slope constant, Ks, is given by the following expression: 626 * 3600 * 1000 * EkWL KS = VL * IL Where EkWh = energy for 1 display increment in kWh VL = rated line voltage IL = rated line current This formula is valid only if 16µARMS flows into the current sense input for rated line current (IL) and 14µARMS flows into the voltage sense input for rated line voltage (VL). Offset Adjustment The precision of this device does not require any offset adjustment for Class 1 metering. This facility has been provided to compensate for poor PCB layout or circumstances requiring precision well beyond a Class 1 rating. The offset of the device may be adjusted by programming a different offset into the device during calibration. To calculate the offset the following procedure should be followed: Measure the linearity error at the current where offset correction is needed. IM ERR KO = * IR * 6 10-6 * Where IM IR ERR KO = = = = Measured current on the current sensor Rated current on the current sensor Error ratio between the device and the Wh standard Offset constant (-127 ...127) (The default value is 0) Note that KO must be programmed as a integer value. Meter/Manufacturers Identification Data A total of eleven 4 bit words are available to store relevant data such as the meter and manufacturer identification codes. For the optical interface protocol, the 4-bit words are converted to 8-bit words (ASCII-format). Writing to RAM The memory is configured as ten 32 bit words. The programming data must be written to the device as a bitstream containing a total of 320 bits. ROM-locations will not be overwritten. 10/18 sames SA9109B Word Bit Function number number 1 31..28 Sign of Register 1 Description A '0' indicates a negative register value 1 27..0 Register 1 Contents of register 1 in binary coded decimal 2 2 31..28 27..0 Sign of Register 2 Register 2 A '0' indicates a negative register value Contents of register 2 in binary coded decimal 3 31..28 Sign of Register 3 A '0' indicates a negative register value 3 27..0 Register 3 Contents of register 3 in binary coded decimal 4 31..28 Sign of Register 4 A '0' indicates a negative register value 4 27..0 Register 4 Contents of register 4 in binary coded decimal 5 31..28 Sign of Register 'Total' A '0' indicates a negative register value 5 27..0 Register 'Total' Registers 1, 2,3 and 4 are added and stored in the register 'Total' 6 31..16 ROM Don't care 6 15..0 Manufacturers Identification 16 bits are available for the manufacturer of the metering system as a system identification 7 31..28 ROM Don't care 7 27..0 System Identification 28 bits are available for the manufacturer of the metering system as a system identification 8 31..0 ROM Don't care 9 31 Programmed slope select Programmed slope select bit must be set if the default slope in ROM is not used 9 30..26 ROM Don't care 9 25 Summation method select 0 to select addition which takes direction of energy flow into account 1 to select addition which does not take direction of energy flow into account 9 24..22 SAMES defined Bits must be set to 0 for correct functionality 9 21 Sign of offset By setting the sign bit a negative value is indicated 9 20..14 Offset Offset of the device in binary 9 10 13..0 31..0 Slope ROM Slope of the device in binary. (default = 11389) Don't care The first bit of the programming data is written to word number 1, bit 31. The last bit is written to word number 10, bit 0. sames 11/18 SA9109B Programming procedure: PGM PCLK PDTA BIT-N0 W ORD-NO 31 1 30 1 29 1 28 1 27 1 26 1 25 1 24 1 23 1 0 10 DR-01257 The PGM pin is pulled low and the PCLK pin should be clocked with an external clock. The programming data on the PDTA pin must be stable during the rising edge of the clock signal on PCLK. The clock signal on PCLK should not exceed 200 kHz and does not have to be synchronised with the oscillator frequency (FOSC). Programming mode is interrupted if PGM goes high. Memory Reset In programming mode (while PGM is pulled low) if PCLK is left floating and PDTA = 0, the internal clock of the SA9109B will ensure that default values are set. For default conditions all of the RAM locations are set to 0 and the value of the slope is set to 11389. The minimum time period for a complete reset cycle is determined by: tmin = 322 * 64 FOSC Where FOSC = Oscillator frequency (2MHz......4MHz) If the recommended crystal frequency of 3.5795MHz is used, this will result in a minimum reset time of 5.8ms. The specified signal levels on pins PGM, PCLK and PDTA must remain stable for the entire reset cycle period. 12/18 sames SA9109B 5. Tariff Registers A multiple tariff facility is provided on-chip by means of 4 tariff registers, which are externally selectable via the SR[0] and SR[1] inputs. The registers may be selected by programming the SR[0] and SR[1] inputs as follows: SR[1] 0 0 1 1 SR[0] 0 1 0 1 Register Register 1 Register 2 Register 3 Register 4 The 4 Tariff registers and Total register may be sequentially displayed by activating the Push Button (PB). The minimum push button make time is 5ms. The contents of the register selected for display is retained on the display for a period of 10 seconds, provided that the push button is not activated during this period. After the 10 seconds has elapsed, the display defaults to the "active" register defined by the status of the SR[0] and SR[1] inputs. The register selected for display via the push button (PB) is indicated by the relevant announciators. 6. Optical Interface The SA9109B device contains an interface for automatic meter reading, according to the IEC1107 Mode D standard. The IEC1107 Mode D is a single baud rate of 2400. For the optical interface protocol, the 4-bit words are converted to 8-bit words (ASCII-format). After initiation of a serial transmission by pulling PB (pin 34) low, the data format transmitted on SDO is given below: Code / XXX 3 YYYYYYYY <cr><lf><cr><lf> 0(nnnnnnnn) 1(nnnnnnnn) 2(nnnnnnnn) 3(nnnnnnnn) 4(nnnnnnnn) !<cr><lf><cr><lf> sames Description Start transmission ID Baud rate identification ID Data header Data of Reg. 1 (sign, 10e5, 10e4 ...10e0, 10e-1) Data of Reg. 2 Data of Reg. 3 Data of Reg. 4 Data of Reg. 'Total' = Sum of registers 0 to 3 End transmission 13/18 SA9109B 7. Power Failure/Battery Backup A battery backup facility is available on VBA. This feature is provided to ensure retention of the information stored in the registers, in case of power breaks. The VSS supply to the analog circuitry and digital circuitry of this device has been separated. In the event of a power failure, the supply to the analog circuitry falls to 0V. The digital circuitry is switched to a power down mode, to minimise the supply current from an external battery backup. During this procedure, the following events take place: • All inputs are disabled • All outputs are placed in high impedance mode • The oscillator is inhibited • The LCD driver is disabled • The contents of the RAM is retained by means of an external power source. 8. Electrostatic Discharge (ESD) Protection The SA9109B integrated circuits inputs/outputs are protected against ESD. Power Consumption The power consumption rating of the SA9109B integrated circuit is less than 40mW. 9. TYPICAL APPLICATION In the Application Circuit (Figure 1), the components required for a single phase power metering application are shown. In Figure 1 a shunt resistor is used for current sensing. In the application, the circuitry requires a +2.5V, 0V, -2.5V DC supply. The most important external components for the SA9109B integrated circuit are: C1 and C2 are the outer loop capacitors for the two integrated oversampling A/D converters. The value of these capacitors is 560pF. The actual values determine signal to noise and stability performance. The tolerances should be within ±10%. C3 and C4 are the inner loop capacitors of the A/D converters. The optimum value is 3.3nF. The actual values are uncritical. Values smaller than 0.5nF and larger than 5nF should be avoided. R1, R2 and RSH are the resistors defining the current level into the current sense input. The values should be selected for an input current of 16µARMS into the SA9109A, at maximum line current. IL RSH * R1 = R2 = 16µARMS 2 Where 14/18 IL RSH = = Line current Shunt resistor sames SA9109B R3, R6 and R4 set the current for the voltage sense input. The values should be selected so that the input current into the voltage sense input (virtual ground) is set to 14µARMS. R7 defines all on-chip bias and reference currents. With R7 = 24kΩ, optimum conditions are set. R7 may be varied within ±10% for calibration purposes. Any change to R7 will affect the energy calculation quadratically. XTAL is a colour burst TV crystal (f = 3.5795MHz) for the oscillator. The oscillator frequency is divided down to 1.7897MHz on-chip to supply the digital circuitry and the A/D converters. Figure 1: Application Circuit using a Shunt Resistor for Current Sensing. + 2 .5 V BAT C6 C9 R 10 D1 R8 C7 C 10 R 11 0V T A R IF F SE L EC T R 12 D2 - 2 .5 V LOA D D IS PL A Y SE LEC T R7 C5 R3 - 2 .5 V PG M PD T A PC L K C4 R4 C2 6 R6 4 5 3 2 1 4 4 4 3 4 2 4 1 4 0 3 9 8 3 8 9 R1 3 7 IC - I 1 0 1 1 C1 R SH C3 R2 R9 7 1 3 1 4 1 5 XT A L 3 6 3 5 3 4 1 2 SA 9109B 3 3 3 2 3 1 . 1 6 3 0 1 7 2 9 1 8 1 9 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 . . . . . . . . . . . . . N E G A T IV E T 1 T 2 T 3 T 4 T O T A L 0V D R -0 1 25 8 SU PPL Y sames 15/18 SA9109B Parts List for Application Circuit: Figure 1 Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Note 1: Note 2: Note 3: Note 4: 16/18 Symbol IC-1 XTAL R1 R2 R3 R4 R6 R7 R8 R9 R10 R11 R12 RSH C1 C2 C3 C4 C5 C6 C7 C9 C10 BAT LED D1 D2 PB DIPSW Description SA9109B Crystal 3.5795 MHz Resistor, 1% metal Resistor, 1% metal Resistor, 390k, 1%, metal Resistor, 1M, 1%, metal Resistor, 24k, 1%, metal Resistor, 24k, 1% metal Resistor, 2M, 1%, metal Resistor, 820Ω, 1%, metal Resistor, 830Ω, 1%, metal Resistor, 820Ω, 1%, metal Resistor, 470Ω Shunt resistor Capacitor, 560pF Capacitor, 560pF Capacitor, 3.3nF Capacitor, 3.3nF Capacitor, 1µF Capacitor, 100nF Capacitor, 820nF Capacitor, 100nF Capacitor, 100nF Battery (1.2V) Light emitting diode Diode, Shottkey Diode, 1N4148 Push button DIP switch, 2 poles Detail PLCC-44 Colour burst TV Note 1 Note 1 Note 2 Note 2 Note 2 Note 3 Note 4 Resistor (R1 and R2) values are dependant upon the selected value of RSH. Resistor (R3, R4 and R6) values are dependant upon the rated mains voltage (230V in this case). See TYPICAL APPLICATIONS when selecting the value of RSH. Capacitor (C7) to be positioned as close as possible to VDD & VSS of IC-1. sames SA9109B ORDERING INFORMATION Part Number SA9109BFA Package PLCC-44 sames 17/18 SA9109B Disclaimer: The information contained in this document is confidential and proprietary to South African MicroElectronic Systems (Pty) Ltd ("SAMES") and may not be copied or disclosed to a third party, in whole or in part, without the express written consent of SAMES. The information contained herein is current as of the date of publication; however, delivery of this document shall not under any circumstances create any implication that the information contained herein is correct as of any time subsequent to such date. SAMES does not undertake to inform any recipient of this document of any changes in the information contained herein, and SAMES expressly reserves the right to make changes in such information, without notification,even if such changes would render information contained herein inaccurate or incomplete. SAMES makes no representation or warranty that any circuit designed by reference to the information contained herein, will function without errors and as intended by the designer. Any sales or technical questions may be posted to our e-mail address below: [email protected] For the latest updates on datasheets, please visit our web site: http://www.sames.co.za South African Micro-Electronic Systems (Pty) Ltd P O Box 15888, 33 Eland Street, Lynn East, Koedoespoort Industrial Area, 0039 Pretoria, Republic of South Africa, Republic of South Africa Tel: Fax: 18/18 012 333-6021 012 333-8071 sames Tel: Fax: Int +27 12 333-6021 Int +27 12 333-8071