3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Garduino: Gardening + Arduino

Step 4Build Your Moisture Sensor

Build Your Moisture Sensor
«
  • moisture.jpg
  • dirtynails.jpg
Your moisture sensor consists of galvanized nails some distance apart from each other in the same milk jug of soil. When the soil is more moist, the sensor will report a lower resistance.

Solder a wire to the head of each nail, and be generous: this will be a structural connection as well as electrical. One nail wire gets connected to +5v on the Arduino, and the other goes to both an analog input and a resistor (then ground)
« Previous StepDownload PDFView All StepsNext Step »
14 comments
Oct 25, 2009. 5:49 PMReagenWard says:
How's it working over time?  Almost everyone tries nails first, then moves to gypsum or the like, and if they want accuracy, they end up with a tensiometer.

Also, DC is known to be a problem for moisture sensors over time - have you considered AC or are you just replacing your probes often?
May 6, 2012. 12:23 PMdiy_bloke says:
As a matter of fact, I tried gypsum first and then went to bare spikes. Gypsum is a bother and the sensors actually fall apart quite soon. Also they are slow in reacting.

With regard to the DC. I have not seen any problems yet with my spikes that have been in the ground for a year., but what you could do is provide the positive feed to yr spikes from an arduino pin and only switch that on right before you measure and then off again ofcourse
May 17, 2011. 1:22 AMtypomaniac says:
sounds like a good idea. Do you have an idea how to modify the code to achieve this? I am not very experience with arduino yet..

thank you so much!
tm
May 6, 2012. 12:26 PMdiy_bloke says:
Have a look here on how to write such a code: http://arduinodiy.wordpress.com/2012/04/29/garduino-an-arduino-sort-of-for-your-garden/ if you haven't already found out how to do that
Nov 10, 2009. 10:29 AMReagenWard says:
Good advice.  Thanks!
Nov 29, 2011. 1:02 AMdiy_bloke says:
I have used galvanized nails for some time now and they do well. In order to combat oxydation one could feed them with AC (=getting the voltages from two digital pins that you alternately switch from high to low), but I found it easier to just switch off the voltage to the pins and only switch it on when I am doing a reading.

I have these pins in the ground for a year now and they still look fine. Since winter is coming, I took them out, gave them a quick clean with a brillo. They will go back in the soil in the spring.

If they really look bad, I will just replace them
May 1, 2010. 10:21 PMFredicvsMaximvs says:
Just curious, why galvanized? Why not stainless steel? Is there something in the chemistry that makes this work better?
Jul 26, 2011. 3:36 PMGlider-diver says:
Ever try soldering to stainless steel? :-)
Apr 26, 2011. 9:38 AMSuper_Nerd says:
galvonized is coated with zinc so the metal doesnt oxidize

I belive there is no difference with stainless steel except it is an alloy not an electro-plating

there probably is no difference but price
Jun 15, 2011. 1:28 AMtypomaniac says:
hey : ) is there a special reason why you chose a 10 k resistor? what would happen if i take a higher or lower resistor?

thank you!

tm
Jan 12, 2011. 7:49 AMKarateLover21 says:
Nice! I just built a moisture sensor. I may make a variation of your garduino project. I love the concept of making robotic enviorments, not just automatons! This way, it can be like a garden that cares for itself! Talk about heterotrophic!
May 20, 2010. 12:22 AMdaufhammer says:
 How did you calibrate the sensors in the code.... was it just trial and error? i.e. how did you find out what the right value that the sensor returned that corresponded to the appropriate dryness that meant it was time to water again?
May 20, 2010. 12:27 AMdaufhammer says:
 sorry, just realized you totally explained this in a later step! Great project im hoping to start my own garduino project soon!
Dec 15, 2008. 4:21 PMaction_owl says:
cool, I had been wondering how to read the moisture level of soil definitely gonna try this out

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
66
Followers
18
Author:liseman
bicycles, gardening, and other important stuff