mandulaj / PZEM-004T-v30

Arduino library for the Updated PZEM-004T v3.0 Power and Energy meter
MIT License
256 stars 108 forks source link

Issue with 16 current coils muxed together with a single PZEM #121

Open prahadeeshwaran-k opened 3 months ago

prahadeeshwaran-k commented 3 months ago

My project is to datalog voltage, current, power, energy, frequency, and power current for 16 appliances using a single PZEM and 16 current transformers. I use a 16-channel analog mux in a round-robin format but there is an issue with the mux: the current & power values are amplified, so I need to offset the current value in PZEMLib manually. I cannot figure out what to do nor know if there is another way.

The test lode is a simple 9w led

The real value is a normal pzem connection without any modification Real value

The in Muxed value single pzem connection the coil with the mux and the mux sig to pzem coil in pin Amplified vaule

The sample connection diagram energy monitoring2_bb I know there is an isolation need

mandulaj commented 3 months ago

First of all, note that your energy value will probably be incorrect as the PZEM chips perform their own power integration (which assumes the voltage and current from a single CT) So if you run a round-robin through multiple CTs, I wouldn't be so sure the integrator doesn't get confused. I would read the voltage, current and power factor for each sensor and perform my integration (even though this will also introduce some issues as you won't have the full high sampling rate of the power waveforms)

What I see as a more serious issue is that the Mux seems to completely distort your current signal. The real power factor of the test LED is 0.95 while using the Mux it seems to be 0.06. This could be because the mux introduces some sort of phase delay. If you can, I would check the signals with an oscilloscope. For AC power measurement, the timing between voltage and current wave forms and their shape is very important!