International Publishing Platform
Serving Researchers Since 2012

An IoT-Based Smart Farming Framework for Real-Time Monitoring and Intrusion Detection

DOI : 10.5281/zenodo.20626595
Download Full-Text PDF Cite this Publication

Text Only Version

An IoT-Based Smart Farming Framework for Real-Time Monitoring and Intrusion Detection

Sunita

VLSI Design & Embedded System VTUs CPGS, Kalaburagi, India Kalaburagi, India

ORCID: 0009-0004-1170-2793

Dr. Pradeep Reddy

Department of Electronics & Communication Engineering VTUs CPGS, Kalaburagi, India

Kalaburagi, India

Abstract – The rapid advancement of Internet of Things (IoT) technologies has enabled the transformation of traditional agriculture into intelligent and automated systems. This paper presents an IoT-based smart farming framework for real-time environmental monitoring and intrusion detection. The proposed system integrates multiple sensors, including DHT11 for temperature and humidity monitoring, a soil moisture sensor for irrigation assessment, a Light Dependent Resistor (LDR) for daynight detection, and a Passive Infrared (PIR) sensor for motion detection. The system operates in dual modes: agricultural monitoring during daytime and security surveillance during nighttime, where it detects wild animal intrusion and triggers alerts. A mobile-controlled robotic platform using an HC-05 Bluetooth module and L293D motor driver enables flexible field operation. Sensor data are transmitted to the Adafruit IO cloud platform for real-time visualization and analysis.

Keywords – Internet of Things (IoT), Smart Farming, Intrusion Detection System, Environmental Monitoring, Wireless Sensor Networks, Embedded Systems, Agricultural Robotics.

  1. INTRODUCTION

    Agriculture remains a fundamental sector for economic development and food security; however, it faces significant challenges such as unpredictable environmental conditions, inefficient resource utilization, and crop damage caused by animal intrusion.

    With the rapid advancement of the Internet of Things (IoT), smart agriculture has emerged as a promising solution to address these challenges. IoT-based systems enable real-time monitoring of environmental parameters, automation of agricultural processes, and remote accessibility through cloud platforms. These systems improve productivity, optimize resource usage, and reduce human intervention.

    Despite these advancements, most existing solutions focus primarily on environmental monitoring and irrigation control, with limited emphasis on integrated security mechanisms for protecting crops from external threats. Intrusion by wild animals remains a major concern, particularly in rural and semi-urban farming regions.

    To address these limitations, this paper proposes an IoTbased smart farming framework that integrates environmental monitoring with intrusion detection. The proposed system operates in dual modes: agricultural monitoring during the daytime and security surveillance during the nighttime.

    The main contributions of this work are as follows:

    1. Design of a dual-mode smart farming system integrating monitoring and security, 2. Implementation of real-time sensor- based environmental analysis, 3. Development of an intrusion detection mechanism using motion sensing, and 4. Integration with a cloud platform for remote monitoring and decision- making.

  2. LITERATURE REVIEW

    Wireless Sensor Networks (WSNs) have also been widely adopted for agricultural monitoring due to their ability to collect and transmit data efficiently across large fields [1]. Furthermore, cloud-based platforms facilitate remote monitoring and data visualization, allowing farmers to access real-time information from anywhere [2]. Despite these advancements, most existing systems primarily focus on environmental monitoring and lack integrated mechanisms for crop protection.

    In parallel, intrusion detection systems based on Passive Infrared (PIR) sensors have been extensively used in security and surveillance applications for motion detection and alert generation [3]. These systems are effective in detecting unauthorized movement; however, they are typically designed as standalone security solutions and are rarely integrated with agricultural monitoring systems.

    Additionally, some recent studies have explored smart surveillance systems using IoT and camera-based monitoring for enhanced security [4]. However, such systems often involve higher costs and complexity, making them less suitable for small-scale farmers.

    Despite the progress in both IoT-based agriculture and intrusion detection systems, there is a lack of unified frameworks that combine environmental monitoring with real- time security mechanisms. This limitation reduces the overall effectiveness of smart farming solutions, particularly in regions where crop damage due to animal intrusion is a significant concern.

    To address this research gap, the proposed work integrates IoT-based environmental monitoring with PIR-based intrusion detection into a unified smart farming framework, providing

    both agricultural automation and field security in a single system.

  3. PROPOSED METHODOLOGY

    The proposed system is an IoT-based smart farming framework designed to perform real-time environmental monitoring and intrusion detection using a mobile robotic platform. The system integrates multiple sensors, communication modules, and control units to enable autonomous operation in agricultural environments.

    1. System overview

      Fig 1 shows the system overview

      A Light Dependent Resistor (LDR) is used to distinguish between day and night conditions. During daytime, the system operates in agricultural monitoring mode, while during nighttime it switches to security mode for intrusion detection.

    2. Key Features

      The major features of the proposed system include:

      • Dual-mode operation: Automatic switching between agricultural monitoring (day) and security surveillance (night)

      • Intrusion detection: Motion detection using PIR sensor with alert generation through a buzzer

      • Cloud integration: Remote monitoring and data visualization using IoT platform

      • Mobile platform: Robot-based system enabling flexible movement across agricultural fields.

    3. Hardware Components

      The system incorporates the following hardware components:

      • DHT11 Sensor: Measures temperature and humidity levels in the environment

      • Soil Moisture Sensor: Detects soil water content for irrigation assessment.

    4. Working Principle

    The system operates based on sensor data acquisition and decision-making logic. The LDR sensor determines the ambient light condition to switch between operational modes. During night time, the PIR sensor becomes active to detect motion, and an alert is triggered when intrusion is detected.

    All sensor data are transmitted to the cloud platform, allowing users to monitor the system remotely. The robotic platform can be controlled via a Bluetooth interface, enabling flexible navigation within the agricultural field.

  4. SYSTEM ARCHITECTURE

    The sensor layer consists of multiple input devices including DHT11 for temperature and humidity sensing, a soil moisture sensor for monitoring soil conditions, a Light Dependent Resistor (LDR) for detecting day and night conditions, and a camera module for visual monitoring. Additionally, an HC-05 Bluetooth module is used for wireless control, hile the power supply unit provides the required operating voltage to the system.

    All sensor data are fed into the processing unit, which is implemented using an Arduino UNO microcontroller. The microcontroller processes the incoming data and executes decision-making logic based on environmental conditions. The LDR sensor plays a crucial role in determining the operational mode of the system. During daytime, the system performs environmental monitoring, whereas during nighttime it activates the intrusion detection mechanism.

    The output and control layer includes a motor driver (L293D) interfaced with DC motors to enable robotic movement across the agricultural field. A buzzer is used as an alert mechanism to indicate intrusion detection events.

    The data are uploaded to an IoT platform, enabling real-time monitoring and remote access. The NodeMCU communicates with the cloud through internet connectivity (e.g., Wi-Fi/5G), ensuring continuous data transmission and system monitoring.

    Overall, the proposed architecture ensures efficient coordination between sensing, processing, actuation, and communication modules, providing a reliable and scalable solution for smart agriculture applications.

  5. IMPLEMENTATION

    The proposed system is implemented using an embedded hardware platform integrating multiple sensors, actuators, and communication modules to achieve real-time monitoring and intrusion detection.

    1. Hardware Implementation

      The core of the system is an Arduino UNO microcontroller, which interfaces with various sensors and peripheral devices. The DHT11 sensor is used to measure temperature and humidity, while the soil moisture sensor monitors the water content in the soil. The LDR sensor detects ambient light intensity to determine day and night conditions. A Passive Infrared (PIR) sensor is employed to detect motion

      for intrusion detection.

      The robotic platform is driven by DC motors controlled through an L293D motor driver, enabling directional movement. A buzzer is connected to the system to generate alerts when motion is detected during nighttime operation.

    2. Software Implementation

      The system is programmed using the Arduino IDE, where embedded C/C++ code is developed to control sensor data acquisition, decision-making, and actuation. The program continuously reads sensor values and processes them based on predefined threshold conditions.

      The logic for mode switching is implemented using LDR input. During daytime, the system focuses on monitoring environmental parameters, whereas during nighttime, it activates the PIR sensor for intrusion detection. When motion is detected, the buzzer is triggered to alert users.

    3. IoT & Communication Module

      The NodeMCU communicates with the cloud using wireless internet connectivity, enabling remote access and monitoring. This integration enhances the systems usability by allowing users to track field conditions without physical presence.

    4. System Operation

    Based on environmental conditions and motion detection, appropriate actions such as motor control or alert generation are executed. The combination of automation, remote monitoring, and intrusion detection ensures efficient and reliable system performance.

  6. Results & Discussion

    Fig. 1 illustrates the hardware implementation of the proposed robotic platform.

    Fig. 2 shows real-time sensor data transmission through HC-05 Bluetooth communication.

    The system was deployed in a controlled agricultural setup, and sensor data were continuously recorded and analyzed through the cloud platform.

    1. Environmental Monitoring Performance

      The system demonstrated accurate measurement of temperature and humidity using the DHT11 sensor. The recorded values were consistently updated on the IoT dashboard, enabling real-time monitoring. Similarly, the soil moisture sensor effectively detected variations in soil water content, which can be utilized for irrigation decision-making.

      The Light Dependent Resistor (LDR) successfully distinguished between day and night conditions, enabling automatic switching between operational modes. This ensured seamless transition between agricultural monitoring and security surveillance without manual intervention.

    2. Intrusion Detection Analysis

      The PIR sensor was tested for motion detection under nighttime conditions. The system successfully detected

      movement within its sensing range and triggered the buzzer alert mechanism. The response time of the system was observed to be minimal, ensuring prompt notification of intrusion events.

      The integration of motion detection with environmental monitoring provides a dual-functionality system, enhancing the overall efficiency and reliability of the solution.

    3. Communication and Cloud Performance

      The data were visualized through dashboards, allowing remote monitoring of environmental conditions. The system maintained stable communication with minimal delay, demonstrating reliable IoT connectivity.

    4. Overall System Performance

      The overall system performance indicates that the proposed framework is efficient, reliable, and suitable for smart agriculture applications. The system achieves:

      • Accurate environmental monitoring

      • Efficient intrusion detection

      • Real-time cloud data transmission

      • Low power consumption

    The combination of sensing, processing, and communication modules ensures a scalable and cost-effective solution for modern farming.

  7. Conclusion

The proposed system integrates multiple sensors, a microcontroller-based processing unit, and a cloud communication module to enable efficient and automated agricultural management. The dual-mode operation allows the system to perform environmental monitoring during daytime and intrusion detection during nighttime, enhancing both crop productivity and field security.

Experimental results demonstrated the effectiveness of the system in accurately monitoring temperature, humidity, and

soil moisture, as well as reliably detecting motion using the PIR sensor.

REFERENCES

  1. K. G. Suresh, M. N. Kumar, and P. V. Reddy, IoT-based smart agriculture monitoring system, in Proc. IEEE Int. Conf. Communication and Electronics Systems (ICCES), Coimbatore, India, 2019, pp. 123127.

  2. R. N. Rao and B. Sridhar, IoT based smart crop-field monitoring and automation irrigation system, in Proc. 2nd Int. Conf. Inventive Systems and Control (ICISC), Coimbatore, India, 2018, pp. 478483.

  3. J. Gutierrez, J. F. Villa-Medina, A. Nieto-Garibay, and

    M. A. Porta-Gandara, Automated irrigation system using a wireless sensor network and GPRS module, IEEE Trans. Instrum. Meas., vol. 63, no. 1, pp. 166176, Jan. 2014.

  4. M. A. Zamora-Izquierdo, J. Santa, J. A. Martínez, V. Martínez, and A. F. Skarmeta, Smart farming IoT platform based on edge and cloud computing, IEEE Access, vol. 7,pp. 257268, 2019.

  5. S. N. Patil and S. R. Kale, PIR sensor based security system for smart home application, in Proc. IEEE Int. Conf. Computing, Communication and Automation (ICCCA), Greater Noida, India, 2017, pp. 332335.

  6. M. S. Hossain and G. Muhammad, Cloud-assisted industrial internet of things (IIoT) enabled framework for health monitoring, IEEE Internet Things J., vol. 5, no. 6,

    pp. 45664575, Dec. 2018.

  7. P. P. Ray Internet of Things for smart agriculture: Technologies, practices and future direction, J. Ambient Intell. Smart Environ., vol. 9, no. 4, pp. 395420, 2017.

  8. S. R. Nandurkar, V. R. Thool, and R. C. Thool, Design and development of precision agriculture system using wireless sensor network, IEEE Int. Conf. Automation, Control, Energy and Systems (ACES), 2014, pp. 16.

  9. L. Ruiz-Garcia, L. Lunadei, P. Barreiro, and I. Robla, A review of wireless sensor technologies and applications in agriculture and food industry, Sensors, vol. 9, no. 6, pp. 47284750, 2009.