Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line Current Offset calibration #30

Open
bilalfarooq002 opened this issue Mar 7, 2022 · 1 comment
Open

Line Current Offset calibration #30

bilalfarooq002 opened this issue Mar 7, 2022 · 1 comment

Comments

@bilalfarooq002
Copy link

Hi, i am trying to calibrate the ATM90E26 metering IC using this library and i have also created some custom functions to calibrate voltage gain, current gain etc, but when i try to calibrate Line Current offset by writing offset value to IoffsetL (register 35H) there is very small change in the Line Current rms. But whatever value i put in the offset register i am not able to make it zero.

here are voltage and current gains
ugain = 0x67A3
igain = 0x1AC6

i have tested the voltage and current gain values and i am getting accurate values with less than 1% error.

here is the code where i am calculating the current offset:

image

this is the same formula as described in the application note, furthermore i have also tested by putting in value from 0 to 50000 in 16 bit IoffsetL register just to see if maybe i was putting wrong value of current offset and also to see the behavior of current offset. I noticed the no matter what value i put in the current offset it never makes the Irms current value zero.

Here is the place where i am setting the current offset and current, voltage gain:

image

image

here is the place where i am apply the calibration in the code, this is in the prebuilt CalibrateEnergyIC() function:

image

If anyone has done current offset calibration, please share your experience,
thanks

@ripper121
Copy link

Did you found a Solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants