ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
Smart Farming Using Raspberry Pi
A S Harsathabinav 1, Yashwanth P 2
Student, Department of CSE, Presidency University, Bangalore, India1
Student, Department of ECE, Presidency University, Bangalore, India2
Abstract:Agriculture is one of the main factors contributing to the economic growth of many developing nations. It is also the
primary source of livelihood of many people in different parts of the world.The system designed and implemented here is a
smart farming system which can handle almost all major facets related to irrigation and crop maintenance. From the
farmer’s point of view, smart farming should provide the farmer with added value in the form of better decision making
or more efficient exploitation operations and management.
Keywords: IOT, ponsing, Raspberry Pi, LCD, photoresistor
I. INTRODUCTION
Smart farming applications do not target only large, conventional farming exploitations, but could also be new levers to
boost other common or growing trends in agricultural exploitations, such as family farming, organic farming, and
enhance a very respectful and transparent farming. Smart farming can also provide great benefits in terms of
environmental issues.The agricultural sector is set to face enormous challenges in order to feed the 9.6 billion people
that the Food and Agriculture Organization (FAO) predicts are going to inhabit the planet by 2050. Thus food
production must increase by 70 percent by 2050, and this has to be achieved in spite of limited availability of arable
lands, the increasing need for fresh water and other less predictable factors such as climate change, which, according to
recent reports by the United Nations could lead, among other things, to changes to seasonal events in the lifecycle of
plants
II. METHODOLOGY
The system is basically having two units. One is the agricultural land having Advanced processor Raspberry Pi
interfaced with different sensors like soil moisture sensor for measuring the water content in the soil, a phase detector
circuit for analysing the three phase availability, a motor and valve for supplying the water on demand, an electronic
fencing to avoid animals entering inside an agricultural land and IoT for linking the information of the farm to farmer
Functional block:
Power
Supply
IOT Motor Valve
Moisture sensor
E-fencing
Rain sensor Raspberry Pi
Temperature sensor Ethernet
Figure 1: Functional Block
The system allows automatic irrigation system with phase detection system to provide better yields. Wireless sensor
networks sense accurately the needed water quantity and supply precisely allowing saving the water. The phase
detection allows switching on and off the motor automatically whenever there is three phase power. E fencing prevents
the animals entering inside land. Everything is interfaced so accurately with the invention of advanced Embedded
Technology. Advanced Raspberry pie is enabled with IOT vehicles data base can be created and it can be linked to the
Copyright to IJARCCE IJARCCE 89
This work is licensed under a Creative Commons Attribution 4.0 International License
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
server using an app installed in any laptop. It gives a flexible front end for farmer authorities to have a complete update
of the farming, market info and so on. Market people can also get in touch with farmers using web-based application
III. TESTING
Continuity Testing
In electronic, a continuity test is the checking of an electric circuit to see if current flows. A continuity testis
performed by placing a small voltage across the chosen path. If electron flow is inhibited by broken
conductors,damaged components, or excessive resistance, the circuit is "open".
Power ON Test
This test is performed to check whether the voltage at different terminals is according to the requirement or not. We
take a multi meter and put it in voltage mode. Remember that this test is performed without microcontroller. Firstly, we
check the output of the transformer, whether we get the required 12 v AC voltage
IV. WORKING
Sensor network nodes are tiny objects which are installed in the different monitoring areas of wireless sensor network,
in order to measure various physical data and finish the specified task. Improvement in growth of various crops depends
on various environmental parameters such as light intensity, soil moisture, relative humidity, soil temperature, usage of
fertilizers and pH of soil etc.
Temperature Sensor
The temperature sensor used in the project is LM35 which is basically an IC. It has three terminals and required
Maximum of 5.5 V supply. This type of sensor consists of a material that performs the operation according to
temperature to vary the resistance. This change of resistance is sensed by circuit and it calculates temperature. When the
voltage increases then the temperature also rises.
Figure 2:Temperature Sensor output on the LCD
Soil Moisture Sensor
The Moisture Sensor detects the moisture of the soil around the sensor, which is ideal for monitoring the plants or the
soil moisture. This sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the
moisture level. Excess water makes the soil conduct electricity better; while dry soil conducts electricity poor. Figure
shows a typical soil moisture sensor and the output on the LCD from the sensor used in the proposed system
Figure 3: Soil Moisture sensor On the LCD
Rain Sensor
The rain sensor detects water that completes the circuits on its sensor boards' printed leads. The sensor board acts as a
variable resistor that will change from 100k ohms when wet to 2M ohms when dry. In short, the wetter the board the
more current that will be conducted. To test the Rain Sensor and ensure that it is working correctly connect the VCC to
a 5v power source and GND. Try placing a few droplets of water on the Rain sensor detection board and the D0-LED
Copyright to IJARCCE IJARCCE 90
This work is licensed under a Creative Commons Attribution 4.0 International License
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
should light up. The code used for rain sensor maps and reads the analog values given by the Rain Sensor (0-1024). The
Rain Sensor will have the following reaction with this code:
Figure 4: Rain Sensor on the LCD
Light Sensor
There are different types of light sensors available such as photoresistors, photodiodes, photovoltaic cells, phototubes,
photomultiplier tubes, phototransistors, charge coupled devices, and so on. But, LDR (Light Dependent Resistor or
photoresistor is used as a light sensor in this project
Figure 5: Light Sensor on the LCD
V. IMPLEMENTATION
In order to display the values from the sensors, we used 16x2 LCD by connecting the output port of the soil moisture
sensor, rain sensor, temperature sensor and the light senor to the LCD from the ADC so that the analog values from the
sensors is converted into digital form before sending it to the LCD. The process is shown in figure.
Figure 5: Implementation of the Project
As all the sensors including temperature sensor, soil moisture sensor, rain sensor and light sensors are interfaced with
the Raspberry Pi and LCD, the implementation of the project. The next stage involved the use of water pump motor
which drives the water to the field by fixing a condition. As the moisture content of the soil is below the threshold, the
motor automatically turns on and it drives the water to the field so that the soil moisture is maintained which also
increases the yield of the crop. The project also uses a buzzer which gives the output in the form of sound when the
water content in the soil is below the threshold so that it awakens the farmer whenever there is low water content. After
Copyright to IJARCCE IJARCCE 91
This work is licensed under a Creative Commons Attribution 4.0 International License
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
the addition of water pump motor and the buzzer, the final proposed system. During the testing stage of the project, the
code is dumped into the Raspberry Pi which is implemented using Python 2(IDLE), and it is run. After the execution of
the code, the following results are displayed on the monitor which is shown in the figure
Figure 7: Display of Sensor values with Monitor
In order to provide the information about the working of the project to the farmer and to provide easiness and comfort,
we use the farmer friendly multipurpose web app called as “Thingview” which can be downloaded from the playstore.
Figure 8:O/P of rain sensor in webapp Figure 9: O/P of moisture sensor in webapp
Figure 10: O/P of Temperature in webapp
Copyright to IJARCCE IJARCCE 92
This work is licensed under a Creative Commons Attribution 4.0 International License
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
The values from the sensors are directly sent to the web app through the internet with the help of Raspberry Pi. Hence,
by using the app, a farmer can get the information about his land and crops directly in the app sitting at any corner. This
reduces the tiredness faced by him due to often visit to his farm for observation. The app gives the values in the form of
graph so that the previous values can be easily studied and thus the future values can be predicted. The output from the
sensors given out by the web app.
VI. ADVANTAGES
No Need of employees.
Allows farmer to interact with market
Avoid middle men interference
Increases yield since advanced farming have been introduced
Increases the productivity
It saves water and formers time
Compact and low cost
Fast operation because RISC architecture embedded chip is used
Operates the water pump automatically
VII.APPLICATIONS
Solar Powered Auto Irrigation
Solar powered auto irrigation system work in the sunlight. When the sun shines the water, pumping process is a sensible
way of solar energy use throughout the summer, as the water need is the highest. The water pump which is used will
provide a reliable water source for plantation. For any solar based water pumping system, the ability to drive water is a
function of three variables like pressure, power, and pressure. These three essential components are used in this solar
powered auto irrigation system.
Forest Development
This system designs the modularized wireless node hardware with chip ATMEGA 128L and CC2420 as its core and
integrates them into various sensor modules such as growth, humidity and temperature of trees. It also completes the
multi-sensor finite state machine program according to Z-stack protocol, stack and improves composition of the
gateway structure. The statistical data are obtained through a large number of experiments. The system has strong
stability and can satisfy application of Internet of Things of the forest data monitoring.
Livestock Monitoring
JMB North America is an organization that offers cow monitoring solutions to cattle producers. One of the solutions
helps the cattle owners observe cows that are pregnant and about to give birth. From the heifer, a sensor powered by
battery is expelled when its water breaks. This sends an information to the herd manager or the rancher. In the time that
is spent with heifers that are giving birth, the sensor enables farmers to be more focused.
Home Gardens
IoT-enabled garden solutions offer the best of all worlds for home gardeners. They make it simple to implement green
protocols and eliminate pesticide use, even for gardeners whose priority isn’t going organic. For casual gardeners, the
solutions enable them to focus on what they love about gardening without worrying about all the things they don’t (pest
control, constant watering, etc.) And gardeners of all types realize a more efficient and optimized operation that
ultimately saves them money in the long run.
Precision Farming
Precision agriculture is one of the most famous applications of IoT in the agricultural sector and numerous
organizations are leveraging this technique around the world. CropMetrics is a precision agriculture organization
focused on ultra-modern agronomic solutions while specializing in the management of precision irrigation. The soil
moisture probe technology provides complete in-season local agronomy support, and recommendations to optimize
water use efficiency. The virtual optimizer PRO combines various technologies for water management into one central,
cloud based, and powerful location designed for consultants and growers to take advantage of the benefits in precision
irrigation via a simplified interface.
Agricultural Drones
Today, agriculture is one of the major industries to incorporate drones.The ways ground-based and aerial based drones
are being used in agriculture are crop health assessment, irrigation, crop monitoring, crop spraying, planting, and soil
Copyright to IJARCCE IJARCCE 93
This work is licensed under a Creative Commons Attribution 4.0 International License
ISSN (Online) 2278-1021
IJARCCE ISSN (Print) 2319-5940
International Journal of Advanced Research in Computer and Communication Engineering
Vol. 9, Issue 12, December 2020
DOI 10.17148/IJARCCE.2020.91215
and field analysis. The major benefits of using drones include crop health imaging, integrated GIS mapping, ease of
use, saves time, and the potential to increase yields. PrecisionHawk is an organization that uses drones for gathering
valuable data via a series of sensors that are used for imaging, mapping, and surveying of agricultural land. These
drones perform in-flight monitoring and observations.From the drone data, we can draw insights regarding plant health
indices, plant counting and yield prediction, plant height measurement, canopy cover mapping, field water ponsing
mapping, scouting reports, stockpile measuring, chlorophyll measurement, nitrogen content in wheat, drainage
mapping, weed pressure mapping, and so on.
VIII.CONCLUSION
The proposed system provides a simple, cost-effective, eco-friendly and efficient solution for irrigation. This system
can prove to be highly beneficial in many developing nations whose economy is supported by agriculture. It also aims
to solve the problem of energy crisis effectively. This system also eliminates water wastage and reduces human
intervention, therebyleading to economic growth, increased productivity, more people adopting smart farming and
thereby increasing the income of farmers. This system would therefore enable the growth of agriculture to a great extent
and attract more people towards agriculture.
REFERENCES
[1]. J. Breckling, Ed., The Analysis of Directional Time Series: Applications to Wind Speed and Direction, ser. Lecture Notes in Statistics. Berlin,
Germany: Springer, 1989, vol. 61.
[2]. M. Wegmuller, J. P. von der Weid, P. Oberson, and N. Gisin, “High resolution fiber distributed measurements with coherent OFDR,” in Proc.
ECOC’00, 2000, paper 11.3.4, p. 109.
[3]. R. E. Sorace, V. S. Reinhardt, and S. A. Vaughn, “High-speed digital-to-RF converter,” U.S. Patent 5 668 842, Sept. 16, 1997.
[4]. (2002) The IEEE website. [Online]. Available: http://www.ieee.org/
[5]. M. Shell. (2002) IEEEtran homepage on CTAN. [Online]. Available: http://www.ctan.org/tex-archive/macros/latex/ contrib.
/supported/IEEEtran/
[6]. FLEXChip Signal Processor (MC68175/D), Motorola, 1996.
[7]. A. Karnik, “Performance of TCP congestion control with rate feedback: TCP/ABR and rate adaptive TCP/IP,” M. Eng. thesis, Indian Institute of
Science, Bangalore, India, Jan. 1999.
[8]. Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specification, IEEE Std. 802.11, 1997.
Copyright to IJARCCE IJARCCE 94
This work is licensed under a Creative Commons Attribution 4.0 International License