Hello,

i need some help to calculate the right values for following registers:

WTHR0, WTHR1, VARTHR0, VARTHR1, VATHR0, VATHR1

i want to have an LSB of 1varh / 1Wh.

so i took the equation of the datasheet: VARTHR = (PMAX x fs x 3600 x 10^n) / (Vfs x Ifs)

1varh -> n = 0

Vfs = 196,006Vrms when ADC has 0,5Vpp

Ifs = 11,048Arms when ADC has 0,5Vpp

so i get the following values:

VARTHR = (33516139 x 8000 x 3600 x 1) / (196,006 x 11,048)

VARTHR = 0x67C8E5EA45

VARTHR0 = WTHR0 = VATHR0 = 0xE5EA45

VARTHR1 = WTHR1 = VATHR1 = 0x67C8

but when i'm measuring energy the result seems to be incorrect!

is anything wrong with my calculation?

regards,

Stefan

Hi Stefan

I would like to refer to the equation 1 in page 4 of the Calibration App Note. The value of 'alpha' in the equation cannot be zero or negative. Based on the value of MC that you are designing your meter for, to get a value of CFxDEN >0, you will need to pick a proper 'alpha'.

Keeping this mind, select a proper value of 'alpha' and see if the results make sense then. Or else, kindly let me know what register values you get and what is the conversion constants you have calculated like Wh/LSB.

Regards

hmani