How to connect pzem 017 DC with nodemcu

how to connect PZEM 017 DC with nodemcu and esphome ?
do i need any converter to connect it with esp8266 nodemcu ?
or i can directly connect ?

I want to know is what should be the wiring diagram of pzem with nodemcu ?

Nodemcu is a firmware.

However to interface this device to an esp8266/32 I suspect you will need an RS485 - TTL convertor. Remember the esp devices are 3v3 not 5v.

This is the block diagram , from this can i directly connect those A & B pins to esp8266 board gpio ? As we dont want to connect it to pc or i need rs485 to ttl converter or any connection directly on pzem board

I am no expert, but

  1. rs-485 uses voltages greater than 3v3 from what I can tell.
  2. esp devices operate at 3v3 on the gpio pins. Some people claim success at 5v but that is more good luck than good management.
  3. All the info I can see on a quick google involving esp8266 and rs-485 use rs-485 - uart boards.
  4. I would therefore use one.

I don’t know if this can help you, it’s a tutorial to connect a pzem 04t to an esp (it’s in italian)

till now i am unable to connect esp8266 nodemcu with PZEM017 ?

can anyone help me ?

How did you go with the rs-485 ttl converter.

i did not want to connect my pzem017 through rs485-ttl converter ,
what i want is to connect my esp8266 node directly by soldering to the PZEM017 as i have seen in this github post ,

but i cant figure out the exact location to connect rx tx ,

Why on earth not?

I solve problem in this mode and work perfect.
I use this convertor:

Hello Cristi,

I’m currently working on the pzem-017 with Esp8266 NodeMCU or ESP8266 Mini D1 which is the same as your project.

Would you please share your code so the PZEM-017 can talk with ESP8266 and display the data?


Hi Nickrout,

I have no problems with the connection between PZEM-017 and ESP at all. What I’m looking for is the code or the sketch that can run and give out the reading on Arduino. (the one from your link does not help)

Does anyone have a project or code for this PZEM-017 to work with ESP on Arduino?


Why are you posting in the esphome section if you do not actually want to run on esphome?

my schematic is for esphome

For arduino find info here:

Esphome does not run on an arduino AFAIK.

Strictly speaking your correct, but esphome uses arduino. Therefore any library available in esphome should be pretty easy to port for use in arduino if needed.

That said, it’s not hard to find a direct example of arduino code for the PZEM sensors (this may also work for the -017?):