PZEM 014,016 Specification
PZEM 014,016 Specification
PZEM 014,016 Specification
Overview
1.Function description
1.1 Voltage
1.2 Current
1.5 Frequency
Active power threshold can be set, when the measured active power exceeds the threshold, it
can alarm
RS485 interface。
2 Communication protocol
0x41 function code is only for internal use (address can be only 0xF8), used for factory
calibration and return to factory maintenance occasions, after the function code to increase 16-bit
password, the default password is 0x3721
The address range of the slave is 0x01 ~ 0xF7. The address 0x00 is used as the broadcast
address, the slave does not need to reply the master. The address 0xF8 is used as the general
address, this address can be only used in single-slave environment and can be used for calibration
etc.operation.
The command format of the master reads the measurement result is(total of 8 bytes):
Slave Address + 0x04 + Register Address High Byte + Register Address Low Byte + Number
of Registers High Byte + Number of Registers Low Byte + CRC Check High Byte + CRC Check
Low Byte.
The command format of the reply from the slave is divided into two kinds:
Correct Reply: Slave Address + 0x04 + Number of Bytes + Register 1 Data High Byte +
Register 1 Data Low Byte + ... + CRC Check High Byte + CRC Check Low Byte
Error Reply: Slave address + 0x84 + Abnormal code + CRC check high byte + CRC check
low byte
0x01,Illegal function
0x02,Illegal address
0x03,Illegal data
0x04,Slave error
The register of the measurement results is arranged as the following table
Register
Description Resolution
address
0x0000 Voltage value 1LSB correspond to 0.1V
0x0001 Current value low 16 bits 1LSB correspond to
0x0002 Current value high 16 bits 0.001A
0x0003 Power value low 16 bits
1LSB correspond to 0.1W
0x0004 Power value high 16 bits
0x0005 Energy value low 16 bits
1LSB correspond to 1Wh
0x0006 Energy value high 16 bits
0x0007 Frequency value 1LSB correspond to 0.1Hz
0x0008 Power factor value 1LSB correspond to 0.01
0xFFFF is alarm,
0x0009 Alarm status
0x0000is not alarm
For example, the master sends the following command (CRC check code is replaced by
0xHH and 0xLL, the same below)
Indicates that the master needs to read 10 registers with slave address 0x01 and the start
address of the register is 0x0000
0x01 + 0x04 + 0x14 + 0x08 + 0x98 + 0x03 + 0xE8+0x00 + 0x00 +0x08 + 0x98+ 0x00 +
0x00 + 0x00 + 0x00 + 0x00 + 0x00 + 0x01 + 0xF4 + 0x00 + 0x64 + 0x00 + 0x00 + 0xHH + 0xLL
At present,it only supports reading and modifying slave address and power alarm threshold
Register
Description Resolution
address
0x0001 Power alarm threshold 1LSB correspond to 1W
0x0002 Modbus-RTU address The range is 0x0001~0x00F7
The command format of the master to read the slave parameters and read the measurement
results are same(descrybed in details in Section 2.3), only need to change the function code from
0x04 to 0x03.
The command format of the master to modify the slave parameters is (total of 8 bytes):
Slave Address + 0x06 + Register Address High Byte + Register Address Low Byte + Register
Value High Byte + Register Value Low Byte + CRC Check High Byte + CRC Check Low Byte.
The command format of the reply from the slave is divided into two kinds:
Correct Response: Slave Address + 0x06 + Number of Bytes + Register Address Low Byte +
Register Value High Byte + Register Value Low Byte + CRC Check High Byte + CRC Check Low
Byte.
Error Reply: Slave address + 0x86 + Abnormal code + CRC check high byte + CRC check
low byte.
For example, the master sets the slave's power alarm threshold:
Indicates that the master needs to set the 0x0001 register (power alarm threshold) to 0x08FC
(2300W).
Set up correctly, the slave return to the data which is sent from the master.
Indicates that the master needs to set the 0x0002 register (Modbus-RTU address) to 0x0005
Set up correctly, the slave return to the data which is sent from the master.
The command format of the master to reset the slave's energy is (total 4 bytes):
Slave address + 0x42 + CRC check high byte + CRC check low byte.
Correct reply: slave address + 0x42 + CRC check high byte + CRC check low byte.
Error Reply: Slave address + 0xC2 + Abnormal code + CRC check high byte + CRC check
low byte
2.6 Calibration
The command format of the master to calibrate the slave is (total 6 bytes):
0xF8 + 0x41 + 0x37 + 0x21 + CRC check high byte + CRC check low byte.
Correct reply: 0xF8 + 0x41 + 0x37 + 0x21 + CRC check high byte + CRC check low byte.
Error Reply: 0xF8 + 0xC1 + Abnormal code + CRC check high byte + CRC check low byte.
It should be noted that the calibration takes 3 to 4 seconds, after the master sends the
command, if the calibration is successful, it will take 3 ~ 4 seconds to receive the response from
the slave.
CRC check use 16bits format, occupy two bytes, the generator polynomial is X16 + X15 +
X2 +1, the polynomial value used for calculation is 0xA001.
The value of the CRC check is a frame data divide all results of checking all the bytes except
the CRC check value.
3 Functional block diagram
4 Wiring diagram
Picture 4.1 PZEM-014 wiring diagram
5 Other instructions
AC voltage provides two isolated outputs after through the switching power supply, one way
is 3.3V provides to the measurement system, the other way is 5V provides to 485 communication
circuits and external circuits.
-20’C ~ +60’C。