{"id":159681,"date":"2025-03-18T17:38:54","date_gmt":"2025-03-18T12:08:54","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=159681"},"modified":"2025-03-18T17:42:00","modified_gmt":"2025-03-18T12:12:00","slug":"soil-moisture-indicator-for-gardening-application","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/soil-moisture-indicator-for-gardening-application","title":{"rendered":"Soil Moisture Indicator For Gardening Application"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"152\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2016\/12\/Screen-Shot-2016-12-24-at-15.19.33-e1644389186872.png\" alt=\"\" class=\"wp-image-28226\" style=\"width:400px\"\/><figcaption class=\"wp-element-caption\">Comment errors or corrections found for this circuit, and get the chance to win big!<\/figcaption><\/figure><\/div>\n\n\n<p>The Soil Moisture Measurement is a vital application in Gardening and Agriculture to check the status of soil whether dry humid or wet. Accurate moisture content knowledge helps to check whether a plant or crop needs water or not. Many moisture measurement systems are available in the market. Some are costly and few have only audio or visual indication facilities. To eliminate this drawback, I have developed this soil moisture indicator for gardening applications with LCD display facility. This system is cost-effective and easy to use with the least human effort.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Components<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Arduino Nano<\/h3>\n\n\n\n<p>The Arduino Nano is a micro size, complete, and breadboard-compatiable board based on the ATmega328. The Arduino Nano can be powered via the Mini-B USB connection.The power source is automatically selected to the highest voltage source.&nbsp;The ATmega328 has 32 KB.&nbsp;Each of the 14 digital pins on the Nano can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">I2C LCD<\/h3>\n\n\n\n<p>A typical I2C LCD display consists of an HD44780-based character LCD display and an I2C LCD adapter. These LCDs are ideal for displaying only characters. A 16\u00d72 character LCD, for example, can display 32 ASCII characters across two rows. At the heart of the adapter is an 8-bit I\/O expander chip \u2013 PCF8574. This chip converts the I2C data from an Arduino into the parallel data required for an LCD display.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Soil Moisture Sensor<\/h3>\n\n\n\n<p>A soil moisture sensor is used to measure the level of moisture of soil.It has two probes which can be inserted in the soil to measure the moisture level in the soil. These two probes flow the current to the soil and calculate the resistance of the soil and change the value to the moisture value. Whenever there is more water, soil conducts more current, so the resistance will be lower and moisture level will be more. On the other side, dry soil conducts less current due to less water, so the resistance is more and moisture will be less.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Part List<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Arduino Nano<\/li>\n\n\n\n<li>Bread Board<\/li>\n\n\n\n<li>Jumper Wires<\/li>\n\n\n\n<li>Nano Cable<\/li>\n\n\n\n<li>LCD I2C<\/li>\n\n\n\n<li>Soil Moisture Sensor<\/li>\n\n\n\n<li>Jar<\/li>\n\n\n\n<li>Soil<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Construction and Working<\/h2>\n\n\n\n<p>To build this soil indicator system, we have used LCD I2C along with electronic components Arduino Nano, Soil Moisture Sensor, Bread Board, Arduino Nano Cable, Jar filled with soil. The Soil Moisture Sensor is connected with the A0 analog pin of Arduino Nano. LCD I2C is used to display soil moisture status whether dry, humid or wet. LCD I2C pins SDA connected to A4 pin of Arduino Nano, SCL to A5 pin of Arduino Nano, Vcc to 5V pin of Arduino Nano, GND to GND pin of Arduino Nano. When the moisture level is between 600 and 1000, LCD will display \u201csoil is dry\u201d. When the moisture level is between 400 and 600, LCD will display \u201cSoil is humid\u201d and when the moisture level is below 400, LCD will display \u201cSoil is wet\u201d. If the moisture value is above 1000, LCD displays \u201cSensor is not in the soil\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Circuit Diagram<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"766\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1024x766.png\" alt=\"\" class=\"wp-image-159682\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1024x766.png 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-500x374.png 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1536x1149.png 1536w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-561x420.png 561w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-80x60.png 80w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-696x521.png 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-265x198.png 265w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator.png 1772w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Fig. 1: Soil Moisture Indicator Circuit Diagram<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Testing<\/h2>\n\n\n\n<p>Make connections as per the circuit diagram. Connect Nano Cable with Computer. Connect Vcc of the sensor to 5V and ground to ground pin of Arduino. Put the Sensor inside dry soil, and the LCD will display \u201cSoil is Dry. Put the Sensor inside wet soil, and the LCD will display \u201cSoil is wet&#8221;. Put the Sensor inside normal soil, LCD will display \u201cSoil is humid\u201d.\u00a0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Source Code<\/h2>\n\n\n\n<p>#include &lt;LiquidCrystal_I2C.h&gt;<\/p>\n\n\n\n<p>LiquidCrystal_I2C lcd(0x27,16,2);&nbsp;&nbsp;<\/p>\n\n\n\n<p>const int sensor_pin = A0;&nbsp;&nbsp;<\/p>\n\n\n\n<p>void setup() {<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.init();<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.clear();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.backlight();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.setCursor(0,0);&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.print(&#8220;Soil Moisture&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.setCursor(0,1);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.print(&#8220;System&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;Serial.begin(9600);&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;delay(2000);<\/p>\n\n\n\n<p>&nbsp;&nbsp;lcd.clear();&nbsp;<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<p>void loop() {<\/p>\n\n\n\n<p>&nbsp;&nbsp;int sensor_analog;<\/p>\n\n\n\n<p>&nbsp;&nbsp;sensor_analog = analogRead(sensor_pin);<\/p>\n\n\n\n<p>&nbsp;&nbsp;if (sensor_analog &gt;=1000)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;{ lcd.setCursor(2,0);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;Sensor is&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.setCursor(0,1);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;not in the soil&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.clear();}<\/p>\n\n\n\n<p>&nbsp;&nbsp;if (sensor_analog &lt; 1000 &amp;&amp; sensor_analog &gt;= 600)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{lcd.setCursor(2,0);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;Soil is&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.setCursor(2,1);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;dry&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.clear();}<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;if (sensor_analog &lt; 600 &amp;&amp; sensor_analog &gt;= 400)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;{ &nbsp; lcd.setCursor(2,0);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;Soil is&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.setCursor(2,1);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;humid&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.clear();}<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;if (sensor_analog &lt; 400)<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;{<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.setCursor(2,0);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;Soil is&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.setCursor(2,1);&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.print(&#8220;wet&#8221;);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delay(1000);<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lcd.clear();<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;}<\/p>\n\n\n\n<p>}<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Author&#8217;s Prototype<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1-1024x461.jpg\" alt=\"\" class=\"wp-image-159683\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1-1024x461.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1-500x225.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1-933x420.jpg 933w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1-696x313.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-1.jpg 1379w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2-1024x461.jpg\" alt=\"\" class=\"wp-image-159684\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2-1024x461.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2-500x225.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2-933x420.jpg 933w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2-696x313.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-2.jpg 1379w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3-1024x461.jpg\" alt=\"\" class=\"wp-image-159685\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3-1024x461.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3-500x225.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3-933x420.jpg 933w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3-696x313.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-3.jpg 1379w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4-1024x461.jpg\" alt=\"\" class=\"wp-image-159686\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4-1024x461.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4-500x225.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4-933x420.jpg 933w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4-696x313.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-4.jpg 1379w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"461\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5-1024x461.jpg\" alt=\"\" class=\"wp-image-159687\" srcset=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5-1024x461.jpg 1024w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5-500x225.jpg 500w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5-933x420.jpg 933w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5-696x313.jpg 696w, https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2025\/03\/Soil-Moisture-Indicator-5.jpg 1379w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>The Soil Moisture Measurement is a vital application in Gardening and Agriculture to check the status of soil whether dry humid or wet. Accurate moisture content knowledge helps to check whether a plant or crop needs water or not. Many moisture measurement systems are available in the market. Some are costly and few have only [&hellip;]<\/p>\n","protected":false},"author":30227,"featured_media":159684,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,3805,776],"tags":[],"class_list":{"0":"post-159681","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-arduino-projects","10":"category-prototypes"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/159681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/30227"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=159681"}],"version-history":[{"count":2,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/159681\/revisions"}],"predecessor-version":[{"id":159691,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/159681\/revisions\/159691"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/159684"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=159681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=159681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=159681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}