Skip to content

Commit 2bc5de4

Browse files
committed
projects: ADE7816: Added readme doc
Signed-off-by: Joyce Velasco <[email protected]>
1 parent 8924b46 commit 2bc5de4

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../../../../../projects/ade7816/README.rst

projects/ade7816/README.rst

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
ADE7816 no-OS Example Project
2+
=============================
3+
4+
.. contents::
5+
:depth: 3
6+
7+
Supported Evaluation Boards
8+
---------------------------
9+
10+
- :adi:`EVAL-ADE7816EBZ`
11+
12+
Overview
13+
--------
14+
15+
The EVAL-ADE7816 is an evaluation board designed to facilitate the
16+
assessment and prototyping of the ADE7816 energy metering IC from Analog
17+
Devices. This board provides users with access to the various
18+
functionalities of the ADE7816, allowing for comprehensive evaluation of
19+
its performance in monitoring electric properties such as voltage,
20+
current, and power. Configured for simple connectivity with other
21+
systems, the evaluation board supports interfacing via test points,
22+
connectors, and communication ports, making it suitable for both
23+
standalone operation and integration into broader testing environments.
24+
The board aids in analyzing the precision of energy measurements and
25+
testing the device in real-world scenarios without the need for
26+
additional complex setups.
27+
28+
Applications
29+
------------
30+
31+
- Energy metering applications
32+
- Power monitoring systems
33+
- Application in electronic designs requiring precise power measurement
34+
35+
Hardware Specifications
36+
-----------------------
37+
38+
Power Supply Requirements
39+
~~~~~~~~~~~~~~~~~~~~~~~~~
40+
41+
The EVAL-ADE7816 Evaluation Board requires a 3.3V power supply. By
42+
default, power is supplied via a USB connection, feeding the NXP LPC2368
43+
microcontroller and one side of the isocouplers through the JP24 jumper
44+
positioned at 2, 3. For external power use, adjust JP24 to position 1, 2
45+
and connect a 3.3V source to the P12 connector. This configuration
46+
maintains the same power domain as the default USB setup. The board is
47+
ready for COM port detection without an external supply if jumper
48+
settings are correctly configured.
49+
50+
Device Interrupt
51+
~~~~~~~~~~~~~~~~
52+
To run the ADE7816 no-OS project with the AD-APARD32690-SL controller board,
53+
the IRQ pin from the EVAL-ADE7816 must be connected to a GPIO pin on the
54+
AD-APARD32690-SL platform. This GPIO pin is configured to detect interrupts
55+
and trigger an interrupt service routine (ISR) when the IRQ pin is activated,
56+
signaling events like data ready or fault conditions. The ISR handles the interrupt
57+
by reading the ADE7816’s status, processing the data, and clearing the interrupt flag.
58+
This setup ensures real-time communication between the ADE7816 and the controller
59+
for efficient data processing and error management.
60+
61+
62+
No-OS Build Setup
63+
-----------------
64+
65+
Please see: `https://wiki.analog.com/resources/no-os/build`.
66+
67+
No-OS Supported Examples
68+
------------------------
69+
70+
The initialization data used in the example is taken out from the
71+
`Project Common Data Path <https://github.com/analogdevicesinc/no-OS/tree/main/projects/ade7816/src/common>`__.
72+
73+
The macros used in Common Data are defined in platform specific files
74+
found in the
75+
`Project Platform Configuration Path <https://github.com/analogdevicesinc/no-OS/tree/main/projects/ade7816/src/platform>`__.
76+
77+
Basic Example
78+
~~~~~~~~~~~~~
79+
80+
The basic example code for the ADE7816 involves initializing the SPI
81+
interface, which configures necessary parameters such as device ID, SPI
82+
mode, clock speed, and chip select. GPIO setup includes managing
83+
interrupt handling crucial for energy measurement operations. The code
84+
demonstrates measuring energy by configuring the ADE7816 for
85+
zero-crossing detection across different channels to set phases and
86+
reading active/reactive energy values. It converts raw RMS readings into
87+
microamperes or microvolts for display. Interrupts control the
88+
measurement cycle, pausing operations when triggered to ensure precise
89+
energy readings.
90+
91+
No-OS Supported Platforms
92+
-------------------------
93+
94+
Maxim
95+
~~~~~
96+
97+
Hardware Used
98+
^^^^^^^^^^^^^
99+
100+
- EVAL-ADE7816
101+
- AD-APARD32690-SL
102+
103+
Connections
104+
^^^^^^^^^^^
105+
106+
Supplying a regulated 3.3V DC to the EVAL-ADE7816 board is achieved via
107+
connector P9, which powers the ADE7816 IC and the non-isolated side of
108+
the circuit; the setup requires adjusting the jumper JP24 to position 1,
109+
2 if using an external power source like P12, as per the user guide. SPI
110+
is the default communication protocol configured for interfacing the
111+
ADE7816 with the AD-APARD32690-SL, using pins for SCLK (SPI
112+
clock), MOSI (data to ADE7816), MISO (data from ADE7816), and SS (SPI
113+
chip select). The evaluation kit supports SPI and I2C interfaces, but
114+
the included example defaults to SPI.
115+
116+
**Important**
117+
118+
- Connect the IRQ Pin from the ADE7816 to a GPIO pin on the AD-APARD32690-SL.
119+
- Configure the GPIO on the AD-APARD32690-SL to detect the IRQ pin's interrupt signal.
120+
121+
+----------+-----------------------------+------------------------------+
122+
| Signal | EVAL-ADE7816 (P17 Header) | AD-APARD32690-SL (P4 Header) |
123+
+==========+=============================+==============================+
124+
| MOSI | P17.1 | P4.4 |
125+
+----------+-----------------------------+------------------------------+
126+
| MISO | P17.7 | P4.3 |
127+
+----------+-----------------------------+------------------------------+
128+
| SCLK | P17.3 | P4.2 |
129+
+----------+-----------------------------+------------------------------+
130+
| SS | P17.5 | P4.1 |
131+
+----------+-----------------------------+------------------------------+
132+
133+
Build Command
134+
^^^^^^^^^^^^^
135+
136+
.. code-block:: bash
137+
138+
# to delete current build
139+
make reset
140+
# to build the project
141+
make PLATFORM=maxim TARGET=max32690
142+
# to flash the code
143+
make run

0 commit comments

Comments
 (0)