SAMES SA9604ASA

sames
SA9604A
THREE PHASE BIDIRECTIONAL POWER/ENERGY
METERING IC WITH SERIAL SPI INTERFACE
FEATURES
■
Performs bidirectional active and
reactive power/energy measurement
■
Voltage and frequency measurement
■
Individual
accessable
■
SPI communication bus
■
Meets the IEC 521/1036 Specification
requirements for Class 1 AC Watt hour
meters
phase
information
■
Protected against ESD
■
Uses current transformers for current
sensing
■
Excellent long term stability
■
Operates over a wide temperature
range
■
Precision Voltage Reference on-chip
DESCRIPTION
PIN CONNECTIONS
The SAMES SA9604A Bidirectional Three
Phase Power/Energy metering integrated
circuit has a serial interface, ideal for use
with a µ-Controller. The SA9604A performs
1
20 IVP2
IIP 2
the calculation for active and reactive power
or energy, mains voltage sense and
IIN2
2
19 IIN1
frequency.
IVP3
3
18 IIP 1
The measurements performed and the
IIP 3
4
17 IVP1
resultant register values are provided for
individual phases.
5
16 G ND
IIN3
The integrated values for active and reactive
V DD
6
15 VREF
energy, as well as the mains voltage sense
and frequency information, are accessable
F1 50
7
14 V SS
through the SPI as 24 bit values.
8
13 CS
SCK
This innovative universal three phase power/
9
12 DI
D0
energy metering integrated circuit is ideally
suited for energy calculations in applications
O SC1
10
11 O SC2
such as primary industrial metering and
factory energy metering and control.
DR-01306
The SA9604A integrated circuit is available
in both 20 pin dual-in-line plastic (DIP-20),
Package: DIP-20
as well as 20 pin small outline (SOIC-20)
SOIC-20
package types.
1/20
SA9604A
PDS039-SA9604A-001
REV. 5
29-05-00
SA9604A
BLOCK DIAGRAM
V DD
V SS
ACTIVE
ENERGY
II P1
II N1
II P2
II N2
II P3
II N3
A N A LO G
S IG N A L
DI
DO
SCK
CS
REACTIVE
ENERGY
SPI
VOLTAGE
FREQUENCY
P ROCE S I VP1
I VP2
S IN G
I VP3
F 150
VOLTAGE
REF.
G ND
OS C
VREF
D R -01 3 0 7
ABSOLUTE MAXIMUM RATINGS*
Parameter
Symbol
Supply Voltage
VDD -VSS
Current on any pin
IPIN
Storage Temperature
TSTG
Operating Temperature
TO
O SC1 O SC2
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.
2/20
sames
SA9604A
ELECTRICAL CHARACTERISTICS
(VDD = 2.5V, VSS = -2.5V, over the temperature range -10°C to +70°C#, unless otherwise
specified.)
Parameter
Symbol
Operating temp. range
TO
Supply Voltage: Positive
VDD
Supply Voltage: Negative
V SS
Supply Current: Positive
IDD
Supply Current: Negative
ISS
Current Sensor Inputs (Differential)
Input Current Range
III
Voltage Sensor Input (Asymetrical)
Input Current Range
IIV
Pin DO
Low Voltage
V OL
High Voltage
VOH
Pin DI
High Voltage
VIH
Low Voltage
VIL
Pin SCK
High Voltage
Low Voltage
VIH
VIL
fSCK
tLO
tHI
Pin CS
High Voltage
Low Voltage
VIH
VIL
Pin F150
Low Voltage
High Voltage
V OL
V OH
Oscillator
Typ
Max
Unit
8
8
+85
2.75
-2.25
10
10
°C
V
V
mA
mA
-25
+25
µA
Peak value
-25
+25
µA
Peak value
VSS+1
V
V
IOL = 5mA
IOH = -2mA
VSS+1
V
V
VIN = VSS
VSS+1
V
V
VIN = VSS
-25
2.25
-2.75
VDD-1
VDD-1
VDD-1
800
0.6
0.6
VDD-1
VSS+1
VSS+1
VDD-1
Condition
kHz
µs
µs
V
V
VIN = VSS
V
V
IOL = 5mA
IOH = -2mA
Recommended crystal:
TV colour burst crystal f = 3.5795 MHz
Pin VREF
Ref. Current
Ref. Voltage
#
Min
-I R
VR
22.5
1.1
25
27.5
1.3
µA
V
With R = 47kΩ
connected to VSS
Reference to VSS
Extended Operating Temperature Range available on request.
sames
3/20
SA9604A
PIN DESCRIPTION
Pin
Designation
Description
16
6
GND
VDD
Ground
Positive Supply Voltage
14
VSS
Negative Supply Voltage
17
IVP1
Analog input for Voltage: Phase 1
20
IVP2
Analog input for Voltage: Phase 2
3
IVP3
Analog input for Voltage: Phase 3
19
IIN1
Inputs for Current sensor:Phase 1
18
IIP1
2
IIN2
1
IIP2
5
IIN3
4
IIP3
Input for Current sensor: Phase 2
Input for Current sensor: Phase 3
10
OSC1
Connections for crystal or ceramic resonator
11
OSC2
(OSC1 = Input; OSC2 = Output)
9
DO
Serial Interface Out
12
DI
Serial Interface In
SCK
Serial Clock In
CS
Chip Select (Active High)
7
FM150
Voltage Sense Zero Crossover
15
VREF
Connection for current setting resistor
8
13
FUNCTIONAL DESCRIPTION
The SA9604A is a CMOS mixed signal Analog/Digital Integrated Circuit, which performs
the measurement of active power, reactive power, voltage and frequency.
Internal offsets are eliminated through the use of cancellation procedures. The SA9604A
integrates the measured active and reactive power consumption and the average mains
voltage into 24 bit integrators, which are accessable via the SPI bus. The mains
frequency information is also available as a 24 bit register value.
The zero crossover of each voltage sense input is signalled on the FM150 (pin 7) output.
This output of 150Hz will allow monitoring by a microcontroller to synchronise with internal
timing for data aquisition. Refer to 5.5 for further information.
The SA9604A has tristate output to allow connection of more than one metering device
on a single SPI bus.
4/20
sames
SA9604A
1.
2.
Power calulation
In the Application Circuit (Figure 1), the voltages from Line 1, Line 2 and Line 3, are
converted to currents and applied to the voltage sense inputs IVN1, IVN2 and IVN3.
The current levels on the voltage sense inputs are derived from the mains voltage
(3 x 230 VAC ) being divided down through voltage dividers to 14VRMS. The resulting
input currents into the A/D converters are 14µARMS through the resistors R15, R16 and
R17.
For the current sense inputs, the voltages across the current transformers terminating
resistors are converted to currents of 16µARMS for rated conditions, by means of
resistors R8, R9 (Phase 1); R10, R11 (Phase 2); and R 12, R13 (Phase 3).
The signals providing the current information are applied to the current sensor
inputs: IIN1; IIP1; IIN2; IIP2; IIN3; and IIP3.
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 copies of the input currents are generated for the
following analog signal processing circuitry.
V DD
II P
CURRENT
SE NS OR
INPUT S
V SS
A
I
A
V
V DD
II N
V SS
VDD
IV P
VOL T AGE
SE NS OR
INPUT
DR-0 1 3 0 8
3.
V SS
GND
Electrostatic Discharge (ESD), Protection
The SA9604A Integrated Circuits inputs/outputs are protected against ESD.
sames
5/20
SA9604A
4.
Power Consumption
The power consumption rating of the SA9604A integrated circuit is less than 50mW.
5.
SPI - INTERFACE
5.1 Description
The serial peripheral interface (SPI) is a synchronous bus for data transfer and is
used when interfacing the SA9604A with any micro-controller. Four pins are used
for the SPI. The four pins are DO (Serial Data Out), DI (Serial Data In), CE (Chip
Enable), and SCK (Serial Clock). The SA9604A is the slave device in an SPI
application, with the micro-controller being the master. The DI and DO pins are the
serial data input and output pins for the SA9604A, respectively. The CE input is used
to initiate and terminate a data transfer. The SCK pin is used to synchronize data
movement between the master (micro-controller) and the slave (SA9604A) devices.
The serial clock (SCK), which is generated by the micro-controller, is active only
during address and data transfer to any device on the SPI bus.
5.2 Register Access
There are four registers for each phase which can be read: active, reactive, voltage
and frequency. Any of these registers may be chosen as the initial register to read.
If the SCK clock input continues after the first register has been read, the contents
of subsequent registers will be output on the DO pin. Transfer will continue until CS
is brough inactive.
To enable registers for reading, the sequence 1 1 0 (6HEX) must precede the 6 bit
address of the register being accessed.
The various register addresses are shown in the table below:
ID
1
2
3
4
5
6
7
8
9
10
11
12
6/20
REGISTER
Active:
Reactive:
Voltage:
Frequency:
Active:
Reactive:
Voltage:
Frequency:
Active:
Reactive:
Voltage:
Frequency:
sames
Phase 1
Phase 1
Phase 1
Phase 1
Phase 2
Phase 2
Phase 2
Phase 2
Phase 3
Phase 3
Phase 3
Phase 3
A5
X
X
X
X
X
X
X
X
X
X
X
X
A4
X
X
X
X
X
X
X
X
X
X
X
X
A3
0
0
0
0
0
0
0
0
1
1
1
1
A2
0
0
0
0
1
1
1
1
0
0
0
0
A1
0
0
1
1
0
0
1
1
0
0
1
1
A0
0
1
0
1
0
1
0
1
0
1
0
1
SA9604A
Address locations A4 and A5 have been included to ensure compatibility with future
SAMES integrated circuit developments.
When CS is high, data input on pin DI is clocked into the device on the rising edge
of SCK. The data clocked into DI will comprise of 1 1 0 A5 A4 A3 A2 A1 A0, in this
order.
5.3 Data Output
After the least significant digit of the address has been entered on the rising edge
of SCK, the output DO goes low with falling edge of SCK. Each subsequent falling
edge transaction on the SCK pin will validate data of the register contents on pin DO.
The contents of each register consists of 24 bits of data output on pin D0, starting
with the most significant digit, D23.
5.4 Frequency Register
For the frequency register only bits D15 ... D0 are used for calculations. The upper
seven bits (D23 ... D17) must still be clocked out, as important frequency information
can be derived from these data bits.
Bit D17 changes with every rising edge of the mains voltage (25Hz square wave for
50Hz mains system). Bit D18 displays a frequency of D17/2 and D19 displays a
frequency of D17/4.
The phase error status may be ascertained from bits D20 and D21. The table below
may be used for this purpose:
Frequency data Bits
D21
D20
0
1
1
0
0
1
Description
No phase error
Phase sequence error (2 phase swapped)
Missing phase
The phase error status is merged on all three frequency registers.
Bits D16, D22 and D23 are not used.
sames
7/20
SA9604A
5.5 SPI Waveforms
The read cycle waveforms are shown below:
8/20
sames
SA9604A
SPI TIMING
Parameter Description
t1
t2
t3
t4
Min Max Unit
SCK rising edge for data valid
1,160
Setup time for DI and CS before the rising edge
0,560
of SCK
0,625
SCK min high time
SCK min low time
0,625
µS
µS
µS
µS
5.6 Synchronised Reading of Registers
The SA9604A integrated circuit updates the registers on a continual basis. The
SA9604A register content in latched onto the SPI interface as soon as a read
command has been detected or the next register is addressed during continual
access. The registers can be accessed at any time however for maximum stability
the time between readings must be in multiples of 8 mains cycles. The internal offset
cancellation procedure requires 8 mains cycles to complete. The registers are not
reset after access, so in order to determine the correct register value the previous
value read must be subtracted from the current reading. This methodology holds
true for Active, Reactive and Voltage registers. The data read from the registers
sames
9/20
SA9604A
represents the active power, reactive power and voltage integrated over time. The
increase of decrease between readings is the energy consumption. The registers
are not affected during access. No error is possible during read, because all control
signals are generated on chip. The registers can be accessed in any sequence at
any time without problems.
The voltage sense zero crossing is a 1mS pulse available on FM150, (Pin 7). This
information allows a supervisor (ie: microcontroller) to monitor when the next read
operation should be performed. The FM150 output is only suitable if all phase
voltages are connected. Should one or more phases fail the FM150 output becomes
unstable. A better approach would be to monitor the upper bits of the frequency
register (18, 19). A measurement cycle is completed when these bits change to the
same state again (00..00 or 01..01 or 10..10 or 11..11).
10/20
sames
FM150 OUTPUT
Ph a se 1
sames
Ph a se 2
Ph a se 3
F
1mS
+5 V
0 V ( Vss)
11/20
SA9604A
d r-0 1 4 6 4
An y se qu e nce o f 2 4 p ulse’s is e q ua l to 1 m e asu re m en t cycle
SA9604A
6.
Register Values
The 24 bit registers are up/down counters, which increment or decrement at a rate
of 640k/s (640k*2/PI for reactive) at rated conditions. The energy register values will
increment for positive energy flow and decrement for negative energy flow as can
be seen in the following diagram:
register wrap around
positive energy flow
Register values
0
...............
H7FFFFF
(8388607)
H800000
............... HFFFFFF
(8388608)
(16777215)
negative energy flow
register wrap around
At power-up the register values are underfined and for this reason the msb of the
delta value (delta value = present register value - previous register value) should
be regarded as an indication of the measured energy direction. (0 = positive, 1 =
negative).
The delta value for the energy registers is between 0 and 8388607 for positive
energy flow and between 0 and -8388607 for negative energy flow. For voltage the
maximum usable delta value is 16777215 as voltage is in a positive direction only.
When reading the registers care should be taken to check for a wrap around
condition.
As an example lets assume that with a constant load connected the delta value is
22260. Because of the constant load, the delta value should always be 22260 every
time the register is read and the previous value subtracted (assuming the same time
12/20
sames
SA9604A
period between reads). However this will not be true when a wrap around occurs as
the following example will demonstrate:
Previous register value
=
16744955
Present register value
=
16767215
Delta value
=
16767215 - 16744955 = 22260
After the next read the values are as follows:
Previous register value
=
16767215
Present register value
=
12260
Delta value
=
12260 - 16767215 = -16754955
Computing this delta value will result in incorrect readings, in other words a wrap
around has occurred. A typical function to check for wrap around condition would
be as follows:
Function Check (delta_value);
Begin
Temp_delta_value = abs(delta_value);
{get rid of the minus sign for example:
abs(-151) = 151}
if Temp_delta_value)> 8388607 then
begin
if (delta_value)>0 then result : = (16777216-delta_value) *-1
else result : = (16777216+delta_value);
end;
end; {end function}
At rated conditions, the time for wrap around is as follows:
18.6 seconds for voltage
13 seconds for active and 21 seconds for reactive
The active and reactive energy measured per count, may be calculated by applying
the following formula:
VI Watt seconds
Energy per Count = K
Where
sames
V
I
=
=
Rated Voltage
Current (Imax)
K
=
640 000
for Active Energy
640 000 * 2 for Reactive Energy
π
13/20
SA9604A
Example:
V = 230V
I = 80A
Active Power
= 230V x 80A x (n/t)/640000
Reactive Power = 230V x 80A (n/t)/(640000 x 2)/Pi)
n
=
Difference in register values between successive reads (delta
value)
t
=
Time difference between successive reads (in seconds)
To calculate the measured voltage, the following formula is applied:
V *n
940 000 * t
V measured =
Where
V =
t =
n =
Rated Voltage
Time difference between successive reads
Difference in register values between
successive reads
The Voltage calculated is the average voltage. The voltage measurement will give
an accuracy of better than 1% for a voltage range of 50% to 115% of the rated mains
voltage if the voltage is a pure sine wave.
The mains frequency may be calculated as follows:
Frequency
=
Crystal frequency
Register Value * 2
7.
Calibration
For accurate results we would recommend the following software calibration
procedure:
7.1 Active energy
Establish a calibration factor for active energy (Ka) at pf close to 1.
Active Measured = Active_Register_Value x Ka
14/20
sames
SA9604A
7.2 Reactive Energy
With a pf close to 0 establish the phase error:
PhaseError = arctan (VARMeaured / ActiveMeasured)
For each measurement calculate the following:
VA
=
PHIcalibrated =
PHICorrected =
VARtrue
=
ActiveMeasured 2 + VARmeasured2
arctan (VARmeasured / ActiveMeasured)
PHIcalibrated - PhaseError
VA * sin(PHICorrected)
TYPICAL APPLICATION
In the Application Circuit (Figure 1), the components required for a three phase energy
metering application are shown.
Terminated current sensors (current transformers) are connected to the current sensor
inputs of the SA9604A through current setting resistors (R 8 ..R13).
The resistor values for standard operation are selected for an input current of 16µARMS
into the SA9604A, at the rated line current.
The values of these resistors are calculated as follows:
Phase 1:
R8 = R9 = (I L1/16µARMS) * R18/2
Phase 2:
R10 = R11 = (IL2/16µA RMS) * R 19/2
Phase 3:
R12 = R13 = (IL3/16µA RMS) * R 20/2
Where ILX
= Secondary CT current at rated conditions.
R18, R19 and R20
= Current transformer termination resistors for the three phases.
R1 + R1A, R4 and R15 set the current for the phase 1 voltage sense input. R2 + R2A, R5 +
P 5 and R16 set the current for phase 2 and R 3 + R3A, R6 and R17 set the current for phase
3. The values should be selected so that the input currents into the voltage sense inputs
(virtual ground) are set to 14µARMS for the rated line voltage condition. Capacitors C1, C2
and C3 are for decoupling and phase compensation.
R14 defines all on-chip bias and reference currents. With R14 = 47kΩ, optimum conditions
are set. R14 may be varied by up to ± 10% for calibration purposes. Any changes to R14
will affect the output quadratically (i.e: ∆R = +5%, ∆P = +10%).
XTAL is a colour burst TV crystal (f = 3.5795 MHz) for the oscillator. The oscillator
frequency is divided down to 1.78975 MHz on-chip, to supply the digital circuitry and the
A/D converters.
sames
15/20
R1A
LINE 2
R2
R2A
sames
LINE 3
R3
R3A
R11
R19
VI2P
R10
C3
R17
VI2N
GND
R13
R20
R12
VI3P
R6
VI3N
GND
F150
SCK
D0
GND
2
19
3
18
4
S A9604A
C2
R18
R8
VI1P
R9
R15
17
C1
VI1N
GND
16
5
6
VDD
R16
20
1
IC -1
R4
15
7
14
8
13
CS
9
12
DI
10
11
R14
R5
GND
VDD
VSS
R7
C13
D R -0 1 3 1 0
C12
XTAL
GND
R21
C14
VSS
SA9604A
R1
LINE 1
Figure 1: Application Circuit for Three Phase Power/Energy Measurement
16/20
M A IN S V O L T A G E S
SA9604A
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
30
31
32
Symbol
IC-1
XTAL
R1
R1A
R2
R2A
R3
R3A
R4
R5
R6
R7
R8
R9
R10
R11
R12
R13
R14
R15
R16
R17
R18
R19
R20
R21
C1
C2
C3
C12
C13
C14
Description
Integrated circuit, SA9604A
Crystal, 3.5795 MHz
Resistor, 200k, 1%, ¼W
Resistor, 180k, 1%, ¼W
Resistor, 200k, 1%, ¼W
Resistor, 200k, 1%, ¼W
Resistor, 200k, 1% , ¼W
Resistor, 180k, 1%, ¼W
Resistor, 24k, 1%, ¼W
Resistor, 24k, 1%, ¼W
Resistor, 24k, 1%, ¼W
Resistor, 820Ω, 1%, ¼W
Resistor
Resistor
Resistor
Resistor
Resistor
Resistor
Resistor, 47k, 1%, ¼W
Resistor, 1M, 1%, ¼W
Resistor, 1M, 1%, ¼W
Resistor, 1M, 1%, ¼W
Resistor
Resistor
Resistor
Resistor, 820Ω, 1%, ¼W
Capacitor, electrolytic, 1µF, 6V
Capacitor, electrolytic, 1µF, 6V
Capacitor, electrolytic, 1µF, 6V
Capacitor, 820nF
Capacitor, 100nF
Capacitor, 100nF
sames
Detail
DIP-20, SOIC-20
Colour burst TV
Note 1
Note 1
Note 1
Note 1
Note 1
Note 1
Note 1
Note 1
Note 1
Note 2
Note 2
Note 2
Note 3
17/20
SA9604A
Note 1:
Resistor (R8, R9, R10, R11, R12 and R13) values are dependant upon the
selected value of the current transformer termination resistors R18, R19
and R20.
Note 2: Capacitor values may be selected to compensate for phase errors caused
by the current transformers.
Note 3: Capacitor (C12) to be positioned as close to Supply Pins (VDD & VSS) of
IC-1, as possible
ORDERING INFORMATION
Part Number
Package
SA9604APA
DIP-20
SA9604ASA
SOIC-20
18/20
sames
SA9604A
Notes:
sames
19/20
SA9604A
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 adress 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:
20/20
012 333-6021
012 333-8071
sames
Tel:
Fax:
Int +27 12 333-6021
Int +27 12 333-8071