Maker Pro
Maker Pro

Energy Meter energy calculation from power

You need to integrate the values over time, and scale appropriately.

Thanks for your reply. But the values given out of these registers are 32 bit. I was thinking how do I convert it to the actual value. I think there is some conversion factor.
As per the datasheet(page 58), PMAX = 33,516,139 = 0x1FF6A6B, the instantaneous power
computed when the ADC inputs are at full scale. So will dividing the value obtained from the register by Pmax give me the actual wh value ?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Instantaneous power is power and is measured in Watts. Energy is power times time and is measured in Watt hours.

There is no conversion from instantaneous power to energy. You need to take a series of measurements over time and integrate them.

If your measurement is Watts, and you take one measurement or second, then you can sum the values in Watts which will give you Watt seconds. Dividing this by 3600 will give you watt hours.

Typically you'll take measurements far more often (maybe hundreds or even thousands of times per second), so you will need to divide your sum by a larger value. You may also need to prescale the values so not to overflow your counter.

It appears that at least some variants of this chip contain Watthour accumulation registers.

Unfortunately, viewing the datasheet on a mobile phone is not conducive to getting a good understanding of the chip.
 

Harald Kapp

Moderator
Moderator
The ADE7878 does the integration. One can read the Energy in Wh (Watt hours) from the registers as noted by Bob. The value per se is meaningless unless you consider the full signal chain:
  • External analog front end (isolation transformers, voltage dividers, whatever.
  • Internal analog front end (pga).
  • ADC conversion scale
You'll have to consider your external circuit and read all the boring stuff on pages 28 ff. (theory of operation) in the datasheet. You can also directly read the digitized values of current and voltage separately from registers (page 31 ff.). When you provide your complete circuit with well known reference voltages and currents at the measuring inputs you can use the digitized values, compare them to the analog inputs and calculate the respective conversion factor. The same goes for the Energy.
Example:
  • Apply 0 V at the voltage input, read the digitized voltage (read a few values and use the mean value to minimize noise). This measurement will give you the offset of the voltage input.
  • Apply the max. expected voltage to the voltage input, read the digitized voltage. From this measurement and the known offset you can compute the parameters for the equation y=a*x+b where b = offset, a = gain, x = analog input, y = digitized output.
The inverse equation x = (y-b)/a will give you the actual analog voltage x for any reading y of a digital value.

Repeat for current, power and or energy.

Doing this will allow you at the same time to trim the error from the analog front end to an acceptable minimum.

There's some more information on the AD website, including an application note on calibration.
 
Top