No, nothing to with calibration, I tested actual current transformer produces, and it’s badly nonlinear with low currents.
Also, resolution and accuracy do increase if more turns in the transformer, for example see this, It’s 10 times here, but the principle is would be the here using two transformers for 2 time increase.
Your solar inverter actually produces very high frequency pulses into the mains, the average of which is a reasonable approximation to the mains waveform.
However it has a great deal of electrical noise on it (like loads of spikes).
These can really confuse things expecting a fairly nice sine wave.
If you can put ferrites around the conductors, they will limit the high frequency noise.
Also keeping your clamp as far away from the inverter as you can may help reduce how much of the high frequency noise is seen but the PZEM module.
Steve
Can indeed confirm you can wire two current transformers in parallel, and it works fine. (probably need to be in the same orientation). This can be slightly expensive alternative for increased accuracy if looping incoming wire can’t be feasibly done.
By default the pzem004t have all the same address I think. Changing them so that each module got a unique address is necessary when you want to use more than one on the same bus
Thanks for the reply, but I’m a newbie and don’t know how to proceed.
As reported here Peacefair PZEM-004T V3 Energy Monitor — ESPHome
I tried inserting the code, and actually in the log I notice that the modbus address is changed. But according to the link this code needs to be cleared. So I wonder, how should I proceed. Do I first write the code for three Pzem sensors giving each one its own ID, then temporarily paste the code to change the address and repeat three times, each time with a different ID?
You just need to change the address in the yaml (based on this snippet) and attach the next module.
So uploading the yaml with address x and attach one pzem module
Then check logs if it works (like you did already) go ahead disconnect that module and at best mark it (write the address on the module itself for future reference).
Then you do the same by uploading a yaml but with a new adress, again attaching one module and so forth.
In the end you have modules with different address and can just proceed like normal - the yaml snippet for code changing shouldn’t be present anymore - it only needs to be one time and is save in the module.
Recently, on advise, I received a PZEM004T-V3 and attached it to a Wemos D1 R2 (in ESPhome). Got it working and it gives pretty expected results.
The official documentation, yes I try to read the RTFM, gives the yaml sketch how to give each PZEM a different UART id. The only reason for this can be only when you attach multiple PZEM to one ESP. However the (perfect) yaml sketch and the master/slave UART requirements are a bit missing in this official documentation.
Yes, you can derive this info from the different PZEM topics but it would be nice if best practice is collected in the official documentation. I am too fresh in this topic to update this myself. Anyone?
I notice some people calibrate were other people use the PZEM as-is. Is there still a need for it with V3?
No, pzem’s come pre-calibrated and I never noticed people try to calibrate this device Any source to this? Tasmota docs even claim that they “can’t” be calibrated - in esphome obviously you could filter the results and use something like calibrate_linear but most likely just make the readings worse with this.
I wish I could guide other people to the perfect multi PZEM and show them what needs to be done in case single master UART or perhaps the other option of using multi UARTs but that is a bridge too far for me at this point in time. True I can copy and paste but not verify yet if it is all valid,
calibration remark is clear, but even for starters like me a dummy remark could be helpful:
“There is no need to calibrate the PZEM, ESP functions like calibrate_linear will not improve results.”
BTW Did some comparing with an old water cooker and the results were pretty in line. I was able to compare the PZEM (1051w) against Electricity Meter Power consumption phase L2 of DSMR (1049w) yesterday which agrees on this calibration (the cooker itself was 900w but likely the build up whitewash (kalk) residue changed this).
At this point I also not able to improve my github skills and update the documentation because I am on the edge of going on holiday and my girlfriend will drag me from my PC any moment.
I see diagrams over internet and the connections of Live and Neutral differ. Here is the one that comes with the manual and here one diagram from tasmota.
I am powering the pzem and esp32 from AC similar to this. So the charger supplies 5V to the esp32, then the esp32 supply 5V to the pzem TTL and at the same time the pzem AC part get its proper power. It might happen that when connecting the plug to the wall, the L and N would be reversed. However, it seems that it doesn’t matter I just tested it and it seems to work just fine.
It work normally, but after a few hour, 1 pzem always lost readng data (crc error in logs) another 5 pzem reading fine.
If I remove 1 of pzem cable, another 5 pzem will read data normally.
So I remove 1 pzem out use only 5 pzem and it work fine for month now.
Here is my final version of yaml file that all 5 pzem working fine.