3-phase power consumption measurement

Paul, the diodes in your circuit are the wrong way around. You need an AND circuit: the input to the level shifter (and the esp32) should only be high if all the outputs of all PZEM's are high. So any PZEM can pull the line low. To do that, the current needs to flow from the level shifter into the PZEM, hence the "arrow" of the diode needs to be the other way around.

The reason is that the serial protocol line is high when idle. So when all PZEMs are idle they all output a high level. When any starts transmitting it starts with a start bit, which is low.

The final piece you need is a pull-up resistor between all the diodes and the level shifter, The PZEMs can't pull the line high (that's the purpose of the diodes), so you need a resistor to do the trick. I would start in the 4.7k range, but it's gonna depend a bit on baud rate, diodes, PZEM output drive...

3 Likes