IoT Based Energy Efficient Agriculture Field Monitoring and Smart Irrigation System using NodeMCU
Arvind Kumar*, Abhijeet Kumar, Abhishek Kumar Singh and Anubhav Kumar Choudhary
Electronics and Communication Engineering, B.I.T. Sindri, Dhanbad, India
E-mail: aksingh738@gmail.com; abkr012@gmail.com; abhiksingh97@gmail.com; acanubhav.001@gmail.com
*Corresponding Author
Received 18 September 2020; Accepted 30 November 2020; Publication 26 January 2021
Agriculture is the most important sector of the Indian economy and employs 50% of the country’s forces. But, in recent times the economic contribution of agriculture to India’s GDP is steadily declining. A major problem is the absence of an energy-efficient and reliable system for real-time monitoring of soil’s condition. The paper proposes a smart alert and irrigation system with real-time monitoring of soil’s condition. The proposed system detects the soil’s moisture content and temperature. Using NodeMCU development kit, the data are sent to the cloud-based IoT platform for round the clock real-time monitoring of the soil’s condition. A Message Queue Telemetry Transport communication protocol is used for data transmission. The cloud-based IoT platform analyses the collected data and sends alert messages and controls the irrigation system according to the pre-set threshold conditions. The proposed system is secure, economically feasible, reliable and energy-efficient which brings automation and IoT technology to the agriculture sector.
Keywords: NodeMCU, ThingsBoard, TE215 sensor, DS18B20 sensor, MQTT.
With the unpredictable environmental condition, water scarcity and water-logging are unpreventable issues downgrading the productivity in the agriculture sector. Hence, reducing water wastage and minimizing human efforts along with energy conservation is the need of the hour. There is a need for economical, energy-efficient and easy to install smart irrigation system [1] to aid the farm owner for increasing the productivity and relentlessly monitoring of the field’s conditions.
With modern advancement in the field of IoT and micro-controller, a smart irrigation system with alert capabilities using the IoT platform is proposed. The proposed system measures the moisture content and temperature level of the soil [2], sends data to the cloud server [3] for processing [4] and alert notification [5, 6] to the user followed by the activation of the irrigation system. The present system lacks data storage and efficient energy utilization capabilities. The proposed system is battery-operated, enables remote monitoring and storage of data and irrigation system accessible from around the globe using a smartphone or PC. The system reduces water wastage by preventing over-irrigation or water-logging in the field. The system is easy to install, secure, economical, energy-efficient and removes the flaws of the existing system.
Yunseop Kim et al. [7] came up with a smart irrigation system which uses six field sensors for the continuous monitoring of the field. The collected information is sent to the farmer through GSM and wireless communication but the system is incapable of storing the previous data for further analysis.
Dinesh et al. [8] demonstrated an automated irrigation system in which the computed data given by PH, temperature, moisture and humidity sensors triggered the motor pump but real-time monitoring of the data was not possible.
Priya et al. [9] proposed an irrigation system in which humidity and moisture sensor are placed near the root area of the crop and according to the values provided by the micro-controller, the watering is done. But this system failed to provide in-depth knowledge and real-time information about the field to the farmer. The system was energy inefficient.
Pushkar Singh et al. [10] implemented a smart irrigation system using Arduino which gives real-time data of moisture and temperature of the soil with the help of sensors. This system also uses a water flow sensor for the controlled irrigation system. The system does not store previous data.
Sujit Thakare et al. [11] implemented a smart irrigation system using Arduino to give real-time moisture, temperature and PH of the soil using sensors. This system uses a motor for irrigation. It uses Arduino and ESP8266 for processing and communication, adding to the cost of implementation and is not energy efficient.
Namala et al. [12] proposed a smart irrigation system using Raspberry Pi and Arduino Uno and used the HTTP communication protocol to show sensors’ reading on webpages. This system is costly as Raspberry Pi is used and also there is a disadvantage that the user cannot access the data if the user doesn’t know the IP address of Raspberry Pi.
Bharath Ravi Prakash et al. [13] proposed a super-smart irrigation system using Arduino Uno and uses HTTP communication protocol and GSM module to provide SMS acknowledgement. The alert system is based on 2G network and has poor latency. The HTTP protocol is slow, complex and data-centric.
The main objective of the system (as illustrated in Figure 1) is to develop a smart alert and irrigation system which can be monitored by the farm owner round the clock. The cloud-based data monitoring system allows access to an authorised user from a PC or a smartphone. It allows real-time monitoring of moisture content and temperature level of the soil through moisture sensor (TE215) and temperature sensor (DS18B20) respectively which are connected to NodeMCU development kit. The NodeMCU development kit doubles its functionality as a micro-controller and communication system having built-in Wi-Fi module. A Message Queue Telemetry Transport is used as IoT messaging protocol to send data to the cloud server. The proposed system is battery operated, re-engineered to provide great power efficiency, low energy consumption and reliability.
This system helps to prevent water wastage and minimises human intervention with automated alert and irrigation system. It provides an instant alert in case of an adverse condition based on the crop in the field. The cloud-based IoT platform keeps the record of previous data so that the analysis of the dataset can be done. The irrigation system is automated or can, even, be controlled using the IoT platform by the user.
Figure 1 Block diagram of the proposed system.
Figure 2 shows the connection of various components used in the system. The power supply circuitry comprises of an LDO Regulator (MCP1700-3302E) [14] with GND pin connected to the negative terminal of the battery source and IN pin with the positive terminal of the battery source. The electrolytic (1000F) and ceramic (100nF) capacitors are connected across the IN and OUT pin of the regulator to improve the stability and transient response of the regulator as NodeMCU development kit is very sensitive to an improper power supply. The power supply circuitry supplies 3.3V to the NodeMCU development kit via 3.3V input pin. The GND and Vin pin of the temperature and soil moisture sensor is connected to GND and 3.3V output pin of the kit. The V pin of the temperature sensor is connected to GPIO4 (digital input) pin of the kit and is also connected to its V with a resistance of 4.7 k. The SIG (Signal) pin of soil moisture sensor is connected to ADCO (Analog input) pin of the kit. The GPIO16 and RST pin of NodeMCU is connected so that the NodeMCU development kit wakes up from the sleep mode after a set delay.
Figure 2 Circuit connections of the system.
NodeMCU development kit shown in Figure 3, based on ESP8266, integrates GPIO, PWM, IIC, 1-Wire and ADC all in one board. It includes firmware which runs on the ESP8266 Wi-Fi SoC from Expressive Systems and hardware which is predicated on the ESP-12 module [15]. The term “NodeMCU” by default refers to the firmware instead of the development kit. The firmware uses the Lua scripting language. The programming for ESP8266 Wi-Fi chip is written using Arduino IDE, for which installation of ESP8266 library is required. The sensors are connected to this module and it even connects to the available W-Fi network to transmit the data to the IoT platform.
Figure 3 NodeMCU development kit.
Soil moisture sensor (TE215) shown in Figure 4 and Temperature sensor (DS18B20) shown in Figure 5 are used in this system. The moisture sensor is capacitive and measures the dielectric permittivity of the soil to get the moisture content of the soil. Moisture sensor reading varies from 0 to 100% depending upon the moisture content of the soil. The temperature sensor DS18B20 is a one-wire digital temperature sensor which can measure temperature from C to C with an accuracy of 5%.
Figure 4 Soil moisture sensor (TE215).
Figure 5 Temperature sensor (DS18B20).
The major advancement in the proposed system in comparison with the existing systems is the battery-operated system (as illustrated in Figure 6) with low energy consumption at a minimal cost.
The NodeMCU development kit is supplied with 4.5V input using three AA Alkaline battery (2400mAh each) along with LDO regulator (MCP1700-3302E) and electrolytic (1000F)) and ceramic (100nF) capacitor to maintain a stable input voltage. NodeMCU development kit remains in sleep mode then activates for few seconds, connects to the Wi-Fi network, sends the reading of the sensors to the IoT platform and again goes back into sleep mode, thus leading to efficient utilization of power source.
Figure 6 Power supply circuit.
Typically, the current consumption of an ESP8266 module in normal operation mode is 70mA. Assuming data transfer rate to be 6/hour i.e. every 10th minute the device transmits data to the IoT platform and the time required for the module to wake up from idle mode, connect to the Wi-Fi network and transmit the data be 5seconds, the per hour consumption of the device would be mAs. Therefore, the battery can serve for mAs/2100 mAs 4114 hours i.e. 171 days. Hence, considering all the practical limitations, three AA alkaline batteries power up the device for around 150 days; making the system very energy efficient.
The solenoid valve is electrically controlled valve used to control the flow of fluid. The smart irrigation system consists of a two-way solenoid valve in connection with a relay in a normally closed state connected to the overhead water tank, powered by 12V DC supply. When adverse conditions are obtained from the sensor readings, the micro-controller activates the solenoid value via relay and flow of water is established to the field and, on reaching optimal conditions, it gets deactivated and returns to its normal closed state. It can also be manually triggered using the IoT platform.
IoT platform is the support software that connects the edge hardware, access points and data network to the end-user applications. The proposed system uses ThingsBoard as an IoT platform. It is an open-source IoT platform for device management, data collection, processing and visualization. The data are sent by the micro-controller using Message Query Telemetry Transport (MQTT) communication protocol for storage and analysis by the IoT platform applications. MQTT is a light-weight, publish-subscribe protocol which is battery friendly, reliable and secure. The ThingsBoard platform provides back-date data and functionality for the visual presentation of data using graphs and tables. The platform’s dashboard can only be accessed by an authorised user using verified username and password. It combines scalability, fault-tolerance and performance and hence the chance of data loss is minimal.
Figure 7 illustrates the working model setup of the proposed system on which practical observations were recorded and examined.
Figure 7 Working model setup.
Figure 8 Flowchart of the system.
The whole working of the proposed system is represented in the flowchart (Figure 8). The sensors are installed in the field and are connected to the NodeMCU development Kit. The NodeMCU is connected to the power circuit. As soon as the power supply is being provided to the microcontroller, the whole system is initialized. The developmental kit, initially, is in sleep mode and after a delay which is set by the users for specifying the frequency at which the data are supposed to be recorded, goes into active mode. The NodeMCU, then, reads the sensors’ data and ESP8266 Wi-Fi SoC module, which is embedded in the kit itself, gets connected to the available network and sends the data to the IoT platform. The development kit again goes into the sleep mode. Then, the IoT platform stores, processes and analyse the data as per the pre-set threshold conditions according to the crop grown in the field. In case of an adverse condition, the relay pin connected to the kit gets triggered and activates the solenoid valve for irrigating the field (if required). The IoT platform, further, alerts the user about the field condition via e-mail and text message. Otherwise, if the condition is under the favourable threshold limits, the same process is repeated after the specified time delay.
NodeMCU development kit sends the sensor’s reading to the IoT platform – ThingsBoard and the IoT platform dashboard displays the real-time reading along with the option of visual representation using graphs and tables. The dashboard enables continuous monitoring of the field conditions by the authorised user using ThingsBoard login credentials from anywhere in the world and provides them accessibility to operate the solenoid valve, remotely, for irrigation. Figure 9 and Figure 10 shows the dashboard interface with the sensors’ reading when the soil’s moisture content is low and high respectively.
Figure 9 ThingsBoard-IoT Platform Dashboard showing sensor reading when the soil’s moisture content is low.
Figure 10 ThingsBoard-IoT Platform Dashboard showing sensor reading when the soil’s moisture content is high.
The IoT platform stores the recorded data permanently in the cloud server and analyses real-time data as per the pre-set threshold conditions according to the particular crop. In case of the adverse condition, solenoid value is operated automatically and an alert email (as shown in Figure 11) and text message are sent to the registered user keeping the user informed about the field conditions.
Figure 11 E-mail alert.
The system based on NodeMCU development kit reduces the cost of having two different devices for processing and communication resulting in ease of implementation, maintenance and operation. The system operating uninterruptedly for 150 days on 3 AA Alkaline batteries is reliable and energy-efficient. The IoT platform provides real-time monitoring, analysis, updates and notifications minimizing human involvement. Thus, the proposed system is secure, reliable, economical and energy-efficient.
The application of machine learning on the dataset of the sensor’s readings observed throughout the year will enable us to predict the trend and pattern in field condition and, accordingly the most suitable crop can be selected for increasing productivity.
The Wi-Fi communication technology can be replaced by Low Power Wide Area Networks (LPWANs) communication technology such as LoRa, SigFox or NB-IoT, thus reducing latency and making the system more secure, reliable and power-efficient.
Further addition of drone system with artificial intelligence and image processing capabilities will predict the health of the crops and alert the user about the pests affecting the crops and pesticides to be sprayed. The pesticides spraying and irrigation using a drone can take the system further ahead and a complete automated irrigation system can be developed.
[1] Christopher Brewster, Ioanna Roussaki, Nikos Kalatzis, Kevin Doolin, Keith Ellis, “IoT in Agriculture: Designing a Europe-Wide Large-Scale Pilot”, IEEE Communications Magazine, vol: 55, issue: 9, pp. 26–33, Sep. 2017.
[2] Olakunle Elijah, Tharek Abdul Rahman, Igbafe Orikumhi, Chee Yen Leow, MHD Nour Hindia, “An Overview of Internet of Things (IoT) and Data Analytics in Agriculture: Benefits and Challenges”, IEEE Internet of Things Journal, vol: 5, issue: 5, pp. 3758–3773, Jun. 2018.
[3] K. Grgic, I. Speh and I. Hedi, “A web-based IoT solution for monitoring data using MQTT protocol,” 2016 International Conference on Smart Systems and Technologies (SST), Osijek, 2016.
[4] Ji-chun Zhao, Jun-feng Zhang, Yu Feng, Jian-xin Guo, “The study and application of the IOT technology in agriculture”, 2010 3rd International Conference on Computer Science and Information Technology, vol: 2, pp. 462–465, Jul. 2010.
[5] K. A. Patil, N. R. Kale, “A model for smart agriculture using IoT”, 2016 International Conference on Global Trends in Signal Processing, Information Computing and Communication (ICGTSPICC), pp. 543–545, Dec. 2016.
[6] Vijay, A. K. Saini, S. Banerjee and H. Nigam, “An IoT Instrumented Smart Agricultural Monitoring and Irrigation System,” 2020 International Conference on Artificial Intelligence and Signal Processing (AISP), Amaravati, India, 2020.
[7] Yunseop Kim and Robert G. Evans, “Remote Sensing and Control of an Irrigation System using a Distributed Wireless Sensing Network” IEEE Transaction on Instrumentation and Measurement, Vol-57, July-2008.
[8] Sonali D. Gainwar and Dinesh V. Rojatkar, “Soil Parameters Monitoring with Automatic Irrigation System” International Journal of Science, Engineering and Technology Research (IJSETR), vol-04, Issue 11, Nov 2015.
[9] Archana and Priya, “Design and Implementation of Automatic Plant Watering System” International Journal of Advanced Engineering and Global technology, vol-04, Issue-01, Jan-2016.
[10] Pushkar Singh and Sanghamitra Saikia, “Arduino Based Smart Irrigation using Water Flow Sensor, Soil Moisture Sensor, Temperature Sensor and ESP 8266 Wi-Fi module” IEEE International Conference on Services Computing (SCC), 2016 IEEE Region 10 Humanitarian Technology Conference (R10-HTC).
[11] Sujit Thakare and P.H. Bhagat, “Arduino-Based Smart Irrigation Using Sensors and ESP8266 WiFi Module” Second International Conference on Intelligent Computing and Control Systems (ICICCS 2018).
[12] K K Namala, Krishna Kanth Prabhu A V, Anushree Math, Ashwini Kumari, and Supraja Kulkarni, “Smart Irrigation with Embedded System,” 2016 IEEE Bombay Section Symposium (IBSS), Baramati, 2016.
[13] B. R. Prakash and S. S. Kulkarni, “Super Smart Irrigation System using Internet of Things,” 2020 7th International Conference on Smart Structures and Systems (ICSSS), Chennai, India, 2020.
[14] Microchip System, “MCP 1700 Low Quiescent Current LDO Datasheet”, pp. 1–30.
[15] Espressif System, “ESP8266EX Datasheet” pp. 1–31.
Arvind Kumar received his B.Sc. degree in Electronics & Communication Engineering from Magdh University, Bodh Gaya, ME degree in Electronics & Communication Engineering from BIT Mesra University Ranchi and PhD degree in Electronics & Communication Engineering from Vinoba Bhave University, Hazaribag. Dr. Kumar is currently working as Assistant Professor in the Department of ECE, BIT Sindri, Dhanbad. He has acquired a solid experience in the field of VLAN and campus wide network management. He is currently working on implementation of IoT Network for agriculture and smart wearable for physically challenged people.
Abhijeet Kumar graduated in Electronics and Communication Engineering from B.I.T. Sindri, Dhanbad, India in 2020. He had previously gone under a research internship on ‘Implementation of IoT Network for Agriculture’ at Indian Institute of Technology, Ropar, India. His current research interests include the application of IoT in agriculture, home automation and smart wearable.
Abhishek Kumar Singh is currently working as Assistant System Engineer at Tata Consultancy Services Ltd. He received his B. Tech degree in Electronics and Communication Engineering from B.I.T. Sindri, Dhanbad, India in 2020. He is associated with Adore India, a community services network of University students and professionals who interact with students so that they grow as successful professionals and responsible citizens. His current research interests include IoT for agricultural advancement and Industrial Revolution 4.0.
Anubhav Kumar Choudhary is pursuing an MBA from Indian Institute of Management, Amritsar. He received his B. Tech degree from B.I.T. Sindri, Dhanbad, India (2020) in Electronics and Communication Engineering. He has done an internship in the State Bank of India during his undergraduate. He has been associated with Rotaract International for the past five years and is currently serving as Zonal Rotaract Secretary of Zone 3 in RI Distt. 3250.
Journal of Mobile Multimedia, Vol. 17_1-3, 345–360.
doi: 10.13052/jmm1550-4646.171318
© 2020 River Publishers