November 5, 2021

Peacefair PZEM-017 Current Sensor with Modbus RS485

2021-11-05 first draft

The Peacefair PZEM-017 Current Sensor and 50 Amp shunt are being used on a small off-grid solar installation. The PZEM is used to monitor the charge/discharge data for the LiFePO4 50 Ah battery.

The current, voltage and power outputs are always positive values. The value never goes negative regardless of the polarity of the current. This does not provide a very good battery monitor. This installation puts the values into MQTT for use by Home Assistant. A template sensor in Home Assistant is used to negate the values when the battery is discharging. The charge/discharge state of the battery is implied by the solar panel power output provided by the system charge controller. The charge controller data is also inserted into MQTT for use by Home Assistant. This method has worked adequately. It is difficult to produce a confident State of Charge of the battery.

The PZEM-017 output is isolated and unpowered opto-isolators. 5VDC must be porovided to the output to enable the interface to communicatie with on an RS485 bus. Some USB-RS485 adapters provide 5VDC terminals but some don't.

The minimalmodbus python libraries work well with the PZEM. The range of the PZEM must be configured to match the shunt used. A python script can set that range value.

PDF documentation can be found with Google searches. Some of the links are from non-secure sites so beware. The product also includes a paper copy of the device.

The 50 Amp shunt has provided reliable values between 0 and 15 Amps in this installation.

The PZEM is available from Amazon: DC Voltage Meter, Portable Watt Meter, for Current(PZEM-017+50A)

No comments:

Post a Comment