This software is windows only, I do not have acces anymore to a windows pc.
But I have managed to set the address by first flash an esp as Tasmota and then
Setting Module ID
As well as wiring for multidrop, the devices need to have an ID set (Sometimes referred to as IP address online, but it is a serial address). Tasmota now also allows you to set this easily with the ModuleAddress command- previously this was done with some serial commands (or with windows software linked below, but I tried this unsuccessfully).
To set the address, connect each module one at a time and on the Tasmota console, run eg
ModuleAddress 2
You'll get a response to say 'Done', but there is no reply to ensure it is carried out successfully. Obviously, set 1, 2 or 3 as needed but remember to disconnect the others when you set each one.
And then connect them to and esp with esphome flashed
Has anybody take a step further and played with appliances classification? Now this is working fine here I was wondering how to automatically identify certain appliances or loads activation and individually monitor their consumption. I’m not the “AI guy” but pretty sure ML can do a good job for that. If anyone can point out a starting point, that would be great.
Schematic to use is the first, but there is an error in R1 10k placement there:
it must be placed between 3V3 and Node Mcu RX pin.
You placed R1 on D1 catode: this is wrong.
Schematic 2 is totally wrong instead. Is better if you throw it away
PS: you don’t need rs485 converter with pzem 004T.
What’s the reporting response time on these with esphome?
Wondering if I could make a automatic sensor to turn on my dust collector. Table saw and other tools draw plent my of power and combined with a relay it could be an awesome solution if quick enough.
Copied this code,
Got all three PZEMs (V3’s)addresses through Tasmota ModuleAddress and got “Done” answer from them.
Connected to NodeMCU
Diodes are 1N4148 that I had in hand (Maybe that’s my issue?)
10K resistor between 5v and RX
If I connect more than one PZEM I get
“[modbus:074]: Modbus CRC Check failed!”
Anyone had this issue?
I’ve been at it for days now
First before connected all RX/TX PZEM04, set the address individually.
I have done with the windows software, one connected at a time, and set a different address
I use one ESP8266, with 4 PZEM04, with following connections:
The GND of ESP8266 and 4 PZEM04 connected together.
The +5V pin of the 4 PZEM04 connected to the ESP8266 3V3.
The TX pin of ESP8266 is connected to the RX 4 PZEM04 together.
The RX pin of ESP8266 is connected to the TX 4 PZEM04 together.
this because the TX PZEM04 is Open Collector type
but to not overload the TX optocouplers, I remove the R4 and R9 on 3 PZEM04
That works fine for me.
Benefits:
The RX signal ESP8266 “voltage low” value is better with this solution. (may reduce CRC Check failed)
no need to add external components
Another recommendation:
As the CT is connected to the neutral by the PZEM04, it is better to install the CT on neutral wire.
This because the difference voltage from CT and neutral is near than 0V.
But when installing the CT on live wire, the difference voltage from CT and live is the AC grid voltage.
=> So the risk to make a short circuit live to neutral is bigger
The only protection to prevent it is the plastic insulation of the CT (which is probably not certified for this)
Hi @4xvince, when you say that you have removed the R4 and R9 on 3 PZEM04, you mean that you really removed the R4 and R9 so no connection anymore with TX in that line
or you have connected directly the 5V to TX with no R4 and R9?
I have five PZEM-004T ver. 3 and I’m trying to connect to Lilygo TTGO T-Internet-POE ESP32-WROOM.
I set each PZEM004v3 address individually with the Windows software, one connected at a time.
When I try to connect the fifth PZEM, no one works. When I try to connect four PZEM, they works at begin but after, only three works. Now I’m having only two PZEM working at same time.
Is my circuit bellow correct? Do I need to use a diode, resistor or something like that? Should I use 3V3 or 5V?
Hi,
Yes if you connect multiples PZEM, you only need one with R4 and R9.
So you can simply removed R4 and R9 from all other PZEM.
(First schematic is correct)
Hi,
As I mentioned “The +5V pin of the 4 PZEM04 connected to the ESP8266 3V3.”
You really need to power the +5V pin of PZEM04 to a 3V3 source, as the input of the ESP32 is only compliant to 3.3V logic.
=> by connecting a +5V source you may have damage the D35 pin or/and the ESP32.
Another thing to check is the current capacity of the ESP
You have 5 PZEMs, and each consume near 2mA, then the ESP have to drive near 10mA
The ESP has a typical current capability of 28mA
(search IOL Electrical Characteristics)
=> It’s seams to be enough