Introduction: Measuring Soil Moisture With Arduino


In this quick tutorial, I'm going to show you how to read a Soil Moisture Sensor using arduino and print the Soil Moisture Level in Arduino Serial Monitor. You can find the original post written by me in Sinhala frim this link

Step 1: Overview

This module comes with in two parts. It has soil moisture sensor prob and small circuit compacted with a voltage divider and analog to digital converter made using a OP-amp. Also Two LED s, One for Power indicator and other one for indicate the digital output. This module has both analog out and digital output. Regarding analog values output from this, It output low values for high moisture and high values for low moisture. Our Arduino can read this signal in between 0 to 1023 range. In other words, maximum moisture equals to 0 value and minimum moisture equals to 1023.

Step 2: Parts Used

I used fallowing parts and components for this project.

Arduino MEGA Board (You can use Arduino UNO, NANO etc...)

If you proffer arduino uno, you can buy 5 pcs with usb cables here just for $25.99 with free shipping from ebay!

Soil Moisture Sensor Module

2 x Female to Female Jumper Wires

3 x Male to Female Jumper Wires

That's All!, I didn't used a breadboard for this simple setup.

Step 3: Wiring Diagram

Now, Connect everything according to this wiring diagram.

Sensor prob connects to it's converter (no polarity)

Moisture sensor --> Arduino

A0 --> A0

D0 --> Not Connected



That's it! Cool

Step 4: Arduino Code

I wrote a small arduino code to output the Soil Moisture Level to the Arduino Serial Monitor in percentage %

You can download the code HERE

Step 5: Result

Here is the output when I upload the code to my arduino. Everything is working as expected.

Step 6: Help Me to Do More...

You can help me to do more projects by donating some $$ to my paypal.

Thank You.