I got a problem with my setup and maybe I find someone skilled in hardware as I'm more the software developer.
Following situation:
I use an Arduino Nano ESP together with 2004A LCD display that has an PCF8574 attached, which makes a nice I2C display out of this piece of electronic. And now the curious thing. If I use a level shifter like I should everything is messed up. The display shows sometimes some values, sometimes not. And if I touch the cable of the rotary encoder I can see the signals on the display I2C line (really strange).
If I on the other side connect the display with its 5V I2C directly to the ESP everything runs fine. (But it should toast my ESP right), The 5V are pulled to around 3,8V and it works. No idea. But this is not a good solution.
And here a measurement of the I2C line with the "correct" but non-working setup. The spikes are the moment I touch the wires of the rotary encoder (which finally has absolutely nothing to do with the I2C lines beside the ground and VSS of course). The rotary encoder is configured as a pull-up.
Connecting a 5V I2C bus to a ESP32 is not allowed in theory. Many 3.3V processors have some kind of protection circuit that is not even mentioned in the datasheet. But sometimes that protection circuit is not the same for every pin.
Breadboards can have bad contacts, jumper wires can be broken.
If something happens if you touch something, that could a missing GND connection somewhere.
As mentioned: As soon as I only connect the signal wires to the other side of the level shifter everything runs fine. I can touch everything without any problems. Could be some kind of ground problem but I don't get it. It's not a missing contact or cable.
Looks like a genuine Adafruit.
Did you solder the headers on yourself?
Maybe a bad solder joint.
Sometimes the solderless breadboards have poor or intermittent connections.
Go out with my dog now. Terrible pain in my head. I switch the power source form Notebook to a USB-C power supply. The situation became worse. Terrible...
Really no idea what's going on. It should be that simple but it really confuses me.
Many times I run the display at 4.5V (diode in series with 5V) or 5V directly. I use pull up resistors to the 3V3, this does not cause a problem as I2C is not driven high, it is pulled up with a resistor to 3V3. It is driven low with either an open collector or open drain output. From your scope trace it appears you are getting ground induced noise, be sure the grounds and + voltages are solid.
Ok guys. Now it becomes really tricky.
I followed your suggestion and reconnected everything. I have replaced the ESP, too. And I disconnected all the other stuff so that only the display, the level shifter and the rotary encoder stays connected.
Same behavior. External power source (not from notebook) makes things worse.
If I touch the rotary encoder it definitely has an effect on the system.
Would like to upload a video but its not possible. Anyhow. If I touch the encoder it becomes a little more stable. If I get my hands of the encoder counts by itself like crazy.
The same behavior is with the level shifter ? And it never happens without the level shifter ?
Can we say that the level shifter is always the problem ? (even if you replaced it with another one)
Exactly. I also tried it together with an LTC4311 (Active I2C Terminator).
I tried a third level shifter that is not build for I2C.
Always the same behavior. As soon as I add a level shifter everything becoming crazy.
I already tried another ESP.
I can try another LCD. Maybe it has a problem. Or maybe the Pins are not well chosen. But if I look into the data sheet it tells me that my choice is ok.
If you have a multimeter, than you can do more tests.
Can you pick one level shifter ?
Tell us where you bought it, with a link to were you bought it.
We would like to see the soldering four ourselves, that photo was not sharp.
Can you show a photo of it in the circuit, so we can see the wires ?
The power on a breadboard can be split into two parts.