You are on page 1of 16

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/358376311

Design and Implementation of a Smart Farm System

Article in Association of Arab Universities Journal of Engineering Sciences · January 2017

CITATION READS
1 1,059

2 authors:

Ahmed Radhi Hayder H. Al-khaylani


Almamoon University College University of Technology-Iraq
15 PUBLICATIONS 21 CITATIONS 7 PUBLICATIONS 108 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Hayder H. Al-khaylani on 05 February 2022.

The user has requested enhancement of the downloaded file.


227

Design and Implementation of a Smart Farm System

Lecturer Ahmed A. Radhi


Email. Ali.ahmed100000@gmail.com
Asst.Lecturer Hayder Hassan Mohammed
Technical Computer Engineering Dept.
Al-Mamon University College/ Iraq

Abstract: The farming is important for life of most countries in the world and has influence
on the economy. In dry or in case of inadequate rainfall areas the irrigation become difficult,
therefore, it required to handled remotely for farmer safety the agro-resources and reduce
harm the productivity. Farmers tend to over-irrigation the soil. Different kinds of soil
required different irrigation schedules and the irrigation also depends on many other factors
like wind speed, existing moisture level, temperature season, stage of growth of crop, etc. In
This research suggests a smart farm consist of automated irrigation system with
programmable schedule, automatic tank level controlling for storage water of irrigation, and
temperature measurement of farm based microcontroller with desired sensors and network
server (gateway) which was connected to the internet. This system can be monitored and
controlled by using a website of network server over the internet from any location in the
world.
Keywords: smart farm, microcontroller, IoT

1. Introduction to support any type of farm, from control


Smart Farming is a modular platform of what happens and monitoring of the
made up of sensors that can be integrated various processes. This includes
in an extremely user-friendly system to solutions from monitoring environments,
enable farmers to get full control over using a user-friendly application on a
critical processes and events. In the long smart phone or tablet as shown in Fig. 1
term, this will enable economic and [11], all events on the farm can be
environmental sustainability of the farm, monitored and controlled. In this
while promoting a better work research a prototype of smart farm
environment as well as improved animal controlled via microcontroller and PHP
upkeep. Smart Farming can be adapted web server depending on desired sensors

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
228

Fig 1. Smart farm based cloud application


Bluetooth technology operated at 2.4
2. Related Works GH up to 3 Mbps bitrate [17]. In 2007 a
The first automatic irrigation system wireless sensors in the agriculture, uses
stusy presented in 1969 [7], and 1970 soil moisture sensors and wateiring
[5]. In 1973 heat dissipating soil used system [6]. In 2008 an efficient water
automatic irrigation plot [1]. In 1980 mamagmet based on distributed
designed automatic irrigation system wireless sensor network for cropping
operated when two or more system by using PLC [18]. In 2009
tensiometers in the plot less than set review the applications of WSN and
point [8]. In 1997 designed automatic RFID in agriculture and industry of
irrigation based modified manometer food [9]. In 2010 a greenhouse based
sensor [14]. Automatic irrigation WSN that can be monitored by using
system based wirelesscommunication GSM [10]. In 2011 a WSN used in
Such as Wifi, REID, ZigBee, WLAN, Automatic irrigation system , which
and Bluetooth for controlling and depending on data from sensor for
monitoring become popular in last decision of watering [13]. In 2012 an
years [12]. ZigBee technology is a automatic cardamom irrigation by real
wireless sensor network (WSN) with sensor to prevent overflow water in
high cost and limited distance [4]. slope area [16]. In 2013 an automatic

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
229

irrigation system controlled via cell GSM and microcontroller for motor
phone with fixed number by using controlling and other devices [15].

Fig. 2 The Internet of Things applications in the human life

3. Internet of Things (IoT) According to the Cisco Internet


The Internet of Things is a Business (IBSG) Group, IoT is simply
technology that has become observed the “things or objects”
increasingly relevant in last years. It were used the Internet more than users
including connecting devices throw as shown in Fig. 3 [3].
the Internet in order to retrieve
information from them at any time
and
from anywhere. In the IoT, sensor
networks that exchange information
wirelessly via
Wi-Fi, Bluetooth, Zigbee or RF are
common [2]. As shown in Fig. 2.As
with many new ideas, IOT origin can
be traced back to the Massachusetts
Institute of Technology (MIT), from Fig 3. The Internet of Things Was “Born”
work at the Auto-ID Center founded Between 2008 and 2009
in 1999.

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
232

4. Proposed smart farmer control for watering the crops will be active;
system the tank level can be controlled by
In this research, a prototype of a smart water level floating detector for auto
farmer designed for monitors the on/off water pump and light detector
amount of soil moisture, tank level for for auto on/off lights in the farmer.
storage water, light detector, and The prototype can be monitored and
temperature sensor. The prototype controlled locally via microcontroller
was programmable for varied soil type (Control Unit) and can
or type of crop. With the special case monitored and controlled from any
taken, the moisture of the soil location in the world via the Internet
controlled the watering system is through a gateway server website
turned on/off. In case of dry soil, the (Base Station Unit) as shown in Fig 4.
irrigation system by controlling valves

Fig. 4 prototype structure of smart farmer

4.1 Control Unit(CU) coupled with the output ports. An


The control unit includes a LCD monitor indicates status of the
microcontroller (PIC16F877A) which control system and the control unit
is the main part of the system. The connected with the server via a serial
moisture, light detector, tank level and port.
temperature sensors are connected to 4.1.1Smart Irrigation
the (A/D) of the controller. The water Irrigation is most important in crop
pump, valves, and light driver circuit production in the agriculture areas,

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
232

Irrigation system is designed to reduce connected to the microcontroller


the number of workers needed for analog input for controlling the light
watering process, and save time of as shown in Fig 5.
work. Irrigation can be made 4.1.4 Temperature measurement
automatic by using microcontroller The Lm35 sensor is used as the heat
and soil moisture sensors. Moisture detector in the control unit. Its better
sensors estimates the soil water used because its attractive features
content based on the dielectric (low cost and highest sensitivity
constant of the soil. The dielectric between +2 Cᵒ and +250 Cᵒ and a low
constant can be thought of as the soil's power consumption at only +5v DC).
capability to electrical transmits. It 4.1.5PIC16F877A Microcontroller
includes a pair of electrodes to A microcontroller is a computer
measure the resistance of the soil. The control system on a single chip. It has
resistance of the soil is reduced when represent the brain in the control
constant is increase, depending on system, which can decode written
water content of the soil, as shown in instructions and convert them to
Fig 5. electrical signals. PIC16F877A has an
4.1.2 Tank level controlling analog to digital converter (10bits
Automatic tank level monitor ADC) for reading data from analog
presented includes, sensor (floating sensors, and digital input-output ports
sensor), microcontroller, LCD 16X2 for read/write data from and to
monitor display, and the pump , the surrounding digital devices such as
tank controlling detecting the level of switching devices and relay driver
water is done by the analog to digital circuits. The tank level percentage is
converter (ADC) which was measured from the output voltage of
embedded in microcontroller, Relay the sensor based the equation (1).
driver used to switching ON or OFF %Tanklevel= (supply voltage *20*L/ 1024)
the pump, depending on receiving ………….(1)
signal from the (ADC) as shown in where supply voltage is 5volt, and L is
Fig 5. the sensor output voltage.
4.1.3 Farmer lights controlling The temperature is measured from the
Lighting automatic control system output voltage by using the equation
executing the control unit for (2).
electricity saving of the farmer lights. Temp (Cᵒ) =temp*(supply voltage *
The present system will be turn ON in 1000 / 1024) / 10…………….(2)
the night turn OFF in the morning. Where the voltage is used to power
Light Dependent Resistor (LDR) the LM35) and 1024 is 210, the value
sensor to indicate a day/night where measured from ADC can be

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
232

represented by the PIC16F877A. 1000 4.2.1 Communication between the


is used to change the unit from V to control unit and web server.
mV. 10 is constant. Each 10 mV is The communication between the
directly proportional to 1ºCelsius. control unit and the computer device
The light and irrigation sensor that acts as a web server is made
depending on threshold value to through a connected to the serial port
operated. (RS-232) of the computer device as
The flowchart of the control unit shown in Fig. 7.
programming shown in Fig 6, where In order to implement the interface,
the software used to program the the visual basic 2013 programming
microcontroller is MikroC PRO for has been chosen to control the serial
PIC. port by sending one command word
4.2 Base Station Unit (BSU) for controlling system
BSU was designed to connect the via the Internet and receive two status
control unit with IoT and design of words as shown in Fig. 7, then store
the website of smart farm . the information in desired data base
which can read and controlled via web
server as shown in Fig 8.

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
233

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
234

Fig. 5: Smart farm Control unit circuit diagram

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
235

Fig 6: flow chart of control unit

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
236

Fig 7: Interfacing Control unit with server circuit diagram

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
237

Fig 8: Interactions of system programs

4.2.2 Design of the web server


Apache web server and PHP
language. Has been used for website
design of smart farm. When a user
want to monitor the status of smart
farm a page that contains some PHP
code to communicate with the farm’s
control unit for monitoring and
controlling the farm as shown in Fig
9, where the status of smart farm
stored in the database as shown in Fig
8. The implementation prototype of
smart farm shown in Fig 10.
The flowchart of web server shown in
Fig 11.

Fig 9: Server homepage of smart


farm based IoT

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
238

Fig. 10 Suggested prototype of smart farm based IoT

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
239

5. Results and Discussion


The system was tested for 90 days and
water savings up to 60% compared
with conventional irrigation systems.
6. Conclusion
In this research, a prototype of smart
farm based microcontroller and IoT
has been designed and implemented in
which suggested an automated
irrigation system to reduce the waste
water and workers use for agricultural
crops. The system has a distributed of
moisture and temperature sensors
placed in the multi zone of the farm. It
is also has a webserver unit handles
sensor information, and transmits data
to a database which can be read via
web applications. It is also can be
controlled manually or automated
from anywhere in the world via the
Internet.
Fig 11. Flow chart of web server

References [3] Dave Evans.( 2011), The Internet


[1] Austin, R. S. and Rawlins, S. L. of ThingsHow the Next
(1977), Optoelectronic level Evolution of the InternetIs
detector for mercury manometer, Changing Everything, Cisco
J. Agric. Eng.(Instr. News Sect.), Internet Business Solutions
vol. 58:pp. 29-30. Group (IBSG).
[2] Daniel Palma.( 2014) , An internet [4] Dr. Esther T. Ososanya, (2015),
of things example: "classrooms "Design and implementation of a
access control over near field solar-powered smart irrigation
communication”,www.mdpi.com system", American Society for
/journal/sensors ,vol. 14, pp. Engineering Education, ASEE
6998-7012;ISSN 1424 8220. conference paper ID #13224.

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
242

[5]Fischbach, P.E, Thompson, L.T.


and Stetson, L.E. (1970), Electric [11] Ms. Deweshvree Rane, Prof. P.
controls for automatic surface RIndurkar, Prof. D. M. Khatri,(2015),
irrigationsystem with reuse " Review paper based on automatic
system, Trans. ASAE, vol.13: irrigation system based on RF
pp.286-288,. module" IJAICT Volume 1, Issue 9,
[6] G. Vellidis, V. Garrick, S. pp. 736- 738.
Pocknee, C. Perry, C. Kvien, M. [12] Ms. Tasneem Sanglikar, Prof.
Tucker. (2007),How Wireless Puranik V. G., (2016), "Design
Will Change Agriculture, Sixth and implementation of automated
European Conference on irrigation control system using
Precision Agriculture, University wsn: an overview", International
of Georgia, Tifton, Georgia, Journal on Recent and
USA pp. 57-67. Innovation Trends in Computing
[7]Haise, H.R. and Kruse, E.G.(1969) and Communication, Volume: 4
,Automation of surface irrigation Issue: 4, pp. 157 - 161
systems, ASCE J. Irrig. Drain. [13] R. Atta1, T. Boutraa, A.
Div., vol. 95:pp.503-516. Akhkha.(2011) Smart irrigation
[8] Hollis, S. and Dylla, AS.(1980), system for wheat in Saudi Arabia
Irrigation automation with using wireless sensors network
moisture sensing system, Trans. technology, International Journal
ASAE, vol.23:pp.649-656. of Water Resources and Arid
[9] L. R. Garcia, L. Lunadei, P. Environments, Vol. 1, PP. 478-
Barreiro, J. I. Robla.(2009),A 482.
review of wireless sensor [14] S.K. Luthra , M.J. Kaledhonkar,
technologies and applications in O.P. Singh, N.K. Tyagi.(1997),
agriculture and food industry”, Design and development of an
International journal of Sensors auto irrigation System,
and Applications, Vol. 9, pp. Agricultural Water Management,
4728-4750. vol. 33: pp. 169- 181.
[10] L. Xiu-hong , X. Cheng , K. Yan [15] V. Divya, A.
and P. Gong. (2010), A Umamakeswari.(2013), Smart
monitoring system for vegetable irrigation technique using vocal
greenhouses based on a wireless commands, International Journal
sensor netwo, International of Engineering and Technology,
Journal of Sensors and Vol. 5, pp. 385-390.
Applications, Vol. 10, pp. 8963- [16] V. Ramya, B.Palaniappan ,
8980. B.George.(2012 ),Embedded

Lect. Ahmed A. Radhi Association of Arab Universities Journal of Engineering Sciences


Asst.Lecturer. Hayder Hassan Mohammed NO. 3 Volume. 24 Year. 2017
‫‪242‬‬

‫‪system for automatic irrigation of‬‬ ‫‪International Conference on‬‬


‫‪cardamom field using Xbee-PRO‬‬ ‫‪Networks Security, Wireless‬‬
‫‪technology‬‬ ‫‪“,‬‬ ‫‪International‬‬ ‫‪Communications and Trusted‬‬
‫‪Journal‬‬ ‫‪of‬‬ ‫‪Computer‬‬ ‫‪Computing, vol. 1, pp.572 – 575.‬‬
‫‪Applications, Vol.53, pp. 36-43.‬‬ ‫‪[18] Y. Kim, R. G. Evans and W. M.‬‬
‫‪[17]Yiming Zhou, Xianglong Yang,‬‬ ‫‪Iversen .( 2008), Remote Sensing‬‬
‫‪Wang, L. Yibin Ying Sch.of‬‬ ‫‪and Control of an Irrigation‬‬
‫‪Biosystems Eng. & Food Sci.,‬‬ ‫‪System using a distributed‬‬
‫‪Zhejiang‬‬ ‫‪Univ.,‬‬ ‫‪Wireless Sensor Network, IEEE‬‬
‫‪Hangzhou.(2009), A Wireless‬‬ ‫‪Transactions on Instrumentation‬‬
‫‪Design of Low-Cost Irrigation‬‬ ‫‪and Measurement, vol. 57, No. 7,‬‬
‫‪System‬‬ ‫‪Using‬‬ ‫‪ZigBee‬‬ ‫‪pp. 1379-1387.‬‬
‫‪Technology,‬‬ ‫‪IEEE‬‬ ‫‪2009‬‬

‫تصميم و تهفير نظام مززعة ذكية‬


‫مدزس أمحد علي زاضي‬

‫مدزس مشاعد حيدز حشو حممد‬

‫قشم يهدسة تقهيات‬

‫كلية املاموى اجلامعة‬

‫اخلالصة‪:‬‬

‫الصزاع٘ ٍٕ مصدز مَه حلٔاٗ معظه دّل العامل ّهلا تأثري عل‪ ٙ‬اقتصاد البالد ‪.‬يف حال٘ املياطق اجلاف٘ أّ ٍطْل األمطاز غري كافٔ٘ تصبح‬
‫عنلٔ٘ السٖ صعب٘ بالتالٕ فإىُ حيتاج إىل معاجل٘ عً بعد لطالم٘ املصازع ّ املْازد الصزاعٔ٘ ّتقلٔل الضسزباإلىتاجٔ٘ ‪ .‬حٔح اٌ املصازعني‬
‫مئلٌْ إىل اإلفساط يف زٖ الرتب٘ ّ كرلك أالىْاع املدتلف٘ مً الرتب٘ تتطلب جدّل٘ زٖ خمتلف٘ ّٓعتند السٖ أٓضا عل‪ ٙ‬العدٓد مً العْامل‬
‫األخس‪ ٚ‬مجل ضسع٘ السٓاح ‪ ,‬مطتْ‪ ٚ‬السطْب٘ املْجْدٗ‪ ،‬املسحل٘ الينْ للنخاصٔل‪ ،‬دزج٘ حسازٗاملْضه‪... ,‬اخل‪ .‬مت يف ٍرا البخح اقرتاح ىظاو‬
‫مصزع٘ ذكٔ٘ حتتْٖ عل‪ ٙ‬ىظاو السٖ اآللٕ مع جدّل٘ شمئ٘ للسٖ قابل٘ للربجم٘ ‪ ،‬الطٔطسٗالتلقا‪ ٜ٘ٔ‬عل‪ ٙ‬مطتْ‪ ٚ‬خصاٌ املا‪ٛ‬لتدصًٓ مٔاِ‬
‫السٖ‪ّ ،‬قٔاس دزج٘ حسازٗ املصزع٘ باالعتناد عل‪ ٙ‬املتخمه الدقٔق ّ جمنْع٘ متخططات ّكرلك خادو الشبم٘ الرٖ جيب اٌ ٓمٌْ متصال‬
‫باإلىرتىت حٔح ميمً مً خاللُ مساقب٘ ٍرا اليظاو ّالتخمه بُ باضتدداو مْقع خادو الشبم٘ عرب اإلىرتىت مً أٖ مماٌ يف العامل‪.‬‬
‫الملنات املفتاحٔ٘‪ :‬املصزع٘ الركٔ٘‪ ,‬املطٔطس الدقٔق‪ ,‬الطٔطسٗ مً خال االىرتىٔت‬

‫‪Lect. Ahmed A. Radhi‬‬ ‫‪Association of Arab Universities Journal of Engineering Sciences‬‬


‫‪Asst.Lecturer. Hayder Hassan Mohammed‬‬ ‫‪NO. 3 Volume. 24 Year. 2017‬‬

‫‪View publication stats‬‬

You might also like