-
Notifications
You must be signed in to change notification settings - Fork 34
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
Several pzemac sensors do not work when connected to the same bus #1139
Comments
But it doesn't belongs here (better place are discord or HA forum) as it is not SW problem, just your HW issue. I have 3 of them on one bus and no issues with the latest dev release. Sure, a small modification is needed - you need add protection diodes and pull-up resistor. Opto-couplers will work on 3,3 V as well, but if you want to have nice, then you need replace two resistors on each device. Here is my schematic (top: original for 5 V, modified for 3,3 V, and then my interconnect module with resistor and diodes): |
Thanks for your schematic. I have posted it here because I was not sure wether my hardware setup was wrong, or it was a software issue. In my case, I am working at 5V voltage, because I am using a 3V3 to 5V level shifter, so I don't need to modify the pzem resistors. I have a setup similar to this, but with several pzem wired in parallel (all sharing the same level shifter) Could you explain why protection diodes and pullup resistor are needed for connecting more than one modbus slave to the bus? It was my understanding that just wiring all the devices in parallel was enough. |
You can check arendst/Tasmota#2315 - they have similar schematics. Diodes are used as protection for the transistor inside of opto-couplers and the pull-up resistor is just a good practice to have input HI in default state and then the opto-couplers will drive it to ground (LO). You can achieve the same with integrated pull-up that can enable your MCU/SoC on input pin. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, I built a similar setup and never worked.. I ended up dropping the level shifter out and instead of replacing resistors, just added 470ohm ones in parallel resulting in 319ohm. Then diodes and pull-up resistor, everything worked from then. |
pzemac source |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Operating environment/Installation (Hass.io/Docker/pip/etc.):
I'm using the Version: 1.15.0-dev but I have also tried this with the latest release
Board is Wemos d1
ESP8266
Affected component:
pzemac
https://esphome.io/components/sensor/pzemac.html
Description of problem:
Several pzemac sensors connected to the same uart bus, with different modbus adress for each sensor don't work
Problem-relevant YAML-configuration entries:
Logs (if applicable):
Additional information and things you've tried:
I have several pzemac sensor connected to the same uart (using pins D1 and D2), I am using a Wemos D1
Each of the pzem has a different modbus address
The pzem are wired in parallel to the Wemos D1 through a level converter 3.3v to 5v
I have tried using an external supply for the pzem bus, suspecting the wemos could not provide enough power, but it makes no difference
I have tested all the pzem individually, and they work well, whenever there is only one device in the bus
However, when I connect more than one pzem to the bus, it doesn't work, the Wemos doesn't boot up properly, and, both the TX and RX leds on the pzem are on continuously.
Has anyone had any success with a similar setup?
The text was updated successfully, but these errors were encountered: