|
SparkFun Qwiic Current Sensor - ADE7953
v1.0.0-3-g9a02684
Arduino Library for the SparkFun Qwiic Current Sensor (ADE7953)
|
Header file for the SparkFun ADE7953 Energy Meter Driver. More...
#include <stdint.h>#include <sfTk/sfToolkit.h>#include <sfTk/sfTkII2C.h>Go to the source code of this file.
Classes | |
| union | sfe_ade7953_config_reg_t |
| Bitfield union for the 16-bit CONFIG register (0x102). More... | |
| union | sfe_ade7953_lcycmode_reg_t |
| Bitfield union for the 8-bit LCYCMODE register (0x004). More... | |
| union | sfe_ade7953_disnoload_reg_t |
| Bitfield union for the 8-bit DISNOLOAD register (0x001). More... | |
| union | sfe_ade7953_irq_reg_t |
| Bitfield union for the 32-bit IRQ enable and status registers. More... | |
| class | sfDevADE7953 |
| Platform-independent driver for the ADE7953 energy metering IC. More... | |
Typedefs | |
| typedef enum sfe_ade7953_pga_gain_t | sfe_ade7953_pga_gain_t |
| PGA gain settings for the PGA_V, PGA_IA, and PGA_IB registers. More... | |
| typedef enum sfe_ade7953_zx_edge_t | sfe_ade7953_zx_edge_t |
| Zero-crossing edge selection for CONFIG register bits [13:12]. More... | |
| typedef enum sfe_ade7953_clamp_t | sfe_ade7953_clamp_t |
| Supported clamp-on current transformers. More... | |
Enumerations | |
| enum | sfe_ade7953_pga_gain_t : uint8_t { ADE7953_PGA_GAIN_1 = 0 , ADE7953_PGA_GAIN_2 = 1 , ADE7953_PGA_GAIN_4 = 2 , ADE7953_PGA_GAIN_8 = 3 , ADE7953_PGA_GAIN_16 = 4 , ADE7953_PGA_GAIN_22 = 5 } |
| PGA gain settings for the PGA_V, PGA_IA, and PGA_IB registers. More... | |
| enum | sfe_ade7953_zx_edge_t : uint8_t { ADE7953_ZX_EDGE_BOTH = 0 , ADE7953_ZX_EDGE_NEGATIVE = 1 , ADE7953_ZX_EDGE_POSITIVE = 2 , ADE7953_ZX_EDGE_BOTH_ALT = 3 } |
| Zero-crossing edge selection for CONFIG register bits [13:12]. More... | |
| enum | sfe_ade7953_clamp_t : uint8_t { ADE7953_CLAMP_ECS1030 = 0 , ADE7953_CLAMP_SCT013 = 1 } |
| Supported clamp-on current transformers. More... | |
Header file for the SparkFun ADE7953 Energy Meter Driver.
sfDevADE7953 is a comms-agnostic driver for the Analog Devices ADE7953 single-phase energy metering IC, built on the SparkFun Toolkit. This driver focuses on current measurement via CT clamp (Channel A primary, Channel B optional) with support for gain configuration, zero-crossing detection, peak measurement, and interrupt handling.
SPDX-License-Identifier: MIT
| typedef enum sfe_ade7953_clamp_t sfe_ade7953_clamp_t |
Supported clamp-on current transformers.
Passing one of these to setCurrentClamp() applies the matching turns ratio and a suitable PGA gain for the board's 5.6 ohm burden resistor. Users with a different clamp can call setCurrentClamp(float) (or setCurrentTransformerRatio()) to enter a turns ratio directly.
| typedef enum sfe_ade7953_pga_gain_t sfe_ade7953_pga_gain_t |
PGA gain settings for the PGA_V, PGA_IA, and PGA_IB registers.
These map to Bits[2:0] of the respective register. A typedef is provided so the type can be used without the enum keyword in environments where that matters.
| typedef enum sfe_ade7953_zx_edge_t sfe_ade7953_zx_edge_t |
Zero-crossing edge selection for CONFIG register bits [13:12].
| enum sfe_ade7953_clamp_t : uint8_t |
Supported clamp-on current transformers.
Passing one of these to setCurrentClamp() applies the matching turns ratio and a suitable PGA gain for the board's 5.6 ohm burden resistor. Users with a different clamp can call setCurrentClamp(float) (or setCurrentTransformerRatio()) to enter a turns ratio directly.
| Enumerator | |
|---|---|
| ADE7953_CLAMP_ECS1030 | SparkFun ECS1030-L72: 30A:15mA (2000:1 turns), 4x PGA gain. |
| ADE7953_CLAMP_SCT013 | SCT-013-000: 100A:50mA (2000:1 turns), 1x PGA gain. |
| enum sfe_ade7953_pga_gain_t : uint8_t |
PGA gain settings for the PGA_V, PGA_IA, and PGA_IB registers.
These map to Bits[2:0] of the respective register. A typedef is provided so the type can be used without the enum keyword in environments where that matters.
| enum sfe_ade7953_zx_edge_t : uint8_t |
Zero-crossing edge selection for CONFIG register bits [13:12].