LCD or any other device not working unless power is connected to Arduino

Hi guys,

So basically I am just tinkering a bit around with Arduino and external devices, sensors etc.
I have a question, which can be for experts quite trivial, but I don’t quite understand why this is happening.

So currently I have LCD I2C connected to my Arduino with this code:

#include <LiquidCrystal_I2C.h>

//I2C pins declaration
LiquidCrystal_I2C lcd(0x27, 16, 2);

int i = 0;

void setup()
{
    lcd.init();
    lcd.backlight();
    lcd.setCursor(0, 0);
    lcd.print("Hello");
    lcd.setCursor(0, 1);
    lcd.print("World!");
    delay(3000);
    lcd.clear();
}

void loop()
{
    lcd.clear();
    lcd.print("COUNTER:");
    lcd.print(i);
    ++i;
    delay(1000);
}

So LCD is just displaying a counter over a loop.
Now, the LCD works as long it is connected to 5V and GND (besides SDA and SCL) pins.
But if I decide that I don’t want to “strain” Arduino with the power for LCD, I would like to connect the power pins of the LCD to some other 5V power source.
But as soon as I do that, it doesn’t work anymore.

So, would someone kindly tell me, why this is not working? I thought that for the communication between Arduino and LCD only SDA and SCL pins are necessary between them.

Also, if I would have many power consuming devices connected to the Arduino - let’s say many LCDs - how do I supply power to all of them? Surely I cannot connect all of them straight on to Arduino.

Any help is much appreciated!

Regards

do you need a common ground between the LCD and Ardiuno (for SCK and SDA)?

But if I decide that I don't want to "strain" Arduino with the power for LCD

What kind of LCD do you have? The ones commonly used with an Arduino draw so little current that the Arduino could power 10 of them with no strain.

gcjr:
do you need a common ground between the LCD and Ardiuno (for SCK and SDA)?

The goal would be not to have a common ground or even same circuit.
The LCD as such is here just an example. It could be any device, or even something big with big power consumption. Something that cannot be powered over an Arduino.
The LCS is just an example for observation that I had.

Thanks

You need a common ground. There needs to be a return path for the signals to the source.

you can't communicate electrically with another device without a complete circuit. If the Arduino provides the SCK and SDA signals there must be a ground path. This is not the same as powering the device.

if you want the LCD to be completely isolated you'll need opto-isolators

The goal would be not to have a common ground

Unless you design the ENTIRE circuit using opto-isolators, you MUST have a common ground.

The LCD can NOT be driven through opto-isolators.

Thank you all for replying me so promptly.

After tinkering around and reading this article, exactly what I did was making a common ground.

Since then everything is working as expected.

So it was really an electronics 101 question. :sweat_smile: But I am not an electrician and this is how I am going to learn. :slight_smile:

Thanks again everybody!