PZEM-004T v3.0 and NodeMCU / Wemos Mini running on Blynk - How To procedure

This project is for V3 board and you are using V1 therefore it will not work.

solved sir, but i have problem now…
my pzem getting short circuit, R18 on pzem blew up … what value of resistor R18.?
help me…i gona fix it…

100 Ohm 2 Watt 5%

really.? can you take a picture.? but another pzem is R500 that’s mean 0.5 ohm

@kriskurniawan

YES, you are correct.
if you look at the pcb from up or even from the side without moving the big capacitor you will never think to find another resistor underneath, even the labeling is badly placed.
Here are your pictures.

connection diagram

thank you sir…
what resistor might be able to replace the SMD resistor R500.?

Change the decimal point in Blynk app, like /.##W then the result will look like this 44.99W

Can the energy reading be reset to zero programmatically?

Yes, you can.
I just looked up the data sheet and command set for the V3 and it’s done by writing to address 0x42
Section 2.56 of this document:

You’re probably going to need to use a node.writeSingleCoil(0x42,0000) command to do this, although life gets much easier if you use a library to so all the heavy lifting for you.

Pete.

2 Likes

Hi

I get this error
Executable segment sizes:

IROM : 289936 - code in flash (default or ICACHE_FLASH_ATTR)

IRAM : 30004 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs…)

DATA : 1276 ) - initialized variables (global, static) in RAM/HEAP

RODATA : 2456 ) / 81920 - constants (global, static) in RAM/HEAP

BSS : 27144 ) - zeroed variables (global, static) in RAM/HEAP

esptool.py v2.8
Serial port COM9
Connecting……____Traceback (most recent call last):
File “C:\Users\joaqu\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py”, line 65, in
esptool.main(cmdline)
File “C:/Users/joaqu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py”, line 2890, in main
esp.connect(args.before)
File “C:/Users/joaqu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py”, line 483, in connect
raise FatalError(‘Failed to connect to %s: %s’ % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
_
serial port _
selected doesn´t exist or connected.

It seems that your PC can’t communicate with your NodeMCU on COM port 9
Is this the correct COM port?
Are you using a hub, or directly connected to a USB port on your PC?
What upload speed are you using?

Pete.

A post was split to a new topic: Using 2x PZEM-004T for solar monitoring

help me measure 380v voltage.
thanks.

Thank you Pete for this tutorial.
I am going to buy two of these modules to monitore my PV system.
I would like to know what happened if the system is power off.
The energy count go to zero or keep in memory the total?

It’s also possible to see the direction of the energy (import/export)? Theoretically I think yes as this device measure current and voltage at the same time.

Thank you

Hi I have nodemcu ESP8266 with pzem004t V3, I did everything same as above, I got all parameters, but one problem I faced the energy got reset i.e “0” after every 65.5KW/H. Can any one guide me how to retain energy or reset energy on every cycle?

1 Like

I got same problem !?
I think we need a Accumulate Function to store Active Energy Value and save it to EEPROM.
I’m still trying to do that :slight_smile:

For storing files or even just variables look into LittleFS. I have been using a Json lib that make it a snap to parse back and forth. EEPROM is either not supported or total phasing out.

1 Like

Oh, how can we do that in this case ?! Can you give more details ? Thanks !

Whoohoo !
I think i have a solution for you. I was try PZEM004Tv30 lib to Read Value from PZEM004Tv3 and the Energy value readout from PZEM is Accumulated from all previous reset ! :smiley:
So maybe problems came from the way use Modbus to readout these values.

Can you share the code that do Accumulated reading?