Why things don't add up in the app - the real reason (and fix) #287
Replies: 9 comments 25 replies
-
Great progress. Does your approach also work for three phase systems? |
Beta Was this translation helpful? Give feedback.
-
BTW so if the above is implemented, then it also becomes super easy to calculate power factor. Remember that the SAMD09 already sends the power values (for each phase) and the current RMS to the ESP. Once we have the correct real power, the apparent power is simply the RMS values of V * I , like the SAMD09 already sends to the ESP. So then we can simply divide real power by apparent power and there's your power factor. Or in other words, for single phase, or 2 phase users (with 180 degrees shift of course) they can already do that. No need to mod the SAMD09 in that case. All that needs to be done in that case is have @flaviut's firmware multiply (V RMS) * (I RMS), like it already gets from the SAMD09 (!), and then divide the real power (which it also already gets from the SAMD09) by apparent power. Actually, 3 phase users can also already do it now. But only as long as they connect breakers between L+N of course. But that's the 'normal' scenario anyway. Only some devices that need 220V-240V will be connected between 2 phases anyway. I think in my home it are actually only the air conditioners, and maybe my oven that need 220V. BTW, haha, that just made me think of this post: #2 (reply in thread) which now finally makes sense too :) His problem was not the power factor, but his connection between 2 phases with 120 degrees shift. |
Beta Was this translation helpful? Give feedback.
-
Actually, thinking about it, the easiest way would be to just make the ESP packet bigger. And then instead of sending for each CT (what it does already now) -> V1 * I We simply add for the 16 smaller CT's: (V1-V2) * I So instead of sending 3 power value's per CT, we send 6. That way there's no need to send any 'configuration message' to the SAMD09. We can then simply determine in the ESP firmware which of the 6 above to use. That's of course the reason they're sending those 3 value's right now too. So we can just expand on that. The only question is if the SAMD09 is fast enough to do this, I already ran into speed problems, not sure if there's enough time left to add 48 times a subtraction and multiplication. Would have to find out about that. If not, we could then either lower the sample rate or bit, or implement the configuration packet like I suggested above. Either way, changing the communication between ESP and SAMD09 would either mean we'd need @flaviut's firmware to be able to handle that, so there should be some YAML setting to let it know which of the 2 types of 'sensor reading' packets to expect. |
Beta Was this translation helpful? Give feedback.
-
I'm using myself this now, it's quick n dirty but works really well: https://github.com/gekkehenkie11/Emporia-VUE-fix/tree/main So I now have 8 ports configured for 2 phase connection and the others should be between phase and neutral. If you want to change this number you can simply change line 618 where it says if (Muxnr < 4) to for example if (Muxnr < 2) So then it would only use the first 4 ports for our special treatment. So if you only have 4 devices at home that need 2 phases then you could do it like that. The port ordering is: 10, 2, 11, 3, 12, 4, 9, 1, 13, 5, 16, 8, 14, 6, 15, 7 So if you changed it into Muxnr < 2, it would then have ports 10, 2, 11 and 3 for 2 phases. With some work it could become a lot nicer and easier (like described above) but for now I've invested already waaaay too much time into this and it works now very well. So for the moment I'll just leave it like this. EDIT I've also just uploaded a precompiled version, ready to be flashed. |
Beta Was this translation helpful? Give feedback.
-
LOL I actually have way more 220V devices in my house than I had thought :) All my split unit AC's, my solar, my oven, washing machine, coffee machine, tumble dryer, car charger and there are more that I haven't even identified are running between 2 phases. I now have one VUE completely flashed for 220V ports, so that also makes it easy to remember how it's all configured. It's so damn awesome to FINALLY have correct value's. BTW I did find in all of my experiments that some of the CT's might have (slightly) higher or lower current measurements than others, so if after the above mod you still have some (slightly) different values than expected (like within 8%) you could try to change the CT, it fixed one last weird thing I saw. |
Beta Was this translation helpful? Give feedback.
-
Hello @gekkehenkie11, |
Beta Was this translation helpful? Give feedback.
-
Hello @gekkehenkie11, I have 2 devices in 2 different buildings which I just found "Phase B Phase Angle" for both : About your workaround : (V1-V2)*I Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your feedback. So I should remove *pos in the filters here below ?
Maybe even remove completly filters since multiply by 1 doesn't do anything ?
|
Beta Was this translation helpful? Give feedback.
-
Following this thread. I just recently finished flashing my Gen 3 (NA with a handful of 220v breakers, only measuring a single leg) with this firmware and noticed that when compared to what was being reported by my power company, it was off by quite a bit.
|
Beta Was this translation helpful? Give feedback.
-
Over the years there's been a lot of discussion on the Emporia forum about why things don't add up in the app. It first was theorized by some users that the Emporia VUE probably would measure apparent power instead of real power. Which seemed to make sense: according to my VUE2, my Air conditioner would use about 800 Watt running but 120 Watt standy. I tested with some other devices that all came to about 6-8 Watt standby and a power factor near 0 in standby mode. So I thought the Emporia indeed measured apparent power for a long time.
Then I started looking into making an open source firmware for the Emporia Atmel chip: #173 and to my surprise I learned that the Emporia actually was measuring real power. In the world of samples, real power is simply V * I and then averaging that, what they indeed did! Then I called in the help of my brother who has a major in electrical engineering. I dumped buffers of voltage and current samples and supplied them to him. He first theorized, based on these samples, that it was a timing problem within the Emporia. But then when I supplied more samples, it seemed there were some problems that didn't make sense and couldn't be explained that way. Then he asked me to describe EXACTLY what I've been measuring and that finally led to the answer :) So here we go:
The problem arises for 3 phase users, however ALSO for some specific 2 phase users in North America. Our own hero @flaviut actually is one of those, going by this post:
emporia-vue-local/emporia-vue2-reversing#1 (comment)
Because this is the exact problem! Whenever somebody's electrical system has 120 degrees shift between the voltages and if they then supply 2 phases to a breaker, for example to connect a 220-240V air conditioner things go wrong...
Here on Aruba we have 3 phases: 127V between neutral and phase and 220V (and 120 degrees) between the phases. So the thing is, that THIS is what happens to the resulting voltage when you connect a breaker to two phases:
The resulting Voltage has a phase shift of 30 degrees and a multiplier of V3 (=1.73). So in this case you can not simply do V * I per sample and then simply use a 2.0 multiplier!! The correct way to calculate it in this scenario is:
(V1 - V2) * I
So we should take the difference between the two voltages and multiply THAT with the current!!
With this modification my Emporia VUE2 all of a sudden becomes super accurate :) I get close to 6W now in standby and close to 710 Watt when the air conditioner is on which is really close to what it indeed is (before, with multiplier 2.0 I got close to 800-830 which is too high).
EDIT There's actually a super simple alternative to this. Just use 2 breakers and add the power values up! With Emporia stock firmware this would never work since it would select the wrong phases, but I just tried it and if you lock the right phases this indeed works too! So you would just need an extra CT if you use 2 phases per breaker. Make sure that you don't use filters like 'abs' or 'pos' though, since one leg actually might become negative by design! For example my air conditioner in standby yields +30W on one leg and -22W on the other, so 8W in standby which is correct.
That's it!! I can't thank enough my brother for dedicating his time to help figure this out. Without him I'm sure I still would be banging my head against the wall about all this, haha :) Thanks bro :)
Beta Was this translation helpful? Give feedback.
All reactions