0% found this document useful (0 votes)
65 views6 pages

Ieee Research Paper

The document describes an IoT-based system to monitor the health of dairy cows by capturing parameters like temperature, humidity, heart rate, and rumination to predict milk yield. The parameters are sensed using sensors connected to a microcontroller and transmitted to NodeMCU to send to an online platform called ThingSpeak for processing and analysis using machine learning to predict milk yield.

Uploaded by

Bhavya Nagrath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views6 pages

Ieee Research Paper

The document describes an IoT-based system to monitor the health of dairy cows by capturing parameters like temperature, humidity, heart rate, and rumination to predict milk yield. The parameters are sensed using sensors connected to a microcontroller and transmitted to NodeMCU to send to an online platform called ThingSpeak for processing and analysis using machine learning to predict milk yield.

Uploaded by

Bhavya Nagrath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)

IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

IoT based Health Monitoring System for Dairy Cows


1 2 3
Varun Mhatre Vishwesh Vispute Nitin Mishra
Student Student Student
Department of Electronics Engineering Department of Electronics Engineering Department of Electronics Engineering
Sardar Patel Institute of Technology Sardar Patel Institute of Technology Sardar Patel Institute of Technology
Mumbai, India Mumbai, India Mumbai, India
[email protected] [email protected] [email protected]

4
Kumar Khandagle
Professor
Department of Electronics Engineering
Sardar Patel Institute of Technology
Mumbai, India
[email protected] m

Abstract— Health monitoring of cows is very important in production is missing in this system. Sale of dairy products
today’s world, as by continuously observing the health, milk play an important role in building the economy of the farmers
yield can be predicted. It is very significant as milk yield is the which eventually depends on the yield of milk but, this system
main livelihood of farmers having a large number of cows. There consists of a lot of hardware which will increase the cost of
has been an existing health monitoring system that focuses on the system thus making the system more complex [10].
body temperature, heart rate, rumination rate, etc. The problem Most of the farmers depend on the earnings from the
in such systems is that they do not predict the milk yield which is
sale of milk and its dairy products. The mode of liv ing of
an important parameter while predicting the health status of a
cow. This work reports the monitoring system that captures farmers depends on the health of the cow. Dairy products are a
parameters namely body temperature, relative humidity, heart kind of livelihood for farmers. Th is same drawback is
rate, rumination rate of a cow at regular intervals based upon observed in another system that focuses on early detection of
which the prediction of milk yield is possible. Finally, the diseases in cattle, which is built using Raspberry Pi, Arduino,
parameters captured will be transmitted through NodeMCU to ESP 32, temperature sensor, and heart rate sensor. The system
an online platform named ThingS peak for processing and health design becomes very co mplex as mu ltip le co mponents are
analysis. required to build it. This existing system is not a cost-efficient
one as hardware consists of many components. But as it is an
Keywords— Cow Health, Rumination, Milk Production, Heart IOT based system, the data is transferred to an online plat form
rate, body temperature, relative humidity. [2]. Another existing cattle health monitoring system consists
of wearab le sensors and Zigbee. Cattle should always remain
I. INTRODUCTION to be in the pro ximity of the range of Zigbee. If any cattle
In the current health mon itoring systems for cows exceeds the range of Zigbee, then it is difficult to transfer the
consisting of parameters such as body temperature, humidity, data on the base stations. This system analyses the data
heart rate, and ru mination rate, the system is assembled with received fro m sensors such as body temperature, absolute
the help of three sensors configured with Arduino. The range position, heart rate, head motion, and predicting the health
for Zigbee is around 5 km o f wireless communication which condition of the cattle. Th is system also doesn’t predict the
means that the distance between transmitter and receiver milk yield of a cow [3].
should be a maximu m of 5 km. Using this system [1], So, this paper functions as an answer that solves the
hardware and cost are increased as hardware consists of two problems associated with each of the previously mentioned
Arduino, two Zigbee, and three sensors. Each Arduino and systems. The system incorporates a temperature & hu mid ity
Zigbee is used while transmitting a signal as well as while sensor, a heart rate sensor, and a ru mination sensor, these
receiving data. Another disadvantage of the existing system is, sensors are configured with At mega328p. The data is first
for analy zing the received data, the computer should be collected through the sensors by standalone Atmega328p and
always ON to detect abnormal health, as the data is displayed then transmitted to NodeMCU through serial co mmunication.
on the Computer Screen. Even though milk production is an To make NodeMCU work, network connectivity is required,
important parameter related to the health of Co w and also as it consists of the ESP module. All the data fro m NodeMCU
plays an important role in build ing the economy of farmers, is then transferred to an online platform named ThingSpeak
the existing system does not consider it. So, th is system does where it is visualized on a ThingSpeak channel. On this
not predict the milk yield. Sudden changes in the values of ThingSpeak channel, the received data is analyzed using
parameters are not identified and how it will affect milk MATLAB Analysis Tool available on ThingSpeak itself. An

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 820

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

algorith mic program is developed on this tool, which predicts


the milk yield (liters/day) of the cow and then displays this
predicted value on the ThingSpeak channel.

II. BLOCK DIAGRAM OF CATTLE HEALTH


MONITORING SYSTEM.

Fig. 3. Circuit Design of standalone Atmega328p.

B. Receiving Data

The receiver part of the system co mprises of NodeMCU


and ThingSpeak as shown in Fig. 4. The body temperature,
heart rate, relative hu midity, and ru mination data collected
using Atmega328p is transmitted to NodeMCU v ia serial
Fig. 1. Basic Block Diagram of Cattle Health Monitoring System.
communicat ion. The serial co mmunication used is a Universal
Asynchronous Receiver and Transmitter (UART). Then this
The basic block diagram of the proposed system is shown data is finally sent to the ThingSpeak channel for visualizat ion
in Fig 1. The system is built using a temperature and humid ity in the form of Graphs and Histograms. This data after being
sensor, a heart rate sensor, and a ru mination sensor. displayed on the Channel is sent to MATLAB Analysis Tool
NodeMCU used as our proposed system is IoT based, and is for pred icting M ilk yield using a pre-built Machine Learn ing
built on Wi-Fi SoC named ESP8266. It is a low cost and easy Model.
to use the device. Internet connectivity is needed to start the
NodeMCU and the internet can be taken from a mobile
hotspot or a W i-Fi router. Only a valid Network Id and its
password are needed for ut ilizing the IoT Application of
NodeMCU. By doing so, it will start working and any data
can be transferred to an online platform named ThingSpeak.
ThingSpeak is used to visualize data in real-t ime. The only
disadvantage of NodeMCU is that only one analog pin is Fig. 4. Receiving sensor data from T ransmitter part of the circuit.
available, so further addit ion of sensors is restricted and hence
the microcontroller At mega328p is used as it has 6 analog
pins. III. SENSORS AND CIRCUIT USED
A. Temperature and humidity sensor
A. Transmission of data from sensors.
The transmission block diagram is as shown in Fig. 2. The
sensors mentioned earlier are connected with the analog pins
of Atmega328p. The standalone Atemga328p is built as
shown in Fig. 3. The three sensors are connected to the analog
pins. Sensor data is continuously read and transmitted to the
receiver part for the circuit by the microcontroller.
Fig. 5. DHT 11 configured with NodeMCU

The standard body temperature of a cow is around the


range of 36.5°C to 39°C. If the temperature exceeds standard
body temperature, there is an adverse effect on the production
of the milk. In this system, the DHT11 sensor is used for the
measurement of body temperature and relative humid ity. This
sensor is connected to the first analog pin of At mega328p, and
using serial co mmun ication fed to NodeMCU. When the body
temperature increases beyond 39°C the milk production
decreases rapidly fro m 10 liters to around 5 liters of milk per
day. The average relat ive humidity at roo m temperature is
Fig. 2. Block Diagram of Sensors connected to standalone Atmega328p approximately in the range of 58%-65%. Milk production also
depends on the relative hu midity of cow, when it increases

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 821

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

fro m 65% to 90%, milk p roduction decreases fro m 10 liters to carried out on Multisim and then the amplifier was realized
around 6 liters per day [6]. using a PCB board.
B. Heart rate sensor. D. Rumination Sensor.

Fig. 6. Kg011 sensor for measuring pulse rate.

Fig. 8. ADXL345 used for measuring absolute motion.


KG011 is used to measure the heart rate of humans but it
cannot be used on a cow as its skin is very much thick. So, to ADXL345 is t iny thin, extremely s mall power, 3 axis
get a clear picture, an amplifier along with metal electrodes is gyrometer with high resolution (13 bit). It procedures the
used. This amplifier is designed on the "Ni Multisim static acceleration of gravity in tilt-sensing applications as
Simu lation" platform and its circuit diagram is as shown in well as dynamic acceleration resultant fro m gesture or shock.
Fig. 7. 1. and Fig. 7.2. Th is designed amplifier is having gain The procedure of chewing is recognized as ru mination. The
around 1000 which will amplify weak Electrocardiogram cattle generally ru minate 400 to 550 times a day. 20-22 t imes
(ECG) signals received fro m electrodes that range from 1mV in a single hour. Using a three-axis gyro accelero meter but
to 2 mV. When the heart rate of the cow is between 45-60 seeing only x, y-direction, ru mination rate is measured. If the
BPM (beats per minute), the milk yield is h ighest i.e. around rumination decreases fro m 550 to below 300, it means that a
10-12 liters per day but when it raises above 75 BPM, milk proper amount of food is not given to the cow. So, a 15 -30%
yield drops below, to around 6 liters per day [6]. drop in the production of milk is observed.
C. Amplifier of 1000 gain. E. Placement of sensors

The temperature and humidity sensor was placed on the


ear of the cow. The A mplifier circuit (Printed Circu it Board)
along with two electrodes was used as a heart rate sensor. The
positive electrode was placed on the neck of the cow and the
negative electrode which acts as a ground terminal was p laced
on the ear. The third sensor i.e. ru mination sensor was placed
Fig. 7.1. T ransmission part of Amplifier design on Ni Multisim. near the jaw of the cow to track the chewing movement while
eating. These positions for the placement of sensors were
determined by consulting a Veterinary Doctor. The placement
of sensors is as shown in fig. 9.

Fig. 7.2. T he receiver part of Amplifier design on Ni Multisim.

An Amplifier is built using an instrumentation amp lifier


and a regular 741 operational amplifier, wh ich has a gain of
around 1000 wh ich can amp lify a signal of millivolts. The
ECG signal measured using metal electrodes is provided as an
input to this amplifier. The input is first delivered to an
instrumentation amplifier where samp ling of data takes place
and this data is then transmitted as an input to an integrator as Fig. 9. Placement of sensors on the body of a cow
shown in Fig. 7.1. After the integration of data, it is fed to the
band notch filter where only 50Hz frequency is allowed to
pass as shown in Fig. 7.2.. Successful simulations were

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 822

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

in Fig. 11. . Histogram of heart rate variation in BPM is


shown in Fig. 12.

IV. SOFTWARES USED.

A. Arduino IDE 1.6.13

Programming in Arduino IDE is very simp le as the


language used is very much similar to C language. NodeMCU,
as well as Atmega328p, are programmed using this IDE.

B. NI Multisim 14.0.

Ni Mult isim software is primarily used for simu lating


hardware circuits. NI Multisim software have been used for Fig. 12. Histogram of Heart Rate(BPM).
designing the Amplifier Circuit. Later, this amplifier design
was implemented on a breadboard, was tested, and then D. MATLAB Analysis Tool.
realized using a Printed Circuit Board (PCB). Then finally,
electrodes along with this A mplifier were used to measure the
heart rate of the cow. The simu lational result of the amp lifier
circuit designed previously is shown in below fig. 10.

Fig. 13. T he layout of MAT LAB Analysis on T hingSpeak.

Fig. 10. T he output of Amplifier on Grapher of Ni Multisim


A Machine Learning-based model was made in MATLA B
C. ThingSpeak. Analysis Tool which is available on ThingSpeak. Dataset for
building this model was collected fro m online websites and
few papers. The dependant variables used for building this
model where body temperature, relative hu mid ity, heart rate,
and rumination rate. Based on these variables, the milk y ield
of the cow was predicted in liters per day [6].
A Machine Learning (M L) based model to predict the
milk y ield was made in MATLAB Analysis Tool available on
ThingSpeak. Dataset for building this model was collected
fro m online websites & few papers. Data was also collected
fro m the host cow which was used for testing the proposed
system. Body temperature, relative hu mid ity, heart rate, and
rumination rate are the dependant variables used for build ing
this model. Regression Learner Toolbo x available on
Fig. 11 T emperature Data transmitted by DHT 11 and displayed on
T hingSpeak. MATLAB ONLINE was first used to find the best model. In
this case, Random Forest Regression gave the best results.
ThingSpeak is an IoT based platform that creates visuals The MATLA B code for this model was then written in the
of live data. Several channels can be made on ThingSpeak and MATLAB Analysis Toolbo x manually. Every t ime this code
each channel has a maximu m of 8 fields. A field is like a runs, the dataset which is stored in a matrix form in the code
variable that can be used for plotting graphs. In our proposed itself gets utilized for train ing the above-mentioned
system, four fields had been created for parameters namely Regression Model. The independent variables read fro m the
body temperature, relative hu mid ity, heart rate, and ThingSpeak channel are then passed into this model. The
rumination rate. Graphs and Histograms for these parameters model predicts the milk yield and then sends it to the
can be viewed on a ThingSpeak Channel. Temperature Data ThingSpeak channel where it is stored in a field and then
transmitted by DHT11 is displayed on ThingSpeak as shown displayed. Email generation code for abnormal behaviour is
written in this same code, which is explained further in detail.

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 823

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

user's Gmail account indicating abrupt milk y ield due to


V. METHODOLOGY. temperature outside the normal range as shown in fig. 16.

The three sensors defined earlier in the paper are p laced on


suitable body parts of the cow. The sensor values read from
the cow using Atmega328p are then transmitted to NodeMCU
using serial co mmunication. NodeMCU then forwards this
data collectively to ThingSpeak Channel. On the channel, four
fields (variab les) are used to plot graphs and histograms of the
data sent by NodeMCU. The fields are for storing and
displaying body temperature, relative humidity, heart rate, and
rumination rate. These fields are then read by a MATLAB
program created on MATLAB Analysis Tool available on
ThingSpeak.

Fig. 16. Email Alert regarding the drop in milk production according to
increase in temperature.

Time Control feature on ThingSpeak is used to make the


above code run at specific intervals. In our case, the frequency
of running had been set to once per hour. So, every hour, the
field for milk yield on ThingSpeak gets updated. The ML
model also gets trained every hour as the code runs once every
hour.

VI. ACCURACY

Fig. 14. Data Analysis of T hingSpeak The predicted value and practical value for milk y ield
were co llected for 20 days. This data was used to calculate the
This program consists of a Machine Learn ing Model accuracy of the pred iction which came around to be 7 6%
(Rando m Fo rest Regression) and thus using the field values using the Random Forest Algorithm. The accuracy dropped
read previously, this model predicts the milk yield of the cow below, as the dataset used for train ing was also collected fro m
in liters per day. This predicted value is then written to a fifth the internet. However, firmly believed that using the dataset
field and using this field, milk yield is plotted on the channel made by pract ical values could imp rove the accuracy to a
as shown in fig. 15. good extent.

VII. FUTURE SCOPE

An integrated wearable device consisting of all the


sensors can be made for future development. The wearable
device should be easy to load and remove. It should be
compact and co mfortable for the cow. More powerful and
accurate sensors can be used. For higher accuracy, larger
datasets could be used. Also, as currently the proposed system
can be used only on a single cow, it can be modified to
monitor multiple cows at a time.
Fig. 15. Prediction of Milk Yield on T hingSpeak.

The predicted milk y ield after being sent to ThingSpeak VIII. CONCLUSION
channel is checked for abnormality. If it drops below the
minimu m value (7 L/day) then the parameter which is outside Health parameters of a cow can be tracked every minute
the healthy range is identified based on healthy ranges utilizing the system proposed in this paper. Thus, abrupt
described in the dataset. Then an email mentioning this faulty transmutations in the milk y ield can specifically be noted and
parameter and the predicted milk value is sent to the user's any abnormality in the health parameters namely body
Gmail account. The MATLA B code for this operation is temperature, relat ive humidity, heart rate, and ru mination rate
written in the same MATLAB Analysis toolbox script. In Fig. can be distinguished. Electronic co mponents used are low -cost
4 shown belo w, can be seen that an email has been sent to the and hence it results in a cost-efficient system. Hence, pretty

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 824

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Third International Conference on Smart Systems and Inventive Technology (ICSSIT 2020)
IEEE Xplore Part Number: CFP20P17-ART; ISBN: 978-1-7281-5821-1

much the system can efficiently monitor the health of a co w,


and minor health issues can kind of be facilely analyzed, and
dedicated attention by veterinarians, for the many health -
related issues, would not be required. Continuous observation
by the user is not required as improper changes in the
parameters will be auto matically identified and the user will
essentially be notified through an electronic mail. Thus, the
proposed system will essentially prove to be self-dependent
with minimu m user interference, unlike the existing systems
which generally require constant observation which is very
tedious in a subtle way.

REFERENCES
[1] Kunja Bihari Swain, Satyasopan Mahato, Meerina patro, and sudeepta
kumar pattnayak, ” Cattle health monitoring system using Arduino and
LabVIEW for early detection of diseases”, 2017 IEEE 3rd International
Conference on Sensing, Signal Processing and Security (ICSSS).
[2] Kevin Smith, Angel Martinez, Roland Craddolph, Howard Erickson,
Daniel Andresen, and Steve Warren, “An Integrated Cattle Health
Monitoring System”, SaB09.1 Proceedings of the 28th IEEE EMBS
Annual International Conference New York City, USA, Aug 30-Sept 3,
2006
[3] Faruq, Iwan Syarif , Ahmad Syauqi Ahsan, M. Udin Harun Al
Rasyid,and Yogi Putra Pratama, “ Health Monitoring and Early
Diseases Detection on Dairy Cow Based on Internet of Things and
Intelligent System”, 2019 International Electronics Symposium (IES).
[4] Nadimi, Esmaeil Shahrak, H. T. Søgaard, Thomas Bak, and Frank W.
Oudshoorn. "ZigBee-based wireless sensor networks for monitoring
animal presence and pasture time in a strip of new grass." Computers
and electronics in agriculture 61, no. 2 (2008): 79-87.
[5] Effect of betaine on ruminant performance – Orffa.
[6] Sugiono Sugiono, Rudy Soenoko, and Debrina Puspita An driani,
“Analysis the Relationship of Physiological, Environment, and Cow
Milk Productivity using AI”, 2016 IEEE.
[7] Smith F. John, Brouk M.J., harner J.P., “Cow Facilities and Effect on
Performance”, Advance in Dairy Technology, Volume 14, page 317,
2002.
[8] Adrew P. Fidler, Karl VanDevender, “Heat Stress in Dairy Cattle”,
Agriculture and Natural Resources Dept
[9] Reynolds Jim, “ Dairy Facilities and Cow Comfort”, Veterinary
Medicine T eaching and Research Center, Tulare, CA.
[10] T he Dairy Council UK, “The importance of milk and dairy products as
part of a healthy balanced diet”,
http://www.milk.co.uk/page.aspx?intPageID=13, Accessed March 9,
2016.

978-1-7281-5821-1/20/$31.00 ©2020 IEEE 825

Authorized licensed use limited to: Auckland University of Technology. Downloaded on October 26,2020 at 15:07:18 UTC from IEEE Xplore. Restrictions apply.

You might also like