4.4 Energy Meter Configuration
Include files are used to initialize and configure the energy meter to perform several metrology functions. Some of the user configurable options that are available are listed in this section. The file that needs modification is emeter-1ph-bare-bones-afe.h in the emeter-ng directory. It includes macro definitions that are used during the normal operation of the meter.
• MAINS_FREQUENCY_SUPPORT: The macro configures the meter to measure the frequency of the mains.
• MAINS_NOMINAL_FREQUENCY: The macro defines the default mains frequency, which is a starting point for dynamic-phase correction for nonlinear CTs or other sensors for which the phase changes with the current.
• TOTAL_ENERGY_PULSES_PER_KW_HOUR: This macro defines the total number of pulses per 1 kWh of energy. In this application, it is defined as 1600. Note that this value is not a standard, but it is widely used by many meter manufacturers. There could be a practical limit set on this number due to the reference meter's ability to accept fast pulses (due to large currents).