-
Notifications
You must be signed in to change notification settings - Fork 425
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
High reading at the beginning #75
Comments
I am experiencing the same issue. Here is an example of my data for Vrms on a 120VAC 60hz line. My calls are
and here is my data, collected using double-buffering (into two buffers) and freeRTOS tasks, one for collecting the data and one for formatting and transmitting it. Each buffer collects 60 samples of 30 zero-crossings. The processor is an ESP32-S2 which has a 13-bit ADC (odd one in the ESP32 family). It is running at 240MHz. I experimentally found the zero crossing to be around 5080 ADC counts out of the 8191 total counts. So, I modified the zero crossing code as follows:
This always finds the zero cross and never times out. The data really is "all over the place". Suggestions? jsonPayload = [202.36,207.04,204.42,204.58,204.11,197.25,196.75,195.85,196.28,202.12,194.21,199.55,196.19,196.18,192.40,196.45,192.51,189.70,187.56,192.37,192.68,197.98,192.90,192.92,188.10,191.15,191.23,192.68,190.68,187.25,182.89,187.23,179.76,179.20,184.23,185.53,186.32,190.52,181.94,179.35,180.94,175.87,185.37,176.22,187.83,178.59,179.37,177.65,169.26,171.55,184.82,175.99,177.49,176.13,179.60,175.19,175.88,175.01,176.00,178.54] |
And, I'm pretty sure my power line is not THAT noisy. |
ّI have precisely the same form shape when I start running my system. It might say that it is just for a few seconds, but I have a big load, and it adds few extra GBPs £ for consuming nothing. |
I dug into this a bit more and now understand why the high readings at first...
So, overtime, it does in fact get closer but I believe it still tends to "drift" that center point. So I changed the initial offset to my experimentally (on the bench with oscilloscope) zero-crossing count.
Now, we start off in about the right place, but the noise is still very high... I am trying some alternatives and will report back. |
Did you fix the issue and manage to get stable reading? |
I have a problem measuring the Amps and kWhs for a few devices. The lib is so precise; nevertheless, after a while. In the beginning, I received a very high reading, and it kept reduced for a few cycles of the code until it settled to the precise value. Please advise.
Thank you.
The text was updated successfully, but these errors were encountered: