Switching a DIY soil moisture sensor

Hello everybody,
I want to build a low cost soil moisture sensor, like the one in this tutorial. But I do not want to run the sensor all the time, but rather switch on the sensor to read out the value and then switch it off again. I'm not an electronic expert but I decided to use an NPN transistor to switch my sensor. I purchased a BC635 transistor and wired everything up (see attached fritzing sketch) but the transistor is not turning off and on. The code is very simple for that:

int probe = 0;
int trans = 9;

void setup() {
  Serial.begin(9200);
  pinMode(probe, OUTPUT);
  pinMode(trans, OUTPUT);
}

void loop() {
  
  digitalWrite(trans, HIGH);
  delay(500);
  int moist = analogRead(probe);
  Serial.println(moist);
  
  delay(1000);
  
  digitalWrite(trans,LOW);
  delay(500);
  int moist2 = analogRead(probe);
  Serial.println(moist2);
  
  delay(1000);

}

The serial nearly prints the same values when the two nails are in water (660 - 570), but changes when I put them out (692 - 3)?
What do I wrong? Or are there any other/better solutions for my problem?

Many thanks in advance.
Max :slight_smile: