Closed alexruffell closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is still present. Can anyone please look into it?
The problem
I have a CircuitSetup 6 channel energy monitor and an addon board so a total of 12 channels. I am in the process of calibrating the boards so I have a load of approximately 100W with all the clamps on the same load. For the purposes of the calibration both L1 and L2 voltage references are the same (but they come from 2 different transformers, one small as it only provides a voltage reference and another larger as it powers the electronics).
I have a Siglent SDM 3055 5 1/2 digit benchtop DMM measuring the line voltage at the transformer inputs, and I am calibrating to that as it is most likely way more accurate and stable that the chips on this energy monitor.
The issue I am seeing is that I never seem to manage to get the 4 voltage measurements to jive. I expect that to some extent but what appears to be a software bug is the fact that the voltage measurement on the 1st board and 1st chip swaps places with the 2nd board and 1st chip in terms of accuracy.
The measurements are being taken every 3s. If I take them faster the system chokes, if slower the delta goes wild likely due to relatively large time delays between when the measurements are taken (line voltage fluctuates constantly quite a bit due to loads changing).
The arrows point to where I restarted the ESP32. 3 references always seem to match while one is high by about 0.5V. Each time you press restart, it trades place with the other one... so this must be some software issue.
After writing this, I restarted and this time it opted to match all the others (which is what it should do since the circuit (line voltage) feeding both transformers is the same:
I waited a little and restarted the ESP32 and now it is L1 AO V that is high, while before the brief interval where they all matched, it was L1V that was high.
In conclusion, the calibration makes all 4 voltage measurements close enough, however every time the system starts up something happens that introduces something like 0.5V error in one of the 1st chip of the board (there are 2 of these chips per board). The issue appears to only affect chip 01.
This issue may be related:
https://github.com/CircuitSetup/Expandable-6-Channel-ESP32-Energy-Meter/issues/88
Part of the issue discussed there is the fact that L1 on board 1 also powers the ESP32 so when it transmits the voltage dips (transformers output a higher voltage than rated as the rating refers to the voltage under specific load, since there is very little load the transformers' voltage is high and dips as soon as the ESP32 draws some current, but line voltage does not actually change in the same way so the hardware modification solution provided in the last few posts fixes that but has nothing to do with what I am reporting here). I am guessing there is some bootup setup for the chips that happens and something goes wrong.
Edit:
In this snapshot both L1s were high, so I restarted and one went to normal the other remained high. So the alternating between boards was random having started in opposing states
...another restart and now we are back to having both L1s high...
Which version of ESPHome has the issue?
2022.10.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2022.10
What platform are you using?
ESP32
Board
ESP-WROOM-32
Component causing the issue
atm90e32
Example YAML snippet