New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Serial HW on WEMOS with PZEM-004T #5673
Comments
I'm not sure I understand what is the problem exactly? Is your Wemos rebooting? If that is the case it is most likely a bad voltage regulator on the D1 mini. Connect PZEM to a separate power supply. RX and TX have to be switched and your first example shows everything working. TX to TX is just sending to the D1's serial out pin and data won't show since D1 isn't receiving any. Check our wiki, there are three examples of a PZEM004 setup with various devices |
The problem it is at moment i'm using the software serial but if i'm try to use the HW serial there is no data from PZEM (Voltage,Current.. display 0). How can i use the HW Serial? I have tried to swap RX/TX into configuration and the cable on PZEM in all possible combination without success. Thanks |
Try without level shifter as described here https://github.com/arendst/Sonoff-Tasmota/wiki/PZEM004T,-Wemos-D1-Mini-and-a-1602-I2C-display |
@michelebossa You can use 3.3V directly for PZEM004T, No need level shifter by adding 1KΩ as below picture. My energy monitor with PZEM004T is running fine with this type of modification. This is from wiki:
|
I have the same problem with the level converted. @michelebossa, did you solve your restart problems? I think the alternative feeding PZEM-004t directly with 5V is not good (wemos d1 mini has no 5v tolerance) Adding other question, did you notice than using level coverter you get very high reactive power values? I did some probes with a tri-phase pzem-004t proyect and I think I get not good values. |
@ricargr Level converting has no way input to measured values this is impossible because values are transfered digital encoded via serial... |
Thanks @Jason2866 |
Yes since hardware serial is only supported at Gpio 1 and 3 |
Closing this issue as it has been answered. Support Information (Guide)See Wiki for more information. |
Hi @michelebossa, I am a bit confused. I am making a similar project with a Wemos D1 Mini and Tasmota and the PZEM-004T, but not sure how to proceed with the serial connection. Some Internet sites say the ESP8266 is 5v tolerant on the I/O pins so they connect to 5v and tx/rx direct to the esp, others use level shifters. You mention a 1K resistor solution, assuming you provide the PZEM unit with 5v? Or als alternative use 3.3v directly to power the PZEM and no use of a resistor. Is this correct? i.e. does the PZEM TTL part run on 3.3v? Thanks |
Hi @martin072, |
Thanks, Do you know if it also works with 3.3v? that would be a bit easier for me (as I have a custom pcb with already a 3.3v, GND and I/O header present). |
No :( |
Works with 3.3V see #3626 (comment) |
BUG DESCRIPTION
I have a problem with Serial Hardware connection between WEMOS and PZEM-004T actually i'm using the Software Serial but somethings some reboot appening it is not a big problem but i have tried to use Serial Hardware connection to have more stability but if i switch there is no information from PZEM.
My worked configuration is:
if i try to switch TX and RX into configuration Module and the cable between PZEM and WEMOS into console i see there is Serial Hardware on but there isn't information from PZEM
REQUESTED INFORMATION
There is some other step to do to use Serial HW connection?
FAILURE TO COMPLETE THE REQUESTED INFORMATION WILL RESULT IN YOUR ISSUE BEING CLOSED
status 0
:(Please use
weblog 4
for more debug information)TO REPRODUCE
EXPECTED BEHAVIOUR
SCREENSHOTS
Correct configuration
If i try to use Serial HW there is no data.
ADDITIONAL CONTEXT
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: