-
Notifications
You must be signed in to change notification settings - Fork 0
PZEM004T Energy Monitor
![](https://github.com/arendst/arendst.github.io/raw/master/media/pzem/pzem-done.jpg)
- Sonoff Basic
- PZEM-004T
- Resistor 1k
- Enclosure
- Power cable
Install Tasmota on the Sonoff Basic and confirm it is functional before connecting the PZEM-004T to its serial interface.
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.
![](https://github.com/arendst/arendst.github.io/raw/master/media/pzem/pzem-fix.jpg)
Connect the serial interface of the Sonoff Basic with the serial interface of the PZEM-004T. See pictures regarding used colors and connections.
- 3V3/5V Red
- Rx Yellow
- Tx Green
- Gnd Grey
![](https://github.com/arendst/arendst.github.io/raw/master/media/pzem/pzem-basic.png)
(Image re-used from https://www.instructables.com/id/Use-Homie-Firmware-to-Drive-Sonoff-Switch-Module-E/ Thanks @amayii0)
As the PZEM004T is functioning better on 5V, it can be obtained from the Voltage regulator as shown in this image.
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 high voltage AC it is recommended to fit the hardware in a solid enclosure.
Configure the GPIO's for hardware serial connection as shown below.
IMPORTANT: If using the connections as following, the communication works in all cores due to Tasmota using hardware serial. If the user wants to use another GPIOs for communication, Tasmota will emulate a serial interface using software serial. This feature does not work using core 2.3.0 due to insufficient RAM. To use the software serial feature, please compile using core 2.4.2 or greater.
![](https://user-images.githubusercontent.com/10942270/50730409-5653d780-114d-11e9-9ce0-05074c4d08b7.png)
Per Theo - As the PZEM is a dedicated energy monitor, device calibration in TASMOTA is currently not supported.
Home
What's New
Contributing
Installation
Prerequisites
Hardware Preparation
Flashing
Initial Configuration
MQTT
Upgrading
Troubleshooting
Tutorials
FAQ
Features
Commands
Templates
Modules
Components
Rules
Smart Home Integrations
Device Configuration
Templates Repository
Flashing Guides
Buttons and Switches
Status LEDs
Sensors
Lights
Displays
Useful Topics
Power Monitoring Calibration
MQTT Overview
MQTT Retained Messages
Energy Saving
Securing Your Setup
Syslog Setup
Theo's Tips
Various Tips
LEGO Nightstand Switch
For Developers
JSON Status Responses
Sensor API
Time Proportioned Output Fork
PID Control Fork