Page 1 of 1

ESP8266 + pzem - boot problem

Posted: 23 Dec 2021, 08:35
by Ravee
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"

Re: ESP8266 + pzem - boot problem

Posted: 23 Dec 2021, 10:36
by TD-er
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.

Re: ESP8266 + pzem - boot problem

Posted: 23 Dec 2021, 17:23
by Ravee
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 :)