arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.71k stars 4.72k forks source link

The 1K resistor mod for PZEM-004T v3 is wrong #9518

Closed radudorurus closed 3 years ago

radudorurus commented 3 years ago

PROBLEM DESCRIPTION

The resistor mod https://tasmota.github.io/docs/PZEM-0XX/#pzem-004t-version-v3_1 is wrong. For the PZEM004T v3 the 1k resistor is soldered between 5V and GND. (mistakenly following the visual from v1) https://user-images.githubusercontent.com/34340210/63591794-cf3d5d80-c57d-11e9-9945-eb062bebf71b.jpeg This is because in v3 the optocouplers are swapped compared to v1. http://samopal.pro/wp13_samopal/wp-content/uploads/2681/100.jpg

Basically, the mod on PZEM-004T v1 was to connect a 1k resistor in parallel with the existing one for the optocoupler to increase the current since it is provided with 3.3V instead of 5V. This can be done in v3 by putting the 1K resistor in parallel with R8. In the image it is placed between pin1 (RX opto) and VCC which is the same.

No issues was reported by now probably because The 3.3V and 1k existing R8 is enough to open the Rx opto LED.(2.06mA) The 1k resistor in parallel will increase the current for the opto to 4.12mA. (actually being designed for VCC 5V/ ~3.76mA)

Datasheet of the opto http://www.ct-micro.com/uploads_zip/CT817.pdf

REQUESTED INFORMATION

Please correct the guide

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`: not related

Rules output here:

- [x] Provide the output of this command: `Status 0`: not related

STATUS 0 output here:

- [ ] Provide the output of the Console log output when you experience your issue; if applicable:
  _(Please use_ `weblog 4` _for more debug information)_

Console output here:



### TO REPRODUCE
-

### EXPECTED BEHAVIOUR
-

### SCREENSHOTS
![image](https://user-images.githubusercontent.com/17679049/95687200-e2404080-0c0a-11eb-9a19-3e99780d06ad.png)

### ADDITIONAL CONTEXT

**(Please, remember to close the issue when the problem has been addressed)**
Jason2866 commented 3 years ago

Sharp eyes! You can edit the docs and provide a PR. Tasmota docu is Open Source too. We would apreciate it!

radudorurus commented 3 years ago

Thanks. I can do the edit. (tried... too difficult) But the PR it seems difficult to create altough I work in software testing. I did not found any docs section. It is just my third contribution or so on github. I will propose a change. IMG_20201012_191539_1

Jason2866 commented 3 years ago

You find a how to here https://tasmota.github.io/docs/Contributing/

Jason2866 commented 3 years ago

Please close. Since you provided the solution :-) Thx!!

leranp commented 3 years ago

Hi In the past i have modified my Pzem v3 with 1k resistor like in the incorrect way ( same as v1). The pzem is working for couple of months and looking good, recently i tried to compare the kW from the pzem to my bill kW and i saw a big difference from pzem kW to the real kW consumption (real kW was 350 and pzem 420), the resistor location can make the measurements to be incorrect? Is there any importance to switch the location if the device working without problems?

ascillato commented 3 years ago

The resistor is just for communications. Will not influence on the readings.

rrelande commented 1 year ago

HI, appreciate such valuable post. Still referring to original PZEM-004T v3 with CT817C optocoupler WITHOUT 1k modifications to R8

according to calculations, the 2.06 mA forward current with a CTR of .5, it still delivers 1mA collector current should indeed be enough to open the optocoupler, even with a power source of 3V3

This could be barely enough to open the optocoupler , but could work.

Is there any feedback from running an unmodified PZEM-004 v3 on 3V3 ?

dg1sek commented 6 months ago

For me adding the 1K resistor shown in the drawing in pink AND REMOVING the R8 SMD resistor worked. Without removing the SMD resistor I did not get RS232 with a NodeMCU board up and running. I used the Vin connector of the NodeMCU board as 5V power supply to the PZEM module, this seems to work fine, the USB PSU module does bring stable 5V, so I don't really see why to add an additional buck converter.