Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
I have a solar inverter monitoring system that monitors some parameters from a solar setup like. Parameters like energy generated by solar panel, energy consumed from grid, energy consumed from inverter itself, and some other parameters,. The data is been stored in a server, and while reviewing the data been sent, it was observed that we were getting negative values something, which to me was impossible. After reviewing the code, i realized that the issue was actually some few lines of code. For example:
1. The variable that monitors the Ac current reading was declared as a float which is fine, but 0.2 was deducted from the result, assuming the current read is zero(0), it means the variable will now hold 0-0.2 = -0.2.
2. The variable that monitors inverter output ac voltage was also declared as a float which is fine. But when the inverter system is not giving output(the system is off), it still reads some values of around 10v or there about. Initially in the code what i did was anything less than 65 v, i take it as zero(0). But for some reasons unknown to me i commented out the code.
now power is normally P= I * V, now power will be seeing -0.2 * 10= – which is not meant to be 2 watts.
After going through the code, i observed this and corrected the issue. Above is the code snippet and the data on the server. You can observe that Power consumed is negative
CONTRIBUTE TO THIS THREAD