Issue with longer wire soil moisture sensor

Hello please bare with me as I'm still learning and new.
I am doing a school project for soil moisture monitoring for a plot. I used capacitive soil moisture sensors with esp32 microcontroller for my blynk. I tried to make my wire longer because the plot is long like 14 meters and have drip lanes for irrigation(also have greenshouse roof but open field).. the wire is about 4 meters stranded 22 wire in my soil moisture sensor and now its not changing any value. (it just stay consistent as 88-90) i tried to test it directly in my esp32 if the sensor is the problem but it works fine... What do i do?


the value of 90 sometimes dropping 87-90

heres the sample

UPDATE: it works now because I use different awg size. from awg22 to awg18 it works now. Thank you

twist long wires

hello, im sorry can you elaborate? im sorry im new to arduino

images
images-1

Why don't you place the ESP right next to the sensor?

hahaha its because the plot of crop is long so i think i needed to make the soil moisture sensor longer so it can measure the other area of plot.. my project is soil moisture monitoring integrating with application so it can notify me with the app if the soil needed to water...

its because the plot of crop is long so i think i needed to make the soil moisture sensor longer so it can measure the other area of plot.. my project is soil moisture monitoring integrating with application so it can notify me with the app if the soil needed to water...

ohh thanks, do i just need to connect this to the jumper wire of sensor or directly?

The long wires may not be your problem.
Those sensors are not waterproof and not designed for operation outdoors.
If the electronic circuit is exposed to high humidty or moisture the readings will not be reliable.

i tried to switch the sensor directly in the esp32...and the sensor still works.. since its still work in progress, i'll design my sensor for prevention of exposure of high humid/moisture. thank you :heart_hands:

ohh sorry i forgot to tell that they have open greenhouse. they have roof but open field and they have drip lanes for irrigation..

With it outside in the soil or are you doing all this testing inside with the wire coiled up like you show in the picture

You could verify that your wiring is solid to start with. Do you have multimeter?

i haven't tried it with the soil and also did not try to test it with wired coiled up..
I tried spreading out the longer wires but the sensor value measures only 88-90 mostly 90..i tried to put the sensor into the mug of water to test if it has a response but there's no dropping value..is the problem the lose of voltage of the wire because of its length??

ohh, i dont have multimeter yet..

When you added the longer wires, did you solder the connections?

oh i did not, i just put electrical tape on it

You cut and stripped the wires, then twisted them together and then put tape over each wire connection, is that correct?

yes

Try this simple test program.
Take a reading with the sensor in air then in water. There should be a big difference in the voltage printed out.

// Soil moisture test program
// Connect sensor AOUT to ESP32 A0 pin

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  uint32_t x = analogReadMilliVolts(A0);
  Serial.println(x);
  Serial.println();
  delay(1000);
}