Major Report Final
Major Report Final
Major Report Final
THROUGH MESSAGE
BACHELOR OF TECHNOLOGY
IN
GNITS-ECE DEPT
DEPT. OF ELECTRONICS & COMMUNICATION ENGG
CERTIFICATE
GUIDE
Mrs Ch. Anusha Dr. K. Ragini
Assistant Professor HOD, ECE
External Examiner
GNITS-ECE DEPT
ACKNOWLEDGEMENTS
We would like to thank Mrs. Ch. Anusha, our guide, and our project coordinator
Mrs. N. Krishna Jyothi, for being a constant source of inspiration. They challenged us
to use our imagination and encouraged us to do this project without delay. We were able
to complete this project because of their comprehensive knowledge, broad experience,
and professional expertise in the subject. Without their assistance and direction, this
endeavor would not have been possible. In our academic endeavors, we could not have
asked for a better mentor.
GNITS-ECE DEPT
INDEX
S. No. Topic Page No.
Abstract i
List of Figures ii
Acronyms iii
1. Introduction
1.1 Literature Survey 1
1.2 Plan of work 5
1.3 Problem statement 5
1.4 Hardware and Software used 6
2. Hardware Requirements
2.1 Arduino 7
2.1.1 Arduino UNO 7
2.1.1.1 General and special pin 8
functions
2.1.1.2 Arduino UNO pin configuration 10
2.1.2 Arduino Nano 11
2.3 LCD Display 12
2.4 LDR Sensor 13
2.5 MQ2 Gas Sensor 14
2.6 IR Sensor 15
2.7 GSM 16
2.7.1 GSM Modem 16
2.7.2 GSM Integration 18
2.8 Buzzer 23
3. Software Requirements
3.1 Arduino Software 25
3.2 Arduino Installation 25
3.3 Arduino Sketch 28
3.4 Arduino Sketch Program Flow 29
3.5 Working Sketch 30
3.6 How to run a Sketch 31
4. Implementation
4.1 Block Diagram 32
4.2 Working 33
5. Results and Discussions 36
GNITS-ECE DEPT
6. Advantages and Disadvantages
6.1 Advantages 40
6.2 Disadvantages 41
7. Applications 43
8. Conclusion and Future scope
8.1 Conclusion 45
8.2 Future scope 45
9. References 48
10. Appendix 49
GNITS-ECE DEPT
ABSTRACT
Many modern techniques were developed to produce more quantity of food for growing
population. Now a day fruits and vegetables have become the major source of nutrients and
energy. Many chemicals are used in the production of fruits and vegetables, which are
dangerous for consumers. To identify pesticides in organic fruits and vegetables, it is necessary
to build low-cost, portable, sensitive, and selective biosensing platform. Many sensors like
nano-sensors, pH sensors, humidity and temperature sensors and gas sensors are used to detect
the pesticides on the fruits and vegetables. The input data is taken from sensors and send to the
microcontroller where the program is written in such a way that it calculates the amount of
pesticide present on fruits and display the output.
The software for this project is written in Arduino c program. The safe value of
pesticides in fruits or vegetables which can be consumed by humans and animalsare mentioned
in the Arduino c program. If the pesticide content is above or below the threshold level then the
sample contains pesticides. Developing an alert system that triggers messages when pesticide
levels surpass predefined thresholds. The message is sent through proper communication
channels such as SMS, mobile app to the stakeholders such as farmers,distributors, retailers,
and consumers by using GSM modem.
i
GNITS-ECE DEPT
LIST OF FIGURES
ii
GNITS-ECE DEPT
ACRONYMS
S. No Abbreviations Full form
1. UNO “One” in Italian
4. IR Infrared sensor
iii
GNITS-ECE DEPT
1. INTRODUCTION
The population is growing very fast but the land for growing food is same. Hence many
technologies are developed to produce more food for growing population. Chemical fertilizers,
insecticides and pesticides are used to enhance the yield production. But consuming these
pesticides and chemical though food can lead to many dangerous diseases like cancer and even
death in worst conditions. But many are adopting the organic forming, integrated forming
system and many newer technologies to improve the fruits and vegetables quality. The fruits
and vegetables grown using the organic methods coast double the amount of the normal
vegetables and fruits. Producers selling fertilized fruits and vegetables by labeling as organic
fruits and vegetables. This can be dangerous to the consumers. Hence detection of the pesticides
on organic fruits and vegetable plays a major role in agriculture sectors.
The accessible traditional techniques for recognition 1esticidee incorporate mass
spectroscopy, gas chromatography, fluid chromatography, elite execution fluid
chromatography and protein connected invulnerable spongy measure. Despite the fact that
these procedures are exact and solid, they require high support and working expenses, logical
research center, gifted labor, huge example volume and are tedious. By and by we want to foster
a detecting stage, which requires fewer examples, less reaction time and which is easy to use,
minimal expense, adaptable and versatile.
1.1 Literature Survey
Title-1: Artificial Intelligence and IoT based detection of pesticide in organic fruits and
vegetables.
Author: John R. Thompson
Description: The implementation of Internet of Things (IoT) technologies for the accurate and
efficient detection of pesticide residues in various fruits and vegetables. The study explores the
integration of advanced sensor networks with IoT platforms to enable continuous monitoring
and real-time analysis of pesticide levels. Utilizing a combination of optical andelectrochemical
sensors, the system is designed to detect and quantify specific pesticide compounds present in
agricultural produce. The collected data are transmitted wirelessly to a centralized platform for
processing and analysis. The paper discusses the experimental methodology, sensor calibration
techniques, and data processing algorithms employed to ensure the reliability and accuracy of
the detection system. Through comprehensive field trials and validation studies, the
effectiveness of the IoT-based approach in detecting and monitoring pesticide content in fruits
and vegetables is demonstrated, highlighting its potential for enhancing food safety and
agricultural practices. In the realm of pesticide detection techniques, recent studies have
GNITS ECE-DEPT 1
explored diverse methodologies. One proposal suggests gas chromatography spectrometry
analysis for measuring pesticide levels in fruits, acknowledgingits drawbacks as a costly, slow,
and less readily available method. On the other hand, another study suggests using an Arduino
and an electrochemical oxygen sensor for pest detection, highlighting a significant
disadvantage due to the constant exposure to oxygen, which decreases the sensor's lifespan.
Another approach involves a three-step methodology, includingconverting RGB to grayscale,
image segmentation using median filtering and morphological approaches, and feature
extraction and classification from images. Additionally, there are benefits to edge-based
algorithms, which produce noisy discontinuous edges, necessitating more intricate processing
after obtaining results, and segmentation through image conversion to the HSV color space and
fuzzy c-means clustering.
Title-2: Identification of Chemicals in Fruits and Vegetables using IOT
Authors: Akula Venkata Narayana, Bolla Jawahar Sri Veera Sai Suraj, Yallavula Sai Prakash.
Description: In the broader context of precision agriculture, literature can be categorized into
three main subsections: IoT/Sensors and Networks, Data Analytics, and Applications of IoT
and Data Analytics in Agriculture. The first section provides an overview of technologies such
as IoT, machine learning, and data analytics, along with discussions on wirelesscommunication
protocols like Zigbee, LoRa, NB-IoT, and Wi-Fi. The Data Analyticssubsection delves into
the use of machine learning algorithms for processing and analyzingdata from IoT devices,
recognizing challenges related to sensor accuracy, data security, andinteroperability. The third
section explores case studies and implementations in pesticidedetection, considerations of
regulatory compliance, environmental impact assessment, andfuture trends. Moving on to
disease detection and classification, various projects have proposedinnovative solutions. One
focus is on the detection of leaf diseases by calculating leaf area through pixel number
statistics, aiming to increase throughput and reduce subjectivity arisingfrom human experts.
Another suggests a segmentation process using the K-means clustering algorithm, feature
extraction through Grey Level-Co-occurrence Matrix (GLCM), andmulticlass Support Vector
Machine (SVM) classification for identifying potato diseases. Another approach involves an
Android application for plant disease identification, where users upload leaf images, and
algorithms process the images to identify the type of disease. Acomprehensive description
of leaf disease detection using image processing techniquesemphasizes critical analysis of
different segmentation techniques. Focusing on rice disease identification using pattern
recognition, another study employs an improved and customized.
GNITS ECE-DEPT 2
Deep Convolutional Neural Network (DCNN) model. Additionally, a proposed system
involves image acquisition, pre-processing, feature extraction, artificial neural network-based
training, classification, and diagnosis for disease identification and treatment. Lastly, an online
tracking system for monitoring soybean disease and insect infection patterns in Nebraska
provides farmers with valuable insights for decision-making, while exploring nonlinear models
to analyze the combined effects of temperature and wetness duration on foliar parasites.
Title-3: IoT- Deep Learning based Prediction of amount of Pesticides and Diseases in Fruits
Authors: D. Devi, Akshaya Anand, M. Karpagam.
Description: IoT coupled with deep learning has emerged as a powerful tool in agricultural
technology, particularly in predicting pesticide levels and diseases in fruits. The integration of
IoT devices, such as sensors capable of detecting chemical compositions and disease
symptoms, forms the foundation of data collection. These sensors, ranging from spectroscopy
to biosensors, provide real-time data on pesticide residue levels or signs of diseases in fruits.
Research in this area focuses on the accuracy, sensitivity, and reliability of these sensors under
diverse environmental conditions, crucial for effective prediction models.
Deep learning algorithms, notably convolutional neural networks (CNNs) and recurrent
neural networks (RNNs), play a pivotal role in processing the data collected from IoT devices.
These algorithms are trained on extensive datasets to recognize patterns and correlations
between various factors influencing pesticide levels or disease occurrence in fruits. Their ability
to learn from complex data sets enables accurate predictions and early identification ofpotential
issues affecting fruit quality and safety. Furthermore, the deployment of thesepredictive models
in real-time IoT systems brings actionable insights to farmers and stakeholders. By analyzing
the data collected by IoT sensors, these models offer predictions and alerts regarding potential
pesticide excesses or emerging diseases in fruit crops. This proactive approach enables timely
interventions, aiding in better agricultural practices and cropmanagement strategies. However,
despite the promising advancements, challenges persist. Data quality, interpretability of deep
learning models, scalability, and the cost of deploying IoT sensors on a large scale remain
significant hurdles. Ensuring the accuracy and robustness of these predictive models against
real-world observations is essential for their practical application in agriculture.
Looking ahead, ongoing research explores innovative sensor technologies, improved
deep learning architectures, and enhanced integration of IoT systems with other agricultural
technologies. The goal is to create more comprehensive and efficient frameworks for predicting
GNITS ECE-DEPT 3
pesticide levels and diseases in fruits.
Title-4: Prediction of pesticides and identification of diseases in fruits using IoT
Authors: M. Uday Madhav, D. Naga Jyothi, P. Kalyani.
Description: The amalgamation of Support Vector Machine (SVM) and IoT technology holds
promise in predicting pesticide levels and identifying diseases in fruits. SVM, a supervised
machine learning algorithm, has demonstrated effectiveness in classification tasks and
regression analysis, making it suitable for handling datasets generated by IoT sensors. In this
context, IoT devices equipped with various sensors collect crucial data on pesticide residues
and disease symptoms present in fruits. These sensors, ranging from spectrometers to imaging
devices, gather diverse information that forms the basis of the dataset used to train the SVM
model. The data includes spectral signatures, chemical compositions, and visual cues indicative
of pesticide presence or disease onset in fruits. SVM algorithms process this multidimensional
data to create predictive models capable of classifying or predicting the levels of pesticides and
identifying potential diseases in fruits. SVM's ability to delineate complex data patterns and
establish decision boundaries makes it adept at handling the intricacies of agricultural data
collected through IoT sensors. Through careful training and optimization, the SVM model
learns to differentiate between healthy and affected fruits or categorize pesticide levels within
specific thresholds. By leveraging these predictive models, stakeholders can receive timely
alerts about potential pesticide excesses or emerging diseases, enabling proactive measures to
mitigate risks and optimize agricultural practices. However, challenges persist, including
ensuring the accuracy and generalizability of SVM models across different fruit types and
environmental conditions. Data quality, feature selection, and model optimization remain
crucial aspects for enhancing the reliability and applicability of SVM-based predictions in
agricultural settings. As research in this field progresses, efforts focus on refining SVM
algorithms, optimizing feature extraction from IoT sensor data, and addressing scalability
issues for widespread adoption. The ultimate goal is to create robust, accurate, and adaptable
predictive models that significantly contribute to sustainable farming practices and ensure the
safety and quality of fruits produced.
Title-5: Rapid detection Methods of Pesticides Residues in Vegetable Foods
Authors: Bahman Fazeli-Nazab, Laleh Shahraki-Mojahed, Maryam Beigomi.
Description: Rapid detection methods for pesticide residues in vegetable foods have seen
significant advancements, leveraging innovative technologies to ensure swift and accurate
GNITS ECE-DEPT 4
analyses. Techniques such as chromatography-based methods, including HPLC and GC-
MS/MS, have evolved to offer high sensitivity and specificity, allowing for quicker detection
with improved limits of detection. Complementing these established methods, immunoassays,
biosensors, and electrochemical sensors have emerged as rapid on-site testing tools, enabling
quick screening of pesticide residues in vegetables. Their portability and simplicity facilitate
convenient field-based analyses, ensuring timely assessment of food safety. Moreover, the
integration of advanced technologies like surface-enhanced Raman spectroscopy (SERS), near-
infrared spectroscopy (NIRS), multispectral imaging, and miniaturized portable devices has
revolutionized the landscape of pesticide residue detection. SERS and NIRS offer rapid, non-
destructive analyses, while miniaturized devices and smartphone-integrated sensors provide
accessible, real-time screening capabilities. These technologies collectively contribute to the
efficiency and effectiveness of food safety protocols, facilitating prompt detection of pesticide
residues in vegetable foods. Continued research in this area aims to further refine these
methods, enhancing their speed, sensitivity, and practicality for widespread application in
ensuring the safety and quality of vegetable produce for consumers.
1.2 Plan of work
Understanding and integrating sensors
IOT Integration
Build the Arduino based hardware
Data collection and analysis
Testing the hardware with apple
1.3 Problem Statement
Detecting pesticides in fruits is crucial for ensuring food safety and minimizing health
risks. Pesticides, while aiding in crop protection, can pose potential health hazards if present in
excessive amounts in our food. Various methods, from chromatography to spectroscopy, are
employed to analyze and quantify pesticide residues in vegetables. The ongoing research and
advancements in detection methodologies continue to refine our ability to monitor and regulate
pesticide levels in vegetables, safeguarding public health and well- being. In this project we are
using Embedded system along with IR sensor, LDR sensor and MQ-2 sensor for the detection
of Pesticide in Apple.
GNITS ECE-DEPT 5
1.4 Hardware and Software used
Arduino UNO
LCD Display
LDR Sensor
MQ2 gas Sensor
IR Sensor
GSM
Buzzer
Arduino IDE (Software)
GNITS ECE-DEPT 6
2. HARDWARE DESCRIPTION
2.1 Arduino
Arduino is a project, open-source hardware, and software platform used to design and
build electronic devices. The designs of Arduino boards use a variety of controllers and
microprocessors. The Arduino board consists of sets of analog and digital I/O (Input / Output)
pins, which are further interfaced to breadboard, expansion boards, and other circuits. Such
boards feature the model, Universal Serial Bus (USB), and serial communication interfaces,
which are used for loading programs from the computers.
2.1.1 Arduino UNO
Arduino UNO is a microcontroller board based on the ATmega328P. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
resonator, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started. The Arduino UNO pin
description is as shown in fig. 2.3.
“Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions
of Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an extensive list of current, past or
outdated boards see the Arduino index of boards.
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino board, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX).
The Arduino UNO can be programmed using the Arduino IDE. The Arduino IDE is the
Integral Development program, which is common to all the boards. We can also use Arduino
Web Editor, which allows us to upload sketches and write the code from our web browser
(Google Chrome recommended) to any Arduino Board. It is an online platform. The USB
connection is essential to connect the computer with the board. After the connection, the PWR
pins will light in green. It is a green power LED.
GNITS ECE-DEPT 7
Technical Specifications are:
Microcontroller: ATmega38P – 8 bit AVR family microcontroller
Operating Voltage: 5V
SRAM: 2kB
EEPROM: 1kB
Frequency (Clock Speed): 16MHz
2.1.1.1 General and Special Pin Functions
Arduino UNO Pinout contains 14 digital pins, 6 analog Pins, 2 Reset Pins & Power Pins.
Each of these Digital & Analog Pins are assigned with multiple functions but their main function
is to be configured as input or output. The analog pins come with a total resolution of 10bits
which measure the value from zero to 5V. They are acted as input pins when they are interfaced
with sensors, but if you are driving some load then use them as output. As shown in Fig 2.1 each
pin on the UNO board comes with a specific function associated with it.
LED - Arduino Uno comes with built-in LED which is connected through pin 13.
Providing HIGH value to the pin will turn it ON. Providing LOW will turn it OFF.
Vin - It is the input voltage provided to the Arduino Board. This pin is used to supply
voltage. It is different than 5V supplied through a USB port. If a voltage is provided
through power jack, it can be accessed through this pin.
5V - This board comes with the ability to provide voltage regulation. 5V pin is used to
provide output regulated voltage. The board is powered up using three ways i.e. USB,
Vin pin of the board or DC power jack. USB supports voltage around 5V while Vin and
Power Jack support a voltage range between 7V to 20V.
GND - These are ground pins. There are more than one ground pins are provided on the
GNITS ECE-DEPT 8
board. They can be used as per requirement.
Reset -This pin is incorporated on the board which resets the program running on the
board. Instead of physical reset on the board, IDE comes with a feature of resetting the
board through programming.
IOREF -It is the abbreviation of Input Output Voltage Reference. This pin is very useful
for providing voltage reference to the board. A shield is used to read the voltage across
this pin which then select the proper power source.
PWM – Pulse Width Modulation is provided by 3, 5, 6, 9, 10, 11 pins. These pins are
configured to provide 8-bit output PWM.
SPI - It is abbreviation of Serial Peripheral Interface. Four pins 10(SS), 11(MOSI),
12(MISO), 13(SCK) provide SPI communication with the help of SPI library.
AREF - It is called Analog Reference. This pin is used for providing a reference voltage
to the analog inputs.
TWI - It is called Two-Wire Interface. TWI communication is accessed through Wire
Library. A4 and A5 pins are used for this purpose.
Serial Communication - Serial communication is carried out through two pins called Pin
0 (Rx) and Pin 1 (Tx).
Rx. & Tx. - Rx (Receiver) pin is used to receive data while Tx (Transmitter) pin is used
to transmit data.
External Interrupts - Pin 2 and 3 are used for providing external interrupts. An interrupt
is called by providing LOW or changing value.
GNITS ECE-DEPT 9
2.1.1.2 Arduino Uno Pin Configuration:
Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL serial
data. They are connected with the corresponding ATmega328P USB to TTL serial chip.
External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using analogWrite()
function.
SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for SPI
communication.
In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is HIGH – LED
is on and when pin 13 is LOW, it’s off.
Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits of
resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can be
increased by using AREF pin with analog Reference() function.
Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire library.
Arduino Uno has a couple of other pins as explained below:
AREF: Used to provide reference voltage for analog inputs with analogReference()
function.
Reset Pin: Making this pin LOW, resets the microcontroller.
GNITS ECE-DEPT 10
2.2 Arduino Nano
The Arduino Nano is a small, complete, and breadboard-friendly board based on the
ATmega328 (Arduino Nano 3.x) as shown in Fig. 2.3. It has more or less the same functionality
of the Arduino Duemilanove, but in a different package. It lacks only a DC powerjack, and works
with a Mini-B USB cable instead of a standard one. Arduino Nano is simply a smaller version of
Arduino UNO, thus both has almost same functionalities. Arduino Nano comes with a crystal
oscillator of frequency 16 MHz. It is used to produce a clock of precise frequency using constant
voltage. Flash memory is 16KB or 32KB that all depends on the Atmega board i.e Atmega168
comes with 16KB of flash memory while Atmega328 comes with a flash memory of 32KB. Flash
memory is used for storing code. The 2KB of memory out of total flash memory is used for a
bootloader. The Arduino Nano is equipped with 30 maleI/O headers, in a dip like configuration,
which can be programmed using the Arduino Software integrated development environment
(IDE), which is common to all Arduino boards and running both online and offline. The board
can be powered through a type-b micro-USB cable,or through a 9V battery.
GNITS ECE-DEPT 11
Technical specifications are:
Microcontroller: ATmega38
Architecture: AVR
Operating Voltage: 5V
Flash Memory: 32KB of which 2KB used by bootloader
SRAM: 2KB
Clock Speed: 16MHZ
Analog I/O Pins: 8
EEPROM: 1KB
DC Current per I/O Pins: 40mA (I/O Pins)
Input Voltage: 7-12V
Digital I/O Pins: 22
PWM Output: 6
Power Consumption: 19mA
PCB Size: 18 x 45 mm
Weight 7g
GNITS ECE-DEPT 12
When the pixels are rapidly switched on and off, a picture is created. The way a pixel is
controlled is different in each type of display; CRT, LED, LCD and newer types of displays all
control pixels differently. In short, LCDs are lit by a backlight, and pixels are switched on and
offelectronically while using liquid crystals to rotate polarized light. A polarizing glass filter is
placedin front and behind all the pixels, the front filter is placed at 90 degrees. In between both
filters arethe liquid crystals, which can be electronically switched on and off.
GNITS ECE-DEPT 13
Also, the energy in incident light should be greater than the bandgap gap energy so that
electrons from the valence band got excited and go to the conduction band. The LDR has the
highest resistance in dark around 1012 Ohm and this resistance decreases with increase Light.
There are five basic elements used in a typical infrared detection system: an infrared source,
a transmission medium, optical component, infrared detectors or receivers and signal processing.
Infrared lasers and Infrared LEDs of specific wavelength used as infrared sources. The three main
types of media used for infrared transmission are vacuum, atmosphere and optical fibres. Optical
components are used to focus the infrared radiation or to limit the spectral response.
GNITS ECE-DEPT 15
2.7 GSM
GNITS ECE-DEPT 16
A GSM (Global System for Mobile Communications) modem is a hardware device that
allows communication between a computer or microcontroller and the GSM network. These
modems enable devices to send and receive messages, make voice calls, and access the internet
via a GSM network. They often come in the form of USB dongles, expansion cards, or
standalone devices.
GNITS ECE-DEPT 17
Interaction with a GSM modem is typically done through AT commands. These
commands instruct the modem to perform specific functions, such as sending an SMS or
initiating a call. GSM modems operate on specific frequency bands, and their compatibility
with different networks depends on the supported frequencies. The modem used supports a
frequency range of 800-1800 MHz.
2.7.2 GSM Integration
GSM SIM900C (Global System for Mobile communication) is a mobile
communication modem that digitizes and reduces the data, then sends it down through a
channel with two different streams of client data, each in its own particular time slot. SIM900C
is a complete Quad-band GSM/GPRS solution in a SMT type with a SIM card holder. It
supports Quad-band 850/900/1800/1900MHz and can transmit voice, SMS and data
information with low power consumption. It smoothly fits into a slim and compact design. The
major benefit of using SIM800C is that it comes with inbuilt GPRS technology. In the
proposedsystem, when the nano micro controller requests the GSM to send an alert message,
the modem fitted with a SIM card sends a text message and calls to specific mobile numbers.
Any number of mobile numbers can be specified.
After performing the assigned task, GSM responds to the request of the nano micro
controller by sending acknowledgement.
GNITS ECE-DEPT 18
communication, making it suitable for applications ranging from IoT (Internet of
Things) to remote monitoring and control.
5. Low Power Consumption: The modem is designed with power efficiency in mind,
ensuring that it can operate for extended periods on battery power or in situations where
power resources are limited. This is particularly important for remote and mobile
applications.
6. Compact Design: SIM900C is designed to fit into a slim and compact form factor,
making it easy to integrate into various electronic devices and systems without taking
up much space.
7. Inbuilt GPRS Technology: One of the major advantages of SIM900C is its built
in GPRS (General Packet Radio Service) technology. GPRS allows for packet based
data transmission over the GSM network, enabling efficient and cost effective data
communication.
GNITS ECE-DEPT 19
Table 4.2 SIM900A GSM modem specifications
FEATURES DETAILS
In the proposed system, when the nano microcontroller requests the GSM module (SIM900C)
to send an alert message, several actions are triggered:
1. Alert Request: The nano microcontroller initiates an alert request, indicating that
specific conditions or events have occurred that require communication with designated
recipients.
2. Text Message and Call: The GSM modem, equipped with a SIM card, is responsible
for sending both a text message and making calls to specific mobile numbers. The
system can specify any number of mobile numbers to be contacted in case of an alert.
3. Acknowledgment: After performing the assigned task, which may involve sending
critical information or warnings, the GSM modem responds to the request of the nano
microcontroller. It sends an acknowledgment to confirm that the alert messages and
calls have been successfully transmitted.
This system architecture allows for rapid communication in critical situations, ensuring that
relevant individuals or parties are informed promptly. It's applicable in various scenarios, such
as security systems, remote monitoring, and emergency notifications.
GNITS ECE-DEPT 20
Thus, the SIM900C GSM modem is a vital component that adds mobile communication
capabilities to the proposed system. Its features, including quad-band support, low power
consumption, and inbuilt GPRS technology, make it a versatile choice for a wide range of
applications that require reliable and efficient data, voice, and SMS communication over the
GSM network.
Fig.2.10 USB
A GSM module works by connecting to the GSM network through a SIM card. The SIM
card provides the module with a unique identification number, which is used to identify the
device on the network. The GSM module then communicates with the network usinga set of
protocols, which allows it to send and receive data.
The GSM network is a digital cellular network that uses a set of protocols to enable
communication between devices. The network is divided into cells, which are each serviced by
a base station. The base station communicates with the devices in its cell, and the cells are
interconnected to form a network.
The GSM module plays a crucial role in the communication between devices and the GSM
network. It is responsible for establishing and maintaining the communication link between the
device and the network. The module also handles the encryption and decryption of data, which
ensures the security of the communication.
There are different types of GSM modules, each with its own functionalities. Some modules
are designed to handle voice communication, while others are designed for data
communication. Some modules also have built-in GPS, which allows them to provide location
information.
GNITS ECE-DEPT 21
There are several advantages of using a GSM module in communication systems. Some
of the most significant advantages are:
The use of 5V Adapter and USB cable to power the GSM by DC voltage and to dump
the code from IDE from the Laptop to the Board respectively. The term USB stands for
"Universal Serial Bus". USB cable assemblies are some of the most popular cable types
available, used mostly to connect computers to peripheral devices. An adapter or adaptor is a
device that converts attributes of one electrical device or system to those of an otherwise
incompatible device or system. Some modify power or signal attributes, while others merely
adapt the physical form of one connector to another. The jumper cables play a major role in
Connections. Male-to-male, male-to-female, and female-to-female connector wires are the
most common.
GNITS ECE-DEPT 22
2.7 Buzzer
In Arduino projects, buzzers are used to produce audible feedback or alarms. They can
be controlled easily by turning the corresponding pins HIGH or LOW for active buzzers, or
by generating PWM signals of varying frequencies for passive buzzers. This allows for the
creation of various sound effects, melodies, or alarms in Arduino projects.
In projects, a buzzer can be used for various purposes, such as creating audible alerts,
indicating events or conditions, or adding sound effects. Here's how a buzzer can work in
different types of projects:
Alarm Systems: Buzzer circuits can be incorporated into alarm systems to produce
loud sounds when triggered by certain events, such as detecting motion, changes in
sensor readings (like temperature or humidity), or unauthorized access. For
example, in a security project, a buzzer can sound an alarm when a motion sensor
detects movement in a restricted area.
Timer Circuits: Buzzer circuits can be combined with timers to create audible alerts
at specific intervals or when a predetermined time has elapsed. This is useful in
projects like kitchen timers, reminders for specific tasks, or countdown timers for
GNITS ECE-DEPT 23
games or competitions.
Notification Systems: Buzzer circuits can be integrated into notification systems to
alert users about important events or conditions. For instance, in a weather
monitoring project, a buzzer can sound an alert when certain weather conditions are
detected, such as high winds or heavy rainfall.
Interactive Projects: Buzzer circuits can add an interactive element to projects by
providing feedback to user inputs or actions. For example, in a game project, a
buzzer can produce soundeffects when a player achieves a certain milestone, makes
a correct move, or completes a level.
Educational Projects: Buzzer circuits are commonly used in educational projects to
demonstrate basic principles of electronics, such as how to create sound using
electromechanical devices and how to control sound output using electronic
components like transistors or microcontrollers.
Regardless of the specific project, the basic principle of operation remains the same: the
buzzer is connected to a circuit that provides electrical power, and when activated, it
produces sound through rapid vibrations of its diaphragm or armature. The design and
complexity of the circuit can vary depending on the requirements of the project and the
desired functionality of the buzzer. Arduino code monitors the levels of gas and light,
presumably related to pesticide levels. If the gas level exceeds a threshold, it sends an SMS
indicating "High Pesticide" along with sensor readings. If the gas level is below the
threshold, it sends an SMS indicating "Low Pesticide". The system checks the sensor
values periodically when triggered by a signal on pin A2. If it indicates High Pesticide,
then the buzzer sound can be heard.
GNITS ECE-DEPT 24
3. SOFTWARE DESCRIPTION
To implement a controller, it is necessary to construct a device that need to have
software to develop a system in real time world. In addition, it is necessary to connect the
computing deviceto the process which is done using sensors and actuators.
IDE stands for “Integrated Development Environment”: it is an official software
introducedby Arduino.cc, that is mainly used for editing, compiling and uploading the code in
the Arduino Device. Almost all Arduino modules are compatible with this software that is an
open source andis readily available to install and start compiling the code on the go.
GNITS ECE-DEPT 25
Step 1- First the Arduino board and a USB cable is required. In case of Arduino Uno, use
ArduinoDuemilanove, Nano, Arduino Mega 2560, or Diecimila, it will need a standard USB
cable (A plugto B plug), the kind you would connect to a USB printer.
In case if Arduino Nano is used A to Mini-B cable can be used instead as shown in fig. 3.1.
GNITS ECE-DEPT 26
Once the software starts, there will be two options:
1. Create new project.
2.Open the existing project example.
To create a new project, select File-> New.
To open an existing project example, select File-> Example-> Basics-> Blink.
Here, selecting just one of the examples with the name Blink. It turns the LED on and off
withsome time delay. Then select any other example from the list.
Step 6- Select the Arduino board.
To avoid any error while uploading the program to the board, then select the correct Arduino
boardname, which matches with the board connected to the computer.
Go to Tools ->Board and select board.
Here, selected the Arduino Uno board according to tutorial, but it must select the name
matchingthe board that is being used.
Step 7- Select the serial port.
Select the serial device of the Arduino board.Go to Tools-> Serial Port menu.
This is likely to be COM3 or higher (COMI and COM2 are usually reserved for hardware
serial ports). To find out, it can disconnect the Arduino board and re-open the menu, the
entry that disappears should be of the Arduino board. Reconnect the board and select that
serial port.
Step 8- Upload the program to the board.
Before explaining how can the program be uploaded to the board.
First demonstrate the function of each symbol appearing in the Arduino IDE toolbar as
shown onthe Fig. 4.2 Function of each symbol appearing in the Arduino IDE toolbar.
Fig. 3.2 Function of each symbol appearing in the Arduino IDE toolbar.
GNITS ECE-DEPT 27
A- Used to check if there is any compilation error.
F- Serial monitor used to receive serial data from the board and send the serial data to the
ward Now, simply click the "Upload" button in the environment. Wait a few seconds-
thenF the RX and TX LEDs on the board, flashing. If the upload is successful, the
message "Done uploading" will appear in the status bar.
Note- If you have an Arduino Mini, NG, or other board, you need to press the reset button
physically on the board, immediately before clicking the upload button on the Arduino
software.
3.3 Arduino Sketch
Arduino sketch is the name that Arduino uses for a program. It’s the unit of code that is
uploadedto, and run on an Arduino board. A basic Arduino sketch consists of two functions:
Setup ()
Loop ()
GNITS ECE-DEPT 28
Open the Arduino IDE and click on the File tab. Then, click on New (or press Control + N
on your keyboard) to have a look at the two functions as shown in Fig. 3.3.
3.4 Arduino Sketch Program Flow
In an Arduino sketch, program statements (individual lines of code) are executed,
i.e. run from top to bottom. This top-to-bottom execution of statements can be altered only
by flow control statements.
There are few things to notice in your sketch:
void setup(): It is the function initialization/declaration process of the function
named setup(). As the function does not return any value, it is initialized with the
keyword void, meaning empty.
Serial. begin (9600);
Serial. println(“Hello World”);
These statements are present in the setup function’s body.
{ is the opening brace of the functions that tells that all statements starting from here
are inside the functions.
} is the closing brace of the function.
; is used to terminate the statement.
In the Hello World sketch, statements in the setup() function will run first, from topto
bottom. The statement Serial. begin(9600); is the first statement in the setup() function, so it
is the first to run. This statement sets up the speed of the serial port to 9600 baud. Thebaud
setting in the serial monitor window must match this value so that the evive and serialmonitor
window can communicate at the same speed.
The second statement to run in the setup() function is Serial.println(“Hello, world!”);,
which sends the text Hello World out for display in the serial monitor window. In this
statement, any text can be put between the opening and closing quotes (” “) and it will be
displayed in the serial monitor window.
The setup() Function
Statements in the setup() function are executed only once when the sketch is run.
The loop() Function
Statements in the loop() function will run continuously from top to bottom and then
back to the top. If the loop() function contains two statements, the first statement will be
executed first, then the second statement, then the first statement again and so on.
GNITS ECE-DEPT 29
The statements in the main loop will be executed continuously until the Arduino is
switched off or reset.
It is important to have the loop() function in the sketch, even if it is empty, because
without it the microcontroller on the Arduino board will try to execute whatever it finds next
in memory after the statements in the setup() function have been executed. But the loop()
function prevents it from doing so by keeping the program execution in the loop.
3.5 Writing Sketch
In writing sketch, we will use the serial monitor window to write our message.
Serial communication is very useful for controlling electronic components or devices
that are connected to (interfaced with) the Arduino board from the computer. You can use it
for debugging (finding errors in) Arduino programs when writing new programs.
To write in the serial monitor, you must first initialise serial monitor, you can do it
with the help of the following statement:
Serial. begin(9600);
Here 9600 is the baud rate at which you are communicating over USB with your device.
The statement to write on Serial Monitor is:
Serial. println (“Your Message”);
GNITS ECE-DEPT 30
Now, we can modify the code by initializing serial monitor and writing print statement
inside setup() function. You will end with this code as shown in Fig. 3.4.
GNITS ECE-DEPT 31
4. IMPLEMENTATION
GNITS ECE-DEPT 32
Microcontroller/Processor, unit processes the analog signals from the sensors.
Analog-to-Digital Converter (ADC) Converts analog sensor signals into digital data for the
processor to handle. The processor executes algorithms to interpret the sensor data. It could
involve pattern recognition, threshold analysis, or comparison against predefined values to
identify the presence and concentration of pesticides.
The IR, MQ2 gas sensor, and LDR sensors interface with the Arduino
microcontroller. Analog outputs from these sensors are connected to analog pins on the
Arduino. The Arduino processes the analog signals from the sensors and converts them into
meaningful data related to pesticide levels. The Arduino code includes calibration, threshold
setting, and alert generation logic.
The Arduino sends the processed data to the LCD display for real-time visualization
ofpesticide levels. The LCD updates as the sensor readings change. The Arduino is connected
toa GSM module, which is responsible for sending alert messages when pesticide levels
exceed predefined thresholds. The GSM module uses SMS (Short Message Service) for
communication. The alert system is triggered by the Arduino when sensor readings surpass
thepredefined thresholds. The alert system activates the GSM module to send alert messages.
Based on the processed data, the processor makes decisions about the presence or
absenceof pesticides and their concentration levels. LCD displays the output information such
as pesticidepresence, concentration levels, and potentially other relevant data for the user.
Visual or audible indicators can alert users to the presence of pesticides beyond certain
thresholds. Interfaces like buttons or switches can allow users to interact with the system, set
thresholds, or calibrate the sensors. The system could include storage capabilities to log data
for future analysis or reference.Power supply provides regulated power to the entire system,
ensuring stable and reliable operation.
4.2 WORKING
The process of detecting pesticides in fruits and vegetables using sensors like LDR, IR,
MQ2 gas sensor, an LCD display, and an Arduino Uno involves a comprehensive approach
that integrates sensor data, processing, and display for identification and indication of
pesticide residues. Each sensor in this setup plays a specific role: the LDR sensor monitors
variations in light intensity, the IR sensor measures infrared radiation, and the MQ2 gas
sensor detects gases, including volatile organic compounds found in pesticides.
To initiate the detection process, the sensors require calibration to establish baseline
GNITS ECE-DEPT 33
valuesand sensitivity levels to specific compounds present in pesticides. When exposed to
fruits or vegetables suspected of pesticide contamination, these sensors collect data based on
changes in light intensity, infrared radiation, and gas concentrations. The Arduino Uno,
acting as the central processing unit, reads, processes, and interprets the sensor data using
predefined algorithms and thresholds to determine the presence of pesticides. Calibration
ensures the accuracy and specificityof the sensors to differentiate pesticide-related variations
from background environmental factors.The decision-making process within the Arduino
determines if detected variations orconcentrations exceed predefined limits, indicating the
potential presence of pesticides.
Results of the detection process are then displayed on the LCD screen, providing a
visual output that indicates the presence or absence of pesticides and potentially triggers alerts
if pesticidelevels surpass acceptable limits. Challenges in this process include ensuring sensor
sensitivity andspecificity, accurate threshold setting to avoid false positives or negatives, and
accounting for real-world variations in environmental conditions and pesticide compositions.
While this setup offers a fundamental model for pesticide detection, practical
implementation often requires more sophisticated and specialized equipment for increased
accuracy and reliability in real-world scenarios. Calibration precision, threshold accuracy,
and consideration of environmental factors remain crucial for effective pesticide detection
using sensor-based systems.
GNITS ECE-DEPT 34
2. Arduino Uno Processing:
Data Acquisition: The sensor data, including readings from LDR, IR, and MQ2 sensors, are
collected by the Arduino Uno microcontroller.
Data Interpretation: Arduino Uno processes and interprets the collected sensor data. It
applies predefined algorithms or thresholds to analyze the readings from the sensors to
3. Decision Making and Output Display:
Determine the likelihood of pesticide contamination based on the changes detected
in lightintensity, infrared radiation, and gas concentrations.
Threshold Comparison: Arduino Uno compares the sensor readings with predefined
thresholds or established patterns that indicate the presence of pesticides. If the readings
exceed these thresholds, it signifies potential pesticide contamination.
LCD Display Output: The results of the pesticide detection process are displayed on an
LCD screen. This display visually indicates the presence or absence of pesticides in the fruits
or vegetables based on the interpretations made by the Arduino Uno.
Considerations:
Calibration and Sensitivity: Proper calibration of sensors is crucial to ensure they are
sensitive enough to detect specific changes caused by pesticides without generating false
positivesor negatives.
Threshold Setting: Establishing accurate thresholds or criteria based on sensor readings to
distinguish between contaminated and uncontaminated produce.
GNITS ECE-DEPT 35
5. RESULTS AND DISCUSSIONS
This project aims to revolutionize pesticide detection by integrating Light Dependent
Resistor (LDR), Infrared (IR), and gas sensors into a comprehensive detection system. The
combined sensor array offers a multi-dimensional approach to identifying pesticides in
varyingenvironmental conditions. The LDR sensor captures changes in light transmission
caused by pesticide particles, while the IR sensor detects alterations in infrared radiation due
to pesticideinteractions. Gas sensors add specificity by detecting particular pesticide gases.
Through sophisticated data processing implemented by the onboard processor, the system
offers both qualitative and quantitative analysis of pesticide presence and concentration
levels as shown in fig. 5.1.
GNITS ECE-DEPT 36
Algorithmic analysis, real-time processing capabilities, and the intuitive LCD
display ensure accurate and immediate feedback to users, detailing pesticide levels and
potential alerts as shown in fig.5.2. Evaluating sensor sensitivity, compensating for
environmental interferences, and exploring avenues for future improvements form critical
aspects of this innovative pesticide detection project.
The outputs of the pesticide content monitoring system with IR, MQ2 gas sensor, LDR
sensors, LCD display, and GSM integration are the actionable information and alerts
generated by the system.
LCD Display Output:
The LCD display provides a visual representation of real-time pesticide levels. It
enables stakeholders to monitor the current status and changes in pesticide concentrations.
The LCD display, as a crucial output component, serves as a direct interface between
the pesticide content monitoring system and its stakeholders, providing them with the
necessary informationfor decision-making and proactive response to changes in pesticide
levels.
GNITS ECE-DEPT 37
Alert Messages via GSM:
By employing the GSM module and SMS alerts, the pesticide content monitoring
system ensures rapid and reliable communication, enabling stakeholders to take timely actions
GNITS ECE-DEPT 38
in response to elevated pesticide levels, ultimately contributing to improved food safety and
agricultural practices as shown in fig 5.5.
GNITS ECE-DEPT 39
6. ADVANTAGES & DISADVANTAGES
6.1. Advantages
The advantages of IoT based detection of pesticides in fruits and vegetables are:
Consumer Safety: Ensures that consumers are not exposed to harmful levels of
pesticides,safeguarding their health and well-being. By identifying and quantifying pesticide
residues, consumers are assured of safer produce, reducing health risks associated with
consuming contaminated fruits and vegetables.
Improved Quality Control: Enables farmers and distributors to monitor and maintain the
quality of their produce, enhancing its market value and consumer trust.
Early Intervention and Prevention: Allows for early detection of pesticide contamination,
enabling swift action to mitigate further contamination or crop damage.
Reduced Wastage: Early detection helps in taking proactive measures to prevent further
contamination, preserving crop quality and reducing potential wastage.
Public Health Awareness: Raises awareness about importance of safe pesticide usage
and fostering a more conscious approach among producers and consumers.
GNITS ECE-DEPT 40
Technology Integration: The use of advanced detection methods, including IoT, sensors,
and data analytics, facilitates efficient and accurate pesticide detection.
Precision and Accuracy: Advanced detection methods ensure accurate measurement and
identification of pesticide residues, providing reliable data about the contamination levels.
Limitations in Detecting All Pesticides: Some detection methods may not be able to identify
all types of pesticides or their breakdown products, potentially leading to incomplete
information about pesticide residues.
Threshold Levels and Sensitivity: Setting threshold levels for pesticide residues is
challenging, as some substances might have different acceptable limits in various regions
or for different produce. Additionally, achieving the required sensitivity in detection can be
difficult for some low-dosage pesticides.
Complexity in Sample Preparation: Preparing samples for analysis, especially for complex
matrices like fruits and vegetables, can be intricate and time-intensive, affecting the
efficiency of the detection process.
GNITS ECE-DEPT 41
Environmental Factors and Interferences: Environmental factors like temperature,
humidity, or natural compounds in produce can sometimes interfere with detection methods,
affecting their accuracy.
Challenges in Implementation for Small-Scale Farmers: Small-scale or subsistence farmers
might face difficulties in adopting these technologies due to financial constraints or lack of
technical expertise.
Continuous Monitoring and Maintenance: IoT-based systems require continuous
monitoring and maintenance, which can pose challenges in terms of reliability, power
supply, and connectivity, particularly in remote or rural areas.
Consumer Perception and Trust: While detection ensures safety, excessive emphasis on
pesticide detection may lead to consumer concern or mistrust about the safety of all
produce, potentially affecting market demand.
Despite these challenges, ongoing advancements in technology and research aim to overcome
these limitations, making pesticide detection more accessible, efficient, and reliable in
ensuringthe safety and quality of fruits and vegetables.
GNITS ECE-DEPT 42
7. APPLICATIONS
The applications of pesticide detection in fruits and vegetables are vital across various
sectors and stages of the food supply chain:
Pesticide Application Management: Monitoring and controlling pesticide application to
ensure compliance with regulations and minimize excess usage.
Quality Control: Assessing produce quality before harvesting, ensuring that fruits and
vegetables meet safety standards.
Quality Assurance: Checking incoming raw produce to guarantee it meets safety standards
and doesn't contain harmful levels of pesticides.
Market Compliance: Meeting regulatory requirements to avoid legal issues related to
permissible pesticide residue levels.
Innovation in Detection Methods: Researching and developing new and more efficient
detection technologies to improve accuracy, sensitivity, and speed of pesticide detection.
Data Analysis for Improvement: Analyzing collected data to improve farming practices,
optimize pesticide application, and enhance food safety.
Setting Standards and Regulatory Compliance: Establishing acceptable pesticide residue
limits in fruits and vegetables to safeguard consumer health and ensure compliance across
the industry.
Enforcement and Inspection: Monitoring and inspecting produce for compliance with set
standards, ensuring adherence to regulations.
Global Trade and Export by International Standards Adherence: Meeting international
standards for pesticide residues in agricultural products to facilitate trade and export of
fruits and vegetables.
Building Trust and Market Access: Ensuring that exported produce meets the safety
requirements of importing countries, enhancing market access and consumer trust.
Public Health Awareness Campaigns: Creating awareness among consumers about the
importance of safe pesticide usage and the significance of buying product with controlled
Pre-harvest Monitoring: Ensuring that pesticide levels in crops are within acceptable limits
before harvesting is critical. Monitoring helps farmers make informed decisions about
pesticide application and withdrawal periods.
Post-harvest handling: The Detecting pesticides in harvested produce helps prevent
contaminated fruits and vegetables from entering the market or being processed into food
products.
GNITS ECE-DEPT 43
Food Processing: Pesticide detection is essential during food processing to ensure that
contaminants are not introduced during processing stages such as washing, peeling, and
cutting.
Quality Control: Monitoring pesticide residues in fruits and vegetables is part of quality
control measures to meet regulatory standards and ensure consumer safety.
Export and Import: Many countries have strict regulations regarding pesticide residues in
imported fruits and vegetables. Detection is necessary to comply with these regulations and
facilitate international trade.
Consumer Safety Ultimately, pesticide detection in fruits and vegetables is crucial for
protecting consumer health and safety, as excessive pesticide residues can pose health risks.
GNITS ECE-DEPT 44
8. CONCLUSION AND FUTURE SCOPE
8.1 Conclusion:
The implementation of IoT-based detection systems for pesticides in apple and potato
cultivation presents a significant leap forward in ensuring food safety, environmental
sustainability, and efficient agricultural practices. This technology offers real-time
monitoring and data-driven insights, enabling farmers and stakeholders to make informed
decisionsregarding pest management. By leveraging sensor networks and data analytics, the
system notonly detects pesticide levels but also provides a comprehensive understanding of
environmentalconditions, crop health, and potential risks.
The IoT-based approach enhances precision in pesticide application, minimizing
overuse and reducing the environmental impact. It contributes to the promotion of sustainable
farming practices, protecting ecosystems and biodiversity. Furthermore, the real-time nature
ofthe system allows for immediate responses to emerging pest threats, preventing widespread
crop damage and ensuring higher yields.
The integration of IoT in pesticide detection aligns with the global push for smart agriculture,
where technology plays a pivotal role in addressing the challenges faced by the agricultural
sector. As we move towards a future of interconnected devices and smart farming practices,
the IoT-based detection of pesticides in apple and potato cultivation stands as a testament to
the potential of technology to revolutionize and optimize agricultural processes.
However, it is crucial to address challenges such as data security, standardization, and
accessibility to ensure the widespread adoption of these technologies. Collaborative efforts
from researchers, farmers, and policymakers will be essential to overcome these hurdles and
unlock the full potential of IoT in creating a sustainable and secure future for agriculture.
Overall, the IoT-based detection of pesticides represents a promising step towards safer and
more efficient food production systems, benefitting both farmers and consumers alike.
8.2 Future Scope:
The future scope of pesticide detection in fruits and vegetables is evolving rapidly due
to technological advancements, particularly in areas like IoT, nanotechnology, spectroscopy,
and data analytics. This evolution is driven by the growing concerns about food safety,
environmental sustainability, and the need for more efficient agricultural practices.
Advanced Sensors: Continued advancements in sensor technology, including miniaturization
and increased sensitivity, will enable the development of highly accurate and cost-effective
sensors for pesticide detection.
GNITS ECE-DEPT 45
IoT Integration: Integration of IoT devices with these advanced sensors will facilitate
real-time monitoring of pesticide residues on fruits and vegetables throughout the supply
chain.
Wireless Connectivity: Enhanced wireless connectivity will enable seamless
communication between sensors, data processing units, and cloud platforms, allowing
for rapid data analysis and decision-making.
Nanotechnology and Spectroscopy: Nanotechnology-driven sensors hold promise for
ultra-sensitive and selective detection of pesticide residues at extremely low
concentrations, improving accuracy and detection limits. Advancements in
spectroscopic techniques, such as Raman spectroscopy and infrared spectroscopy, will
enable non-destructive and rapid detection of pesticides in produce.
Big Data Analytics: Increased use of big data analytics will allow for the processing of
vast amounts of data generated by IoT devices and sensors, extracting meaningful
insights into pesticide usage patterns and contamination levels.
Machine Learning and AI: Machine learning algorithms will continue to evolve,
enabling predictive analysis, anomaly detection, and optimization of pesticide
application strategies based on historical data and environmental factors.
Smart Farming Practices: The integration of pesticide detection technologies into
precision agriculture systems will enable targeted and optimized pesticide
application, reducing Autonomous drones and robotic systems equipped with
detection overuse and minimizingenvironmental impact.
Precision Agriculture: sensors will enable efficient and precise pesticide
application and monitoring across vastagricultural fields.
Standardization and Regulation: There will be an increased focus on establishing
standardizeddetection methods and regulatory frameworks to ensure compliance with
safety standards.
Consumer Empowerment: Consumers will have access to more information about the
producethey buy, including pesticide residue levels and farming practices, empowering
them to make informed choices.
GNITS ECE-DEPT 46
Challenges and Considerations:
Cost and Accessibility: Adoption of advanced technologies might initially be costly,
limiting accessibility for smaller farmers.
Data Security and Privacy: Ensuring the security and privacy of data collected from IoT
devices and sensors will be critical.
Education and Adoption: Efforts are needed to educate farmers about the benefits and
proper utilization of these technologies for effective pesticide detection and
management.
In conclusion, the future of pesticide detection in fruits and vegetables lies in the integration
ofcutting-edge technologies, data-driven approaches, and sustainable agricultural practices.
As these innovations continue to evolve, they hold the potential to significantly enhance food
safety, minimize environmental impact, and improve overall agricultural productivity and
sustainability.
GNITS ECE-DEPT 47
9. REFERENCES
[1] D.Nagajyothi, P. Hema Sree, M.Rajani Devi, G.Madhavi, Sk Hasane Ahammad, “IOT-
Based Prediction of Pesticides and Fruits Diseases Detection Using SVM and Neural Networks”
in International Journal of Mechanical Engineering, January 2022.
[2] Selvi, S., Karthikeyan, R. and Vanitha, U., “Organic farming: Technology for environment-
friendly agriculture,” in Proc. International Conference on Advances in Engineering, Science
and Management (ICAESM), pp.132-136, March 2012.
[3] Mnif W, Hassine AIH, Bouaziz A et al (2011) Effect of endocrine disruptor pesticides: a
review. Int J Environ Res Public Health 8:2265–2303.
[4] Sharma A, Kumar V, Shahzad B et al, “Worldwide pesticide usage and its impacts on
ecosystem”. SN Appl Sci 1:1446 (2019).
[5] Narenderan ST, Meyyanathan SN, Babu B. Review of pesticide residue analysis in fruits
and vegetables. Pre-treatment, extraction and detection techniques. Food Res Int. 2020
Jul;133:109141.
[6] Archana B S et al. “Different Methods to Determine Pesticides in Fruits and Vegetables: A Review”,
IRJET, April 2021.
[7] Aradhana B S et al. “Quality and pesticides detection in fruit and vegetables”, JETIR May 2021.
[8] Sujitha, S., Vinoth Kumar, K., Shiva, R.V., Kulkarni, S., Ponnappa, M.M, “An
implementation of soft computing approach of smart control for induction motor using ANFIS”
proceedings - 4th International Conference on Smart Systems and Inventive Technology,
ICSSIT 2022.
[9] Shalini Gnanavel et all “Quality Detection of Fresh Fruits and Vegetables to Improve
Horticulture and Argo-industries” IEEE Xplore2017.
[10] Sujitha, S., Venkatesh.C, “Analysis of regulated PV fed switched reluctance motor drives
using repression resistor converter” in International Journal of Engineering and Technology,
2014, 6(3), pp. 1309–1313
GNITS ECE-DEPT 48
APPENDIX
Code:
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
int count=0;
int a=0;
int b=0;
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(11, OUTPUT);
digitalWrite(11, LOW);
lcd.begin(16,2);
delay(500);
lcd.setCursor(0, 0);
lcd.print("Pesticide Level");
lcd.setCursor(0, 1);
lcd.print(" Monitor System");
delay(3000);
lcd.clear();
}
// the loop routine runs over and over again forever:
void loop() {
int ldr = analogRead(A0);
int gas = analogRead(A1);
if(digitalRead(A2)==LOW)
{
lcd.setCursor(0, 0);
lcd.print("checking... ");
GNITS ECE-DEPT 49
delay(3000);
lcd.clear();
ldr = analogRead(A0);
gas = analogRead(A1);
lcd.setCursor(0, 0);
lcd.print("LDR:");
lcd.print(ldr);
lcd.setCursor(8, 0);
lcd.print("GAS:");
lcd.print(gas);
delay(7000);
do
{
ldr = analogRead(A0);
gas = analogRead(A1);
lcd.setCursor(0, 0);
lcd.print("LDR:");
lcd.print(ldr);
lcd.setCursor(8, 0);
lcd.print("GAS:");
lcd.print(gas);
delay(1000);
if(gas>50 && b==0)
{
b=1;
a=0;
lcd.setCursor(0, 1);
lcd.print("High Pesticide ");
digitalWrite(11, HIGH);
Serial.println("AT+CMGF=1");
//To send SMS in Text Mode
delay(1000);
Serial.println("AT+CMGS=\"+919182849514\"\r");
GNITS ECE-DEPT 50
// change to the phone number you using
delay(1000);
Serial.println("Pesticide level: HIGH");
//the content of the message
delay(200);
Serial.print("LDR:");
//the content of the message
delay(200);
Serial.println(ldr);
delay(200);
Serial.print("GAS:");
//the content of the message
delay(200);
Serial.println(gas);
delay(200);
Serial.println((char)26);
//the stopping character
delay(1000);
Serial.println((char)26);
//the message stopping character
delay(1000);
digitalWrite(11, LOW);
}
if(gas<=50 && a==0)
{
a=1;
b=0;
lcd.setCursor(0, 1);
lcd.print("Low Pesticide ");
Serial.println("AT+CMGF=1");
//To send SMS in Text Mode
delay(1000);
GNITS ECE-DEPT 51
Serial.println("AT+CMGS=\"+919182849514\"\r");
// change to the phone number you using
delay(1000);
Serial.println("Pesticide level: LOW");
//the content of the message
delay(200);
Serial.print("LDR:");
//the content of the message
delay(200);
Serial.println(ldr);
delay(200);
Serial.print("GAS:");
//the content of the message
delay(200);
Serial.println(gas);
delay(200);
Serial.println((char)26);//the stopping character
delay(1000);
Serial.println((char)26);//the message stopping character
delay(1000);
}
}while(digitalRead(A2)==LOW);
}
}
GNITS ECE-DEPT 52
Code Explanation:
This Arduino code monitors the levels of gas and light, presumably related to pesticide
levels. If the gas level exceeds a threshold, it sends an SMS indicating "High Pesticide" along
with sensor readings. If the gas level is below the threshold, it sends an SMS indicating "Low
Pesticide". The system checks the sensor values periodically when triggered by a signal on
pin A2.
The code includes the LiquidCrystal library which allows control of LCD displays. An
instance of the LiquidCrystal class is created named lcd, which is connected to pins 7, 6, 5, 4,
3, and 2 of the Arduino board. Three integer variables are declared: count, a, and b. Count is
initialized to 0. Variables a and b are used as flags to indicate whether a certain condition has
been met or not. The setup() function initializes the program.
Serial communication is initiated at a baud rate of 9600.
Pins A0, A1, and A2 are set as input pins.
Pin 11 is set as an output pin and initially set to LOW.
The LCD is initialized with 16 columns and 2 rows.
"Pesticide Level Monitor System" is displayed on the LCD for 3 seconds.
The LCD is cleared.
The loop() function runs repeatedly. Analog readings of sensors connected to pins A0
(LDR sensor) and A1 (gas sensor) are stored in variables ldr and gas respectively. If pin A2
is LOW, the code inside the if statement executes. The LCD displays "checking..." for 3
seconds and then clears the display. Analog readings of LDR and gas sensors are taken again.
The values of LDR and gas are displayed on the LCD.
There's a delay of 7 seconds. A do-while loop runs as long as pin A2 is LOW. If gas level is
above 50 and flag b is 0, the code inside the if statement executes. If gas level is 50 or below
and flag a is 0, the code inside the if statement executes. Depending on whether the gas level
is high or low, an SMS is sent with the respective message and sensor reading.
GNITS ECE-DEPT 53
GNITS ECE-DEPT 54
GNITS ECE-DEPT 55
GNITS ECE-DEPT 56
GNITS ECE-DEPT 57
GNITS ECE-DEPT 58
GNITS ECE-DEPT 59
GNITS ECE-DEPT 60
GNITS ECE-DEPT 61
GNITS ECE-DEPT 62