2. INTRODUCTION
For farmers and growers, the Internet of Things has
opened up extremely productive ways to cultivate soil and
raise livestock with the use of cheap, easy-to-install
sensors and an abundance of insightful data they offer.
Prospering on this prolific build-up of the Internet of
Things in agriculture, smart farming applications are
gaining ground with the promise to deliver 24/7 visibility
into soil and crop health, machinery in use, storage
conditions, animal behavior, and energy consumption
level.
3. Soil moisture
Soil moisture sensor calculates the volumetric
water content of soil according to the dialetric
constant measurement. The sensor allows to
control the water content of soil in order to
optimize irrigation and treatments as well as to
support agronomic studies.
5. GOAL OF THE PROJECT
We are going to harness the awesomeness of Raspberry Pi
to build a moisture sensor for a plant pot.
We will be able to monitor the sensor locally on the LCD
or remotely, via ControlMyPi.com, and receive daily
emails if the moisture drops below a specified level.
7. ALONG THE WAY WE WILL ALSO…
wire up and read a value from an analog sensor over SPI
using a breadboard
format the sensor reading nicely in the console
display the sensor reading on an RGB LCD display
have the Raspberry Pi send an email with the sensor
reading
easily monitor the sensor and some historic readings on
the web
Raspberry Pi Moisture Sensor
8. HARDWARE SUPPLIES
Raspberry Pi model B
Wired or wireless Internet connection
Half-size breadboard
Six female-to-male jumper wires
Male-to-male jumper wires (various lengths)
MCP3008 - 8-Channel 10-Bit A/D Converter with SPI Serial Interface
Octopus Soil Moisture Sensor Brick
Adafruit RGB Negative 16x2 LCD + Keypad Kit for Raspberry Pi
assembled with the Stacking Header for Raspberry Pi - 2x13 Extra Tall
10. STEPS INVOLVED
1.Wiring
• Power and ground Rails
• MCP3008
• Sensor
2.Preparing the Software environment
• Operating system
• Required Utilities
• SPI Python Wrapper
• Adafruit Python Library
• ControlMyPi Library
• Project code
Adding a Line Chart
11. 3.Reading a value from sensor
• Programs
• Monitoring in the console
• Better console Monitoring
• LCD Monitoring
• Remote monitoring with ControlMyPi
• Adding a Line chart
• Improving the Line chart
15. The Software Environment
This project can be built using Adafruit, which comes with the hardware SPI
driver ready to go.
Required Utilities:
Git (/ɡɪt/) is a version control system that is used for software development
and other version control tasks.
pip is a package management system used to install and manage software
packages written in Python.
We need a Python wrapper for the SPI driver so we can read the values from
the sensor over SPI
16. ControlMyPi Library
ControlMyPi is a service to quickly and easily make control panels on the
Internet from your Raspberry Pi Python scripts.
ControlMyPi provides a web based service to allow simple Python scripts to be
controlled from a panel over the Internet. Your Python script defines a widget
layout of labels, buttons, status indicators and more for ControlMyPi to display.
When a button is clicked your script will get a message. If you have some
status to report, your script can send that to ControlMyPi at any time and it’ll be
pushed out to your
18. Advantages
Water saver.
• Soil detection system helps to provide sufficient water to the plants and
can save plants from excess watering or starvation.
Increased production and better quality
• The yield of crops will be at its optimum level and quality will also be
improved
Cost Effective.
• It is really cheap and affordable.
20. FUTURE SCOPE
In near future we are enhancing the design to automate watering
system according to the soil moisture levels.
A database can be formed. It can be used to determine the types of
acids, alkalis or salts present in the soil. Salinity of soil can also be
calculated by correlating it with the output voltage.
Wireless transmission of the output data directly to the user can be
done using ZigBee or Bluetooth. We can get the values from stored
data base in PC so that the moisture holding capacity of the soil can
be determined and can be operated by a smart phone for automatic
watering of plants.
21. Conclusion
The soil moisture response monitoring system designed is very simple to
understand and handle. It can be operated by all age-groups of farmer.
It can be reprogrammable to add more features. The moisture is measured
up to the root zone of the crop. Thus it can be used to check the moisture
value for any crop.
Sensor can be placed vertically in the soil to check the depth of irrigated
water and also it can be placed horizontally at different heights in the soil
according to the crop.
It is user friendly and can also be used by uneducated farmers.
22. In this Project, we learned how to set up and use SPI on your Raspberry Pi for
use with an Analog-to-Digital converter.
We then used a sensor to monitor the moisture level of the soil in a plant pot.
The software allows us to see this sensor reading on the console, on an LCD,
on a gauge and chart over the Internet and through a daily email.