Three Phase Power / Energy IC with SPI
Interface
SA9904B
FEATURES
+
Bi-directional
+
+
+
+
active and reactive power/energy
sames
+
+
+
+
+
+
Meets the IEC 61268 Specification requirements for
Class 2 VAR hour meters
Protected against ESD
Total power consumption rating below 60mW
Uses current transformers for current sensing
Operates over a wide temperature range
Precision on-chip voltage reference
measurement
RMS Voltage and frequency measurement
Individual Phase information
SPI communication bus
Meets the IEC 61036 Specification requirements for Class 1
AC Watt hour meters
DESCRIPTION
The SAMES SA9904B is a three phase bi-directional
energy/power metering integrated circuit that has been
designed to measure active and reactive energy, RMS mains
voltage and frequency. The SA9904B has an integrated SPI
serial interface for communication with a micro-controller.
Measured values for active and reactive energy, the mains
voltage and frequency for each phase are accessible through
the SPI interface from 24 bit registers. The SA9904B active and
reactive energy registers are capable of holding at least 52
seconds of accumulated energy at full load. A mains voltage
zero crossover is available on the F50 output.
The SA9904B includes all the required functions for three-
phase power and energy measurement such as oversampling
A/D converters for the voltage and current sense inputs, power
calculation and energy integration. This innovative universal
three phase power/energy metering integrated circuit is ideally
suited for energy calculations in applications such as electricity
dispensing systems, residential metering and factory energy
metering and control.
The SA9904B integrated circuit is available in 20 pin dual-in-
line plastic (PDIP20), as well as 20 pin small outline (SOIC20)
package types.
VDD
VSS
IIP1
IIN2
IIP2
IIN2
IIP3
IIN3
IVP1
IVP2
IVP3
ACTIVE
CURRENT
ADC
DI
REACTIVE
SPI
RMS
VOLTAGE
VOLTAGE
ADC
MAINS
FREQ.
F50
DO
SCK
CS
GND
VOLTAGE
REF.
OSC
DR-01641
VREF
OSC1
OSC2
Figure 1: Block diagram
SPEC-0447 (REV. 6)
1/12
04-07-03
SA9904B
ELECTRICAL CHARACTERISTICS
(V
DD
= 2.5V, V
SS
= -2.5V, over the temperature range -10°C to +70°C , unless otherwise specified.)
#
sames
Symbol
Parameter
Operating temp. Range
Supply Voltage: Positive
Supply Voltage: Negative
Supply Current: Positive
Supply Current: Negative
Current Sensor Inputs (Differential)
Input Current Range
Min
-25
2.25
-2.75
Typ
Max
+85
2.75
-2.25
Unit
°C
V
V
mA
mA
Condition
T
O
V
DD
V
SS
I
DD
I
SS
9.5
9.5
11
11
I
II
-25
+25
µA
Peak value
Voltage Sensor Input (Asymmetrical)
Input Current Range
Pins SCK
High Voltage
Low Voltage
I
IV
V
IH
V
IL
f
SCK
t
LO
t
HI
Pins CS, DI
High Voltage
Low Voltage
Pins F50, DO
Low Voltage
High Voltage
Oscillator
Pin VREF
Ref. Current
Ref. Voltage
V
IH
V
IL
V
OL
V
OH
-25
V
DD
-1
V
SS
+1
800
0.6
0.6
V
DD
-1
V
SS
+1
V
SS
+1
V
DD
-1
+25
µA
V
V
kHz
µs
µs
V
V
V
V
I
OL
= 5mA
I
OH
= -2mA
Peak value
Recommended crystal: TV colour burst crystal f = 3.5795 MHz
-I
R
V
R
23
1.1
25
27
1.3
µA
V
With R = 47k
W
connected to V
SS
Reference to V
SS
ABSOLUTE MAXIMUM RATINGS*
Parameter
Supply Voltage
Current on any pin
Storage Temperature
Operating Temperature
Symbol
Min
3.6V
-150
-40
-40
Max
6.0
+150
+125
+85
Unit
V
mA
°C
°C
V
DD
-V
SS
I
PIN
T
STG
T
O
*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.
During manufacturing, testing and shipment we take great care to protect our products against potential
external environmental damage such as Electrostatic Discharge (ESD). Although our products have ESD
protection circuitry, permanent damage may occur on products subjected to high-energy electrostatic
discharges accumulated on the human body and test equipment and can discharge without detection.
Therefore, proper ESD precautions are recommended to avoid performance degradation or loss of
functionality during product handling.
http://www.sames.co.za
2/12
3
SA9904B
PIN DESCRIPTION
PIN
16
6
sames
Designation
GND
V
DD
Description
Analog Ground. The supply voltage to this pin should be mid-way between
V
DD
and V
SS
.
Positive Supply voltage. The voltage to this pin is typically +2.5V if a shunt
resistor is used for current sensing or in the case of a current transformer a
+5V supply can be applied.
Negative Supply Voltage. The voltage to this pin is typically -2.5V if a shunt
resistor is used for current sensing or in the case of a current transformer a
0V supply can be applied.
Analog Input for Voltage Phase 1, Phase 2 and Phase 3. The current into the
A/D converter should be set at 14µA
RMS
at nominal mains voltage. The voltage
sense input saturates at an input current of ±25µA peak.
14
V
SS
17, 20, 3
IVP1, IVP2,
IVP3
18, 19, 1, 2, 4, 5
IIP1, IIN1, IIP2, IIN2,
Inputs for current sensors. The shunt resistor voltage from each channel is
converted to a current of 16µA
RMS
at rated conditions. The current sense input
IIP3, IIN3
saturates at an input current of ±25µA peak.
VREF
OSC1, OSC2
SCK
DO
F50
DI
CS
This pin provides the connection for the reference current setting resistor.
A 47k
W
resistor connected to sets the optimum operating condition.
Connections for a crystal or ceramic resonator. (OSC1 = input; OSC2 = Output)
Serial clock in. This pin is used to strobe data in and out of the SA9904B
Serial data out. Data from the SA9904B is strobed out on this pin. DO is
only driven when CS is active.
Voltage zero crossover. The F50 output generates a pulse, on every
rising edge of the mains voltage for any one phase.
Serial data in. Data is only accepted during an active chip select (CS).
Chip select. The CS pin is active high.
15
10, 11
8
9
7
12
13
IIP2
IIN2
IVP3
IIP3
IIN3
VDD
F50
SCK
DO
OSC1
1
2
3
4
5
6
7
8
9
10
Dr-01642
20
19
IVP2
IIN1
ORDERING INFORMATION
Part Number
SA9904BPA
SA9904BSA
Package
PDIP20
SOIC20
18 IIP1
17 IVP1
16 GND
15 VREF
14 VSS
13 CS
12
DI
11 OSC2
Figure 2: Pin connections: Package: PDIP20, SOIC20
http://www.sames.co.za
3/12
SA9904B
FUNCTIONAL DESCRIPTION
The SA9904B is a CMOS mixed signal Analog/Digital integrated
circuit, which performs the measurement of active power,
reactive power, RMS voltage and mains frequency. The
integrated circuit includes all the required functions for three-
phase power and energy measurement such as oversampling
A/D converters for the voltage and current sense inputs, power
calculation and energy integration.
Calibration LED
IIP
V DD
sames
CURRENT
SENSOR
INPUTS
VSS
VDD
A
I
IIN
VSS
VDD
Current
Sensing
SA9904B
Active Energy
Reactive Energy
V
RMS
and
Frequency
Measurements
SPI
Micro-
Controller
IVP
VOLTAGE
SENSOR
INPUT
V SS
A
V
Voltage
Sensing
EEPROM LCD
Power
Supply
N L1 L2 L3
Dr-01643
A micro-controller in addition to communicating
with the SA9904B is used to read/write
parameters to the EEPROM, output pulses for
fast calibration and to display the consumed
active and reactive power, Vrms and mains
frequency information. Other parameters such
as Irms, phase angle etc. can be accurately
calculated.
GND
DR-01288
Figure 4: Analog input internal configuration
and R2 on current channel 1, resistors R3 and R4 on current
channel 2 and resistors R5 and R6 on current channel 3, define
the current levels into the SA9904B current sense inputs. The
current sense inputs saturates at ±25µA peak. Resistors Rsh1,
Rsh2 and Rsh3 are the current transformer termination
resistors. The voltage drop across the termination resistors
should be at least 20mV but not higher than 200mV. The ideal
value should be approximately 100mV at rated conditions.
Values for the current sense inputs are calculated as follows:
R
1
= R
2
= (I
L
/ 16µA
RMS
) x Rsh / 2
R
3
= R
4
= (I
L
/ 16µA
RMS
) x Rsh / 2
R
5
= R
6
= (I
L
/ 16µA
RMS
) x Rsh / 2
Ch3 In
CH2 In
Figure 3:
Typical architecture of an energy meter using the
SA9904B
The SA9904B integrates instantaneous active and reactive
power into 24 bit registers. RMS voltage and frequency are
continuously measured and stored in the respective registers.
The mains voltage zero crossover is available on the F50 output.
The SPI interface of the SA9904B has a tri-state output that
allows connection of more than one metering device on a single
SPI bus.
INPUT SIGNALS
Analog Input Configuration
The input circuitry of the current and voltage sensor inputs is
illustrated in figure 4. These inputs are protected against
electrostatic discharge through clamping diodes. The feedback
loops from the outputs of the amplifiers A
I
and A
V
generate
virtual shorts on the signal inputs. Exact duplications of the input
currents are generated for the analog signal processing
circuitry. The current and voltage sense inputs are identical.
Both inputs are differential current driven up to ±25µA peak. One
of the voltage sense amplifier input terminals is internally
connected to GND. This is possible because the voltage sense
input is much less sensitive to externally induced parasitic
signals compared to the current sense inputs.
Current Sense Inputs (IIN1, IIP1, IIN2, IIP2, IIN3, IIP3)
At rated current (I
MAX
) the resistor values should be selected for
input currents of 16µA
RMS
. Referring to figure 5, the resistors R1
CH1In
I
MAX
Neutral
GND
CT1
I
MAX
Rsh1
I
MAX
GND
CT2
Rsh2
R3
16µA
RMS
R1
> 20mV
16µA
RMS
IIN1
RMS
R2
IIP1
IIN2
> 20mV
RMS
SA9904B
IIP2
16µA
R4
GND
CT3
Rsh3
R5
> 20mV
RMS
IIN3
RMS
R6
IIP3
GND
CH3 Out
CH2 Out
CH1 Out
Dr-01644
Figure 5: Current sense input configuration
http://www.sames.co.za
4/12
SA9904B
Where:
I
L
= Line current or if a CT is used I
L
= Line current / CT ratio
Rsh = Shunt resistor or CT termination resistor.
Rsh should be less than the resistance of the CT's secondary
winding.
sames
the micro controller and the SA9904B. The clock signal on this
pin is generated by the micro controller and determines the
data transfer rate of the DO and DI pins.
Voltage Sense Input (IVP1, IVP2, IVP3)
Figure 6 shows the voltage sense (IVP) input configuration for
one phase. The exact circuit is duplicated for the other two
phases. The current into the voltage sense inputs (virtual
ground) should be set to 14µA
RMS
at rated voltage conditions.
The voltage sense inputs saturate at an input current of ±25µA
peak.
14V
RMS
Serial Data In (DI)
The DI pin is the serial data input pin for the SA9904B. Data will
be input at a rate determined by the Serial Clock (SCK). Data
will be accepted only during an active chip select (CS).
Chip Select (CS)
The CS input is used to address the SA9904B. An active high
on this pin enables the SA9904B to initiate data exchange.
Ch1 Voltage
Neutral
Dr-01645
R16
R19
R22
C5
R8
14µA
OUTPUT SIGNALS
RMS
IVP1
Serial Data Out (DO)
The DO pin is the serial data output pin for the SA9904B. The
Serial Clock (SCK) determines the data output rate. Data is
only transferred during on active chip select (CS). This output
is tri-state when CS is low.
R13
GND
GND
Figure 6: Voltage sense input configuration
The individual mains voltages are divided down to 14V
RMS
per
phase. The resistor R8 sets the current for the voltage sense
input. The voltage divider is calculated for a voltage drop of 14V.
With a phase voltage of 230V the equation for the voltage divider
is:
RA = R16 + R19 + R22
RB = R8 || R13
Combining the two equations gives:
(RA + RB) / 230V = RB / 14V
A 24K resistor is chosen for R13 and a 1M resistor for R8.
Substituting these values results in:
RB = 23.44K
RA = RB x (230V / 14V-1)
RA = 361.6K
Resistor values for R16, R19 and R22 is chosen to be 120K
each.
The capacitor C5 is used to compensate for any phase shift
between the voltage sense and current sense input
caused by
the current transformer. As an example to compensate for a
phase shift of 0.18 degrees the capacitor value is calculated as
follows:
C = 1 / (2 x
p
x Mains frequency x R5 x tan (Phase shift angle))
C = 1 / (2 x
p
x 50Hz x 1M
W
x tan (0.18 degrees))
C = 1.013µF
Mains Voltage sense zero crossover (F50)
The F50 output generates a signal, which follows the mains
voltage zero crossings, see figure 7.
This output generates a
pulse on the rising edge of the mains voltage zero crossing
point. Internal logic ensures that this signal is generated from a
valid phase. Should all three phase be missing but power still
applied to the SA9904B this output will generate a constant
54Hz signal.
The micro controller can use the F50 to extract
mains timing.
Phase Voltage
F50
Dr-01646
+5V
1ms to 2ms
0V (Vss)
1ms to 2ms
Figure 7: Mains voltage zero crossover
SPI - INTERFACE
Description
A serial peripheral interface bus (SPI) is a synchronous bus
used for data transfers between a micro controller and the
SA9904B. The pins DO (Serial Data Out), DI (Serial Data In),
CS (Chip Select), and SCK (Serial Clock) are used in the bus
implementation. The SA9904B is the slave device with the
micro controller being bus master. The CS input initiates and
terminates data transfers. A SCK signal (generated by the
micro controller) strobes data between the micro-controller
Reference Voltage (VREF)
The VREF pin is the reference for the bias resistor. With a bias
resistor of 47k
W
connected to Vss optimum conditions are set.
Serial Clock (SCK)
The SCK pin is used to synchronize data interchange between
http://www.sames.co.za
5/12