Abstract
Overfertilization with nitrogen fertilizers has damaged the environment and health of soil, but standard laboratory testing of soil to determine the levels of nitrogen (mainly NH4+ and NO3−) is not performed regularly. Here we demonstrate that point-of-use measurements of NH4+, combined with soil conductivity, pH, easily accessible weather and timing data, allow instantaneous prediction of levels of NO3− in soil (R2 = 0.70) using a machine learning model. A long short-term memory recurrent neural network model can also be used to predict levels of NH4+ and NO3− up to 12 days into the future from a single measurement at day one, with \(R^2_{{{\mathrm{NH}}_4}^+} = 0.60\) and \(R^2_{{{\mathrm{NO}}_3}^-} = 0.70\), for unseen weather conditions. Our machine-learning-based approach eliminates the need for dedicated instruments to determine the levels of NO3− in soil. Nitrogenous soil nutrients can be determined and predicted with enough accuracy to forecast the impact of climate on fertilization planning and to tune timing for crop requirements, reducing overfertilization while improving crop yields.
This is a preview of subscription content, access via your institution
Access options
Access Nature and 54 other Nature Portfolio journals
Get Nature+, our best-value online-access subscription
$29.99 / 30 days
cancel any time
Subscribe to this journal
Receive 12 digital issues and online access to articles
$119.00 per year
only $9.92 per issue
Rent or buy this article
Prices vary by article type
from$1.95
to$39.95
Prices may be subject to local taxes which are calculated during checkout




Data availability
All data are available from the corresponding author upon reasonable request.
References
World Population Prospects 2019 https://population.un.org/wpp/Download/Files/1_Indicators(Standard)/EXCEL_FILES/1_Population/WPP2019_POP_F01_1_TOTAL_POPULATION_BOTH_SEXES.xlsx (United Nations Department of Economic and Social Affairs, 2019).
Mosheim, R. Fertilizer Use and Price https://www.ers.usda.gov/webdocs/DataFiles/50341/fertilizeruse.xls?v=5260.4 (United States Department of Agriculture—Economic Research Service, 2019).
Alexandratos, N. & Bruinsma, J. World Agriculture Towards 2030/2050 http://www.fao.org/3/ap106e/ap106e.pdf (Food and Agriculture Organization of the United Nations, 2012).
Tetteh, R. N. Chemical soil degradation as a result of contamination: a review. J. Soil Sci. Environ. Manage. 6, 301–308 (2015).
Osman, K. T. Soil Degradation, Conservation and Remediation (Springer Netherlands, 2014); https://doi.org/10.1007/978-94-007-7590-9
Beeckman, F., Motte, H. & Beeckman, T. Nitrification in agricultural soils: impact, actors and mitigation. Curr. Opin. Biotechnol. 50, 166–173 (2018).
Smith, V. H., Tilman, G. D. & Nekola, J. C. Eutrophication: impacts of excess nutrient inputs on freshwater, marine, and terrestrial ecosystems. Environ. Pollut. 100, 179–196 (1999).
Zheng, F. et al. Mineral and organic fertilization alters the microbiome of a soil nematode Dorylaimus stagnalis and its resistome. Sci. Total Environ. 680, 70–78 (2019).
Wang, Q. et al. Impact of 36 years of nitrogen fertilization on microbial community composition and soil carbon cycling-related enzyme activities in rhizospheres and bulk soils in northeast China. Appl. Soil Ecol. 136, 148–157 (2019).
Zhao, Z. B. et al. Fertilization changes soil microbiome functioning, especially phagotrophic protists. Soil Biol. Biochem. 148, 107863 (2020).
Rosas, F. Fertilizer Use by Crop at the Country Level (1990–2010) Working Paper No. 12-WP 535 (Center for Agricultural and Rural Development, Iowa State University, 2012); http://publications.iowa.gov/13990/1/12-WP_535.pdf
Zhu, Q., Schmidt, J. P., Lin, H. S. & Sripada, R. P. Hydropedological processes and their implications for nitrogen availability to corn. Geoderma 154, 111–122 (2009).
Shanahan, J. F., Kitchen, N. R., Raun, W. R. & Schepers, J. S. Responsive in-season nitrogen management for cereals. Comput. Electron. Agric. 61, 51–62 (2008).
Tremblay, N. et al. Corn response to nitrogen is influenced by soil texture and weather. Agron. J. 104, 1658–1671 (2012).
Cilia, C. et al. Nitrogen status assessment for variable rate fertilization in maize through hyperspectral imagery. Remote Sens. 6, 6549–6565 (2014).
Kitchen, N. R. et al. Ground-based canopy reflectance sensing for variable-rate nitrogen corn fertilization. Agron. J. 102, 71–84 (2010).
Stone, M. L. et al. Use of spectral radiance for correcting in-season fertilizer nitrogen deficiencies in winter wheat. Trans. ASABE 39, 1623–1631 (1996).
CropSpec Crop Canopy Sensors http://topconcare.com/en/agriculture/crop-monitoring-technology/crop-canopy-sensors/ (Topcon Totalcare, 2021).
SS1 SunScan Canopy Analysis System https://delta-t.co.uk/product/sunscan/ (Delta-T Devices, 2021).
N-Sensor https://www.yara.co.uk/crop-nutrition/farmers-toolbox/n-sensor/ (Yara, 2021).
Morellos, A. et al. Machine learning based prediction of soil total nitrogen, organic carbon and moisture content by using VIS-NIR spectroscopy. Biosyst. Eng. 152, 104–116 (2016).
Kim, H. J., Hummel, J. W. & Birrell, S. J. Evaluation of nitrate and potassium ion-selective membranes for soil macronutrient sensing. Trans. ASABE 49, 597–606 (2006).
World’s First Wireless NPK Soil Sensor (Teralytic, 2021).
Shaw, R., Lark, R. M., Williams, A. P., Chadwick, D. R. & Jones, D. L. Characterising the within-field scale spatial variation of nitrogen in a grassland soil to inform the efficient design of in-situ nitrogen sensor networks for precision agriculture. Agric. Ecosyst. Environ. 230, 294–306 (2016).
Hengl, T. et al. Soil nutrient maps of sub-Saharan Africa: assessment of soil nutrient content at 250 m spatial resolution using machine learning. Nutr. Cycl. Agroecosyst. 109, 77–102 (2017).
Zaman, B. & McKee, M. Spatio-temporal prediction of root zone soil moisture using multivariate relevance vector machines. Open J. Mod. Hydrol. 4, 80–90 (2014).
Brewster, C., Roussaki, I., Kalatzis, N., Doolin, K. & Ellis, K. IoT in agriculture: designing a Europe-wide large-scale pilot. IEEE Commun. Mag. 55, 26–33 (2017).
Dincer, C. et al. Disposable sensors in diagnostics, food and environmental monitoring. Adv. Mater. 31, e1806739 (2019).
Burton, R. Nitrate Sensing in the Soil https://www.cambridgeconsultants.com/insights/nitrate-sensing-in-the-soil (Cambridge Consultants, 2016).
Tully, K. L. & Weil, R. Ion-selective electrode offers accurate, inexpensive method for analyzing soil solution nitrate in remote regions. Commun. Soil Sci. Plant Anal. 45, 1974–1980 (2014).
Choosang, J. et al. Simultaneous detection of ammonium and nitrate in environmental samples using on ion-selective electrode and comparison with portable colorimetric assays. Sensors (Basel) 18, 3555 (2018).
Shaw, R., Williams, A. P., Miller, A. & Jones, D. L. Assessing the potential for ion selective electrodes and dual wavelength UV spectroscopy as a rapid on-farm measurement of soil nitrate concentration. Agriculture 3, 327–341 (2013).
Viscarra Rossel, R. A., Walvoort, D. J. J., McBratney, A. B., Janik, L. J. & Skjemstad, J. O. Visible, near infrared, mid infrared or combined diffuse reflectance spectroscopy for simultaneous assessment of various soil properties. Geoderma 131, 59–75 (2006).
Sinfield, J. V., Fagerman, D. & Colic, O. Evaluation of sensing technologies for on-the-go detection of macro-nutrients in cultivated soils. Comput. Electron. Agric. 70, 1–18 (2010).
Xuejiang, W. et al. Conductometric nitrate biosensor based on methyl viologen/Nafion®/ nitrate reductase interdigitated electrodes. Talanta 69, 450–455 (2006).
Wongchoosuk, C. et al. Electronic nose for toxic gas detection based on photostimulated core-shell nanowires. RSC Adv. 4, 35084–35088 (2014).
Barandun, G. et al. Cellulose fibers enable near-zero-cost electrical sensing of water-soluble gases. ACS Sens. 4, 1662–1669 (2019).
Grell, M. et al. Autocatalytic metallization of fabrics using Si ink, for biosensors, batteries and energy harvesting. Adv. Funct. Mater. 29, 1804798 (2018).
Ainla, A., Hamedi, M. M., Güder, F. & Whitesides, G. M. Electrical textile valves for paper microfluidics. Adv. Mater. 29, 1702894 (2017).
Hamedi, M. M. et al. Integrating electronics and microfluidics on paper. Adv. Mater. 28, 5054–5063 (2016).
Glavan, A. C. et al. Analytical devices based on direct synthesis of DNA on paper. Anal. Chem. 88, 725–731 (2016).
Stark, J. M. & Firestone, M. K. Mechanisms for soil moisture effects on activity of nitrifying bacteria. Appl. Environ. Microbiol. 61, 218–221 (1995).
Nguyen, L. T. T. et al. Impacts of waterlogging on soil nitrification and ammonia-oxidizing communities in farming system. Plant Soil 426, 299–311 (2018).
Taylor, A. E., Giguere, A. T., Zoebelein, C. M., Myrold, D. D. & Bottomley, P. J. Modeling of soil nitrification responses to temperature reveals thermodynamic differences between ammonia-oxidizing activity of archaea and bacteria. ISME J. 11, 896–908 (2017).
Hao, T. et al. Impacts of nitrogen fertilizer type and application rate on soil acidification rate under a wheat–maize double cropping system. J. Environ. Manage. 270, 110888 (2020).
Smith, J. L. & Doran, J. W. in Methods for Assessing Soil Quality Vol. 49 (eds Doran, J. W. & Jones, A. J.) 169–185 (Soil Science Society of America, 1997).
Rogovska, N., Laird, D. A., Chiou, C. P. & Bond, L. J. Development of field mobile soil nitrate sensor technology to facilitate precision fertilizer management. Precis. Agric. 20, 40–55 (2019).
Ortega, L., Llorella, A., Esquivel, J. P. & Sabaté, N. Paper-based batteries as conductivity sensors for single-use applications. ACS Sens. 5, 1743–1749 (2020).
Güder, F. et al. Superior functionality by design: selective ozone sensing realized by rationally constructed high-index ZnO surfaces. Small 8, 3307–3314 (2012).
Güder, F. et al. Paper-based electrical respiration sensor. Angew. Chem. Int. Ed. 55, 5727–5732 (2016).
Maier, D. et al. Toward continuous monitoring of breath biochemistry: a paper-based wearable sensor for real-time hydrogen peroxide measurement in simulated breath. ACS Sens. 4, 2945–2951 (2019).
Acknowledgements
We thank EPSRC (grant no. EP/R010242/1), Innovate UK (grant no. 33486), Cytiva (formerly General Electric Healthcare Life Sciences) and Imperial College, Department of Bioengineering, for their generous support. F.G. and M.G. thank the Imperial College Centre for Processable Electronics and the Centre for Doctoral Training in Plastic Electronics, S. Yaliraki from Imperial College Department of Chemistry, T. Bell from Imperial College Department of Life Sciences, C. Mace from Tufts University Department of Chemistry and T. Schaul from (Google) DeepMind Technologies Ltd. F.G. also acknowledges Agri Futures Lab. M.K. acknowledges EPSRC DTP (grant no. 1846144). A.S.P.C. acknowledges BBSRC DTP (grant no. 2177734).
Author information
Authors and Affiliations
Contributions
M.G. designed and performed most of the experiments and wrote the manuscript. G.B. designed the homemade electronics. T.A. produced the supplementary videos and iterated on Fig. 1. M.K. performed the soil measurements and maintenance. A.S.P.C. and J.W. performed measurements with the homemade electronics. F.G. designed the experiments and edited the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Peer review information Nature Food thanks Arben Merkoçi, Anna Herland and Ramses Martinez for their contribution to the peer review of this work.
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Supplementary Information
Supplementary Figs. 1–17.
Supplementary Video 1
Video illustration of the chemPEGS for measuring NH4+.
Supplementary Video 2
Video illustration of the ML models constructed to predict the levels of soil-N.
Rights and permissions
About this article
Cite this article
Grell, M., Barandun, G., Asfour, T. et al. Point-of-use sensors and machine learning enable low-cost determination of soil nitrogen. Nat Food 2, 981–989 (2021). https://doi.org/10.1038/s43016-021-00416-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1038/s43016-021-00416-4
This article is cited by
-
Smart nanobiosensors in agriculture
Nature Food (2021)