I have been working on a small DIY soil moisture sensor project the last couple days, mostly inspired by the gardenbot project. The idea is to add it to my greenhouse monitoring project. I chose to make my own sensor because it is quite easy to do, but if you prefer to buy a readily made one, there are relatively cheap ones Ebay and SeeedStudio. The schematic of such sensor is quite basic:
I wanted to hook the moisture sensor to the TinySensor’s 2.5mm jack so that I can take use of the on-board voltage divider, plus it is easy to connect/disconnect whenever necessary. So I looked on the schematic to find out how to configure the voltage divider so that I can achieve the above schematic, it takes a small trick to do it: I don’t place the components that are crossed over with red mark:
And finally time to put the sensor together and the two resistors. I will share a trick that I have on the TinySensors: I solder small headers instead of the resistors so that I can plug the resistors in, instead of soldering. This allows me for flexible prototyping and quickly switching projects. Note the 1Mohm between the burden resistor and the ground:
I could tin the copper rods for better corrosion protection, copper will oxidize really quick.
The software part is nothing special, just averaging ten analog readings. You get near 1023 when you dip the sensor in water and 0 when it is out in the dry. all the in-between range is some level of moisture, experimenting with the readings on relatively dry and ready for watering soil is necessary. Also, GardenBot’s site suggest flipping the voltage to cancel out electrolysis, but I decided this is so cheap to build that not worth the extra effort.
Interesting project, I actually planned to hook up an avocado tree that we have to Tweet when it wants watering, but didn’t have enough time to complete the project because I am overwhelmed with other project ideas and so little time to materialize them.
Page views: 20704