How to connect pzem 017 DC with nodemcu

I have a question. Can I also measure negative current with PZEM-017? I would like to measure the charging and discharging of a battery in a solar system with it.

Hello, it’s not like INA22x, it measure current/power only one way. Thus is useful to measure energy from PV panels, for example.

Just read the manual :wink: https://thesunpays.com/downloads/files/Battery%20SOC%20meters/PZEM-003%20017User%20Manual(MEDC300V).pdf

I’m using this power monitor with modbus integration, because haven’t found a way how to use this integration with RS485 adapter without automatic flow control, like standalone MAX485. It requires flow_control_pin. Any suggestions?

EDIT:

I’ve got it…

# ESP32     MAX485  PZEM-017
#
# GPIO10    DI
# GPIO20    RI
# GPIO21    DE+RE
# GND       GND     GND
# 3V3       VCC
# 5V                5V
#           A       A
#           B       B

uart:
  baud_rate: 9600
  data_bits: 8
  stop_bits: 2
  parity: NONE
  tx_pin: GPIO10
  rx_pin: GPIO20

modbus:
  flow_control_pin: GPIO21

modbus_controller:
  address: 30

i try to coment on patreon and i have to pay to do so so bad advertising

Did anyone has checked the accuracy of Pzem 017?

I’m using it with 50A shunt to monitor my solar installation in real time. And yes, I have programmed pzem 017 to use 50A shunt too. I have a mppt charge controller which also display on its screen the realtime voltage, current, power and kWh for the day. My setup has max current of 18.5 A, max voltage around 96V seen so far from panels.

The charge controller and pzem 017 kWh readings have differences. For production above 5 kWh, I have seen a difference of 4% (pzem 017 overreporting by approx 4% or charger underreporting by 4%) but below 2kWh, the difference is huge (pzem 017 overreporting by approx 25% or charger underreporting by 25%).

Pzem 017 claims to be accurate to 1% but without actual accuracy it is impossible to blame pzem 017 or mppt charge controller.

I don’t have a constant dc load on pzem 017, so I would like to know if someone has done some accuracy tests.

Here’s my approach to make it “natively” wireless :slight_smile: GitHub - taHC81/pzem017-wireless: Built-in wireless functionality with ESP32-C3 and ESPhome

esphome:
  name: pzem-017

esp32:
  variant: ESP32C3
  board: esp32-c3-devkitm-1

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password

api:
ota:
logger:

uart:
  baud_rate: 9600
  data_bits: 8
  stop_bits: 2
  parity: NONE
  tx_pin: GPIO10
  rx_pin: GPIO20

sensor:
  - platform: uptime
    name: "PZEM-017 uptime"
    update_interval: 30s
  - platform: wifi_signal
    name: "PZEM-017 WiFi Signal Sensor"
    update_interval: 30s

  - platform: pzemdc
    address: 30
    current:
      name: "PZEM-017 Current"
    voltage:
      name: "PZEM-017 Voltage"
    power:
      name: "PZEM-017 Power"
    energy:
      name: "PZEM-017 Energy"
    update_interval: 2s

switch:
  - platform: restart
    name: "PZEM-017 restart"

text_sensor:
  - platform: wifi_info
    ip_address:
      id: ip_address
      name: PZEM-017 IP Address
    ssid:
      name: PZEM-017 Connected SSID
1 Like

Remove that QC past sticker :rofl::rofl::rofl:

1 Like

Hey Sam, can you share a diagram or some knowledge on how to wire to get it working for monitoring direct solar panels

I managed to fry 2 units , I give them power from the USB port but I think this is not ok if you don’t have a special power brick or something ,give up :pensive:


How many ohm capacitor you replace for r3 and r5? Tks you

Hi, they’ve been burnt, so replaced with a same 10R (10 ohm). And these are resistors, not capacitors :slight_smile:

That looks like a failed USB adapter, there’s a protection diode U6 to avoid mismatched + and - on USB, so it might be overvoltage. Or incorrect connection on a shunt side.