D-Bus must not be disturbed (e.g., pulled low) while the MCU's TX GPIO pin is in an unconfigured state #78
Replies: 3 comments 11 replies
|
Note This text was AI-generated as I lack EE experience. Note The pull-up resistor discussed here refers to the internal pull-up at the MCU's GPIO pin, rather than the external pull-up on the D-Bus. When an ESP32 GPIO is not configured, it enters a high-impedance (floating) state that acts like an antenna for electrical noise. This undefined voltage level at the input of the 74LVC1G07 prevents the CMOS internal transistors from switching cleanly, causing them to partially conduct simultaneously. This results in an unwanted internal cross-current ( Hardware-Specific Pin AnalysisESP32-C6 (e.g., @Bouni's board)
ESP32-C3 (e.g., @kiu's board -- S3/C6 not checked!)
Conclusion & Software CaveatsSince the TX pins (GPIO9 on C3 / GPIO5 on C6) are strapping pins with an internal 45 kΩ weak pull-up, there shouldn't technically be an issue on the D-Bus during the very first milliseconds of power-up. However, even though the hardware provides that 45 kΩ pull-up, ESPHome (via the underlying ESP-IDF) often performs a "GPIO reset" on all pins that aren't explicitly defined in your YAML configuration during the early boot stage. This reset can momentarily disable the internal pull-up and set the pin to a pure high-impedance state before the main loop starts. A "stronger" external pull-up (like 4.7 kΩ or 10 kΩ) is superior to the internal 45 kΩ one, as it ensures a defined logic level even if the internal pull-up is temporarily disabled by the firmware's initialization sequence. |
|
Thanks @hn. For C3 thats true, for at least C6 its not pulled up internally. In kiu/BaSHi#5 (comment) we learned that everything works fine. Lets see if more people stumble upon similar issues. I added it to the future improvements list kiu/BaSHi#4 (comment) I used P5 for TX and P6 for RX on the left hand side in this "compatiblity" table: |
|
I can confirm that the board (I have Bouni's 1.0RC2) has an influence to the D-Bus communication during startup. When it is connected, I cannot enter the diagnostics menu of my dishwasher (holding 2 buttons while pressing power). When it is unplugged this works perfectly fine. It seems to interrupt / disturb the recognition of the buttons pressed at startup. Once you entered the diagnostics menu it is possible to hotplug the board and capture traffic. |




Uh oh!
There was an error while loading. Please reload this page.
Note
This text has been migrated from #17 (comment)
This concerns the observations made here and here. When the ESP32 boots, the TX pin is (as far as I know) in a floating state, which apparently causes the 74LVC1G07 to pull the bus low. So far, I haven’t been able to identify this as a real problem, but it could certainly be improved.
I only had time for a quick test just now: If I fully deconfigure the TX pin (= floating) on Bouni's board in ESPHome, the household appliance (in this case a dryer) no longer starts correctly. If I add the TX pin back to the config yaml, everything works fine again.
@Bouni @kiu @tubist2004 I suspect that an additional pull-up resistor directly on the ESP’s TX GPIO would be advisable, so that the bus is not disturbed during boot or in a potentially unconfigured pin state. But you are the EE experts :)
In any case, the software should be configured so that the TX pin goes high as quickly as possible. For me, the normal boot order of the ESPHome UART configuration has always been sufficient, but this might not be enough for some particularly delicate devices.
All reactions