Soil Moisture Tester




Introduction: Soil Moisture Tester

About: Electronic is my passion. I like to work with programming devices like Arduino, ESP8266, Raspberry Pi. I enjoy design electronic projects. IG: lab_torord.

Check your plant soil moisture with this simple tester. You will know if you need to water your plants.

I have some plants and I wanted to know if they needed some water.

I created a device that allows me to know if I need to water my plants.

I used a soil moisture sensor this measure ground conductivity. I connected it to an Arduino Uno and created some levels of soil moisture. The device has three LEDs. Green, yellow and red. Green led shows me that the soil moisture is good. Yellow shows me the soil moister is enough and red led shows the plants need water.


Step 1: Have Supplies on Hands

You should have your supplies on hands.

That save you time.

Step 2: Make Connections

Use the schematic to make the connections between components.

Step 3: Upload the Code

Upload the code to the Arduino Uno.

// Soil moisture tester
// Set leds numbers const int verde = 8; const int amarillo = 9; const int rojo = 10;

// Set analog input const int sensor = A0;

// Variable to store moisture value int humedad = 0;

void setup() { //Set name as outputs pinMode(verde, OUTPUT); pinMode(amarillo, OUTPUT); pinMode(rojo, OUTPUT);


void loop() {

humedad = analogRead(sensor); //take the lecture from the sensor

if(humedad < 300) { // If the moisture value is less than 300 lights on green led and turns off others. digitalWrite(verde, HIGH); digitalWrite(amarillo, LOW); digitalWrite(rojo, LOW); delay(1000); }

else if(humedad > 300 && humedad < 600){ // If the moisture value is more than 300 but less that 600 lights on yellow led and turns off others.. digitalWrite(verde, LOW); digitalWrite(amarillo, HIGH); digitalWrite(rojo, LOW); delay(1000); }

else { // Any value more than 600 lights on red led and turns off others. digitalWrite(verde, LOW); digitalWrite(amarillo, LOW); digitalWrite(rojo, HIGH); delay(1000); } delay(1000); //Retardo de 1 segundo antes de iniciar el ciclo nuevamente.


Step 4: Make Some Tests

Now you have a soil moisture tester.

You should have some tests. Try to measure different soil plants.

Enjoy your tester.

Be the First to Share


    • Big and Small Contest

      Big and Small Contest
    • For the Home Contest

      For the Home Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge



    2 years ago

    A good start, but please allow me some remarks: the A0 output of the module is in fact directly wired to the actual sensor.
    Using that output to the i put of your Arduino makes the module totally unnecessary. Just as well connect the sensor directly to the arduino.
    Your sensor will be gone in a short time due to electrolysis. There is a solution for that: rather than feed yr sensor from Vcc, feed it from a digital pin and only turn that pin high when you are measuring and measure only a few times per day.
    A second solution is to not use this type of sensor at all but to use two graphite rods as a sensor


    Reply 2 years ago

    Hello, diy_bloke,

    The device is only used to check the soil moisture in one time. You do not need to leave the sensor inside the soil.

    You are right, I could use the sensor directly to the Arduino. I will take that recommendation for another project.

    I apreciate your suggestions.