Why the emphasis on power rather than energy? #211
Replies: 1 comment
|
Just thinking aloud for now, and taking into account this is my first use of microcontrollers. The goal is to make the system as similar as possible to a utility meter, in the sense that 1) it keeps accumulating energy consumption, even across power interruptions and 2) you can look at/query the counter(s) when you want. (If you are familiar with the SunPower PVS6 "hidden" interface, that's what I am trying to replicate). If I understand correctly, the energy registers on the ATM chip are reset whenever they are read. The ESP can of course accumulate the reads, so we now need to persist across power resets. I understand that the unit for flash writes is 4k, and let's say the values to persist fit in 4k. Let's say I persist values every 5 minutes, that 105k write/year, that's roughly the number of possible writes. If I can afford 1MB of flash, that's 250 years. So it looks like we are safe, we could even go down to persist every minute. Of course, we rotate the 4k blocks, so can keep about one day of measurements (and if we have only 1k of data, we can keep 4 days). So we can take down the machines pulling the values for a little while, and they can catch up when they come back up. If we can have one day of data, this also opens the possibility of uploading from the ESP to some "distant" server not too frequently: I do that with the PVS6+raspberry pi: the pi fetches values every 2 minutes, and every day uploads via ftp to my hosted virtual machine. On top of that, I am thinking a simple http server on the ESP, to either access the persisted values, or to read the other ATM registers that are not persisted. Is my understanding of what's possible good enough to further investigate? Thanks. |
Uh oh!
There was an error while loading. Please reload this page.
I recently stated with this system, and did a default installation of ESPHome and Home Assistant. I noticed that the emphasis is on power rather than energy (e.g. the default setup is to get power for each CT, but energy only for the whole system). For my application, I care more about energy, so I would think that it's best to get energy out of the ATM chips rather than integrate downstream. After all there is a good reason for the ATM chips to integrate power at 1MHz.
Do I miss something?
Similarly, I would think it is better to handle energy over intervals [0, t_i], rather than over [t_i, t_i+1]. If I loose one of the measurements, say E (0, t_k), I can still compute the E (t_i, t_j) (for i and j <> k), whereas if I loose one E (t_k, t_k+1), I also loose all the intervals that include k, not just those that start or end at k. It seems that the ATM90E32 clears the energy registers when they are read, so the ESP would have to maintain the sums. Is that correct?
Thanks.
All reactions