This project is meant to understand the overall health of a cow for the user. The impact of this device will be shown to the dairy farmers in the long run.To monitor these behaviors, you would have to have a person checking the cows at least once a day. Technology has provided a means to do that automatically.
Using code we’ll be able to analyze sensor data to prove the ruminating and eating cycles of the cow.This was the general idea of this project, however due to the delay in data transfer in cloud the identification of eating and ruminating cycles have not come to pass and furthermore this requires the use of Machine Learning code which I’m unable to implement at this point in time.
The basic theory that I used analyzing the eating cycles is the analog input data, that is voltage that I received from a sound sensor.However this is not exact audio which would prove much better results as using the sound we can determine the cow’s eating cycles.
Collar-based activity sensors are in common use as a means of detecting oestrus to optimize farm fertility and, hence, productivity. Recently, the same acceleration-derived signals have been processed to detect the time spent ruminating and eating, which, together, give an insight into animal welfare. Here, the use of neck-mounted accelerometers to provide a quantifiable measure of the time period that an individual animal exhibits signs of heat stress is reported. Heat stress has a significant impact on both animal welfare and productivity.
Specifications:The design of this device had to be continuously changed due to the inefficiency of initial Soc IoT boards.The final prototype consists of a Particle Photon SoC Micro controller board and this had to be implemented as the project had been getting delayed due to previous SoC IoT boards.
The circuit for this device is built on to a dot board initially for the prototype of this device.Using header pins the sensors and the Particle Photon is embedded in the circuit. This circuit is powered by a 3.7 V lithium polymer battery that is rechargeable The networking function of this device is based on the built-in WiFi capabilities of the Particle Photon IoT development Board.
This circuit had to be built specifically separate for the Particle Photon board as there were problems and limitations faced in the previous circuits.The list of components and specifications used are:
● MPU6050 Accelerometer and Gyroscope● MAX9814 Microphone AGC Amplifier Module● DS18B20 Temperature Sensor● Skylab GPS Module● Ubidots Cloud Services
MCU- Particle Photon IoT Development Board.
CIrcuit Design:The circuit was built in a Dot board and all the necessary headers were soldered onto the board for the sensors and modules.The connections were given using single strand wires in a very compact manner.This device was twice as small as the Prototype V1.0 and could easily fit into a compact enclosure which was a very useful perk for this project.The Micro controller has been programmed to retrieve Raw data input from the sensors and analyze the data and send it to the Ubidots Cloud via HTTP.
The MPU6050 accelerometer Data : The MPU6050 is connected to the Particle Photon via its SDA and SCL pins to its respective analog I2C pins in the Particle Photon Board. The code accesses the individual shift registers in the MPU6050 module to get raw sensor data.The data we get is in Raw format as given in the specifications of this report in order to convert it into steps taken by the cow, I researched the way cows walk and this data is then calibrated with an if else statement and the step count is flagged for each time the force in Y axis increases and suddenly drops that indicates that cow’s step count. This step count was sent to the Ubidots cloud as a variable via HTTP protocol. Eg:gForceY > 0.5 && gForceY < 3.5.
The Microphone : The signal from the Microphone is connected to the Analog A0 pin in the Particle Photon Board.The output data from the microphone is output analog voltage value.I used a simple analogRead() command to get this data and sent it to the Ubidots Cloud via HTTP.
The plan was to find out whether the cow was eating or not.So using a simple if else statement and the audio of a cow eating I trained the circuit to respond to the sounds of a cow eating and thus show the status in the Ubidots Dashboard.
GPS Module : The GPS Module has its Rx and Tx Pins connected to the D2 and D3 pins of the Particle Photon.This helps us transfer NMEA data from the GPS to the Photon.Now the code is written to convert the NMEA data into Latitude and Longitude values and send it to the Particle Photon as variables which are then Sent to the Ubidots cloud.The Ubidots Dashboard has a special Map widget which is used to display the real time location of the device in the map.
Temperature Sensor : This particular sensor has a signal wire and is connected to the pin D7 of the Particle Photon.The data we obtain from this sensor is calibrated to be of unit degree Celcius using a library called DallasTemperature and thus this Temperature data in Celcius is sent to the Ubidots cloud as a variable.All the variables in Ubidots are used as widgets in the dashboard which will be displayed further in this report.
3.7 V Lithium Polymer Battery : The whole circuit is powered by a LiPo Battery that can be charged using a TP4056 1A charging circuit and this battery is connected to the VIN and GND pins of the Particle Photon from where the power is distributed among the sensors and GPS module.
After Building the Circuit the whole circuit was placed in an enclosure that is modified to suit the needs of the cow tracker.Two holes were drilled in the enclosure to pass wires through to the external battery as well as the GPS pins and DS18B20 Temperature Sensor node.The image of the GPS placement is shown below:
The image of the totally fabricated circuit within the enclosure is given below(aerial view):This device is then placed onto a cloth belt and used as a cow-collar.The way this is done is by first protecting the device in a pouch and attaching the pouch to the belt that is tied around the cow’s neck.
ProgrammingtheParticlePhotonDevelopmentBoard The code used in Particle Photon is written in Embedded C language.This code uses HTTP protocol to send sensor data as well as location data from the Microcontroller unit to the Ubidots cloud.The code is flashed remotely to the Microcontroller using Particle OTA(Over The Air ) Flash method.The code is attached in this webpage.
Results:The results and output are displayed in the Ubidots Dashboard.They are visualisations of the variables that we get from the device.The results after practical testing of the device is given in the following page.
This is how the data is visualised using a dashboard. The steps counter has recorded the number of steps taken by the cow. The chart represents Raw analog voltage data obtained from the mic.Using this Raw data I studied the voltage given by the sound sensor when the cow was chewing and programmed a statement to give the status of whether the cow is eating or not.
Although this functionality alone is not accurate in this device, the aspect of finding the eating sounds of the cow needs to improve.The temperature of the surface of the cow is also showcased in this dashboard in degrees Celsius.
The location of the moo tracker is given as a map and can be changed into any form of map, i.e satellite, terrain via settings. Only a link is needed to access this Dashboard.
The device is securely placed onto a closed bag that is stitched firmly onto a belt setup for placing it around the neck of the cow I'll give some snapshots to give the readers an idea.
Building the Moo Tracker allowed me to further delve into coding, electronics, fabrication and Biomechanics as well as the general health aspects of a cow. This device would prove very useful for dairy farmers if they implement this in their cattle farming.The Moo Tracker is therefore a companion to you as well as your cattle in preserving its health, security and safety as well.
Comments