# 3-phase power consumption measurement

**URL:** <https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489>\
**Category:** Hardware\
**Created:** [2 October 2022 14:40 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489 "2022-10-02T14:40:38Z")\
**Posts on this page:** 6\
**Page:** 11

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 April 2023 08:02 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/206 "2023-04-13T08:02:56Z")

</div>

Here's a link to the thread about connecting a PZEM-004T to a Wemos D1 Mini flashed with Tasmota.

> [@Need to write one function that will return 3 values](https://discourse.nodered.org/t/need-to-write-one-function-that-will-return-3-values/30931/12):
>
> This is the module I used PZEM-04 0-100A from BangGood with a serial connection to Wemos. I cut the USB connector off the end of the lead and fed the Tx and Rx signals through level shifters as the PZEM-04 used 5V logic and the Wemos is 3v3. It took quite a lot of trail-and-error to find the best pins to use on the Wemos with Tasmota. I can draw out the circuit/schematic over the weekend if you need it.

It includes one of my "rough" sketches showing the connections/diagram.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [13 April 2023 08:32 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/207 "2023-04-13T08:32:39Z")

</div>

> [@dynamicdave](#):
>
> Here's a link to the thread about connecting a PZEM-004T to a Wemos D1 Mini flashed with Tasmota.

Thanks, I know how to do that, I am playing with node-red-mcu and using this as another testbed.

---

<div class="post-metadata">

**Author:** ![phoddie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/phoddie/32/64232_2.png) [@phoddie](https://discourse.nodered.org/u/phoddie)\
**Post date:** [15 April 2023 00:36 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/208 "2023-04-15T00:36:56Z")

</div>

I found my PZEM-004t set-up and built a simple flow for ESP32. It works nicely. Here's a sample flow and configuration. The Inject node controls the frequency of sensor readings.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/8756c0549c1692c34daa576228c4ce24524e1b84.png)

FWIW – because it is a debug build, the default UART port is taken by the debugger connection, so it uses UART port 2.

This should work on ESP8266, just with different pins and port. I'll try to make time to try that too.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 April 2023 12:48 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/209 "2023-04-15T12:48:50Z")

</div>

I have the PZEM on order, but it will take a couple of weeks to get here.  
My S2 Minis should be here soon, so I will probably try one of those with it, so I can try the OTA updates too.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [14 May 2023 17:38 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/210 "2023-05-14T17:38:27Z")

</div>

> [@Sean-McG](#):
>
> I eventually got some more to test and can confirm they work well wired as per
> 
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/9/198ed65558c65871d8e790a69f42a8c1663b09b8.png)

**Just a note to my future self and anyone interested** ,

If you are using this on a Wemos D1 mini, the RX pin is held high by the onboard USB serial chip, (1K I believe). So the Pzems are not able to pull the pin low when wired like this.

In this case select a **different** gpio to use for the RX eg GPIO 5.

I figured this out after an afternoon of head scratching, shame I don't have a scope 😉

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 August 2023 17:38 UTC](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489/211 "2023-08-12T17:38:40Z")

</div>

Closed on 12 August 2023 17:38 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/3-phase-power-consumption-measurement/68489.md?page=10)
