ESP8266 + pzem - boot problem

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Ravee
New user
Posts: 4
Joined: 09 Dec 2021, 17:41

ESP8266 + pzem - boot problem

#1 Post by Ravee » 23 Dec 2021, 08:35

Hello,
I running esp easy on ESP_Easy_mega_20211105_energy_ESP8266_4M1M.bin
I have connected PZEM as folloving:
ESP -> PZEM
D7 -> TX
D8 -> RX
GND -> GND
VIN -> 5V

In esp easy selected HW serial0 swap

The problem is that when esp is unplugged from its power source for some reason and plugged back in, it fails to turn on (or cannot connect to wifi).
The PZEM LED is solid red. For the esp to get up, I have to disconnect the pzem, disconnect and reconnect the esp power, wait and then connect the pzem. Then the esp starts up and connects to the wifi, and pzem is signaled by a flashing diode when esp is asked for measurements.
Is the problem with the connection or the firmware?
For now, I have only the pzem connected to esp - I do not have 230VAC connected. When esp stands up, all results are 0, after the first measurement the results change to "nan"

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP8266 + pzem - boot problem

#2 Post by TD-er » 23 Dec 2021, 10:36

See: https://espeasy.readthedocs.io/en/lates ... on-esp8266
D7 = GPIO13
D8 = GPIO15
If GPIO15 is high during boot, the ESP will not boot.

So what you need to do, is to add a PNP transistor between the device and the ESP for GPIO-15.

Just a standard PNP transistor and a pull-up resistor.
Some example found with Google image search:
Image

The resistor between GPIO15 and the base of the transistor is optional, but it is good practice to include it.

Ravee
New user
Posts: 4
Joined: 09 Dec 2021, 17:41

Re: ESP8266 + pzem - boot problem

#3 Post by Ravee » 23 Dec 2021, 17:23

Alright, now it make sens :)
I simply switched pins - it is my first sensor, and my first esp :)

Thanks for the link it will be usefull when will add some more sensors :)

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests