Problem with connecting Arduino by battery

I don't know if this belongs here, because I don't know what causes the problem

If I connect my Adafruit i2c soil moisture Sensor with the Arduino connected to my PC everything works fine. When I connect my relay with my Arduino connected to a battery everything works fine too. But it gets weird when I connect my Sensor. Somehow the sensor stops working. But when I touch any wire connected it works again. When I tested it, the sensor could still pick up about the value 600. I'm very confused and have no Idea, what the problem could be, because, when I touch a wire everything works fine.

Demonstration:
https://drive.google.com/file/d/19_Eb7ZxFbM3nJzQWNdU9s7nlC9u3liD_/view?usp=sharing

Schematic:

#include "Adafruit_seesaw.h"

Adafruit_seesaw ss;
int relais = 5;

 void setup() {
  ss.begin(0x36);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  if (ss.touchRead(0) > 1000){
    digitalWrite(LED_BUILTIN, HIGH);
    delay(1000);
    
    digitalWrite(LED_BUILTIN, LOW);
    delay(1000);
  }
}

Could it be, that there is a problem with ground?

I'm thankful for all answers and hope you can help me

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.