Updated PZEM004T Energy Monitor (markdown)

Theo Arends 2018-08-29 11:15:36 +02:00
parent a47e19f4f5
commit 7bb6918bfb
1 changed files with 7 additions and 5 deletions

@ -1,22 +1,22 @@
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-done.jpg" width="250" align="right" /> <img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-done.jpg" width="250" align="right" />
When a clamp on energy monitor is needed the PZEM-004T together with a Sonoff Basic can be used. The PZEM-004T together with a Sonoff Basic provide a good clamp on energy monitor.
## Parts needed ## Parts needed
- Sonoff Basic - Sonoff Basic
- PZEM-004T - PZEM-004T
- Resistor 1k - Resistor 1k
- Enclosure - [Enclosure](https://www.itead.cc/smart-home/sonoff-ip66.html)
- Power cable - Power cable
## Preparation ## Preparation
Install Tasmota on the Sonoff Basic and confirm it's functionality before connecting the PZEM-004T to it's serial interface. Install Tasmota on the Sonoff Basic and confirm it's functionality before connecting the PZEM-004T to it's serial interface.
## Hardware connections ## Hardware connections
As the PZEM-004T expects 5V serial data and the Sonoff Basic only provides up to 3V3 the expected optocoupler input power of the PZEM-004T has to reduced. This can be accomplished by soldering a 1k resistor between the joints as shown below. As the PZEM-004T expects 5V serial data and the Sonoff Basic only provides up to 3V3 the expected optocoupler input power of the PZEM-004T has to be reduced. This can be accomplished by soldering a 1k resistor between the joints shown below.
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-fix.jpg" height="400" /> <img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-fix.jpg" height="400" />
Now connect the serial interface of the Sonoff Basic with the serial interface of the PZEM-004T. See picture regarding used colors and connections. Connect the serial interface of the Sonoff Basic with the serial interface of the PZEM-004T. See pictures regarding used colors and connections.
- 3V3 Red - 3V3 Red
- Rx Yellow - Rx Yellow
@ -25,7 +25,9 @@ Now connect the serial interface of the Sonoff Basic with the serial interface o
<img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-basic.png" height="400" /> <img src="https://github.com/arendst/arendst.github.io/blob/master/media/pzem/pzem-basic.png" height="400" />
Cut the power cable in two and connect the input to both Sonoff Basic and PZEM-004T. Route one of the power output lines through the PZEM-004T core and connect it to the Sonoff Basic output. Cut the power cable in two and connect the input wires to both Sonoff Basic and PZEM-004T. Route one of the power output wires through the PZEM-004T core and connect the output wires to the Sonoff Basic output.
As most parts are connected to AC try to fit the hardware in a solid enclosure.
## Software configuration ## Software configuration
Configure the GPIO's for hardware serial connection as shown below. Configure the GPIO's for hardware serial connection as shown below.