-
Notifications
You must be signed in to change notification settings - Fork 354
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
Calculation error due to using uint16_t = 65535? 66.5kW = 0.5kW! #199
Comments
Also, there is an error during compilation:
|
I'm seeing the same "read" warning and started a new issue. I think this lib is not maintained/updated. |
I also thought that the project was abandoned. That's why I found the PZEM-004T-v30 library and switched to it. It turned out to be more convenient to work with it and the answers are accurate. However, there are errors there too :) |
I use it for reading industrial sensors typically flow meters. It works but there are a lot of issues opened and just wonder what happened to the author? |
Are you sure that your power meter can handle more than 65535W? uint32_t i = (uint32_t)node.getResponseBuffer( 0 ) << 16; |
I'm sure) When switching to another library, everything works fine. |
I didn't notice the gaps in the used registers before, in your code: |
When the active power (W) and accumulated power (Wh) measurements are exceeded, the buffer overflows.
For example:
65.535 kWh is the limit after which it starts counting from zero.
i.e. 65.537 kWh = 0.001 kWh
6553.5 W is the limit after which it starts counting from zero.
6553.7 W = 0.1 W
I really liked this library, I ask you to improve it!
Or please advise me how to fix this error ;)
The text was updated successfully, but these errors were encountered: