I2C problem with display

Hello, everyone
I have connected a SH1106 display to pins D1(SCL) and D2(SDA9 on a Wemos D1mini. The display gets its supply voltage directly from the Wemos via the 3V3 and GND connections. When the Wemos is booted, a text output appears briefly on the display and then I have the problem that the Wemos no longer connects to my WLAN.

If I disconnect the power supply to the display, the Wemos boots without any problems and also connects to my WLAN.

Now one could assume it would be a problem with the power supply. But since the text is output on the display, I rule that out.

Since I could not eliminate the problem, I wanted to check the hardware structure and put the unmodified circuit into operation with EasyESP and set up the display there. Here the text is output without any problems and the WLAN connection is also absolutely stable.

So it can’t be the hardware because I haven’t changed it at all.

I can’t get any further with my problem and hope to find help here.

greeting
dieter

No solution here, just my ESPHome configuration, working on my D1 Mini, with display powered by it.

# ----------------------------------------------------------------------------------------
# micro:bit OLED Module - 0.96 inch
i2c:
  sda: GPIO4
  scl: GPIO5

text_sensor:
  - platform: homeassistant
    entity_id: input_text.a_qui_le_tour
    name: "Douche"
    id: douche

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20
    glyphs:
      ['&', '@', '!', ',', '.', '"', '%', '+', '-', '_', ':', '°', '0',
       '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
       'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
       'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
       'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
       'u', 'v', 'w', 'x', 'y', 'z', '/', 'é', 'è', 'ê', 'à', 'î', 'ï', 'ë',
       'ô', 'ö', 'ù', 'ç', 'æ', 'œ']

display:
  - platform: ssd1306_i2c
    model: "SSD1306 128x32"
    address: 0x3C
    lambda: |-
      it.printf(64, 0, id(roboto), TextAlign::TOP_CENTER, "%s", id(douche).state.c_str());
# ----------------------------------------------------------------------------------------

Thank you for your answer.
I’ve now tested the same code on a Lolin32 and on a Wemos 32 mini and both boards work fine.
I also tested the code on a brand new Wemos D1 mini and I get the wrong behavior there too. I can’t keep up with that and I can’t explain the error. Strange that the thing also runs on the Wemos D1 mini for you and with me several Wemos D1 mini all show the same error.

Looking at my D1, I see that the other 2 pins are GND (obviously) but 5v on mine.

I connected my display to 3.3V. this also works on the ESP32 without any problems.

This may be the solution SSD1306 breaks wi-fi - #3 by jsuanet

Hello, everyone,
that was the solution! Now everything works as it should.
Great thank you. I just wonder what is the reason that the wifi breaks down at lower I2C bus speeds.

Sometimes it is because the bus is shared and wi-fi can not operate at lower bus speed.
Like on the RPi before 3B+, USB 2.0 is the same bus as Ethernet, strongly reducing the speed ethernet can go.