Arduino Soil Moisture Project

Hello guys

Today I am presenting you my first project on instructables.
It's about measuring soil moisture with Arduino and only one sensor. This project is very easy to make, and everybody who wants to start learning work with Arduino platform should try it. This project can also help someone who has previous experience with Arduino.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Obtaining of All Parts

This project uses only few parts. They are also very cheap to get so don't worry about price.
Parts used in this project:

  1. Arduino uno rev3
  2. LCD 1602 green display with I2C
  3. FC-28-d Soil hygrometer detection module + soil moisture sensor
  4. Red LED diode
  5. Blue LED diode
  6. 2 resistors 220 ohm
  7. Few jumper cables to connect all of the parts
  8. Arduino battery connector

Always keep in mind that you can use any other Arduino for this project. You can also change LCD display to any other.

Step 2: Connecting All Parts Together

In this step you can see the schematic I made with fritzing. I will also write down how to connect every key part of this project down here.
As you can see we are using 5V and GND from arduino to power the breadboard.

LCD :

  • VCC to 5V (+ part on breadboard)
  • GND to gnd (- part on breadboard)
  • SDA to analog pin A4
  • SCL to analog pin A5

Soil Moisture Sensor:

  • VCC to 5V (+ part on breadboard)
  • GND to gnd (- part on breadboard)
  • D0 to digital pin 2
  • A0 to analog pin A0

Diode connecting:

  • one part of diode goes into - part of breadboard
  • second part goes through resistor of 220 ohm and after that is is connect to pin 12(blue diode) or 11 (red diode)

Step 3: Writing Code

I'll try to explain this code in few parts. There will also be written full code so you can copy it and also change it if you see any need.

  1. First thing to keep in mind is that you need to instal LCD i2c library
    1. LiquidCrystal_I2C.h
    2. You also need to configure your lcd on the start of the code
  2. Set up variables used in code, connecting sensor to pins, and diodes
  3. In the third part there are methodes created so loop part can be easier written
  4. Setup for arduino, in this part you are setting up LCD you are using for this project
  5. Loop part is the main part of this project

Full code is in attachment of this step.

Step 4: Using Your Arduino

Here you can see how does the sensor works.
Red diode is signalizing that sensor has small value of detection. It is around one. In this picture sensor is not placed in ground so the normal result here will be somewhere around one.

On the other picture sensor is placed near plant that was watered few hours ago. As you can see the blue diode is ON.

If there is any other question you can ask me.
Thank you guys for looking at my first project.

With all regards.

Be the First to Share

    Recommendations

    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    2 Discussions

    0
    None
    Sebastian95seamster

    Reply 17 days ago

    Thank you for looking at my first project on instructables. There will be more of them here, and I hope you'll find them interesting. Have a nice day. :D