Professional Documents
Culture Documents
Iot Based Smart Weather Monitoring System For Poultry Farm: Jenny Priyanka Mondol
Iot Based Smart Weather Monitoring System For Poultry Farm: Jenny Priyanka Mondol
A project/report submitted
in partial fulfilment of the requirements
for the degree of
Bachelor of Science in Computer Science and Engineering
May 2020
2
DECLARATION
I declare that this report entitled “IOT BASED SMART WEATHER MONITORING
SYSTEM FOR POULTRY FARM” is the result of my own effort research work except as
cited in the reference. I confess that this report has not been accepted and not concurrently
submitted in nomination for any other degree.
Signature :
ID : 161014040
The project report entitled “IOT BASED SMART WEATHER MONITORING SYSTEM FOR
POULTRY FARM” is submitted to the department of Computer Science and Engineering at
University of Liberal Arts Bangladesh (ULAB) in partial fulfillment of the requirements for the
degree of Bachelor of Science.
To the almighty who is my source of inspiration, knowledge and giving me the strength to
stay positive and be determined to complete the project successfully.
To my lovely parents who always have faith in me, their endless love, encouragement in
every sphere of my life.
From the bottom of my heart I dedicate this report to all of the loving people in my life.
ACKNOWLEDGEMENT
At first I desire to express my deepest gratitude to the almighty for giving me the ability to upright
myself and to present my work with ambiance and patience. I wish to express my deepest appreciation
to all of those who helped me in every way to complete this project.
Special thanks to my honorable supervisor Khan Raqib Mahmud and also Dr. Abul Kalam Al Azad,
and Muhammad Golam Kibria Sir for believing in me, for their guidance and support during the
whole period of the project. Their excellent and magnificent guidance helped me to overcome all the
obstacles through my entire thesis. Their positive feedback always helped me to motivate myself to
move forward towards the success.
At last I would like to thank my Parents for cooperating, helping and encouraging me through thick
and thin.
ABSTRACT
Internet of Things (IoT) is being applied in different areas in agriculture sector including
smart fisheries, smart poultry, etc. that allows a system to collect data through heterogeneous
sensors, analyze them to predict the situation in advance, make appropriate decision,
notification to user and finally take actions through actuators automatically. The application
of IoT in a poultry farm allows real-time monitoring of the context of the farm through
notification to email, predict the context in advance, advise right decision at the right time
that saves poultry lives, minimize the loss, improve the productivity and quality. Monitoring
weather of the poultry farm is one of the important issues that requires monitoring the status
of the temperature, humidity, etc. that has impact on raw materials and quality of food, health
condition of the poultry, feeding in time, food management etc. Considering the fact,
improvement of the management and increase the efficiency of the farm, an IoT based
weather monitoring system for a poultry farm has been proposed in this report. DHT11 is
used to measure the temperature and humidity in the proposed system. The collected data is
transmitted to the server, stored in a database and compared with threshold values
continuously. If the stream of data crosses the threshold values and remains higher the system
sends alert message to the email and signal to a buzzer. To validate, the proposed system has
been implemented that sends alert message to the email and signal to buzzer successfully.
7
TABLE OF CONTENTS
1 INTRODUCTION 11
2 LITERATURE REVIEW 12
4 IMPLEMENTATION 23
4.1 Implementation Architecture 23
6 FUTURE WORK 33
7 CONCLUSION 33
REFERENCES 34
APPENDIX 36
LIST OF FIGURES
2. Flow diagram of IoT based weather monitoring system foe poultry farm 16
3. DHT11 Sensor 17
5. Passive Buzzer 18
6. Arduino IDE 19
7. ThingSpeak 20
8. IFTTT 20
9. XAMPP 21
10. MySQL 21
11. phpadmin 22
14. Database 25
In agricultural field modern technologies are applied in present days to make the system more
versatile, automatic and user friendly. Smart farming is a high technology system of growing
food cleanly in a sustainable way and increase the quantity and quality of the products. There
are two types of conceptions in smart farming. They are smart agriculture and AgriTech. Our
project is under smart agriculture as it is related with the application of Internet of thing (IoT)
which can be utilize in various devices to connect with each other. IoT helps in agriculture to
introduce with advance sensors that can be utilize to connect with the cloud via
cellular/satellite network [1]. This helps us to know the real time data from the sensor and
make effective decisions.
The main purpose of controlling the humidity and temperature in modern day poultry
production is to produce a healthier bird which has the capability to grow more efficiently
and to adopt themselves to live in the most desirable and least stressful environment. Healthy
chicken grows rapidly and have a good demand in the market. In poultry farm too little
moisture can cause dehydration and respiratory illness where excessive moisture can lead to
caking and ammonia [2]. Heat stress occur which effects on the behavior, welfare, growth
and immunity of the poultry which decreases the egg production as well as lower the quality
of egg and meat which causes a massive economic loss. This also lower the reproductive
performance and reduces feed intake which led to lower the body weight [3].
The application of IoT act as a blessing as it makes a great contribution to the development of
modern poultry farming. IoT helps to store the data in one place so that farmers can easily
check the data, analysis them and help to make the right decision. This helps to reduce the
risk in business and improve business efficiency. IoT makes a better control over the internal
operations which reduces production loss and ensures a good quality of products to the
customer. In poultry farm it is very necessary to maintain the correct temperature and
humidity in order to save the food, keep the medicine and chemicals from damage and for
many other purpose.
Our project used DHT11 sensors connected with NodeMCU module to collect the
temperature and humidity in the poultry farm. This helps the farmer to know the weather
condition of the poultry farm which can effects the quantity and quality of the poultry. IoT
helps us to know the real time weather condition by using the sensors data which are
collected from the environment [4]. The sensor monitors the condition of the poultry farm
and sends the data to the ThingSpeak, which eliminates the physical presence of the farmer in
the farm. They can access the data from anywhere using the ThingSpeak. The system gives
more focused in precision farming which is one of the most famous application in IoT
agriculture. This helps the farmer to generate the data that is collected from the sensors and
analyze that information to take intelligent and quick decision. If any disturbing weather
condition are found such as the temperature crosses the threshold limit it starts the buzzer on
and send an alert email to the user email address. The alert system helps to notify the farmer
about the impacts of increasing temperature so they can take essential steps. The database in
the system helps to store the data that are collected from the sensors. This helps the farmer to
make better decision related to poultry farm to maintain the quality and enhancing the
product quantity.
The DHT11 sensor used in the system is light weight. It responds instantly, no anti-
interference and give extremely accurate results. It is an ultra-low cost digital temperature and
humidity sensor with a high cost performance advantage. It gives a high reliability and
excellent long term stability [5]. The NodeMCU is a low cost, low energy consumed module
which is integrated to support for Wi-Fi network. This is flexible to design and operate.
Previously used existing model system were costly and human involvement were required.
This developed system is budget friendly and does not require any human engage. The
system is easy to operate and no training is required.
Chapter 2
Literature Review
The necessity of providing a healthy environment in a poultry farm is very essential. This
helps to maintain the quality of the poultry products and improve the work condition. Hence,
related literature has been reviewed in journals, articles and research papers.
The Internet of thing (IoT) main concept is to connect different electronic devices together in
a network and collecting data from these devices. The values can be shared and uploaded in
any cloud services for processing, analysis and. It builds a communication between human
and device and also between devices [6]. The required project measures temperature and
humidity. Before IoT was introduced the wireless connection between user and the system
were made online by using RF, ZigBee and Bluetooth. This technology was slow in
communication, short range distance, small amount of data transmission [7]. The purpose of
the system in this paper is to monitor the weather condition of the industry and to view the
data from any place in the world using Wi-Fi [8].
The Poultry farm uses computer network technology to monitor and control the temperature
and humidity of the farm. IoT platform is used to save time, increase poultry production,
improve quality of meat and egg and also to provide healthy environment. The report focus
on the wireless sensor network in the poultry farm. The temperature and humidity is
maintained by the wireless sensor network. This maintain the quality and quantity of the
chicken [9]. Poultry birds can tolerate temperature up to 30 degrees Celsius. So it is very
important to maintain the temperature in all seasons.
NodeESP8266 is a Wi-Fi module which is implemented for internet connection in the circuit.
[10]. To measure temperature and humidity DHT11 sensors have been used. It is an 8-bit
microcontroller which has high accuracy, excellent performance, gives fast feedback and
doesn’t interrupt [10]. It has a motive of using low power which is beneficial for both
economically and technologically.
In the manufacturing factory measuring temperature and humidity is very essential [11]. It
helps us by providing a safety place to work and also for the products. Using the help of IOT
it will keep updating the user about the atmospheric changes in the factory. Different kinds of
Arduino are available based on different microcontrollers [12]. In this project a
microcontroller (ESP8266) has been used which connects the entire system by connecting
with the sensor. Microcontroller helps in operating the sensors and to receive the data. After
processing the data, it is then updated to the internet [8].
Data is collected and shared over the network [13]. Based on Sensor Technology their basic
algorithm is ingrained in four different ways in a software. This helps from building the
connection with the sensors to transmitting the data over the internet. They are (i) Main
thread
(ii) Measurement thread (iii) Transfer thread (iv) Send thread. Main thread helps in
controlling accommodations with other sensors. Measurement thread obtains setting from
Main thread. Transfer thread transmit data from sensors to microcontroller [14]. The paper
used NodeMCUin a Smart weather monitoring and real time alert system using IoT. This
allows the sensors connectedwith the microcontroller to receive the data after the data is
processed and analyze. This processed data is stored and transferred in a website function
[15]. IoT platform transmits data to the cloud from any internet device.
According to the research it has been found that there are many IoT based weather
monitoring systems. They have multi features that can be implemented in the system for
future work like cameras, motion sensors etc. Weather monitoring system is a high cost big
project in industry. But this project is a budget friendly and effective system which can save a
huge amount of money. This project is beneficial for both small- and large-scale industries.
Chapter 3
IoT based weather monitoring system for poultry farm
Agriculture and poultry farm plays a vital role in the economic growth of a country. In
Bangladesh poultry farms enhance the production of meat and egg which can meet up to 68
to 64% of national demand [16]. The modern technology act as a catalyst which helps the
farmer to enhance their production with good quality and quantity. IoT based weather
monitoring system act as a blessing for poultry farm as it has the capability to monitor the
environmental parameter temperature and humidity automatically.
In figure 2 the flow chart diagram elaborates the functionality of the working model. This
explains the data transmission in the system from the sensor to the server and then to the
cloud system. The procedure of sending alert email notification to the user email address and
sending signal to the buzzer is also explain in details.
3.2 Required Hardware and Software Tools:
NodeMCU ESP8266: It is a small Wi-Fi module which is used to build the wireless network
connection for microcontrollers or processes. This is cheaper to use for developing IOT
connections. The ESP module has 22 pins for connection. It has a frequency Range between
2.412 - 2.484 GHz. It has a programmable GPIO which is available here. It allows maximum
current 15 mA to per pin. It has an operating voltage between 3V to 3.6V. It has 10 GPIOs
D0- D10, PWM functionality, IIC and SPI communication and many other facilities in one
board.
As it is connected to the internet both update and fetch data is possible. It also has a PCB
antenna. The board has 128 KB RAM and 4MB of Flash memory which can adjust with the
large string that builds the web page, JSON/XML data and everything that is included in the
IOT devices. As it has 802.11b/g/n HT40 Wi-Fi transceiver this allows it to set up a network
and also connect to the Wi-Fi network and collaborate with the internet. Other devices can
also connect with the component. It has two buttons RST for reset purpose and FLASH for
upgrading firmware. It is used in the weather stations, IOT applications, wireless control
system, security ID tags and many others.
Passive Buzzer: It is use for alarm purpose. It has three pin where one pin provide power to
the device, and another pin control it. The passive buzzer is connected with npn transistor and
then connected in the circuit. It is small in size, it has a good frequency and cost friendly. In
some cases, passive buzzer can be used to multiplexed with the LED.
Thing Speak:
Thing Speak is developed for the IOT based application and API. By using the HTTP and
MQTT protocol the data can be stored and retrieved. This is done by Internet or via a Local
Area Network. Thing Speak analysis and visualizes the user data using Matlab. Thing Speak
enables the creation of sensor logging applications, location tracking applications, and a social
network of things with status updates.
Figure 8: IFTTT
XAMPP:
XAMPP is an open source software which has been developed by Apache. It is a cross-
platform, Apache, MariaDB, PHP and Perl. For Windows, MAC and Linux systems it is
available. It also gives a GUI tool in phpMyadmin for handling MySQL databases.
Fig 9: XAMPP
MySQL:
MySQL is the database system used with PHP. It is used on the web and runs on a server.
This is very fast and reliable to use. The database is free to download and use. It is developed,
distributed, and supported by Oracle Corporation. It is useful for both small and large
applications. In MySQL the data is stored in the form of a table. It stores information
categorically.
The design in figure 12 comprises the internet based system which include sensor,
NodeMCU and passive buzzer to complete the system. The system can generate real time
based data to the cloud and automatically takes the reading from the environment such as
humidity and temperature. The research is focused on the integration of wireless sensor
and mobile network. The system will help to control the temperature and humidity for the
benefits of the product.
In figuare 13 we can see DHT11 is directly connected with the NodeMCU. The
ground connection of DHT11 is connected with the GND of NodeMCU. The data out of
DHT11 is connected with the D3 of NodeMCU. The VCC of DHT11 is connected with the
3V of NodeMCU. The connection of Passive buzzer is also shown in the diagram clearly.
This states the electric circuit is simple and easy to understand. It explains all the connections
with the components clearly and gives a visual display of the system.
Fig.14: Database
4.3 Notification to Email:
For an alert message first we have to sign in to the IFTTT account and create an applet. Then
go to “My Service” and select “Webhook”. From there we have to go to the “Documentation”
and in the “event” we write down “High_Alert_Message” and click “Test it”. After that we
sign in to ThingSpeak and choose ThingHTTP. From here we create a new ThingHTTP and
fill up with required details information. Here we place the URL from the IFTTT and
Channel ID in the body which build a path connection. Then go the the react and create a new
react. Here we give our threshold value, condition type which is numeric, choose the option
and save it. After that every time the threshold value is crossed an alert message is sent to the
user email.
NodeMCU has been used in the system and is programmed to detect the humidity and
temperature every seconds. The code is run in the Arduino IDE and the reading is sent to the
serial monitor and ThingSpeak. In the given below, image value in the Serial monitor of
Arduino IDE is shown.
In the experiments reading of the temperature in degree Celsius and humidity in percentage
were taken from the sensor for different locations. A specific time periods were followed for
detecting humidity and temperature level for different time of the day. For each different
place it has been monitored for an hour after every five minutes to see the changes in
humidity and temperature and then the value has been average and inserted to plot the graph.
In figure 20 for location 1 the value for humidity and temperature is higher than figure 21 for
location 2 as the sun was direct and the temperature is cooperatively higher than other areas.
It has been found that the functionality of the system runs well and gives readings
correspondingly. From here it can be clearly understood the sensor can easily intake the
temperature and humidity percentage from the atmosphere.
80
70
60
50
40 Humidity
Temperature
30
20
10
0
Morning Afternoon Evening Night
90
80
70
60
50
Humidity
40 Temperature
30
20
10
0
MorningAfternoonEvening Night
.
Different threshold values for temperature were set to see the effects in alert email which is
send to the user email address. So, it has been found that whenever the system crosses the
threshold value it will always sends an alert email notification to the respective user email.
So, from here we can understand the functionality of the system is not hampered by the
different threshold value and the system is effective.
Chapter 6
Future work
The system has many opportunities to implement various ways to make it more versatile and
unique. In the future, we can add a pressure sensor, rain sensor to get more information of the
weather. We can also add LED light and buzzer as an alert system. When the temperature
will cross the threshold limit LED light will start blinking and the buzzer will start on. The
system can also be equipped with a motion sensor or camera which can act as a security
guard in the poultry farm. If there is any unauthorized access of people it can sense it and
send an alert email notification to the user. The system can also use mobile SMS system for
sending alert notification.
IoT is an innovative technology especially in poultry farming. This helps to change from the
routine of traditional farming into smart farming. It monitors continuously environmental
parameters like humidity and temperature to improve health and growth of the chicks and
chicken. Using IoT helps the farmer to monitor the internal environment of poultry farm and
get all details of the farm from anywhere and anytime. Excessive temperature and humidity
can cause many problems in the raw materials, products, foods and many other major sectors.
If this is not observed carefully it can bring problems like giving birth to many
microorganisms, growth of poultry hampers, quality and quantity of meat and egg decreases
and many other. The system helps in giving the readings properly with accurate results. The
alert message makes the system more beneficial because it aware farmers from any sudden
increase in the temperature and helps them to take necessary steps. The separate database
stored for the system makes it more helpful, so that it can prevent data from getting lost. The
system is both environment and cost friendly. It does not emit any harmful radiation and does
not affect the environment. The system functionality and performance has a good satisfaction
which makes it more effective and long lasting. The data collected in the system is based on
real time measurements of temperature and humidity.
References
1. A. Ranjan, R. Sinha, I. Devi, A. Rahim and S. Tiwari, "Effect of Heat Stress on Poultry
Production and their Managemental Approaches," International Journal of Current
Microbiology and Applied Sciences, vol. 08, no. 02, pp. 1548-1555, 2019.
2. S. Mitkari, A. Pingle, Y. Sonawane, S. Walunj and S. Anand, "IOT Based Smart Poulty
Farm," International Research Journal of Engineering and Technology (IRJET), vol.
06, no. 03, pp. 2380-2384, 2019.
3. D.R.CHARLES, "Temperature for Broilers," Cambridge University, vol. 42, no. 3, pp.
249-258, 2007.
4. L. J. Lara and M. H. Rostango, "Impact of Heat Stress on Poultry Production,"
Nation Center for Biotechnology Information (NCBI), vol. 3, no. 2, pp. 356-369,
2013.
13. Y. Rahut, R. Afreen and D. Kamini, "Smart weather monitoring and real time alert
system using IOT," International Research Journal of Engineering and Technology
(IRJET) , 2018.
14. N. Dayyani and H. Bakhtiari, "Heat stress in poultry," International journal of
Advanced Biological and Biomedical Research, vol. 1, no. 11, pp. 1409-1413, 2013.
const char *ssid = "D-Link"; // replace with your wifi ssid and
wpa2 key
const char *pass = "#cjpk@12!";
const char* server = "api.thingspeak.com";
WiFiClient client;
void setup()
{
Serial.begin(115200);
delay(10);
dht.begin();
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
void loop()
{
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(h) || isnan(t))
{
Serial.println("Failed to read from DHT sensor!");
return;
}
if (client.connect(server,80)) //
"184.106.153.149" or api.thingspeak.com
{
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" degrees Celcius, Humidity:
");
Serial.print(h);
Serial.println("%. Send to Thingspeak.");
}
client.stop();
Serial.println("Waiting...");