Hi all, I’ve been messing with the PZEM-017s for a while and have learned a few things I wanted to share, hopefully to make it easier for others just getting started, and maybe find some better solutions. I am by no means an expert, but I wanted to share what’s worked for me.
I’ve gotten the PZEM working using just a RS485 to UART converter. Originally I was also using the logic level shifter recommended here and elsewhere, but I’ve found that I don’t actually need it
I’m using an ESP-WROOM-32 and breakout, a RS485 to TTL converter, and PZEM-017 with 50A shunt.
I’ve also been having the double or half current reading issue, and at first I thought that this was caused by the 3.3-5V logic level shifter, (my flawed logic being that 3.3 is almost half of 5V) but after doing some more research I now believe it has to do with the size of the shunt you are using.
I bought mostly 50A kits, and one 100A kit. I finally realized after a lot of troubleshooting that if I use the 100A shunt, I get the correct reading without any filtering. But if I use one of my 50A shunts, the reading I get is double what it should be, and I have to apply a filter.
According to this thread on the tasmota forum, this is because the PZEM-017 comes factory set to a certain shunt size. I assumed that the 50A kits I bought would be set to match the shunt they ship with, but this doesn’t seem to be the case. All of the units I’ve gotten appear to be factory set to 100A.
Apparently there IS a way to send a command to the PZEM-017 to set the shunt size you are using so that you don’t have to apply filters in ESPhome, but doing this is currently beyond my understanding, and since the reading seems to be EXACTLY double the correct reading, I don’t see any real drawback to using a filter besides the fact that it feels hacky.
After I figured that out, these sensors work great, and I’m using them to monitor my solar in real time. Cutting out the level shifter simplified the wiring a lot, but you may still need one for some boards. The ESP-WROOM-32 and breakout work great though, and the converter slides neatly between the ESP and breakout board, which keeps things tidy.
If anyone is interested, I post monthly updates about what I’ve learned on my Patreon, and everything I post there is free and open for everyone, nothing is paywalled or Patrons-only. If you want more details on how I’m using these sensors, you can find them at Patreon[dot]com/disruptivelyuseful (this is my first post so I can only post 2 links)
If anyone knows how to send a command to the PZEM-017 to change the shunt setting, I’d love to know how to do it.
Also, do I even need the RS845 converter? I don’t really know what I’m doing, I just know that how I’m currently doing it works for me.
Hope that’s helpful to anyone, happy hacking!