I saw a lightning in the distance, and at the same time one of our RCD tripped
Fortunately the HASS installation and WiFi router were on a different circuit and kept running
The PZEM is not specified to measure such high voltages, but I think it can be interesting to post the data here in case someone can provide more insight:
(The 17:30 minute mark is bugging me: why would the ESP send values earlier than it should? Can a voltage surge cause that? Is this an interpolation by HASS when the sensor disconnects & later reconnects?) UPDATE: It is! see here
It read 214W to 216W until 21:17:30, when it read 30.337.052W. Then there is a gap, and at 21:18:28 it read 142.055.264W. Afterwards it was reading 71-60W. Time travelers, you are welcome!
Unfortunately neither AC current nor AC frequency were enabled, so that’s all the data we have.
There’s a household surge protector - I hope it helped a bit? No electronics seem to have been damaged
Reverting the moving average, and assuming the 21:17:30 sample is ficticious/interpolated by home assistant, there could have been an instantaneous measurement of ~5092V (?)
Anyone knows what’s the true maximum voltage that can be read by PZEM-004 V3?
However there’s still the mystery of why there is no sample at 21:18:18. Does someone know how are disconnections handled by HASS/ESPHome?
According to the SD3004’s datasheet, this energy meter uses a voltage divider that goes to an ADC:
With those resistor values, the maximum theoretical voltage that the device can mesure is 5000V, which is darn close to the estimated measurement.
However, the rest of the circuit wouldn’t stand such high voltages; It’s more likely there simply was an electromagnetic interference and the device went “nuts” (as well as one of the RCDs)
Maybe the EM pulse was captured by the AC current probe, which is a very large coil.
However there were plenty of lightning that night, and this only happened with the one that made the RCD trip.
(still think the ADC is internally limited to measuring 5V, this is 5kV after the voltage divider, and 500A for the current clamp coil. not considering RMS though )
It turns out that’s a (confusing) interpolation that HASS incorporates upon sensor disconnection.
I’ve migrated the data to influxdb and there’s only one “high voltage” sample (remember it’s after a 20 sample moving average though, read comments above)
That’s cool. Years ago I made a lightening detector for physics class (high school) by connecting a Tesla coil secondary through an op-amp to an A-D converter. Computer would scan the output of the A-D converter via parallel port in a continuous loop and plot the points on a graph. Written in QBasic.