sames SA9103C SINGLE PHASE BIDIRECTIONAL POWER/ENERGY METERING IC WITH SERIAL INTERFACE FEATURES n Performs bidirectional active and reactive power/energy, frequency and voltage measurement n Meets the IEC 521/1036 Specification requirements for Class 1 AC Watt hour meters n Protected against ESD n Total power consumption rating below 25mW n Adaptable to different current sensor technologies n Operates over a wide temperature range n Serial interface having a RS232 protocol n Precision voltage reference on-chip Tri-state output to allow parallel connection of devices n DESCRIPTION The SAMES SA9103C bidirectional Single Phase Power/Energy metering integrated circuit has a serial interface with a RS232 protocol, ideal for use with a µ-Controller. The SA9103C performs the calculation for active and reactive power. The integrated values for active and reactive energy as well as the mains frequency and voltage information are accessable through the RS232-Interface as 16 bit values. This innovative universal single phase power/energy metering integrated circuit is ideally suited for energy calculations in applications such as electricity dispensing systems (ED's), residential municipal metering and factory energy metering and control. The SA9103C integrated circuit is available in both 20 pin dual-in-line plastic (DIP-20), as well as 20 pin small outline (SOIC-20) package types. PIN CONNECTIONS IIN 1 20 IIP 2 19 IVP VREF 3 18 CON CPON 4 17 COP CPOP 5 16 CIN CPIN 6 15 CPIP V DD 7 14 CIP V SS 8 13 SIN TP9 9 12 SOUT OSC2 10 11 OSC1 GND DR-00829 Package: DIP-20 SOIC-20 1/16 4259 PDS039-SA9103C-001 REV. D 23-08-1996 SA9103C BLOCK DIAGRAM V DD IIP ACTIVE ENERGY IIN REACTIVE ENERGY ANALOG V SS SIN SOUT SERIAL FREQUENCY INTERFACE SIGNAL VOLTAGE PROCEVOLTAGE REF. SSING IVP GND OSC VREF DR-00830 OSC1 TIMING OSC2 ABSOLUTE MAXIMUM RATINGS* Parameter Supply Voltage Symbol VDD -VSS Min -0.3 Max 6.0 Current on any pin IPIN -150 +150 mA Storage Temperature TSTG -40 +125 °C TO -10 +70 °C Operating Temperature Unit V * 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. 2/16 sames SA9103C ELECTRICAL CHARACTERISTICS (VDD = 2.5V, VSS = -2.5V, over the temperature range -10°C to +70°C#, unless otherwise specified.) Parameter Symbol Min Typ Max Unit Condition Supply Voltage: Positive VDD 2.25 2.75 V Supply Voltage: Negative VSS -2.75 -2.25 V Supply Current: Positive IDD 5 6 mA Supply Current: Negative ISS 5 6 mA -25 +25 µA Peak value IIV -25 +25 µA Peak value Pin SOUT Output Low Voltage Output High Voltage VOL VOH VSS+1 VDD-1 V V IOL = 5mA IOH = -2mA Pin SIN Input High Voltage Input Low Voltage Pull-up Current VIH VIL -II V V µA VIN = VSS Current Sensor Inputs (Differential) Input Current Range I II Voltage Sensor Input (Asymetrical) Input Current Range Oscillator VSS+1 150 50 Recommended crystal: TV colour burst crystal f = 3.5795 MHz Pin VREF Ref. Current Ref. Voltage # VDD-1 -IR VR 45 1.1 50 55 1.3 µA V With R = 24kΩ connected to VSS Referred to VSS Extended Operating Temperature Range available on request. sames 3/16 SA9103C PIN DESCRIPTION Pin Designation Description 20 8 GND VDD Ground Positive Supply Voltage 14 VSS Negative Supply Voltage 19 IVP Analog input for Voltage 1 IIN Inputs for current sensor 2 IIP 11 OSC1 Connections for crystal or ceramic resonator 10 OSC2 (OSC1 = Input ; OSC2 = Output) 12 SOUT Serial Interface Out 13 SIN Serial Interface In 4 CPON Connections for outer loop capacitors of 5 CPOP A/D converter (Voltage) 6 CPIN Connections for inner loop capacitors of 7 CPIP A/D converter (Voltage) 15 CIP Connections for inner loop capacitors of 16 CIN A/D converter (Current) 17 COP Connections for outer loop capacitors of 18 CON A/D converter (Current) 3 VREF Connection for current setting resistor 9 TP9 Test Pin. Must be connected to VSS FUNCTIONAL DESCRIPTION The SA9103C is a CMOS mixed signal Analog/Digital integrated circuit, which performs power/energy calculations across a power range of 1000:1, to an overall accurancy of better than Class 1. The integrated circuit includes all the required functions for 1-phase power and energy measurement, such as two oversampling A/D converters for the voltage and current sense inputs, power calculation and energy integration. Internal offsets are eliminated through the use of cancellation procedures. The SA9103C integrates the measured active and reactive power consumption into 22 bit integrators, which are accessable via a serial port having a RS232 protocol. Two additional on-chip registers exist: one register contains the mains frequency information; and the other the voltage information. 4/16 sames SA9103C 1. Power calculation In the Application Circuit (Figure 1), the voltage drop across the shunt will be between 0 and 16mV (0 to 80A through a shunt resistor of 200µΩ). This voltage is converted to a current of between 0 and 16µA, by means of resistors R 1 and R2. The current sense input saturates at an input current of ±25µA peak. For the voltage sensor input, the mains voltage (230V AC) is divided down through a divider to 14V. The resulting current into the A/D converter input is 14µA at nominal voltage, via resistor R4 (1MΩ). In this configuration, with a mains voltage of 230V and a current of 80A, the SA9103C functions at its optimum conditions, having a margin of 3dB for overload available. 2. 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. V DD IIP CURRENT SENSOR INPUTS V SS AI V DD IIN V SS V DD IVP VOLTAGE SENSOR INPUT DR-00831 sames V SS AV GND 5/16 SA9103C 3. Electrostatic Discharge (ESD) Protection The SA9103C integrated circuit's inputs/outputs are protected against ESD . 4. Power Consumption The power consumption rating of the SA9103C integrated circuit is less than 25mW. 5. Serial Interface Reading and resetting of the SA9103C's on-chip integrators, is performed via the serial interface. The settings are: 19 200 Baud 1 Start bit (S) 1 Stop bit (E) No parity bits The serial interface, with RS232 protocol, has been designed to operate directly with a PC (Personal Computer). The serial interface allows for the following operations: Read Integrator (RD): The SA9103C integrated circuit transmits the integrator status to the controller, after the current measurement cycle has been completed (8 mains periods maximum). The register containing the mains frequency information is read only. Reset Integrator (RES): The SA9103C integrator is reset, without transmitting the integrator status. Read/Reset Integrator (RD/RES): The SA9103C transmits the integrator status and resets the integrator after the current measurement cycle has been completed. In a typical application, the system controller monitors the status of the SA9103C's integrator using the "Read" command. At rated load conditions, the capacity of the 22 bit integrator allows for an integration time of 2 seconds prior to integrator overflow. If after a "Read" command, the integrator value is sufficently high, a "Read/Reset" command from the controller causes the SA9103C integrated circuit to complete the existing measurement cycle, transmit the 16 most significant bits of the 22 bit integrator via the Serial Output (SOUT) to the controller and restart the integrator. In order to ensure correct measurements, the integrator commands ("Read" and "Read/Reset") are only executed after completion of the internal offset calibration cycle. The cycle length is 8 mains periods. Thus, for power calculations, the time value should be taken from the difference in time from the previously received energy value to the currently received value. 6/16 sames SA9103C By adapting the "Read/Reset" rate to the line current the accuracy of the measurement can be achieved down to lowest signal levels. Read, Reset and Read/Reset of integrator for active energy RD RD RES RES RD RD/ RES RES STOP BIT START BIT DR-00832 Read, Reset and Read/Reset of integrator for reactive energy RD RD RES RES RD RD/ RES RES START BIT STOP BIT DR-00833 Read frequency register RD RD DR-00834 START BIT STOP BIT Read, Reset and Read/Reset of integrator for voltage RD RD RES RES RD RD/ RES DR-01152 START BIT sames RES STOP BIT 7/16 SA9103C The register access codes which can be written to the SA9103C via the serial communications port are shown in the table below. REGISTER ACTIVE RE-ACTIVE VOLTAGE FREQUENCY READ $01 $81 $C1 $41 RESET $02 $82 $C2 - READ-RESET $03 $83 $C3 - Data on SOUT 8 9 10 11 12 13 FIRST BYTE 14 15 0 1 2 3 4 5 6 7 SECOND BYTE DR-00835 From the two bytes of data output by the device, the value for the register can be derived as shown: Register value = (First Byte * 256) + Second Byte The most significant bit of the 16 bit energy register (active or reactive) is an indication of the direction of the energy flow (0 = positive, 1 = negative). 6. Register Values a. The active and reactive energy measured per count, may be calculated by applying the following formula: V*I Energy per Count = K Watt seconds Where V I K = = = Rated Voltage Rated Current 9281 for Active Energy 9281 * 2 for Reactive Energy π b. The mains frequency may be calculated as follows: Crystal frequency Frequency = Register Value * 8 c. To calculate the measured voltage, the following formula may be used: V*n Vmeasured = 14000 *t Where 8/16 V t n sames = = = rated voltage time difference between successive reads difference in register values between successive reads SA9103C 7. Software flow In an application in which all the registers must be accessed, the software loop illustrated below can be implemented. READ FREQUENCY COMMAND DELAY OF 8 MAINS PERIODS RECEIVE FREQUENCY READ ACTIVE COMMAND LOOP DELAY OF 8 MAINS PERIODS ∧ RECEIVE ACTIVE READ REACTIVE COMMAND DELAY OF 8 MAINS PERIODS RECEIVE REACTIVE READ VOLTAGE COMMAND DELAY OF 8 MAINS PERIODS RECEIVE VOLTAGE The SA9103C integrated circuit transmits the register values only after completion of the current measurement cycle (8 mains periods maximum). The delay of 8 mains periods can be calculated from the period value of the frequency returned by the initial read, and updated with each subsequent reading of frequency. Each successive read of the registers takes place regularly at intervals of 4 blocks of 8 mains cycles. This time and the difference between successive energy register values can be used to calculate power. sames 9/16 SA9103C 8. Calibration For the calibration of the SA9103C, the following procedure is recommended: a. Establish calibration factor for active energy (Ka) at pf close to 1. Active (Measured) = register_value (Active) * Ka. 1 b. The factor for reactive (Kr) is typically Ka * PI/2. For higher accuracy of Kr, establish Kr at pf close to 0. Reactive (Measured) = register_value (Reactive) * Kr 2 c. At pf close to 1, establish error for reactive (Er) Er = (Reactive (Measured) - Reactive (True)) / Active (Measured) 3 Reactive (Corrected) = Reactive (Measured) - Er * Active (Measured) 3b Measurement Having determined the scaling factors (Ka & Kr) and error correction constant (Er) the measurement cycle consists of the following steps: step 1 Read active register step 2 ∨ Calculate Active (Measured) as per 1 step 3 ∨ Read reactive register step 4 ∨ Calculate Reactive (Measured) as per 2 step 5 ∨ Perform error correction Calculate Reactive (Corrected) as per 3b ⇒ Active energy ⇒ Reactive energy The above five steps must be performed for each measurement cycle. 10/16 sames SA9103C TYPICAL APPLICATIONS In the Application Circuits (Figures 1 and 2), the components required for power metering applications, are shown. In Figure 1 a shunt resistor is used for current sensing. In this application, the circuitry requires a +2.5V, 0V, -2.5V DC supply. In the case of Figure 2, when using a current transformer for current sensing, a +5V, 0V DC supply is sufficient for the circuit. The most important external components for the SA9103C 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 the 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µA into the SA9103C at rated line current. Values for RSH of less than 200µΩ should be avoided. R1 = R2 = (IL/16µA) * RSH/2 Where IL = Line current RSH = Shunt resistor/termination resistor 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µA. R7 defines all on-chip bias and reference currents. With R7 = 24kΩ, optimum conditions are set. 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 A/D converters and digital circuitry. sames 11/16 SA9103C Figure 1: Application Circuit using a Shunt Resistor for Current Sensing, having a PC (Personal Computer) Interface. 12/16 sames SA9103C Part 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 30 31 32 33 34 35 36 Symbol IC-1 IC-2 IC-3 D1 D2 D3 ZD1 ZD2 XTAL R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 R13 R14 R15 C1 C2 C3 C4 C9 C10 C11 C12 C13 C14 C15 RSH Description SA9103C Opto Coupler 4N35 Opto Coupler 4N35 Diode, Silicon, 1N4148 Diode, Silicon, 1N4148 Diode, Silicon, 1N4148 Diode, Zener, 2.4V, 200mW Diode, Zener, 2.4V, 200mW Crystal, 3.5795MHz Resistor, 1% metal Resistor, 1% metal Resistor, 390k, (230VAC), 1% metal Resistor, 1M, 1/4W, 1% metal Resitor, 470Ω, 2W, 5%, carbon Resistor, 24k, 1/4W, 1%, metal Resistor, 24k, 1/4W, 1%, metal Resistor, 680Ω, 1/4W, 5% Resistor, 680Ω, 1/4W, 5% Resistor, 680Ω, 1/4W, 5% Resistor, 100k, 1/4W, 5% Resistor, 120Ω, 1/4W, 5% Resistor, 120k, 1/4W, 5% Resistor, 3.9k, 1/4W, 5% Resistor, 120Ω, 1/4W, 5% Capacitor, 560pF Capacitor, 560pF Capacitor, 3.3nF Capacitor, 3.3nF Capacitor, 100nF Capacitor, 100nF Capacitor, 0.47µF, 250VAC, polyester Capacitor, 100nF Capacitor, 100µF Capacitor, 100µF Capacitor, 820nF Shunt Resistor Detail DIP-20/SOIC-20 DIP-6 DIP-6 Colour burst TV Note 1 Note 1 Note 2 Note 1: Resistor (R1 and R2) values are dependant upon the selected value of RSH. Note 2: See TYPICAL APPLICATIONS when selecting the value for RSH. sames 13/16 SA9103C Figure 2: Application Circuit using a Current Transformer for Current Sensing. 14/16 sames SA9103C Parts List for Application Circuit: Figure 2 Item 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Note 1: Note 2: Note 3: Note 4: Symbol IC-1 XTAL RSH R1 R2 R3 R4 R6 R7 R8 R9 C1 C2 C3 C4 C9 C10 C11 CT Description SA9103C Crystal, 3.5795MHz Resistor Resistor, 1%, metal Resistor, 1%, metal Resistor, 390k, (230VAC) 1%, metal Resistor, 1M, 1/4W, metal Resistor, 24k, 1/4W, metal Resistor, 24k, 1/4W, metal Resistor, 2.2k, 1/4W, 5% Resistor, 2.2k, 1/4W, 5% Capacitor, 560pF Capacitor, 560pF Capacitor, 3.3nF Capacitor, 3.3nF, Capacitor, 820nF Capacitor, 100nF Capacitor Current Transformer Detail DIP-20/SOIC-20 Colour burst TV Note 1 Note 2 Note 2 Note 3 Note 4 See TYPICAL APPLICATIONS when selecting the value of RSH. Resistor (R1and R2) values are dependant upon the selected value of RSH. Capacitor (C9) to be positioned as close to IC-1, as possible. Capacitor (C11) selected for DC blocking and to minimize phase error introduced by the current transformer. Part Number Package SA9103CPA SA9103CSA DIP-20 SOIC-20 sames 15/16 SA9103C 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 out 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: 16/16 012 333-6021 012 333-8071 sames Tel: Fax: Int +27 12 333-6021 Int +27 12 333-8071