I'd like my accumulation registers to reflect real world energy values, with a 1 Wh/LSB constant. Making use of equation 26 on page 50 of the ADE7878 datasheet I get a very high number that makes the registers to be zero all the time.

WTHR = PMAX × fs × 3600 × 10^n / (Vfs × Ifs)

PMAX = 33516139

fs = 8000

n = 0

Vfs = 447.6 (1 Vpp ADC input)

Ifs = 3.54 (1 Vpp ADC input)

The result is 0x08DD69585ED, which makes WTHR0 = 0x009585ED and WTHR1 = 0x00008DD6. If I use those numbers xWATTHR will be zero even after tens of seconds (default read-with-reset enabled), when I apply inputs that generate hundreds of watts in the xWATT registers.

However, if I change the xWTHR registers for new values WTHR0 = 0x00000000 and WTHR1 = 0x00000003 I can see some non-zero values in the xWATTHR registers.

What I am making wrong in the calculation?

Hi edmont

100W accumulated for 10 seconds is still 0.277Wh (100*10/3600), but you desire to have a constant of 1Wh/LSB. So, that might be why you aren't seeing any accumulation. Anyways, I would recommend that you use a WTHR value equal to PMAX (0d' 33516139) or if you want, you can go slightly larger than that. The higher your WTHR value, the larger your Wh/LSB constant will be and that means that the resolution is getting worse. You cannot set WTHR to be less than PMAX anyways. So, the best possible value to start with would be equal to PMAX, because you are then utilizing the maximum available resolution. For instance, if I plug in your Vfs and Ifs values in the equation and set PMAX=WTHR=33516139, the value of 'n' that I get is -4.26. This means that 1 LSB in the active energy register would correspond to 0.1mWh. For every 0.1mWh, you will get a bit in the register.

Please let me know if you have any further questions.

Regards

hmani