2 arduino's and 1 LCD sharing I2C

Hi all,

Im using 2 arduino (nano's) and 1 LCD on a I2C bus. The master arduino sends data to the slave (which doesnt send anything back, or acknowledge, it just listens on the I2C), and the master controls the display. Both arduino's are powered separately via USB. I simply put the SDA, SCL and ground in parallel, like this:

This works, but ONLY if both arduino's are powered on. When the slave is off, the Master seems to freeze. I tried adding 10K resistors between SDA and 5V and between SCL and 5V, but that doesnt help.

Am I doing something wrong with my wiring?

When the Slave is powered off, its input protection diodes will clamp the SCL & SDA lines to within 0.5V of its supply lines.
If unpowered, that's 0.5V. Both SCL & SDA low will keep I2C from operating.

Thanks, I suppose that makes sense. Is there anything I can do to prevent this?

Are you sure you need the second Arduino?

No, its a temporary solution; Im building a vertical speed indicator with display and needle. Im using an oled without framebuffer, and a single nano is using most of my ram, and refreshing the display with adafruits gfx library is blocking and takes just long enough that the stepper motor stalls/stutters on large moves. To prevent that, I thought, why not use 2 arduino nano's, since I had two, and well, I thought it would be cool to try :slight_smile: The proper solution will involve an esp32 and/or a display with framebuffer.

But in that case: just always power both Arduinos during the temporary solution.

Yeah, thats what I'll do. But its a little tedious because the flight computer Im connecting to has just 1 USB port. I can power the second nano through Vin from the first one's 5V out, but that may not be a a good idea when Im frequently connecting/disconnecting USB to either or both of them when uploading and debugging my sketches on PC. Sure, disconnecting the 5V each time is just a minor inconvience, nothing more. I asked the question initially mostly because I worried I was doing something wrong and possibly risk frying something.