top of page
Hariharan Subramanian

Measuring soil moisture using Arduino & resistive moisture sensor









Article covers measuring moisture contents in soil using Arduino-Uno & Moisture sensor.


 

Disclaimer


1. This article does not cover the calibration of moisture sensors.

2. This does not cover the working principles of flow meter.

 

Working sample


Before we proceed further, let us take a look at what our end result would look like.









Items Needed


- Arduino Uno

- Soil moisture sensor.


Pre-requisites


This post assumes you already have,

  1. Arduino Editor installed on your laptop.

  2. Your laptop connected to Arduino using the USB cable.

  3. Basic familiarity with Arduino programming using C++.

Technical details


How moisture sensors work?


This post does not go deeper into the working details of moisture sensors. There are numerous materials available on the internet.







Moisture sensor used in this examples accepts 5V as input .



Schematic & Wiring diagrams







This is how the final setup looks like:






How-to steps




Step 1: Connecting Arduino to moisture sensor







Arduino Uno

Moisture Sensor

Remarks

Wire color

5 V

+ ve

5 V

red

GND

- ve

5 V ground

black

A2

AO

Analog output

blue



Step 2: Arduino C++ code


There are no libraries needed.



~~~~~~~~ C++ Code


Step 3: Testing the bidirectional message communication


Now the setup should be ready to test the moisture sensor. Please refer the last section of accompanying video in this page to see the working demo.




Closing note


Hope this post gives you the basic details for measuring the moisture contents using Arduino and resistive moisture sensor. Wishing you all the very best for your IoT projects.





Thanks,








0 views0 comments

Bình luận


bottom of page