Strange Capacitive Soil Moisture Sensor v2.0 values

Hi,
i wanted to build a system with 4 waterpumps, 4 Capacitive Soil Moisture Sensor and an Arduino Mega 2560 to water 4 differnet plants in the summer. I wrote a script, wired the sensors and performed a test at an indoor plant.
All four sensors are sticking in the same pot with about 10 cm between them. I didn't expect, that they had similar values, but as you can see (i use a datalogger shield with 32gb SD card to log the data) in the picture attached, it can't be seen at all if something changes with the Soil. The plot you can see is a record of about 2,5 days, i watered the plants only in the beginning, about 1h before the recording starts.
I have relativ long wires attached (two sensors with 2m wire and two sensors with 1,5m wire) with 0,75mm^2 but that shouldn't be that much of an issue, right? Furthermore i have sealed the Moisture Sensor with an water-based paint, i dipped the whole sensor in the paint, because i want to use the sensor outside for an extended amount of time. Since the values are in an normal range, i would suspect that it didn't damaged the Sensor.

The Mega is supplied with 9V DC.

What do you guys think about the values, are the normal? Shouldn't they increase/decrease over time?

Here is the Code i use:

#include <Wire.h>
#include "RTClib.h"
#include "DHT.h"
#include <SPI.h>
#include <SD.h>

#define DHTPIN 2 //Pin für DHT
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);
RTC_DS1307 rtc;
File logFile;

const int chipSelect = 10; //für AZ-Delivery Data-Logger Shield
const int zeit = 60000; //Messintervall

long temperature;
long humidity;

int sensorValue1;
int sensorValue2;
int sensorValue3;
int sensorValue4;

void setup() {

pinMode(10, OUTPUT);
Serial.begin(9600);
dht.begin();
rtc.begin();
SD.begin (10,11,12,13);

char filename = "LOGGER00.CSV";
for (uint8_t i = 0; i < 100; i++) {
filename[6] = i/10 + '0';
filename[7] = i%10 + '0';
if (! SD.exists(filename))
{
// only open a new file if it doesn't exist
logFile = SD.open(filename, FILE_WRITE);
break; // leave the loop!
}
}
if (!logFile) {
Serial.println("could not create file");
}
Serial.print("Start logging: ");
Serial.println(filename);
logFile.print ("Start logging");
logFile.print(';');
logFile.print(';');
logFile.print(';');
logFile.print(';');
logFile.print(';');
logFile.print(';');
logFile.print("Sensor1");
logFile.print(';');
logFile.print("Sensor2");
logFile.print(';');
logFile.print("Sensor3");
logFile.print(';');
logFile.print("Sensor4");
logFile.println();
}

void loop() {
delay (zeit);

/RTC/
DateTime now = rtc.now();

/Moisture Sensor Values/
delay (250);
sensorValue1 = analogRead(A0);
delay (250);
sensorValue2 = analogRead(A1);
delay (250);
sensorValue3 = analogRead(A2);
delay (250);
sensorValue4 = analogRead(A3);

/* Serial Print */
Serial.print(now.day(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.year(), DEC);
Serial.print(',');
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.print (",");
Serial.print (" ");
Serial.println();

Serial.print ("sensorValue1: ");
Serial.println(sensorValue1);
Serial.print ("sensorValue2: ");
Serial.println(sensorValue2);
Serial.print ("sensorValue3: ");
Serial.println(sensorValue3);
Serial.print ("sensorValue4: ");
Serial.println(sensorValue4);
Serial.println();

/* Log Data to SD */
logFile.print(now.day(), DEC);
logFile.print(';');
logFile.print(now.hour(), DEC);
logFile.print(';');
logFile.print(now.minute(), DEC);
logFile.print(';');
logFile.print(now.second(), DEC);
logFile.print(';');
logFile.print(';');
logFile.print(';');
logFile.print(sensorValue1);
logFile.print(';');
logFile.print(sensorValue2);
logFile.print(';');
logFile.print(sensorValue3);
logFile.print(';');
logFile.print(sensorValue4);

logFile.println();
logFile.flush();

}

I will take a SWAG! They probably do not work because you destroyed them. The typical sensor in the Arduino is a resistance measuring device and the paint insulated the sensor soil contacts. If capacitance you flooded the sensor with the paint, it added to much capacitance and took it out of range.

You might want to look at my page here

that shows how I measure soil moisture levels.

I’ve had probes in pots for a while now they just need cleaning occasionally.

Hi Tooth
Look at this site.
It maybe help you.
There is menny of this sensor that have problems
So-Now.com - Electronics (so-now.com)

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