Soil and Water Testing using Rasberry pi

Download Full-Text PDF Cite this Publication

Text Only Version

Soil and Water Testing using Rasberry pi

Soil and Water Testing using Rasberry pi

1 Guru Prasad M S, 2 Arpita A Revankar, 3 Kavya S N, 4 Kruti U Nayak

1-4 Dept. of CES, SDMIT,

Ujire, India.

AbstractSoil tests can be used to estimate the kinds and amounts of soil nutrients available to plants. They also can be used as aids in determining fertilizer needs. Properly conducted soil sampling and testing can be cost-effective indicators of the types and amounts of fertilizer and lime needed to improve crop yield . To monitor soil fertility, pH of the soil is most commonly measured. The main objective of the project is to develop a cost efficient and farmer friendly unit that provide the information about deficiency in the soil. This involves testing the macronutrients and micronutrients content of the soil using a pH sensor.

Index TermsMacronutrients, Micronutrients, pH, Soil pH.


    Agriculture is the most important sector of indian economy. Indian agriculture sector accounts for 18% of indias gross domestic products. Soil is a precious resource that we need to manage carefully. As much as 60 per cent of crop yields depends on soil fertility. Fertile soil are necessary to grow healthy crops. A proper soil test will help ensure the application of enough fertilizer to meet the requirements of the crop while taking advantage of the nutrients already present in the soil.

    There are 18 elements necessary for plant growth. They are; Hydrogen (H), oxygen (O), carbon (C), nitrogen (N), phosphorus (P), potassium (K), calcium (Ca), magnesium (Mg), iron (Fe), manganese (Mn), sulfur (S), boron (B), copper(Cu), zinc (Zn), molybdenum (Mo), chlorine (Cl), nickel (Ni) and silicon (Si). The availability of these nutrients to plants is governed by soil chemistry, specifically, pH .

    Soil pH is a measure of the acidity or alkalinity in soils. In the pH scale, pH 7.0 is neutral. Below 7.0 is acidic and above

    7.0 is basic or alkaline. Soil pH affects nutrients available for plant growth. In highly acidic soil, aluminium and manganese can become more available and more toxic to plant while calcium, phosphorus, and magnesium are less available to the plant. In highly alkaline soil, phosphorus and most micronutrients become less available.


    Miss Yogita Kulkarni, Dr. Krishna K. Warhade, Dr. SusheelKumar Bahekar presented the Primary Nutrients Determination in the Soil Using UV Spectroscopy. In this paper author described to analyse soil properties for accurately mapping various primary nutrients in the soil. Various soil samples were taken from cultivated farms at the agriculture college, Pune A multi-parametric analytical system for measuring primary nutrients contents in cultivated soil is developed for on field analysis using the techniques as

    UV Spectroscopy. This paper gives review of sensor technology used for sensing of primary nutrients in the and demonstrate fundamental results of UV Spectroscopy method for on the go soil sensor.

    Deepa V. Ramane, Supriya S. Patil1, A. D. Shaligram presented the Detection of NPK nutrients of soil using Fiber Optic Sensor. This paper explains about the actual detection of NPK values of the soil using multimode plastic fiber optic sensor. Aqueous solution of soil under test is illuminated by different light colors.

    The principle of optical NPK fiber is based on the interaction between incident light and the soil surface properties, such that the reflected light vary due to the soil physical and chemical properties. This sensor works on the colorimetric principle, which deals with the measurement of colored intensity. The sensor probe consists of seven fibers arranged in concentric configuration with central fiber acts as receiving fiber and surrounding six fibers acts as transmitting fiber. The driving circuit of LED consists of voltage to current converter, buffer and a subtractor.

    The colored light passed through the fiber to aqueous solution of soil sample. Depending upon NPK values of the soil light pf particular wavelength and strength gets absorbed by the solution and remaining gets reflected back. Reflected light is get collected by the receiver probe and then converted to electrical signal using phototransistor. The sensor output is calibrated in terms of deficient component values as per the standard color chart. Results are not accurate and it requires more time.


    In the system the soil nutrients are measured with the help of pH sensor. The analog input from the pH sensor is converted into digital input and send to the controller called Raspberry Pi. From the pH value the nutrient content in the soil can be analysed. Then it is compared with the already stored threshold value and if the obtained value is less than the threshold value then it is notified to farmer.

    1. Block Diagram

      Fig: Block diagram of proposed system

      1. pH Electrode:

        The pH of a solution is determined by the solution coming in contact with the electrode. The electrode is constructed of a special glass, which is responsive to the change in the hydrogen ion potential. The special glass is actually hydrated by the solution, and becomes a type of glass gel. The difference in electric potential between the outside solution and the inside solution generates the electrical signal which is read out in either digital or analog form. pH sensor is used to measure the pH value of the soil. The module power of pH sensor is 5V.

      2. Analog to digital converter

        pH sensor output signal is analog signal that will be passed to MCP 3008. It converts the analog signal into digital signal. Digital signals are passed to the raspberry pi. Raspberry pi only accept the digital signals.

      3. Raspberry pi 3 Model B:

        Is the third generation raspberry pi. This powerful credit card sized single board computer can be used for many applications. It brings more powerful processor, 10x faster than first generation Raspberry pi. Additionally it adds

        wireless LAN and Bluetooth connectivity making it the idol solution powerful connected design.

    2. Preparation of Soil Samples and Experimentation:

    • Sample- Collect 15-20 soil samples per field, fairway or potting mix.

    • Mix- Place these samples in clean plastic container.

    • Measure- Remove a small amount of soil from your mix and add to an equal amount of distilled water.

    • Shake and Wait- Stir or shake the soil and water mixture vigorously. Then let it sit for 5 minutes.

    • Test- Turn on your pH meter and remove the cap to expose the sensor completely in the solution. Reading is displayed on the remote display.

    1. RESULTS

      The chart below lists the most essential nutrients plants need for vigorous growth. Along with that list is horizontal representation of the availability of each of these nutrients as you move along the pH scale. Color coded chart of relative nutrient availability with change in pH. The darker the blue the more available the nutrient.

      Fig: Chart representing nutrient content in soil for various pH readings.



      Highly Available

      Moderately Available

      Slightly Available

      Not Available

      Color code:

      By considering the above fig availability is set and it is compared with pH sensor output. Thus farmer ges notified with different available soil nutrients in the soil based on the soil pH.


In this system we are determining the nutrients present in the soil using pH electrode. By continuously checking content in soil it is easy to preserve the soil health from land pollution and water pollution. Though there are soil testing laboratories but laboratories process is time consuming and unfortunately many farmers skip this process for this reason or do this process only once and repeatedly grow the same crop. The system thus designed is advantageous as it reduces the undesired use of fertilizers to be added in the soil. One can properly select the fertilizer to be used for reducing the deficiency in the soil at a particular field. This sensor measures the pH of soil so we can add the fertilizers in the soil as per requirement for increasing the food production capability of soil.


[1] Ms Yogita Kulkarni, Dr. Krishna K. Warhade, Dr. SusheelKumar Bahekar, (May 2014) Primary Nutrients Determination in the Soil Using UV Spectroscopy, International Journal of Emerging Engineering Research and Technology Volume 2, Issue 2, pp 198-204.

[2] Joaquin Gutierrez Jaguey, Juan Francisco Villa-Medina Aracely Lopez-Guzman, and Miguel Angel Porta-Gandara, (Sep 2015) Smartphone Irrigation Sensor, IEEE Sensor Journal, Volume15.

[3] Deepa V. Ramane, Supriya S. Patil, A, D. Shaligram, (Feb 2015) Detection of NPK nutrients of soil using Fiber Optic Sensor, International Journal of Research in Advent Technology.

[4] B.-G.Lee and W.-Y. Chung, Driver alertness monitoring using fusion of facial features and bio-signals, IEEE Sensors J., vol. 12, no. 7, pp. 24162422, Jul. 2012

[5] Nishant Singh and A. D. Shaligram, (2014) NPK Measurement in Soil and Automatic Soil Fertilizer Dispensing Robot, International Journal of Engineering and Research, Volume 3, issue 7,pp. 634-637rsion 1), pp.360-363.

[6] Bah, A., S.K. Balasundram, M.H.A. Husni Sensor technologies for precision soil nutrient management and monitoring American Journal of Agricultural and Biological Sciences 7 (1): 43-49, 2012

[7] Fertilizers and Manures by Rajendra Prasad.

Leave a Reply

Your email address will not be published. Required fields are marked *