diff --git a/PZEM-016-Energy-Monitoring-Custom-Devices.md b/PZEM-016-Energy-Monitoring-Custom-Devices.md new file mode 100644 index 00000000..7224b0df --- /dev/null +++ b/PZEM-016-Energy-Monitoring-Custom-Devices.md @@ -0,0 +1,21 @@ +:warning: :warning: :warning: +**DO NOT PERFORM THIS MODIFICATION WITHOUT REMOVING POWER FROM THE PZEM FIRST!** +:warning: :warning: :warning: + +**Note**: the PZEM-016 TTL output is at 5V signal levels. There are varying schools of thought on whether the ESP82xx has 5V tolerant GPIO. You may want to use a level shifter for the serial communications signals to bring them to the recommended 3.3V. + +PZEM-016 modules can be converted from RS485 to TTL serial level devices by simply removing the internal MAX485 chip and adding two internal jumper wires. This will bring the serial port connections out via the four-pin terminal block. Pin A is now TTL serial out (Tx) and pin B TTL serial in (Rx). The modification retains the optical isolation used by the PZEM for safety to ensure no high voltages on the outputs. + + + + +You can use a voltage level shifter to power the ESP82xx from the PZEM-016 module's 5V power. This may also require a 470uf 35V capacitor across the 5V line to work reliably. + + +**Tasmota Configuration** +It is recommended to use GPIO1/GPIO3 or GPIO13/GPIO15 for the most reliable serial communications. You can use any GPIO but anything else will use serial emulation (software). Software serial is not supported with the 2.3 Arduino Core. + +GPIO|Component|PZEM +-:|:-:|:-: +1|PZEM0XX Tx (62)|Pin B +3|PZEM016 Rx (98)|Pin A diff --git a/PZEM016-Energy-Monitoring-Custom-Devices.md b/PZEM016-Energy-Monitoring-Custom-Devices.md deleted file mode 100644 index 80bf70ac..00000000 --- a/PZEM016-Energy-Monitoring-Custom-Devices.md +++ /dev/null @@ -1,19 +0,0 @@ - -***** DO NOT PERFORM THIS MODIFICATION WITHOUT REMOVING POWER FROM THE PZEM FIRST! ***** - -PZEM016 Modules can be converted from RS485 to TTL serial level devices by simply removing the internal MAX485 chip and adding two internal jumper wires. This will bring the serial port connections out via the four-pin terminal block. Pin A is now TTL serial out and pin B TTL serial in. The modification retains the optical isolation used by the PZEM for safety to ensure no high voltages on the outputs. - -In my case I used a bare 5V ESP8266 dev board and connected it up using four wires to use the 5V power from the PZEM016 module to power the ESP8266. This required an 470uf 35V cap across the 5V line to work reliably. - -Note the PZEM TTL output is at 5V levels. Depending on who you believe the ESP8266 may have 5V tolerant inputs. I am not using any level shifters, but I don't care if I burn out an ESP8266 or two. You may want to use a level shifter. - - -On the Sonoff-Tasmota you simply need to configure the Pin A to be "PZEM016 Rx (98)" in and Pin B to be "PZEM0XX Tx (62)" - -Sorry embedding the images did not work so here are the links - -https://www.dropbox.com/s/h7xc5z49s2076a6/pzem016-01.jpg - -https://www.dropbox.com/s/j26ys5ayob618vy/pzem016-02.jpg - -https://www.dropbox.com/s/atdph2hwng0m4j9/pzem016-03.jpg