Magic Farm

Agriculture has very significant impact on the economy of the country but because of shortage of water in our country we are not able to produce good yield of crops and we are in need of new farming techniques which can help us to produce good yield and fast growing .With the practice of modern

2025-06-28 16:34:04 - Adil Khan

Project Title

Magic Farm

Project Area of Specialization Computer ScienceProject Summary Project Summary:


Agriculture has very significant impact on the economy of the country but because of shortage of water in our country we are not able to produce good yield of crops and we are in need of new farming techniques which can help us to produce good yield and fast growing .With the practice of modern farming techniques where plants can be grown without the need of soil by means of nutrient solution ,Hydroponics are in the rise and we need 95% less water than normal . Now towards controlling the hydroponic plant growth we need to environment control setup which work automatically so we can save the cost of labor. Internet of Things allows for Machine to Machine interaction and controlling the hydroponic system autonomously and intelligently. Our aim is to develop an intelligent IoT based hydroponic system. The system so developed is intelligent enough in providing the appropriate control action for the hydroponic environment based on the multiple input parameters.

Pakistan’s economy is strongly dependent on the agriculture .Because of the deficiency of water and uncertain weather conditions increase in demand of food, labor cost and more specifically doubt on quality of food,These increase in motivation for indoor farming such as hydroponic.

But it result in rise of another problem in urban areas where people have no land for farming so they wish to use hydroponic technique but they didn’t know much about farming and they are too busy to take care of plants so it generate a need of an automated system which take care of their indoor farm and they can keep an eye on it remotely, that’s where IOT comes in play.

In hydroponic system we don’t need soil we meet the need of required nutrients for growth through nutrients solution mixed with water and supplied directly to root so root can absorb nutrients more efficiently and even more effectively as compare to soil. Monitoring of water level, pH, temperature, flow, and light intensity can be regulated by the use of Machine learning.

Project Objectives Objectives:

The goal of this project is basically to create an automated environment where anyone can do farming without need of land and without any worry for watering. It also meets your green foods need and it may be use as a source of animal fodder. This project will enable anyone to setup an indoor farm and it provide you remote access to keep an eye on your farm and enable you to monitor all information as well as growth of your plants and all other alerts:

  1.  Enable anyone to setup their onw farm within even very congested space as you can setup on your house roof.
  2.  Provide you cheap and fresh vegetable.
  3. Automatically control everything and maintained best environment for growth of your plants.
  4. Enable you to monitor and control your farm remotely.
  5. Plants will grow fast and healthy regardless of what the weather conditions are.
Project Implementation Method Project Implementation Method:


The Implementation Phase will include the following aspects:

1.Developing Hardware
 We starting developing hardware with the help of connecting different devices like Arduino, ph sensor, light sensor and combine them with wires and do install software for cording in raspberry pi and also start coding in pythons for sensors results checking so that it will easily connected to cloud.
After this phase we built an iron pipe frame and cover it by Polycarbonate hollow sheets so it can be in working condition regardless of climate and install our devices which we connect earlier in your fram and step up all water flow lights and fans to control our condition

2.Raspberry Pi
We Use Raspberry Pi 3 Model B is single board computer. Its CPU speed ranges between 700MHZ and 1.2 GHZ. It also has on board memory between 256MB and 1GB Ram. It is the heart of the system.
It play to importan roles.First is to communicate to arduino and take input from arduino for mechain learning processing and return some action which have to take.Secondly it send data to cloud data base so our app will keep users update about their farm.

3. Arduino
We use arduino to collect all the inputs from sensor and send them to pi for further processing so pi will run machine learning algorithm on it and predict the action which have to take and pass ouput to arduino where arduinohave predefine output on inputs so after taking pie output as input arduino take appropriate action to control the conditions 

4.Sensors
We use temperature, humidity, level indicator, Ph level and light sensors to take different values as a parameter so we will process this data and predict that which action need to take based on the values of parameter.

5.Developing Software
We will develop a machine learning algorithm to predict action by processing the data which is receive from sensor and as we train our algorithm so it will predict more likely action which will be take on the bases of data so the prediction is optimized and more accurate.

6.Storing Data
We will store all the data on the cloud so our client app will retrieve data from cloud and keep user update that what is going on.

7.App
We will write an application for android so user can get updates and keep monitor remotely we enable user to do some actions remotely.

Benefits of the Project Benefits of the Project:

There are many effective benefits of this project which is given below:

  1. It provides fresh vegetables and fruits  in less time of growth as campare to simple farming .
  2. It solve the problem of land and water so in crises of water and land its help ful.
  3. It's provide indoors farming so weather changes would not effect on farming.
  4.  Enable anyone to setup their on farm within even very congested space as you can setup on your house roof.
  5.  Provide you cheap and fresh vegetable.
  6. Automatically control everything and maintained best environment for growth of your plants.
  7. Enable you to monitor and control your farm remotely.
  8. Plants will grow fast and healthy regardless of what the weather conditions are.
Technical Details of Final Deliverable Software Plateform:

Working and Connectivity of Components:

Our project hardware consist of four main sensor like humidity temperature sensor (DHT 22) which is used for sense sudden temperature changes in environment, also we used light sensor (LM 393) which is use for light intensity checking, our third sensor is PH sensor which is used to check ph level, and our last sensor is water level indicator sensor which is used to check water level in tank and these four sensors are connected through wires with arduino devices and arduino take some data as input from these sensors  and arduino is also connected via uart with Raspbarry pi and in Raspbarry pi machine learning algorithm is running with predict some action and then through output to arduino and through 2 channel relay module connect with other hardware ( fan, shower, lights, etc) and then it perform  some actions like (to slow it, fast it, start it, stop it)  in this way our hardware is working .

Magic Farm _1582926774.png

Magic Farm _1582926775.png

Final Deliverable of the Project HW/SW integrated systemCore Industry ITOther Industries Agriculture Core Technology Artificial Intelligence(AI)Other Technologies Internet of Things (IoT)Sustainable Development Goals Good Health and Well-Being for People, Decent Work and Economic Growth, Sustainable Cities and Communities, Climate Action, Life Below WaterRequired Resources
Item Name Type No. of Units Per Unit Cost (in Rs) Total (in Rs)
Total in (Rs) 79980
iron Frame Equipment11500015000
Polycarbonate hollow sheet Equipment11400014000
Ph sensor module Equipment170007000
pvc 4inch pipe Equipment115001500
raspberry pi+ pi case Equipment165006500
arduino uno Equipment1600600
plant cups Equipment62001200
grow light Equipment135003500
10mm pipe Equipment115001500
18v supply Equipment112001200
12v dc fan Equipment25041000
water pump Equipment2350700
High pressure pump Equipment120002000
12mm pipe Equipment1700700
spray nozzles Equipment5150750
connector for nozzles Equipment52001000
drill machine Equipment121502150
3'' inch bit Equipment1250250
1 Equipment1200200
drill screw Equipment50052500
paint for frame Equipment1500500
tires for frame Equipment42501000
2 channel relay Equipment63001800
wires ties and nuts Equipment115001500
light sensor module Equipment1200200
DHT22 Equipment1680680
solution pvc Equipment1200200
3/4 pipe pvc Equipment1400400
water level sensor Equipment1450450
traveling and frame transportation Miscellaneous 11000010000

More Posts