0% found this document useful (0 votes)
196 views32 pages

ADE7878

Uploaded by

xuandong.29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views32 pages

ADE7878

Uploaded by

xuandong.29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

EVAL-ADE7878EBZ

Evaluation Board Documentation


ADE7878 Energy Metering IC
Preliminary Technical Data EVAL-ADE7878EB
FEATURES This documentation describes the ADE7878 evaluation kit
Evaluation board designed to be used together with hardware, firmware and software functionality. The evaluation
accompanying software to implement a fully functional board contains an ADE7878 and a LPC2368 microcontroller.
three-phase energy meter The ADE7878 and its associated metering components are
Easy connection of various external transducers via screw optically isolated from the microcontroller. The microcontroller
terminals communicates with the PC using a USB interface. Firmware
Easy modification of signal conditioning components using updates can be loaded using one PC com port and a regular
PCB sockets serial cable.
LED indicators on logic outputs CF1, CF2, CF3, IRQ0, and The ADE7878 evaluation board and this documentation,
IRQ1 together with the ADE7878 data sheet provide a complete
Optically isolated metering components and USB based evaluation platform for the ADE7878.
communication with PC
The evaluation board has been designed so that ADE7878 can
External voltage reference option available for on-chip
be evaluated in an energy meter. Using appropriate current
reference evaluation
transducers, the evaluation board can be connected to a test
PC COM port-based firmware updates
bench or high voltage (240Vrms) test circuit. On-board resistor
GENERAL DESCRIPTION dividers networks provide the attenuation for the line voltages.
The ADE7878 is a high accuracy, 3-phase electrical energy This application note describes how the current transducers
measurement IC with serial interfaces and three flexible pulse should be connected for the best performance. The evaluation
outputs. The ADE7878 incorporates seven ADCs, reference board requires two external 3.3V power supplies and the
circuitry and all signal processing required to perform total appropriate current transducers.
(fundamental and harmonic) active, reactive and apparent
energy measurement, fundamental active and reactive energy
measurement and rms calculations.
IBN IBP IAN IAP VDD2 GND2 MCU_VDD MCU_GND

P2 P1 P10 P12

P3
ICP
ICN Digital
LPC2368 USB Port
Isolators
Filter Network ADE78xx

INP
INN P13
P4 P15
Optional External
1.2V Reference ADR280 Optional External
Clock In
Connector to
PC COM Port

Filter Network & Attenuation JTAG


Interface

P5 P6 P7 P8 P9 J2 J3 J4

VN GND VCP GND VBP GND VAP GND VDD GND CF3 CF2 CF1

Figure 1. Functional Block Diagram

Rev. PrB
Evaluation boards are only intended for device evaluation and not for production purposes.
Evaluation boards are supplied “as is” and without warranties of any kind, express, implied, or
statutory including, but not limited to, any implied warranty of merchantability or fitness for a
particular purpose. No license is granted by implication or otherwise under any patents or other
intellectual property by application or use of evaluation boards. Information furnished by Analog
Devices is believed to be accurate and reliable. However, no responsibility is assumed by Analog
Devices for its use, nor for any infringements of patents or other rights of third parties that may result
from its use. Analog Devices reserves the right to change devices or specifications at any time One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A.
without notice. Trademarks and registered trademarks are the property of their respective owners. Tel: 781.329.4700 www.analog.com
Evaluation boards are not authorized to be used in life support devices or systems. Fax: 781.461.3113 ©2009 Analog Devices, Inc. All rights reserved.
EVAL-ADE7878EB Preliminary Technical Data

TABLE OF CONTENTS
Features .............................................................................................. 1 Front Panel Screen ....................................................................7
General Description ......................................................................... 1 PSM0 – Normal Power Mode..................................................8
Evaluation Board Power Supplies............................................... 3 Enter PSM1 Mode .................................................................. 15
Analog Inputs (P1, P2, P3, P4, P6, P7, and P8) ........................ 3 Enter PSM2 Mode .................................................................. 15
Current Sense Inputs (P1, P2, P3, and P4 Connectors) ...... 3 Enter PSM3 Mode .................................................................. 16
Using a Current Transformer as the Current Sensor .......... 3 Communication Protocol Between Microcontroller and
Votage Sense Inputs (P5, P6, P7, and P8 Connectors) ........ 4 ADE7878 ..................................................................................... 16

Setting Up the Evaluation Board as an Energy Meter ............. 5 Upgrading Microcontroller Firmware..................................... 19

Activating Serial Communication ADE7878 − LPC2368 .. 7 Evaluation Board BOM ............................................................. 21

Using the Evaluation Board with another microcontroller 7 Evaluation Board Schematic ..................................................... 23

ADE7878 Evaluation Software ................................................... 7 Evaluation Board LAYOUT ...................................................... 26

Installing the ADE7878 Software ........................................... 7


Uninstalling the ADE7878 Software ...................................... 7

Rev. PrB | Page 2 of 30


Preliminary Technical Data EVAL-ADE7878EB
EVALUATION BOARD POWER SUPPLIES JP3A JP5A
TP1
ADE78xx
The board has three different power domains: one that supplies R9 R17
IAP

the microcontroller and one side of the isocouplers, one that 100 1K

18000pF
18000pF
JP1A

C17
R1
supplies the other side of the optocouplers and one that supplies

C9
P1
ADE7878. The ground of the microcontroller’s power domain is IAP

connected to the ground of the PC through the USB cable. The IAN

18000pF
18000pF
ground of ADE7878 power domain is determined by the

JP2A

C10

C18
R2
ground of the phase voltages VAP, VBP, VCP and VN and must R10 R18
IAN
be different from the ground of the microcontroller’s power 100 1K
domain. TP2
JP4A JP6A

The microcontroller 3.3V supply is provided at P12 connector. Figure 2. Phase A Current Input Structure on Evaluation Board
ADE7878 3.3V supply is provided at P9 connector. The same
JP3A JP5A
supply should also be provided at P10 connector, the connector TP1
R17 ADE78xx
R9
that supplies the other side of the isocouplers. IAP

100 1K

18000pF
ANALOG INPUTS (P1, P2, P3, P4, P6, P7, AND P8) Imax=6 Arms

18000pF
JP1A

C17
R1

C9
50
CT
P1
1:2000
Current and voltage signals are connected at the screw
terminals P1 – P4 and P5 - P8 respectively. All analog input

18000pF
18000pF
signals are filtered using the on-board anti-aliasing filters before

JP2A

C10

C18
R2

50
being connected to ADE7878. The components used on the R10 R18 IAN
board are the recommended values to be used with ADE7878. 100 1K
TP2
Current Sense Inputs (P1, P2, P3, and P4 Connectors) JP4A JP6A

ADE7878 measures 3 phase currents and the neutral current. Figure 3. Example of a Current Transformer Connection
Current transformers or Rogowski coils can be used to sense The burden resistors R1 and R2 have to be chosen function of
the currents, but not mixed together. ADE7878 contains current transformer ratio and maximum current of the system.
different internal PGA gains on phase currents and on the The jumpers JP1A and JP2A should be opened if R1 and R2 are
neutral current, so sensors with different ratios can be used. used. The antialiasing filters should be enabled by opening
The only requirement is to have same scale signals at PGAs jumpers J5A and J6A (please see Figure 3).
outputs, otherwise the mismatch functionality of ADE7878 is
compromised (Please see Neutral Current Mismatch chapter in The transformer’s secondary current is converted to a voltage by
ADE7878 data sheet for more details). Figure 2 shows the using a burden resistor across the secondary winding outputs.
structure used for the phase A current: the sensor outputs are Care should be taken when using a current transformer as the
connected to P1 connector. The resistors R1 and R2 are the current sensor. If the secondary is left open, that is no burden is
burden resistors and by default, they are not populated. They connected, a large voltage could be present at the secondary
can also be disabled using JP1A and JP2A jumpers. The RC outputs. This can cause an electric shock hazard and potentially
networks R9/C9 and R10/C10 are used to provide phase damage electronic components.
compensation when a current transformer is being used. They Most current transformers introduce a phase shift that the
can be disabled using JP3A and JP4A jumpers. The RC manufacturer indicates in the data sheet. This phase shift can
networks R17/C17 and R18/C18 are the antialiasing filters. The lead to significant energy measurement errors, especially at low
default corner frequency of these low pass filters is 8.8KHz power factors. ADE7878 can correct the phase error using
(1KΩ/18nF). These filters can easily be adjusted by replacing APHCAL[9:0], BPHCAL[9:0] and CPHCAL[9:0] phase
the components on the evaluation board. calibration registers as long as the error stays between -6.732°
All the other current channels, that is phase B, phase C and and +1.107° at 50Hz. Please see ADE7878 data sheet for more
neutral current have similar input structure. details. The software supplied with the ADE7878 evaluation
board allows user adjustment of phase calibration registers.
Using a Current Transformer as the Current Sensor
For this particular example, burden resistors of 50 ohm signify
Figure 3 shows how a current transformer can be used as a an input current of 7.05 Arms at ADE7878 ADC full scale input
current sensor in one phase of a 3-phase 4-wire distribution (0.5V). In addition, the PGA gains for the current channel have
system (Phase A). The other two phases and the neutral current to be set at 1. For more information on setting PGA gains,
requires similar connections. please see ADE7878 data sheet. The evaluation software allows
the user to configure the current channel gain.

Rev. PrB | Page 3 of 30


EVAL-ADE7878EB Preliminary Technical Data
Votage Sense Inputs (P5, P6, P7, and P8 Connectors) resistors in the current channel (R17 and R18 on phase A
The voltage inputs connections on the ADE7878 evaluation current data path).
board can be directly connected to the line voltage sources. The JP7A
TP12
P8
line voltages are attenuated using a simple resistor divider VAP R26 R29 VAP
ADE78xx

network before it is presented to ADE7878. The attenuation

18000pF
1M 100K

C32
JP8B

R32

1K
network on the voltage channels is designed such that the

Phase A
corner frequency (3dB frequency) of the network matches that

Neutral
VN

1
A 2
COM 3
of the antialiasing filters in the current channels inputs. This JP9A

B
JP7N
prevents obtaining large energy errors at low power factors. P5
TP9
VN R25 VN
Figure 4 shows a typical connection of the phase A voltage

18000pF
1K

JP8N

C25
inputs: the resistor divider is enabled by opening JP7A jumper.
The antialiasing filter on VN data path is enabled by opening
JP7N jumper. JP8B and JP8N are opened. The analog input VN
Figure 4. Phase A Voltage Input Structure On Evaluation Board
is connected to AGND via the antialiasing filter R25/C25 using
JP8N connector. The maximum signal level permissible at VAP, VBP and VCP
pins of ADE7878 is 0.5V peak. Although ADE7878 analog
The attenuation networks can be easily modified by the user to
inputs can withstand ±2V without risk of permanent damage,
accommodate any input level. However, the value of R32 (1KΩ),
the signal range should not exceed ±0.5V with respect to
should be modified only together with the corresponding
AGND for specified operation.

Table 1. Recommended Settings for Evaluation Board Connectors


Jumper Option Description
JP1 unsoldered It connects AGND to Earth. By default, it is unsoldered.
JP1A, JP1B, open They connect IAP, IBP, ICP and INP to AGND. By default, they are open.
JP1C, JP1N,
JP2 closed It connects ADE7878 VDD power supply (VDD_F at P9 connector) to the power supply of the isocouplers
(VDD2 at P10 connector). By default it is closed.
JP2A, JP2B, open They connect IAN, IBN, ICN and INN to AGND. By default, they are open.
JP2C, JP2N
JP3 soldered It connects padd metal below ADE7878 to AGND. By default, it is soldered.
JP3A, JP3B, closed They disable the phase compensation network in IAP, IBP, ICP and INP dat path. By default, they are
JP3C, JP3N closed.
JP4 soldered It connects C3 to DVDD. By default, it is soldered.
JP4A, JP4B, closed They disable the phase compensation network in IAN, IBN, ICN and INN data path. By default, they are
JP4C, JP4N closed.
JP5 soldered It connects C5 to AVDD. By default, it is soldered.
JP5A, JP5B, open They disable the phase antialiasing filter in IAP, IBP, ICP and INP data path. By default, they are open.
JP5C, JP5N
JP6 soldered It connects C41 to REF pin of ADE7878. By default, it is soldered.
JP6A, JP6B, closed It disables the phase antialiasing filter in IAN, IBN, ICN and INN data path. By default, they are closed.
JP6C, JP6N
JP7 closed It enables the supply to the microcontroller. When open, takes out the supply to the microcontroller. By
default, it is closed.
JP7A, JP7B, open It disables the resistor divider in VAP, VBP and VCP data path. By default, they are open.
JP7C
JP7N open It disables the antialiasing filter in VN data path. By default, it is closed.
JP8 open It sets the microcontroller in flash memory programming mode. By default, it is open.
JP8A, JP8B, open They connect VAP, VBP and VCP to AGND. By default, they are open.
JP8C
JP8N open It connects VN to AGND. By default, it is open.
JP9 open When closed, signals the microcontroller to declare all I/O pins as outputs. It is used when another
microcontroller is used to manage ADE7878 through P38 socket. By default, it is open.
JP9A, JP9B, soldered to pin They connect the ground of antialiasing filters in VAP, VBP and VCP data path to AGND or VN. By default,
JP9C 1 (AGND) they are soldered to AGND.

Rev. PrB | Page 4 of 30


Preliminary Technical Data EVAL-ADE7878EB
Jumper Option Description
JP10 open It connects external voltage reference to ADE7878. By default, it is open.
JP11 soldered to pin It connects CLKIN pin of ADE7878 to 16.384MHz crystal (pin 1 of JP11) or to an external clock input
1 provided at J1. By default, it is soldered to pin 1.
JP12 soldered to pin It connects DGND (pin 2 of JP12) of ADE7878 to Earth (pin 1 of JP12) or to AGND (pin 3 of JP12).
3 (AGND)
JP35, JP33 open If I2C communication between LPC2368 and ADE7878 is used, these connectors should be closed with
0Ω resistors. In this case, JP36 and JP34 connectors should be opened. By default, the SPI is the
communication used between LPC2368 and ADE7878, so these connectors are open.
JP31, JP37 open If HSDC communication is used, then these connectors should be closed with 0Ω resistors. In this case,
JP35 and JP33 connectors should also be closed. By default, the SPI is the communication used between
LPC2368 and ADE7878, so these connectors are open.
JP36, JP34, closed with 0Ω If SPI communication is used between LPC2368 and ADE7878, these connectors should be closed and
JP32, JP38 resistors JP35, JP33, JP31, JP37 should be opened. By default, the SPI is the communication used between
LPC2368 and ADE7878, so these connectors are closed.

SETTING UP THE EVALUATION BOARD AS AN and the control circuit, the power supplies should have floating
ENERGY METER voltage outputs.

Figure 5 shows a typical setup for the ADE7878 evaluation The evaluation board is connected to the PC using a regular
board. In this example, an energy meter for a 4 wire, three phase USB cable supplied with the board. When the evaluation board
distribution system is shown. Current transformers are used to has been powered up and is connected to the PC, the
sense the phase and neutral currents and are connected as enumeration process begins and the PC recognizes new
shown in Figure 5. The line voltages are connected directly to hardware and asks to install the appropriate driver. The driver
the evaluation board as shown. Note the state of all jumpers is found in VirCOM_Driver_XP folder of the CD. After the
must match the indication in Figure 5 and the fact the board is driver has been installed, the supplied evaluation software can
supplied from two different 3.3V power supplies, one for the be launched. The next section describes the ADE7878
ADE7878 domain, VDD, and one for LPC2368 domain, evaluation software in detail and how it can be installed and
MCU_VDD. As the two domains are isolated to ensure there is uninstalled.
no electrical connection between the high voltage test circuit

Rev. PrB | Page 5 of 30


EVAL-ADE7878EB Preliminary Technical Data

Voltage Source Voltage Source

MCU_GND

MCU_VDD
GND

VDD
Phase C
P9 P12

Phase B JP1, JP2 = closed

P1
Neutral

IAP IAP JP1A, JP2A = open

R1
IAN JP3A, JP4A = closed

R2
IAN JP5A, JP6A = open
P2
IBP R3 IBP JP1B, JP2B = open

IBN JP3B, JP4B = closed


R4

IBN JP5B, JP6B = open


P3
ICP ICP JP1C, JP2C = open
R5

ICN JP3C, JP4C = closed


R6

ICN JP5C, JP6C = open


P4
INP INP JP1N, JP2N = open
R7

INN JP3N, JP4N = closed


R8

INN JP5N, JP6N = open


P8
VAP R26 R29
VAP
JP7A, JP8A = open
R32

C32

P7
VBP R27 R30
VBP
JP7B, JP8B = open
R33

C33

P6
VCP R28 R31
VCP
JP7C, JP8C = open
R34

C34

Load
P5
VN R25
VN
JP7N, JP8N = open
C34

Neutral

Figure 5. Typical Setup for the ADE7878 Evaluation Board

Rev. PrB | Page 6 of 30


Preliminary Technical Data EVAL-ADE7878EB
Activating Serial Communication ADE7878 − LPC2368 LabView based program must be installed. Place the CR-ROM
The ADE7878 evaluation board comes with the communication in the CDROM reader and double click on
between ADE7878 and LPC2368 set through SPI ports. Jumpers LabView_project\installation_files\setup.exe. This launches the
JP32, JP34, JP36 and JP38 are closed using 0Ω resistors and setup program that automatically installs all the software
JP31, JP33, JP35 and JP37 are open. In this case, the SPI port components including the uninstall program and creates the
should be chosen as active port in the ADE7878 control panel. required directories.
Communication between ADE7878 and LPC2368 is also To launch the software, simply go to the Start->Programs-
possible using the I2C ports. To accomplish this, jumpers JP31, >ADE7878 Eval Software menu and click on “ADE7878 Eval
JP33, JP35 and JP37 should be closed using 0Ω resistors and Software”.
JP32, JP34, JP36 and JP38 should be open. In this case, the I2C
Uninstalling the ADE7878 Software
port should be chosen as active port in the ADE7878 control
panel (See Table 2). Both the ADE7878 Eval Software program and the NI run-time
engine are easily uninstalled by using the Add/Remove
Table 2. Jumpers State to Activate SPI or I2C Programs option in the control panel. Simply select the
Communication program to uninstall and click the Add/Remove button.
Jumpers closed When installing a new version of the ADE7878 evaluation
Active Comm with 0Ω resistors Jumpers open
software, the previous version should be first uninstalled.
SPI (default) JP32, JP34, JP36, JP31, JP33, JP35,
JP38 JP37
I2C JP31, JP33, JP35, JP32, JP34, JP36,
JP37 JP38
Using the Evaluation Board with another
microcontroller
It is possible to manage the ADE7878 mounted on the
evaluation board with a different microcontroller mounted on
another board. The ADE7878 may be connected to this other
board through two connectors: P11 or P38. P11 is placed on the
same power domain as the ADE7878. P38 is placed on the
power domain of the LPC2368 and communicates with the
ADE7878 through the isocouplers. If P11 is used, then the
power domain of the LPC2368 should not be supplied at P12. If
P38 is used, a conflict may arise with LPC2368 I/O ports. Two
choices are provided to deal with this situation:
-One is to keep the LPC2368 running and close JP9. This tells Figure 6. Front panel of ADE7878 Software
LPC2368 to set all its I/Os high in order to allow the other
Front Panel Screen
microcontroller to communicate with the ADE7878. Once JP9
is closed, the reset button S2 should be pressed low to force When the software is launched, the front panel screen is
LPC2368 to reset. This is necessary because JP9 state is checked opened. Three windows compose this screen: the main menu at
inside LPC2368 program only once after reset. the left, the submenu at the right and a window showing the
communication port used by PC to connect to the evaluation
-The other choice is to cut the power supply of LPC2368 by
port (see Figure 6). The serial port chosen on the board is
disconnecting JP7.
introduced using a switch. By default, the communication
ADE7878 EVALUATION SOFTWARE between the microcontroller and ADE7878 uses the SPI port.
The ADE7878 evaluation board is supported by Windows based Note the active serial port must first be set in hardware. See
software that allows the user to access all the functionality of Activating Serial Communication ADE7878 − LPC2368 section
ADE7878. The software communicates with the LPC2368 for details on how to set it up.
microcontroller using the USB as a virtual COM port. On its The main menu has only one choice enabled, “Find COM Port”.
side, LPC2368 communicates with ADE7878 to accomplish the Clicking on it starts a process in which the PC tries to connect
requests arrived from the PC. to the evaluation board and learn what PC port to use. It uses
Installing the ADE7878 Software the Echo function of the Communication protocol (see
Communication Protocol Between Microcontroller and
The ADE7878 Software is supplied on one CD-ROM. It
ADE7878). It visualizes the port that matches the protocol and
contains two projects: one that represents the LPC2368 project
then sets it to 9600 baud, 8 data bits, no parity, no flow control,
and one LabView based program that runs on the PC. The
1 stop bit. If the evalution board is not connected, the port is
LPC2368 project is already loaded into the processor, but the
Rev. PrB | Page 7 of 30
EVAL-ADE7878EB Preliminary Technical Data
visualized as “XXXXX”. In this case, all the windows of the button of submenu has to be clicked. The state of the front
evaluation software are still accessible, but no communication panel is presented in Figure 8.
can be executed. In both cases, whether the search for COM Reset ADE7878
port is successful or not, the cursor is put back at “Please select
from the following options” in the main menu, “Find COM When “Reset ADE7878” is selected, the RESET pin of
Port” is greyed out and the next main menu options are enabled ADE7878 is kept low for 20msec and then is set high. If the
(see Figure 7). These options allow the user to command operation was correctly executed, the message “ADE7878 was
ADE7878 in any of PSM0 or PSM3 power modes. The other reset successfully” is displayed and the users have to click “OK”
power modes PSM1 and PSM2 are not available for now to move forward. The only error that may occur during this
because initializations have to be made in PSM0 before using operation is communication related, so if this happens, the
ADE7878 in one of these modes. following message is visualized: “The communication between
PC and ADE7878 evaluation board or between LPC2368 and
ADE78xx did not function correctly. There is no guarantee the
reset of ADE7878 has been performed.”
Configure Communication
When “Configure Communication” is selected, the screen
presented in Figure 9 is opened. This menu is useful if an
ADE7878 reset has been performed and the SPI is not anymore
the active serial port. User selects SPI port and then clicks OK
button to update selection and lock the port. If the port
selection is successful, the message “Configuring LPC2368 –
ADE7878 communication was successful” is displayed and the
users have to click “OK” to move forward. If a communication
error happens, then the message “Configuring LPC2368 –
ADE7878 communication was not successful. Please check the
communication between the PC and ADE7878 evaluation
board” is displayed. Then CONFIG2[7:0] register is written
Figure 7. Front panel after the COM port has been identified
with bit 1 (PORT_LOCK) set to 1, so the user does not need to
PSM0 – Normal Power Mode remember to set it once the communication is set.
Right after the evaluation board has been powered up, CONFIG2[7:0] is then read back and visualized together with
ADE7878 is in PSM3 sleep mode. When “Enter PSM0 mode” bit 1 (PORT_LOCK).
choice is selected, the microcontroller manipulates PM0 and If EXIT button is pressed, the window is closed and the cursor
PM1 pins of ADE7878 to switch it into PSM0 mode. It waits is put at “Please select from the following options” in the
50msec for the circuit to power up and if the SPI is the submenu of the Front Panel screen.
communication activated on the board, it executes 3 SPI write
operations to address 0xEBFF of ADE7878 to activate the SPI
port. If the operation has been correctly executed or the I2C
communication is used, the message “Configuring LPC2369 –
ADE7878 communication was successful” is displayed and the
user has to click “OK” to continue. The only error that may
occur during this operation is communication related, so if this
happens, the following message is visualized: “Configuring
LPC2368 – ADE7878 communication was not successful. Please
check the communication between the PC and ADE7878
evaluation board and between LPC2368 and ADE78xx”.
Bit 1 (PORT_LOCK) of CONFIG2[7:0] register is now set to 1
to lock in the serial port choice. Then DICOEFF register is
initialized with 0xFF8000 and the DSP of ADE7878 is started by
writing RUN=0x1. At the end of this process, the entire main
menu is greyed out and the submenu is enabled. In this way, the
user can now manage all the functionalities of ADE7878 in Figure 8. Front panel after ADE7878 enters PSM0 mode
PSM0 mode. To switch ADE7878 in another power mode, Exit

Rev. PrB | Page 8 of 30


Preliminary Technical Data EVAL-ADE7878EB
Total Active Power When “Read Energy Registers” button is pressed, a new panel is
When “Total Active Power” is selected, the panel presented in opened (see Figure 12). This panel gives access to bits and
Figure 10 is opened. The screen has two horizontal halfs: the registers that configure the energy accumulation. Read Setup
one below shows the total active power data path of one phase and Write Setup buttons update and visualize their values.
and the one above shows bits, registers and commands Similar to Total Active Power panel, CHECKSUM[31:0] register
necessary to the power management. The Active Data Path is read back whenever a read or write operation is executed.
button manages which data path is shown in the bottom half. “Read All Energy” registers button reads all energy registers in
Some registers or bits, like WTHR0[31:0] or bit 0 (INTEN) of that instant, whithout regard to the mode in which they function.
CONFIG[15:0] are common to all data paths, independent of The panel also gives the choice of reading the energy registers
which phase is shown. In that case, when they are updated, all synchronous to CFx, x=1, 2, 3 interrupts or using line cycle
the values in all data paths are updated. HPFDIS[23:0] register accumulation mode. When “Read energy registers
is present twice in the data path. In this case, only its value from synchronously with CF1 pulses” button is pressed, the following
the current data path is written into ADE7878. All the other happens:
instances take this value directly. - STATUS0[31:0] is read and then written back, so all non zero
interrupt flag bits are cancelled.
- bit 14 (CF1) in MASK1[31:0] register is set to 1 and the
interrupt protocol is started (please see Communication
Protocol Between Microcontroller and ADE7878 chapter for
protocol details). The microcontroller waits until IRQ0 pin
goes low. If the wait is longer than the timeout the user indicates
in 3sec increments, then an error message is displayed: “No CF1
pulse was generated. Verify all the settings before attempting to
read energy registers in this mode!” When IRQ0 pin goes low,
STATUS0[31:0] register is read and written back to cancel bit 14
(CF1) and then the energy registers involved in CF1 signal are
read and visualized. A timer in 10msec increments can be used
to measure the reaction time after IRQ0 pin goes low.
- The operation is repeated as long as the button remains
pressed.
Figure 9. Configure Communication panel
The process is similar when the other CF2, CF3 and line
“Read” button reads all registers that manage the total active accumulation buttons are pressed.
power and visualizes them. Registers from the inactive data
paths are also read and updated. It is recommended to always use a timeout when dealing with
interrupts. By default, the timeout is set to 10 (indicating 30 sec
“Write” button writes all registers that manage the total active timeout) and the timer is set to 0 (indicating the
power into ADE7878. Registers from the inactive data paths are STATUSx[31:0], x=1, 2 and energy registers are read
also written.
immediately after IRQ0 goes low).
ADE7878 status window shows the power mode in which
When selected, “Total Reactive Power”, “Fundamental Active
ADE7878 is into (it should always be PSM0 in this window), the
Power” and “Fundamental Reactive Power” buttons open panels
active serial port (it should always be SPI) and
very similar with the Total Active Power panel. They are
CHECKSUM[31:0] register. After every READ and WRITE
presented in Figure 13, Figure 14 and Figure 15.
operation, CHECKSUM[31:0] register is read and visualized.
When “CFx Configuration” button is pressed, a new panel is
opened (see Figure 11). This panel gives access to all bits and
registers that configure the CF1, CF2 and CF3 outputs of
ADE7878. Read and Write buttons update and visualize their
values. Similar to Total Active Power panel, CHECKSUM[31:0]
register is read back whenever a read or write operation is
executed. To select more than one choice in TERMSELx, x=1, 2,
3 bits of COMPMODE[15:0] register, just press CTRL keypad
when clicking on them. EXIT button closes the panel returns to
Total Active Power panel.

Rev. PrB | Page 9 of 30


EVAL-ADE7878EB Preliminary Technical Data

Figure 10. Total active energy panel

Figure 13. Total Reactive Power panel

Figure 11. CFx Configuration panel Figure 14. Fundamental Active Power panel

Figure 15. Fundamental Reactive Power panel

Apparent Power
Figure 12. Read Energy Registers panel
When “Apparent Power” is selected, a new panel is opened
(Figure 16). Similar to the other panels that deal with power
measurement, this panel is divided in two horizontal halfs: the
one below shows the apparent power data path of one phase

Rev. PrB | Page 10 of 30


Preliminary Technical Data EVAL-ADE7878EB
and ADE7878 status and the one above shows bits, registers and
commands necessary to the power management.
Current RMS
When “Current RMS” is selected, a new panel is opened (Figure
17). All data paths of all phases are available.
“Read Setup” button reads all registers shown in the panel.
“Write Setup” button writes xIRMSOS[23:0] (x=A,B,C,N)
registers.
“Start/Stop Digital Signal Processor” buttons manage
RUN[15:0] register.
“Read xIRMS” registers button uses ZXIA, ZXIB and ZXIC
interrupts at IRQ1 pin to read xIRMS[23:0] (x=A,B,C,N)
registers 10 consecutive times and then compute and visualize
their average. If no interrupt occurs for a time indicated by the Figure 17. Current RMS panel
timeout (in 3 sec increments), then the following message is
Mean Absolute Value Current
visualized: “No ZXIA, ZXIB or ZXIC interrupt was generated.
When “Mean Absolute Value Current” is selected, a new panel
Verify at least one sinusoidal signal is provided between IAP-
is opened (Figure 18). When “Read xIMAV Registers” button is
IAN, IBP-IBN or ICP-ICN pins.” A delay can be introduced (in
pressed, xIMAV[19:0](x=A, B, C) registers are read 10
10msec increments) between the time IRQ1 pin goes low and consecutive times and then their average is computed and
the moment the xIRMS registers are read. The operation is visualized. After this operation, the button is returned back
repeated as long as the button remains pressed. high automatically. In addition, ADE7878 status is visualized.
Voltage RMS
This panel is very similar with the Current RMS panel. “Read
Setup” button executes a read of xVRMSOS[23:0] and
xVRMS[23:0] (x=A, B, C) registers.
“Write Setup” writes xVRMSOS[23:0] registers into ADE7878.
“Start/Stop Digital Signal Processor” buttons manage
RUN[15:0] register.
“Read xVRMS” registers button uses ZXVA, ZXVB and ZXVC
interrupts at IRQ1 pin to read xVRMS[23:0] (x=A,B,C)
registers 10 consecutive times and then compute and visualize
their average. If no interrupt occurs for a time indicated by the
timeout (in 3 sec increments), then the following message is
visualized: “No ZXVA, ZXVB or ZXVC interrupt was generated.
Verify at least one sinusoidal signal is provided between VAP-
VN, VBP-VN or VCP-VN pins.” A delay can be introduced (in
Figure 16. Apparent Power panel
10msec increments) between the time IRQ1 pin goes low and
the moment the xVRMS[23:0] registers are read. The operation
is repeated as long as the button remains pressed.

Rev. PrB | Page 11 of 30


EVAL-ADE7878EB Preliminary Technical Data
ANGLEx[15:0] (x=0,1,2) registers, cos(ANGLEx) are computed
and visualized.
When “Write Configuration” button is pressed, MMODE[7:0],
OVLVL[23:0], OILVL[23:0], SAGLVL[23:0], SAGCYC[7:0],
COMPMODE[15:0], PEAKCYC[7:0] are written into
ADE7878 and then CHECKSUM[31:0] is read back and
visualized.
When “Wait For Interrupts” button is pressed, the interrupts
enabled by the user in MASK1[31:0] register are monitored.
When IRQ1 pin goes low, STATUS1[31:0] register is read and
its bits visualized. Then, ISUM[27:0], PHSTATUS[15:0],
IPEAK[31:0], VPEAK[31:0], ANGLE0[15:0], ANGLE1[15:0],
ANGLE2[15:0] registers are also read and visualized. A timeout
should be introduced in 3 seconds increments to ensure the
program does not wait indefinitely for interrupts and a timer
(in 10msec increments) is provided to allow reading the
registers with a delay from the moment the inyterrupt is
triggered.
“Active Measurement” button gives access to Zero Crossing
Figure 18. Mean Absolute Value Current panel
measurements, Neutral Current Mismatch management,
Overvoltage & Overcurrent management, Peak detection, Sag
detection and Time Intervals Between Phases (see Figure 20,
Figure 21, Figure 22, Figure 23, Figure 24).
The line frequency is computed using PERIOD[15:0] register
based on the following formula:
256000
f= [Hz]
PERIOD
Based on ANGLE0[15:0], ANGLE1[15:0], ANGLE2[15:0]
measurements, the cosine of them is computed using the
following formula:
ANGLEx ⋅ 360 ⋅ 50 ⎞
cos(ANGLEx) = cos⎛⎜ ⎟
⎝ 256000 ⎠

Figure 19. Voltage RMS panel

Power Quality
Power Quality panel is divided in two horizontal halfs. The
bottom one shows various registers that manage various power
quality measurements function of Active Measurement button.
The one above shows ADE7878 status and various buttons that
manage the measurements. When “Read Configuration” button
is pressed, all power quality registers (MASK1[31:0],
STATUS1[31:0], PERIOD[15:0], MMODE[7:0], ISUM[27:0],
OVLVL[23:0], OILVL[23:0], PHSTATUS[15:0], IPEAK[31:0],
VPEAK[31:0], SAGLVL[23:0], SAGCYC[7:0], ANGLE0[15:0],
ANGLE1[15:0], ANGLE2[15:0], COMPMODE[15:0],
CHECKSUM[31:0], PEAKCYC[7:0]) are read and the ones
belonging to the active window are visualized. Based on
PERIOD[15:0] register, the line frequency is computed and Figure 20. Zero Crossing Measurements panel
visualized in the Zero Crossing Measurement window. Based on

Rev. PrB | Page 12 of 30


Preliminary Technical Data EVAL-ADE7878EB

Figure 21. Neutral Current Mismatch panel Figure 24. Time Intervals Between Phases panel

Waveform Sampling
This panel (see Figure 25) uses HSDC port to acquire data from
the ADE7878 and visualize it. It can be accessed only if the
communication between ADE7878 and LPC2368 is I2C. See
Activating Serial Communication ADE7878 − LPC2368 section
for details on how to set I2C communication on the ADE7878
evaluation board.
The HSDC transmits data to LPC2368 at 4MHz because this is
the maximum speed the slave SPI of LPC2368 can receive data.
The panel contains some switches that must be set before
acquiring data:
-One switch chooses what quantities are visualized: phase
currents and voltages or phase powers. For every set of
quantities, only two can be acquired at a time. This choice is
done using the buttons “Select Waveform1” and “Select
Figure 22. Overvoltage & Overcurrent management panel Waveform2”.
-A second switch allows for acquired data to be stored in files
for further utilization.
-The acquisition time should also be set before an acquisition is
ordered. By default, this time is 150msec. It is limited for phase
currents and voltages for up to 1sec, but for phase powers is
unlimited. This difference appears because the LPC2368 must
execute in real time three tasks using the ping pong buffer
method: continuously receiving data from HSDC, storing it into
its USB memory, sending it to the PC. More time it takes the
HSDC to transmit data, more time LPC2368 has to transmit
data to the PC. As transmitting 6 phase currents and voltages at
4MHz takes 103.25μsec, less than 125 μsec, but transmitting 9
phase powers takes 133.25μsec, more than 125 μsec, the first
quantities are transmitted by HSDC at 8KHz update rate and
the second at 4KHz rate. This means the phase currents and
voltages can be acquired only for up to 1sec before the LPC2368
Figure 23. Peak management panel goes out of bandwidth and the powers can be acquired for an
unlimited time.

Rev. PrB | Page 13 of 30


EVAL-ADE7878EB Preliminary Technical Data
To start the acquisition, press “ACQUIRE DATA” button. The
data is visualized on two different plots, Waveform1 and
Waveform2. If the switch to allow storing of data into files is
turned on, the program asks for the name and location of files
before storing Waveform1 and Waveform2.

Figure 26. CHECKSUM Register panel

All Registers Access


This panel gives read/write access to all ADE7878 registers.
Because of their number, the panel can scroll up/down and has
multiple “Read”, “Write” and “End” buttons (see Figure 27,
Figure 28). The registers are placed in alphabetical order,
starting from upper left corner and going vertically.
Figure 25. Waveform sampling panel

CHECKSUM Register
This panel gives access to all ADE7878 registers that are used to
compute CHECKSUM[31:0] register (see Figure 26). The user
can read/write the value of these registers by clicking on
“Read”/”Write” buttons. LabView program estimates the value
of CHECKSUM[31:0] register and visualizes it whenever one of
the registers is changed. When “Read” button is pressed, aside
from reading the registers, CHECKSUM[31:0] is also read and
visualized. In this way, the user can compare the value of
CHECKSUM[31:0] estimated by LabView with the value read
from ADE7878. They should always be identical.

Figure 27. Panel giving access to all ADE7878 registers (1)

Rev. PrB | Page 14 of 30


Preliminary Technical Data EVAL-ADE7878EB

Figure 30. Front Panel after ADE7878 enters PSM1 mode


Figure 28. Panel giving access to all ADE7878 registers (2) Mean Absolute Value Current in PSM1 Mode
PSM2 Settings This panel is very similar to the panel accessible in PSM0 mode
This panel gives access to LPOILVL[7:0] register that is used to (see Mean Absolute Value Current Chapter for details). The
access PSM2 low power mode (see Figure 29). The user can only difference is that ADE7878 status does not show
manipulate its LPOIL[2:0] and LPLINE[4:0] bits. The value CHECKSUM[31:0] register because it is not available in PSM1
shown into LPOILVL[7:0] register is composed from these bits mode (Figure 31)
and then visualized. Writing a value to LPOILVL[7:0] register
window directly does not have any consequence.

Figure 31. Mean AbsoluteValue Currents Panel in PSM1 mode


Figure 29. PSM2 settings panel
Enter PSM2 Mode
Enter PSM1 Mode When “Enter PSM2 mode” is selected, the microcontroller
When “Enter PSM1 mode” is selected, the microcontroller manipulates PM0 and PM1 pins of ADE7878 to switch it into
manipulates PM0 and PM1 pins of ADE7878 to switch it into PSM2 low power mode. Then the submenu only allows
PSM1 reduced power mode. Then the submenu only allows accessing the Phase Current Monitoring function because this is
accessing the Mean Absolute Value Current function because the only ADE7878 functionality in this low power mode.
this is the only ADE7878 functionality in this reduced power
mode (see Figure 30).

Rev. PrB | Page 15 of 30


EVAL-ADE7878EB Preliminary Technical Data
this mode. User can press one of “Enter PSM0, PSM1 or PSM2”
buttons to order ADE7878 in one of these power modes.
COMMUNICATION PROTOCOL BETWEEN
MICROCONTROLLER AND ADE7878
This chapter lists the protocol commands that have been
implemented to manage ADE7878 from the PC using the
microcontroller.
The microcontroller is a pure slave during the communication.
It receives a command from PC, it excutes it and then sends an
answer to the PC. The PC should wait the answer before
sending a new command to the microcontroller.

Table 3. Echo Command—Message from PC to Microcontroller


Byte Description
0 ‘A’=0x41
Figure 32. Front Panel after ADE7878 enters PSM2 mode 1 N=Number of bytes transmitted after this byte
Phase Current Monitoring 2 Data byte N-1 (MS)
3 Data byte N-2
This panel allows the user to visualize the state of IRQ0 and 4 Data byte N-3
IRQ1 pins because in PSM2 low power mode, ADE7878 … …
compares the phase currents against a threshold determined by N Data byte 1
LPOILVL[7:0] register (see Figure 33). The button “READ N+1 Data byte 0 (LS)
STATUS OF IRQ0 AND IRQ1 PINS” reads the status of these
Table 4. Echo Command—Answer from Microcontroller to PC
pins, visualizes and interprets it. This operation is managed by
Byte Description
LPOILVL[7:0] register and it can only be modified in PSM0
0 ‘R’=0x52
mode. The panel offers this option by switching ADE7878 in
1 ‘A’=0x41
PSM0 and then back in PSM2 when one of “READ/WRITE
2 N=Number of bytes transmitted after this byte
LPOILVL” buttons is pressed. To avoid toggling both PM0 and
3 Data byte N-1 (MS)
PM1 pins in the same time during this switch, ADE7878 is
4 Data byte N-2
ordered first in PSM3 when changing modes.
… …
N+1 Data byte 1
N+2 Data byte 0 (LS)

Table 5. Power Mode Select—Message from PC to


Microcontroller
Byte Description
0 ‘B’=0x42 - change PSM mode
1 N=1
2 Data Byte 0:
0x00=PSM0
0x01=PSM1
0x02=PSM2
0x03=PSM3

Table 6. Power Mode Select—Answer from Microcontroller


to PC
Byte Description
0 ‘R’=0x52
1 ‘~’=0x7E to acknowledge the operation was successful
Figure 33. Panel managing Current Monitoring in PSM2 mode

Enter PSM3 Mode


In PSM3 sleep mode, the ADE7878 has most of its internal Table 7. Reset—Message from PC to Microcontroller
circuits turned off. Therefore, no submenu is activated while in Byte Description

Rev. PrB | Page 16 of 30


Preliminary Technical Data EVAL-ADE7878EB
0 ‘C’=0x43 - toggle RESET pin and keep it low for at least 0 ‘R’=0x52
10msec 1 MS byte of the address
1 N=1 2 LS byte of the address
2 Data Byte 0: this byte can have any value 3 Byte 5, 3,1 or 0 (MS)read at the location indicated by
address. The location may contain 6, 4, 2 or 1 bytes. The
Table 8. Reset—Answer from Microcontroller to PC content is transmitted MS byte first.
Byte Description 4 Byte 4, 2 or 0
0 ‘R’=0x52 5 Byte 3, 1
1 ‘~’=0x7E to acknowledge the operation was successful 6 Byte 2, 0
7 Byte 1
8 Byte 0
Table 9. I2C/SPI Select (Configure Communication)—
Message from PC to Microcontroller Table 15. Interrupt Setup—Message from PC to
Byte Description Microcontroller
0 ‘D’=0x44 - Select I2C, SPI and initialize them. Then sets Byte Description
CONFIG2[7:0]=0x2 to lock in the port choice. When I2C is 0 ‘J’=0x4A
selected, enable also SSP0 of LPC2368 (used for HSDC) 1 N=8 - Number of bytes transmitted after this byte.
1 N=1 2 MS byte of MASK1[31:0] or MASK0[31:0] address
2 Data Byte 0: 0x00=I2C, 0x01=SPI 3 LS byte of MASK1[31:0] or MASK0[31:0] address
4 Byte3 of the desired value of MASK0[31:0] or
Table 10. I2C/SPI Select (Configure Communication)— MASK1[31:0]
Answer from Microcontroller to PC 5 Byte2
Byte Description 6 Byte1
0 ‘R’=0x52 7 Byte0
1 ‘~’=0x7E to acknowledge the operation was successful 8 Time Out Byte - Time the MCU must wait for the interrupt
to be triggered. It is measured in 3sec increments.
Table 11. Data Write—Message from PC to Microcontroller Time Out Byte (TOB)=0 means the timeout is disabled
Byte Description 9 IRQ timer - Time the MCU leaves the IRQx , x=0,1pin low
0 ‘E’=0x45 before writing back to clear the interrupt flag. It is
1 N= Number of bytes transmitted after this byte. N can be measured in 10msec increments.
1+2,2+2, 4+2 or 6+2 Timer=0 means the timeout is disabled
2 MS byte of the address
3 LS byte of the address Table 16. Interrupt Setup—Message from Microcontroller to PC
4 Data byte N-3 (MS) Byte Description
5 Data byte N-4 0 ‘R’=0x52
6 Data byte N-5 1 Byte3 of STATUS0[31:0] or STATUS1[31:0]
… … If the program waited for TOB*3sec and the interrupt was
N+2 Data byte 1 not triggered, then the Byte3=Byte2=Byte1=Byte0=0xFF
N+3 Data byte 0 (LS) 2 Byte2 of STATUS0[31:0] or STATUS1[31:0]
3 Byte1 of STATUS0[31:0] or STATUS1[31:0]
Table 12. Data Write—Answer from Microcontroller to PC 4 Byte0 of STATUS0[31:0] or STATUS1[31:0]
Byte Description The microcontroller executes the following operations once
0 ‘R’=0x52 Interrupt Setup command is received:
1 ‘~’=0x7E to acknowledge the operation was successful
- Reads STATUS0[31:0] or STATUS1[31:0] (depending on the
Table 13. Data Read—Message from PC to Microcontroller address received from PC) and if it shows an interrupt already
Byte Description triggered (one of its bits equal to 1), it erases it by writing it
0 ‘F’=0x46 back.
1 N= Number of bytes transmitted after this byte. N=3 - Writes MASK0[31:0] or MASK1[31:0] with the value received
2 MS byte of the address from PC.
3 LS byte of the address - Waits for the interrupt to be triggered. If the wait gets more
4 M=number of bytes to be read from the address above. than the time out specified in the command, then sends back
M can be 1, 2, 4 or 6 0xFFFFFFFF.
- If the interrupt is triggered, it reads STATUS0[31:0] or
Table 14. Data Read—Answer from Microcontroller to PC STATUS1[31:0] and then writes it back to clear it. The value
Byte Description

Rev. PrB | Page 17 of 30


EVAL-ADE7878EB Preliminary Technical Data
read at this point is the value sent back to the PC so the user can Byte Description
see the source of the interrupts. 13 Increment_IB_Byte0
- Sends back the answer. 14 0
Table 17. Interrupt Pins Status—Message from PC to 15 Increment_VB_Byte2. If VB is to be acquired, then bytes
15, 16, 17 are 1. Otherwise they are 0.
Microcontroller
16 Increment_VB_Byte1
Byte Description
17 Increment_VB_Byte0
0 ‘H’=0x48
18 0
1 N=1 - Number of bytes transmitted after this byte
19 Increment_IC_Byte2. If IC is to be acquired, then bytes
2 Any byte. This byte is not used at all. It is used only
19, 18, 19 are 1. Otherwise they are 0.
because N must not be 0.
20 Increment_IC_Byte1
Table 18. Interrupt Pins Status—Answer from 21 Increment_IC_Byte0
Microcontroller to PC 22 0
Byte Description 23 Increment_VC_Byte2. If VC is to be acquired, then bytes
0 ‘R’=0x52 23, 24, 25 are 1. Otherwise they are 0.
1 A number representing the status of IRQ0 and 24 Increment_VC_Byte1
25 Increment_VC_Byte0
IRQ1 pins.
26 0
0: IRQ0 =low, IRQ1 =low 27 Increment_IN_Byte2. If IN is to be acquired, then bytes
27, 28, 29 are 1. Otherwise they are 0.
1: IRQ0 =low, IRQ1 =high
28 Increment_IN_Byte1
2: IRQ0 =high, IRQ1 =low 29 Increment_IN_Byte0
3: IRQ0 =high, IRQ1 =high 30 Byte1 of M. M is a 16 bit number. The number of 32 bit
samples that will be acquired by the microcontroller is
The reason of IRQ0 and IRQ1 order is because on the (2*M+1)*67 per channel.
microcontroller’s IO port, IRQ0 =P0.1 and IRQ1 =P0.0 31 Byte0 of M
Acquire HSDC Data Continuously If two of phase powers are to be acquired, the protocol changes ,
This function acquires data from HSDC continuously for a see Table 20.
defined time period and for up to two variables. The Table 20. Acquire HSDC Data Continuously—Message from
microcontroller sends data in packages of 4Kbytes. PC to Microcontroller if phase powers are acquired
The following table describes the protocol when two Byte Description
instantaneous phase currents or voltages are acquired. 0 ‘G’=0x47
1 N= Number of bytes transmitted after this byte. N=38
Table 19. Acquire HSDC Data Continuously—Message from
2 0. This corresponds to byte3 of AVA. But as this byte is
PC to Microcontroller if phase currents and voltages are only a sign extension of byte2, it is not sent back by the
acquired microcontroller.
Byte Description 3 Increment_AVA_Byte2. If AVA is to be acquired, then
0 ‘G’=0x47 bytes 3, 4, 5 are 1. Otherwise they are 0.
1 N= Number of bytes transmitted after this byte. N=30 4 Increment_AVA_Byte1
2 0. This corresponds to byte3 of IA. But as this byte is only 5 Increment_AVA_Byte2
a sign extension of byte2, it is not sent back by the 6 0
microcontroller. 7 Increment_BVA_Byte2. If BVA is to be acquired, then
3 Increment_IA_Byte2. If IA is to be acquired, then bytes 3, bytes 7, 8, 9 are 1. Otherwise they are 0.
4, 5 are 1. Otherwise they are 0. 8 Increment_BVA_Byte1
4 Increment_IA_Byte1 9 Increment_BVA_Byte0
5 Increment_IA_Byte2 10 0
6 0 11 Increment_CVA_Byte2. If CVA is to be acquired, then
7 Increment_VA_Byte2. If VA is to be acquired, then bytes bytes 11, 12, 13 are 1. Otherwise they are 0.
7, 8, 9 are 1. Otherwise they are 0. 12 Increment_CVA_Byte1
8 Increment_VA_Byte1 13 Increment_CVA_Byte0
9 Increment_VA_Byte0 14 0
10 0 15 Increment_AWATT_Byte2. If AWATT is to be acquired,
11 Increment_IB_Byte2. If IB is to be acquired, then bytes 11, then bytes 15, 16, 17 are 1. Otherwise they are 0.
12, 13 are 1. Otherwise they are 0. 16 Increment_AWATT_Byte1
12 Increment_IB_Byte1 17 Increment_AWATT_Byte0
Rev. PrB | Page 18 of 30
Preliminary Technical Data EVAL-ADE7878EB
Byte Description Start ADE7878 DSP
18 0 This function orders the microcontroller to start the DSP. The
19 Increment_BWATT_Byte2. If BWATT is to be acquired, Microcontroller writes RUN register with 0x1.
then bytes 19, 18, 19 are 1. Otherwise they are 0.
20 Increment_BWATT_Byte1 Table 22. Start ADE7878 DSP—Message from PC to
21 Increment_BWATT_Byte0 Microcontroller
22 0 Byte Description
23 Increment_CWATT_Byte2. If CWATT is to be acquired, 0 ‘N’=0x4E
then bytes 23, 24, 25 are 1. Otherwise they are 0. 1 N= Number of bytes transmitted after this byte. N=1
24 Increment_CWATT_Byte1 2 Any byte
25 Increment_CWATT_Byte0
26 0 Table 23. Start ADE7878 DSP—Answer from
27 Increment_AVAR_Byte2. If AVAR is to be acquired, then Microcontroller to PC
bytes 27, 28, 29 are 1. Otherwise they are 0. Byte Description
28 Increment_AVAR_Byte1 0 ‘R’=0x52
29 Increment_AVAR_Byte0 1 ‘~’=0x7E to acknowledge the operation was successful
30 0
31 Increment_BVAR_Byte2. If BVAR is to be acquired, then
bytes 31, 32, 33 are 1. Otherwise they are 0. Stop ADE7878 DSP
32 Increment_BVAR_Byte1 This function orders the microcontroller to stop the DSP. The
33 Increment_BVAR_Byte0 Microcontroller writes RUN register with 0x0.
34 0
35 Increment_CVAR_Byte2. If CVAR is to be acquired, then Table 24. Stop ADE7878 DSP—Message from PC to
bytes 35, 36, 37 are 1. Otherwise they are 0. Microcontroller
36 Increment_CVAR_Byte1 Byte Description
37 Increment_CVAR_Byte0 0 ‘N’=0x4F
38 Byte1 of M. M is a 16 bit number. The number of 32 bit 1 N= Number of bytes transmitted after this byte. N=1
samples that will be acquired by the microcontroller is
2 Any byte
(2*M+1)*67 per channel.
39 Byte0 of M Table 25. Stop ADE7878 DSP—Answer from
After receiving the command, the microcontroller enables the Microcontroller to PC
HSDC port, and acquires 67*7*4=1876 bytes into buffer0. As Byte Description
soon as buffer0 is filled, data is acquired in buffer1 (equal in 0 ‘R’=0x52
size to buffer0), while 2*3*67=402 bytes (134 24-bit words) 1 ‘~’=0x7E to acknowledge the operation was successful
from buffer0 are transmitted to the PC. As soon as buffer1 is UPGRADING MICROCONTROLLER FIRMWARE
filled, data is acquired into buffer0 while 402 bytes from buffer1
are transmitted to the PC. Only the less significant 24 bits of Although the evaluation board is supplied with the
every 32 bit instantaneous value is sent to PC in order to microcontroller firmware already installed, the ADE7878
decrease the size of the buffer sent to PC. The most significant 8 Evaluation Software CD provides the microcontroller LPC2368
bits are only an extension of a 24 bit signed word anyway, so no project developed under IAR Embedded Workbench
information is lost. The protocol used by the microcontroller to Environment for ARM. Users in possession of this tool can
send data to the PC is as follows: modify the project at will and can download it using an IAR J-
Link debugger. As an alternative, the executabale can be
Table 21. Acquire HSDC Data Continuously—Answer from downloaded using a program called Flash Magic, available on
Microcontroller to PC the Evaluation Software CD or at this website:
Byte Description http://www.flashmagictool.com/
0 ‘R’=0x52 Flash Magic uses the PC COM port to download the
1 Byte 2 (MS) of word 1 microcontroller firmware. In the following, the procedure to
2 Byte 1 of word 1 use Flash Magic is presented:
3 Byte 0 (LS) of word 1 -Plug a serial cable into connector P15 of ADE7878 evaluation
4 Byte 2 (MS) of word 2 board and into a PC COM port. As an alternative, use
5 Byte 1 (MS) of word 2 ADE8052Z-DWDL1 ADE downloader from Analog Devices
… … together with a USB cable.
402 Byte 0 (LS) of word 134 -Launch the Device Manager under Windows XP by writing
devmgmt.msc into Start->Run window. This helps in
Rev. PrB | Page 19 of 30
EVAL-ADE7878EB Preliminary Technical Data
identifying which COM port is used by the serial cable. Plug
USB2UART board into connector P15 of ADE7878 evaluation
board with VDD pin of USB2UART aligned at pin 1 of P15.
- Connect Jumper JP8. This means the P2.10/ EINT0 pin of the
microcontroller is connected to ground.
- Supply the board with two 3.3V supplies at connectors P10
and P12. Press and release RESET button S2 on ADE7878
evaluation board
- Launch Flash Magic and choose the following options:
COM port: COMx as seen in the Device Manager above
Baud rate: 115200
Device: LPC2368
Interface: None (ISP)
DOscillator Freq. (MHz): 12.0
Check Erase all Flash + Code Rd Block box
Choose ADE7878_Eval_Board.hex file from \Debug\Exe project
folder
Check Verify after programming box Figure 34. Flash Magic settings
An image of Flash Magic with the above settings is presented in
- Click Start for the download process to begin
Figure 34:
- After the process finishes, please extract the jumper JP8.
- Reset the ADE7878 evaluation board by pressing and releasing
RESET button S2. At this point, the program should be
functional and an USB cable may be connected to the board.
When the PC recognizes the evaluation board and asks for a
driver, please point it to \VirCOM_Driver_XP folder of the
project. The file ADE7878_eval_board_vircomport.inf is the
driver.

Rev. PrB | Page 20 of 30


Preliminary Technical Data EVAL-ADE7878EB
EVALUATION BOARD BOM
Table 26.
Designator Value Description
A1 ADR280ARTZ IC-ADI 1.2V ULTRALOW POWER HGH PSRR VOLT REF
A2 ADUM1250ARZ IC SWAPPABLE DUAL ISOLATOR
C1,C8,C44,C78 10UF CAP TANT SMD 3528
C9-C25,C32-C34 18000PF CAP CER
C2,C7,C40,C42,C43,C48-
0.1UF CAP CER X7R
C59,C61,C62,C72,C73,C75-C77,C79-C84
C26,C27,C70,C71 20PF CAP CER NP0
C3,C5,C41 4.7UF CAP TANT CHIP
C38,C74 1UF CAP CER X7R
C4,C6 .22UF CAP CER
CF1-CF3,CLKIN AMP227699-2 CONN-PCB COAX BNC ST
CR1-CR5 28-21SRCTR8T1 DIODE LED RED SMD
CR6 SML-LXT0805GW-TR LED GREEN SURFACE MOUNT
E1A,E1B,E1C,E1N,E2A,E2B,E2C,E2N,E8A,E8B,E
1500 OHMS INDUCTOR CHIP FERRITE BEAD 0805
8C,E8N
JP2,JP7-JP10,JP1A-JP8A,JP1B-JP8B,JP1C-
BERG69157-102 CONN-PCB BERG JMPR ST MALE 2P
JP8C,JP1N-JP8N
JP32,JP34,JP36,JP38,JP60,JP61 0 RES JMPR SMD 0805 (OPEN)
P1-P10,P12 WEILAND25.161.0253 CONN-PCB TERM BLK 2P ST
P11,P38 SAMTSW-1-30-08-GD CONN-PCB HDR SHRD ST 32 PIN MALE
P13 SAMTECTSW11008GD CONN-PCB BERG HDR ST MALE 20P
P14 4-1734376-8 CONN-PCB USB TYPE B R/A THRU HOLE
P15 SAMTECTSW10608GS4PIN CONN-PCB BERG HDR ST MALE 4P
P16 MOLEX22-03-2031 CONN-PCB STRAIGHT HEADER 3PIN
Q1-Q5 FDV302P TRANS DIGITAL FET P CHAN
R1-R8 TBD1206 RES CHIP SMD 1206
R9-R16,RSB 100 RES PREC THICK FILM CHIP R1206
R17-R25,R32-R34 1K RES PREC THICK FILM CHIP R0805
R26-R28 1M RES MF RN55
R29-R31 100K RES MF RN55
R35,R36,R38,R44-R57,R64-R66,R68-
10K RES PREC THICK FILM CHIP R0805
R76,R78,R82-R86,R58A,R58B,R59A,R59B
R37 2 RES FILM SMD 0805
R39-R43,R81 1.5K RES PREC THICK FILM CHIP R1206
R77 680 RES FILM SMD 0805
R79,R80 27 RES FILM SMD 1206
S1,S2 B3S1000 SW SM MECHANICAL KEYSWITCH
TP1-TP18,TP22-TP55 BLK CONN-PCB TST PNT BLK
U1 ADE7858CPZ IC-ADI POLY-PHASE MULTIFUNC ENERGY METERING IC
U3-U7 ADum1401BRWZ IC-ADI QUAD CHANNEL DIGITAL ISOLATOR
U8 LPC2368FBD100 IC ARM7 MCU FLASH 512K 100LQFP
Y1 16.384MHZ IC CRYSTAL
Y2 12.000MHZ IC CRYSTAL QUARTZ
A3 ADG820BRMZ IC-ADI 1.8V TO 5.5V 2:1 MUX/SPDT SWITCHES
IC-ADI 1.8V TO 5V AUTO-ZERO IN-AMP WITH
A4 AD8553ARMZ
SHUTDOWN
C63 560PF CAP CER NP0
JP31,JP33,JP35,JP37 0 RES JMPR SMD 0805 (SHRT)

Rev. PrB | Page 21 of 30


EVAL-ADE7878EB Preliminary Technical Data
Designator Value Description
P17 WEILAND25.161.0253 CONN-PCB TERM BLK 2P ST
P18-P37 SAMTECTSW10608GS5PIN CONN-PCB BERG HDR ST MALE 5P
R60 4.02K RES PREC THICK FILM CHIP R0805
R61,R62 100K RES PREC THICK FILM CHIP R0805
R63 200K RES PREC THICK FILM CHIP R1206
TP61,TP62 BLK CONN-PCB TST PNT BLK
U2 MICRO24LC128-I-SN IC SERIAL EEPROM 128K 2.5V

Rev. PrB | Page 22 of 30


Preliminary Technical Data EVAL-ADE7878EB
EVALUATION BOARD SCHEMATIC

Rev. PrB | Page 23 of 30


EVAL-ADE7878EB Preliminary Technical Data

Rev. PrB | Page 24 of 30


Preliminary Technical Data EVAL-ADE7878EB

Rev. PrB | Page 25 of 30


EVAL-ADE7878EB Preliminary Technical Data
EVALUATION BOARD LAYOUT

Rev. PrB | Page 26 of 30


Preliminary Technical Data EVAL-ADE7878EB

Rev. PrB | Page 27 of 30


EVAL-ADE7878EB Preliminary Technical Data

Rev. PrB | Page 28 of 30


Preliminary Technical Data EVAL-ADE7878EB

Rev. PrB | Page 29 of 30


EVAL-ADE7878EB Preliminary Technical Data

NOTES

©2009 Analog Devices, Inc. All rights reserved. Trademarks and


registered trademarks are the property of their respective owners.
EB08059-0-2/09(PrB)

Rev. PrB | Page 30 of 30


EVAL-ADE7878EBZ

Powered by TCPDF (www.tcpdf.org)

You might also like