As my projects evolved in my mind there comes a time to make the ideas come true and so the project below became reality. Its an Arduino based soil moisture sensor, with 16,x2 LCD, real time clock (which keeps time even if the power supply is disconnected), temperature sensor and SD data logger.

It can be very helpful with a bachelor's degree or master's degree biotechnology/biology/botanics/plant keeping projects.

The idea of the project is to build a moisture sensor, both portable and stationary (with 9V battery or supplied with a standard adjustable charger). Its going to take very short measurments every X miliseconds, depending from how you will set it. Why the measurments need to be short? Becouse there is a problem which need to be solved and got solved in an article:

https://www.instructables.com/id/Have-a-Bumper-Crop... ----- By: Robert M / ArduinomasteR

who improved my first instructable which im very grateful for:

https://www.instructables.com/id/Arduino-LCD-Soil-M... ----- By: Wojciech Marczak / WojciechM3

Those two articles became the base for my idea, how to improve it and make it even better

So the idea to make the probes last longer is to let the current only flow in a short time (2x 30 miliseconds in our case) and to turn it off for a set amount of time, for example 1,800,000 milisecounds = (30x60x1000) = 30 minutes. To set this value you need to change the delay at the very end of a project.ino file.

However, since we have the sensor which takes the measurements every X miliseconds, now we need map the values. The values will vary from 1000 and something about stable 400, However the lower the measurment the lesser is the resistance, and since the probes check the resistance between two bolts we need to make Value of 400 or similar to be humidity 100% and a bigger resistance, 1000 or above means the humidity is 0% So we need to map the values of 1000 --> 400 to be humidity 0 ---> 100%

All of those things will be done in the next steps of this instructable.

Step 1: Gathering Parts

You will need:

- Arduino Uno (for example)

- Real-Time Clock (RTC) DS3231 with battery

- MicroSD + SD adapter / SD Card

- SD Module

- 16x2 LCD

- YL-69 Soil moisture sensor

- Wires

- Potentiometer, i useed 47k , but thats only because i couldnt find any 10-20k Ohm potentiometer in my parts collection

- Breadboard

You can buy all of these really cheaps, since all of those are made in china as a mass production.

<p>sir,</p><p>im just a novice on this arduino project.</p><p>i just wanna ask if the codes given in this project can also be used in</p>Arduino Nano?
<p>sir.. im already making this project.. tnks to you..<br>but its a half bake.. <br>coz i dont know how to adjust the time just like what you written above.. what part of the program i that i should change or adjust..could you give example please?</p><p>by the way.. can 4gb or 8gb SD card can be used in this project? coz i have a problem on mounting the SD card.. it cant be detected in the SD module</p>
<p>Everything is explained in the instructable.<br><br>&quot;</p><p>To set the time you're going to need <strong>Sodaq DS3231 library</strong>. <br></p><p>You can get it thru <strong>&quot;add library&quot;</strong> option in arduino program. Just click add library and<strong> type &quot;3231&quot;</strong> And you ll have it shown. You need to install it now. </p><p>However:</p><p>If there is no Sodaq DS3231 library to install use this link to GitHub:</p><p><a href="https://github.com/SodaqMoja/Sodaq_DS3231" rel="nofollow">https://github.com/SodaqMoja/Sodaq_DS3231</a><br><br><br>Load the sketch <strong>&quot;adjust&quot;</strong> and change those values&quot;<br><br>If you still need help, contact me in private message.</p>
sir.. could you help my problem sir?<br>
I have done with the project. When it comes to the output soil containing more water content let's say showing 27% when it comes to dry soil is showing 85% what's wrong with this.sir,please answer my question as i am doing this as my major project for my course
<p>You need to have something wrong in the values mapping section of the arduino code.<br></p><p>int soil = analogRead(potPin) ;<br> soil = constrain(soil, 400, 1000); // We get the values between 400 and 1000, thats why we need to map the values<br> soil = map(soil, 400, 1000, 100, 0); // to make lower numbers a bigger percent, and to map them im range of 1 to 100.<br><br><br>Arduino reads the low moisture as ~1023 and high as around 300-400. Thats why we need to map the values, so they will vary between 0-100 % and 100% is 300-400 value and 0% is around 1000 (1023). Its a simple convertion of values to get what we aim to :) So thats probably the section that is wrong. What method u made it with? Breadboard of PCB? </p>
I had done first with bread board and than I did in pcb. Finally got the output. Can you please help me about the temperature values and what is the temperature shown on the lcd.as i want to show my project to my professor
Any video tutorial please.
<p>This should help, borrowed from youtube, for the moment i dont have enough time to make a video tutorial</p><p>https://www.youtube.com/watch?v=fCxzA9_kg6s</p>
I don't know how to code...so pls help ..
<p>produce hot water of course ..from 50 to 65 degreecelsius</p>
<p>really nice project, we need a similar one to test umidity, temperatures , oxygen and water flux for a new project related to produce water from brushwood</p><p>can you send me more info's about </p><p>please</p><p>mario </p><p>my mail mario.zacrom@gmail.com</p>
<p>Nice project!</p><p>But, bear in mind that at low frequency,</p><p>youll be seeing the ionic conductivity of the soil,</p><p>not just the water content.</p><p>To see only the water content,</p><p>one must look at the permittivity ( capacitance) of the water only.</p><p>The capacitance of the water and the ionic conductivity</p><p>give crossover frequencies from 250K to 4MHz.</p><p>Eg. you need to measure &gt;&gt;4MHz to see only the water.</p><p>Hmmm . . .</p>
<p>I need a similar tester for my eggs incubator, could this be revamp to work? </p>
<p>What do you want to measure? Air humidity, temperature? light? For all of them answer is yes</p>
<p>will I need to change anything? light isn't important but the humidity and temp is, I need to be very accurate with the temp. </p>
<p>What I'm building is designed to measure the soil moisture and the temperature of the air, what you need is to measure the humidity of the air, am I right? If yes, you need to change the sensors, specific sensors can be found over the internet, for example:<br></p><p><a href="https://www.fasttech.com/product/1451806-dht22-am2302-digital-temperature-humidity-sensor" rel="nofollow">https://www.fasttech.com/product/1451806-dht22-am2...</a><br><br>So yup, there is some things which you have to change.</p>
<p>Or lets try the other way, do you need it to check your air humidity and temperature, as it is an egg incubator or its an egg incubator but the eggs are in the soil or sand? If the temperature is an issue, i would use something else to measure the temperature that RTC module, because i don't belive it somehow</p>
<p>the eggs are in racks, so it's the air, the humidity is what I'm looking to check, finding something accurate is my problem. I'm using a GQF cabinet Incubator with a circulating fan</p>
<p>https://www.sparkfun.com/products/10167<br> 2% toleration, is this accurate enough? If not, then :</p><p><a href="https://www.sparkfun.com/products/12871" rel="nofollow">https://www.sparkfun.com/products/12871<br></a></p><p>Accuracy: &plusmn;0.2&deg;C at 0&deg;C, &plusmn;0.5&deg;C at 100&deg;C</p><p></p>
<p>very comprehensive post. are you familiar with my work, i have created many soil sensors; <a href="https://www.instructables.com/id/the-Plant-Doctor-family/">www.instructables.com/id/the-Plant-Doctor-family/</a><br></p>
<p>Could you share instructions for that specific device in the photo you attached?</p>
<p>i'm working on a new instructables post about it. please follow for updates. but in the meantime take a look at <a href="https://www.instructables.com/id/DIY-Smart-Plant-pot/">www.instructables.com/id/DIY-Smart-Plant-pot/</a> same wiring/components, different frame..<br></p>
<p>Great instructable, and excellent idea to de-couple the YL-69 from the power when not measuring to prevent de-lamination and corrosion of the probes. When you get a chance, can you update the connection diagram and the instructions at Step 2 as the improved wiring is not documented there - both the diagram and written instructions still say to connect to the common power rails. </p><p>Another idea is to use galvanised nails as probes, as they are conductive (just file one end to get bare metal and solder to it), or to move away from DC, and simulate an AC supply, to completely neutralise any electron migration and prevent 'green wire corrosion'.</p>
<p>Is this better now ?:)</p>
<p>You've added the A0 connection for reading the sensor, but didn't you connect the moisture sensors VCC to Arduino pin 2, not the common VCC, so you could switch the power to it off when not reading it? ;)</p>
<p>You're absolutly right! I missed that mistake twice . I completly forgot to update the schematic with a proper connection of sensor board, its good you found that. Its updated now and connected, mistake got fixed:)</p>
<p>No worries, thanks for fixing it up so quickly :) Looks good now. And good to see the project is still evolving (the work-in-progress PCB). You might want to consider using an Arduino Nano if you're serious about doing more PCB stuff, as it is perfectly suited for this application - both in size and form. </p>
<p>Well done, great effort. Keep up the good work. And thank you for mentioning me in your instructable. I like this one, with clock and data logger and will put this on my long list to make.</p>

About This Instructable




More by WojciechM3:Soil Moisture Sensor (LCD, RTC, SD Logger, Temperature) Arduino LCD soil moisture sensor 
Add instructable to: