Agriculture and farming is considered the backbone of Pakistan's economy, which relies heavily on its major crops. Agriculture accounts for about 18.9% of Pakistan's GDP and employs about 42.3% of the labour force.(Ministry of finanace) Now when the environmental crisis are beco
IOT Based Smart Farming for Precision Agriculture
Agriculture and farming is considered the backbone of Pakistan's economy, which relies heavily on its major crops. Agriculture accounts for about 18.9% of Pakistan's GDP and employs about 42.3% of the labour force.(Ministry of finanace)
Now when the environmental crisis are becoming large day by day there is a need of smart farms and precision agriculture in order to enhance our crop production smartly using latest technologies for betterment of mankind.
Smart Farming includes the totally automated and manged farming techniques using different types of sensors those were linked together through Wireless Sensor Networks.Further it is fully capable of detecting of pests in the crops and alarms the farmer about them so he can take necessary measures according to it.
Smart Farming include smart irrigation that efficiently overcomes the problem of low water resources and also it includes intelligent usage of environmental conditions helped the system to intelligently irrigate the farm according to need efficiently.
Precision agriculture seeks to use new technologies to increase crop yields while lowering the levels of traditional inputs needed to grow crops (land, water, fertilizer, herbicides and insecticides). It uses smart Soil moisture sensors to actually detect the physical condition of earth that whether it has a need of water or not that is included in a complete mesh which is the actual physical system installed in a field to detect physical condition and send it to main controller for intelligent smart irrigation, In our project it comprises of two meshes those are linked using Wireless Sensor Networks Technology at these Cyber Physical Systems. Another system working in parallel to it is smart weather conditions fetching system that fetch the latest and accurate( using latitudes and longitudes) weather data from Internet(Google) at that place.This data includes the rainfall,wind speed, perception of rain in next four days and humidity rate in the atmosphere.At main controller this weather data fetched from Google and actual data received from Meshes through Zigbee Wireless Technology is further compared and smart final decision of starting water pump is made.
Precise agriculture system also includes a complete system of pest detection which involves detection of pest and after successful detection it automatically alarms so the pest around the field repelled from entering into the field. The process is done by using Machine Learning process. It uses camera as hardware input tool from which, real-time video frames are acquired. Then these frames are sent to main controller where the detection process is done by using already trained models.

Project implementation method includes following points.
Design of Mesh System such that there are total two meshes present and each mesh consist of Soil moisture sensor that receives data from soil and after it is linked with microcontroller to convert this analogue data in to the digital and send it to Zigbee module from where it will be communicated to another mesh or main controller.Similarly another Mesh with same components is also present in another part of field from where it collect physical earth conditions and through Zigbee wireless technology communicates the data to other Mesh or Main Controller.
As these Meshes are mutually connected through Zigbee Wireless Communication Technology so each Mesh collects physical earth data(Moisture,humidity) from different parts of farm and send them to Maincontroller.So that Earth Physical Conditions(Moisture, Humidity) can be received from different parts of Earth.

MainController comprises of a Raspberry Pi connected with internet collects the weather forecasting data from the google using the longitude and latitude of particular place and using built in API system that fetch weather conditions from a weather forecasting website on regular interval basis after every four hours.At the same time Physical Earth data(moisture,humidity) from mesh is received at Main Controller and then these two Conditions one from physical earth and other from Online Weather Forecasting is compared and decides that earth has a need of water as per its physical condition but keeping in view the weather forecasting data it process that is there chance of rain or not? What is speed of wind at that place?, it decides to turn on Sprinkler when physical conditions demand irrigation of soil and there is no forecast of rain, if there’s a condition that earth demands irrigation but there is forecast of rain in next four hours it does not turn on Sprinkler.

For pest detection, a camera is installed on the crop field, which gets real-time video of crop field. The camera is connected to main controller. At main controller, we have already trained model for pest detection which analyze the video and run the detection process. After a successful detection, the main controller automatically turn on the alarm for few minutes. In this way, this system constantly detects the pest.

It provides following benefits for the mankind and Society
Final Deliverable of Smart Irrigation for Precise Agriculture consist of three systems integrated together whose details are as under:
Physical Earth Conditions Data Fetching:
This system is also called MESH that comprises of a soil moisture sensor that collects data(moisture level) from the earth and sends it to MicroController ATMEGA 328 UNO BOARD where this analogue data is converted to digital form.Now the ZIGBEE MODULE is also connected with this MicroController through ZIGBEE SHEILD that communicate this data between different MESHES and also to MAINCONTROLLER where further Data Manipulation Takes place.
Main Controller:
Main Controller mainly comprises of a RASPBERRY PI connected with internet and a LINUX Operating System Installed on it. Through Internet in operating system it collects weather forecasting data from the website using its API.Its demands the Longitude and Latitude of the particular area for which we have to collect weather data and Rain Threshold for which it sends the signal of rain for data comparison. It is also connected to ZIGBEE MODULE through ZIGBEE SHEILD that collects data to be transmited from MESH and stores this data for comparison. Now we have the data from both of our points and its is manipulated further that rather its a need of irrigation or not keeping in mind the physical condition of earth and weather forecast at that time.If earth condition demands irrigation and there is forecast of no rain or less rain then our threshold at that time it turns on the sprinkler for irrigation.
At main controller there is a program that keeps on running all the time which check the weather forecast automatically on regular base after four hours and keep on sending this data for manipulation while the Physical Data collection is keep on going all the time.
PEST DETCTION:
For pest detection, we have used Machine Learning. A camera (USB/wireless) of 48 mega pixel is installed on the crop field, which gets real-time video of crop field. The pest under 5 meters range can be detected. The camera is connected to main controller. Trained model is obtained by first creating datasets and then through python programming, yoloV5 algorithm is applied to make a trained model. At main controller, we have already trained model for pest detection which analyze the video and run the detection process. After a successful detection, the main controller automatically turn on the alarm for few minutes. In this way, this system constantly detects the pest.
| Item Name | Type | No. of Units | Per Unit Cost (in Rs) | Total (in Rs) |
|---|---|---|---|---|
| Raspberry Pi 3B+ | Equipment | 1 | 22000 | 22000 |
| Micro Controller ATmega 328 UNO Board | Equipment | 3 | 950 | 2850 |
| Sprinkler | Equipment | 1 | 1300 | 1300 |
| Xbee(Zigbee) Module | Equipment | 2 | 4500 | 9000 |
| Relay | Equipment | 1 | 300 | 300 |
| Soil Moisture Sensor | Equipment | 2 | 500 | 1000 |
| Buzzer | Equipment | 1 | 200 | 200 |
| Usb Portable Camera | Equipment | 1 | 3000 | 3000 |
| Xbee(Zigbee) Shield | Equipment | 3 | 1000 | 3000 |
| Total in (Rs) | 42650 |
This study aims to calculate the performance of the ND of wet cooling tower (NDWCT) using...
Electrical power system is the major source to provide energy for residential, commercial,...
As technology is changing rapidly and becoming advance, it has also changed the human need...
Project Objectives (less than 2500 characters)
The aim of this project is to designed a fruit grading system using the Machine learning a...