|
| 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 | +Digital Communication Pins |
| 51 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 52 | + |
| 53 | ++-----------------------+-----------------------+-----------------------+ |
| 54 | +| **Pin Function** | **EVAL-ADE7816 | **MAX32690EVKIT** | |
| 55 | +| | Evaluation Board** | | |
| 56 | ++-----------------------+-----------------------+-----------------------+ |
| 57 | +| MOSI | Pin 10 (U2) - Master | Pin 45 (P3.0) - | |
| 58 | +| | Out Slave In (MOSI) | Master Out Slave In | |
| 59 | +| | | (MOSI) | |
| 60 | ++-----------------------+-----------------------+-----------------------+ |
| 61 | +| MISO | Pin 11 (U2) - Master | Pin 46 (P3.1) - | |
| 62 | +| | In Slave Out (MISO) | Master In Slave Out | |
| 63 | +| | | (MISO) | |
| 64 | ++-----------------------+-----------------------+-----------------------+ |
| 65 | +| SCK | Pin 12 (U2) - Serial | Pin 47 (P3.2) - | |
| 66 | +| | Clock (SCK) | Serial Clock (SCK) | |
| 67 | ++-----------------------+-----------------------+-----------------------+ |
| 68 | +| CS | Pin 13 (U2) - Chip | Pin 48 (P3.3) - Chip | |
| 69 | +| | Select (CS) | Select (CS) | |
| 70 | ++-----------------------+-----------------------+-----------------------+ |
| 71 | + |
| 72 | +No-OS Build Setup |
| 73 | +----------------- |
| 74 | + |
| 75 | +Please see: `https://wiki.analog.com/resources/no-os/build` |
| 76 | + |
| 77 | +No-OS Supported Examples |
| 78 | +------------------------ |
| 79 | + |
| 80 | +The initialization data used in the example is taken out from the |
| 81 | +`Project Common Data Path <https://github.com/analogdevicesinc/no-OS/tree/main/projects/ade7816/src/common>`__. |
| 82 | + |
| 83 | +The macros used in Common Data are defined in platform specific files |
| 84 | +found in the |
| 85 | +`Project Platform Configuration Path <https://github.com/analogdevicesinc/no-OS/tree/main/projects/ade7816/src/platform>`__. |
| 86 | + |
| 87 | +Basic Example |
| 88 | +~~~~~~~~~~~~~ |
| 89 | + |
| 90 | +The basic example code for the ADE7816 involves initializing the SPI |
| 91 | +interface, which configures necessary parameters such as device ID, SPI |
| 92 | +mode, clock speed, and chip select. GPIO setup includes managing |
| 93 | +interrupt handling crucial for energy measurement operations. The code |
| 94 | +demonstrates measuring energy by configuring the ADE7816 for |
| 95 | +zero-crossing detection across different channels to set phases and |
| 96 | +reading active/reactive energy values. It converts raw RMS readings into |
| 97 | +microamperes or microvolts for display. Interrupts control the |
| 98 | +measurement cycle, pausing operations when triggered to ensure precise |
| 99 | +energy readings. |
| 100 | + |
| 101 | +In order to build the basic example, make sure you have the following |
| 102 | +configuration in the |
| 103 | +`Makefile: <https://github.com/analogdevicesinc/no-OS/blob/main/projects/ade7816/Makefile>`__ |
| 104 | + |
| 105 | +.. code-block:: bash |
| 106 | +
|
| 107 | + # Enable the basic example project |
| 108 | + basic_example_max32690 TARGET=max32690 |
| 109 | +
|
| 110 | +No-OS Supported Platforms |
| 111 | +------------------------- |
| 112 | + |
| 113 | +Maxim |
| 114 | +~~~~~ |
| 115 | + |
| 116 | +Hardware Used |
| 117 | +^^^^^^^^^^^^^ |
| 118 | + |
| 119 | +- EVAL-ADE7816 |
| 120 | +- MAX32690 Evaluation Kit |
| 121 | + |
| 122 | +Connections |
| 123 | +^^^^^^^^^^^ |
| 124 | + |
| 125 | +Supplying a regulated 3.3V DC to the EVAL-ADE7816 board is achieved via |
| 126 | +connector P9, which powers the ADE7816 IC and the non-isolated side of |
| 127 | +the circuit; the setup requires adjusting the jumper JP24 to position 1, |
| 128 | +2 if using an external power source like P12, as per the user guide. SPI |
| 129 | +is the default communication protocol configured for interfacing the |
| 130 | +ADE7816 with the MAX32690 microcontroller, using pins for SCLK (SPI |
| 131 | +clock), MOSI (data to ADE7816), MISO (data from ADE7816), and SS (SPI |
| 132 | +chip select). The evaluation kit supports SPI and I2C interfaces, but |
| 133 | +the included example defaults to SPI. |
| 134 | + |
| 135 | +============================ ============ ===================== |
| 136 | +ADE7816 Pin Name MAX32690 Pin Description |
| 137 | +SCLK/SCL (JP32) SCK SPI Clock |
| 138 | +MOSI/SDA (JP36) MOSI SPI Data to ADE7816 |
| 139 | +MISO/HSD (JP34) MISO SPI Data from ADE7816 |
| 140 | +SS (Slave Select) (JP38) CS SPI Chip Select |
| 141 | +RESET GPIO Output Reset Control |
| 142 | +VDD/AVDD/DVDD 3.3V Supply Power |
| 143 | +AGND/DGND GND Ground |
| 144 | +PULL_HIGH 3.3V Tie to 3.3V |
| 145 | +PULL_LOW GND Tie to Ground |
| 146 | +============================ ============ ===================== |
| 147 | + |
| 148 | +Build Command |
| 149 | +^^^^^^^^^^^^^ |
| 150 | + |
| 151 | +.. code-block:: bash |
| 152 | +
|
| 153 | + # to delete current build |
| 154 | + make reset |
| 155 | + # to build the project |
| 156 | + make PLATFORM=maxim TARGET=max32690 |
| 157 | + # to flash the code |
| 158 | + make run |
0 commit comments