Livestock tracking system

Final Report for FNE14-814

Project Type: Farmer
Funds awarded in 2014: $14,600.00
Projected End Date: 12/31/2015
Region: Northeast
State: New Hampshire
Project Leader:
Carole Soule
Learning Networks Foundation
Expand All

Project Information

Summary:

This project set out to provide a low cost, easy to use method for tracking livestock anywhere and accessing the data about livestock movement from a PC web or hand held device. The final product from this project tracks specific animals in a single pasture including 1) normal movement, 2) non-movement which could indicate sickness, entrapment or death, 3) loss of animal via theft or escape 4) excessive movements indicating stress or predator presence. Using existing technology livestock are tracked remotely without visiting the pasture. Pasture grazing patterns are captured to help improve pasture management.

Introduction:

Miles Smith Farm has a successful track record producing and selling beef products since 2002. MSF owners Carole Soule and Bruce Dawson have actively developed their brand and supported New Hampshire beef production with retail sales of over $400,000 so far in 2013.  We currently have 60 head of beef cattle, which we feed baleage from October to May.

With over approximately 250 acres of off-farm leased fields in 6 different locations. Expected cost savings will be about a 26% time savings in tracking and counting animals in our rotational grazing program.

Bruce Dawson, a computer professional as well as a farmer has worked for over 30 years in the high tech industry. He has worked as a systems engineer for Digital Equipment Corporation, Compaq Computers and was hired by Nokia to create test processes for new multi-media cellular phone systems. Bruce has also worked with HP (Hewlett-Packard) to design tools to systematically verify correct operation of new hardware and software. He has designed, implemented and supports several end users websites including LNF http://www.learningnet.org/, Cole Gardens Winter Farmers Market http://www.concordwintermarket.com/ and The Attorney General's Website in the USVI http://doj.vi.gov/ and Miles Smith Farm http://www.milessmithfarm.com/

Bruce has researched this project for two years and has created a prototype which is ready for implementation and field testing. Our technical adviser will assist in setting up appropriate testing conditions to track 1) ease of use 2) data captured is accurate 3) data collected is easy to read and useful to the farmer.

Carole Soule is an experienced manager who has also worked in the High Tech at HP for over 16 years. She has managed a grazing SARE grant awarded in 2011 and has managed grants awarded to the farm from the NH Dept of Agriculture, USDA (EQIP, Rural Development, FMPP).

This system is using the XBee's internal serial number to identify each animal (the XBee is a miniature radio modem on the ear tag – see attached diagrams). The system will use radio wave time-of-flight and statistical averaging with tri-laterization (see http://en.wikipedia.org/wiki/Trilateration) between the tag and base station(s) to determine each signal's origination.

Issues this system addresses include:

1) Measuring the time of flight for a radio signal, which is crucial because:

  • At least 12 (decimal) digits of precision are needed for measuring. Most clocks with more than 10 digits require military approval.
  • Most clocks (excluding only ones self-made) become erratic between 10 and 11 digits of precision. This worsens given temperature fluctuations.
  • To accurately capture a clock rate of greater than 10 digits, a computer with a CPU clock speed of greater than 3 GHz is needed.

Our system resolves these problem by:

  • Using three or more "base stations" with high-precision clocks instead of having a high-precision clock on each tag.
  • Using GPS for a high-precision clock. (But this can be "tinkered with" by the military.)
  • Using statistics to compensate for externally induced "fluctuations" in the timing.

This proposed system uses IEEE 802.15.4 wireless modems on the ear tags. Depending on the orientation of the animal, the tags can be read from up to 1 mile (5000 feet). away. The ability to quickly and effectively read the cattle's tags from this distance enables a couple of things. Farmers can do faster, easier, and more frequent head counts of the herd by looking at a website or smartphone to get an accurate head count. If an animal is missing, the rancher can take immediate steps: fix a fence, locate a cow that has wandered off or be alert for rustlers.

Because wireless modems are employed, two-way data communications with the animal is possible, but this project does not address those possibilities; the objective of this project is to simply get the basic system operational and track animal location.

Project Objectives:

This project remotely monitors the location of large livestock and potentially, equipment. (“Large” is typically greater than 75 lbs.)

  1. With 98% accuracy, count the number of livestock in two separate fields using a computer or smart phone application.
  2. With 98% accuracy determine the movements of livestock within two separate fields using a computer or smart phone application.
  3. Demonstrate an application for counting and tracking livestock that is less than $300 per base station and less than $35 per tag.

Cooperators

Click linked name(s) to expand/collapse or show everyone's info
  • Bruce Dawson
  • Teresa Downey
  • Dorothy Perkins

Research

Materials and methods:

Objective 1: With 98% accuracy, count the number of livestock in two separate fields using a computer or smart phone application.

Method: Five ear tags were built.  It turns out that only four were working.  One never worked correctly.  Because development of the system took almost two years testing was restricted to the home farm in Loudon.  Extensive beta testing was done prior to putting tags on cattle.  Beta testing indicated that “line of sight” to the three base stations was necessary.  Also “line of sight” from the base stations to the WiFi receiver was also required.  

We set up a test condition in a flat field that where the tags on the cattle had a direct line of contact to the three base stations.  There were no trees, brush or hilly terrain between the tags and the base stations.

We used two different types of antenna for the base stations.  Antenna were necessary to transmit data collected from the ear tags by the base stations to the WiFi router.  The WiFi router was located at the peak of the barn and had a direct line of sight connection to each base station. Data transmitted from the WiFi router was displayed on a laptop and on a smartphone using a web browser.

Objective 2: With 98% accuracy determine the movements of livestock within two separate fields using a computer or smart phone application.

Method: Monitoring was one in one field using four test cattle wearing ear tags with battery powered radio signal electronics.  Because the life of the batteries was restricted by the cold weather only an hour was used for testing.  All four animals were successfully tracked as they moved around the field.

Tracking was successful in these conditions:

  1. Animals are in a predefined area (a predefined field)
  2. If the monitored animals have moved through the same area multiple times.
  3. If the system works in inclement weather.

Tracking was not successful in these conditions

  1. Animal has not moved within 4 hours - testing was only done for an hour
  2. If there are multiple obstacles such as trees in the way tracking does not work

The testers reviewed the data collected during testing. They evaluated:

  1. ease of reading data - data was easy to read
  2. usefulness of data - data was useful
  3. ease of using the computer application both on a laptop or tablet and on a smartphone application - the application was not easy to read.  Most of this grant time was spent developing electronics and software; not building a user friendly interface

Objective 3: Demonstrate an application for counting and tracking livestock that is less than $300/base station and less than $35/tag.

Method: The actual parts costs were:

$220 - 3 Beaglebone Black Rev C
$60 - 3 XBee adapters
$16 - Proto plates - for connecting GPS & XBees to Beaglebone Blacks
$30 - Power converters - for converting 12V DC battery to 3.3V DC required by Beaglebone Blacks
$80 - 3 GPS
$303.60 - 8 XBee Pro Series 1 - 3 for base stations, 5 for ear tags
$440 - 1 Ubiquiti WiFi Outdoor Enterprise Access Point
$772.85 - 4 Ubiquiti WiFi AirMax Outdoor transceivers and antennas, and 1 Nanostation WiFi router.
$155 - 3 Weatherproof enclosures for the base stations, and 5 DC/DC power converters for the ear tags
$44.79 - Weather proof power connectors for base stations
$98.77 - 3 small lead-acid batteries for base stations.
$18.00 - WiFi antennas (that were too low power and ultimately determined to be not-suitable for this project)
$15.00 - 5 Battery Holders for ear tags

Total: $2254.01

Of the above total, about $680 was originally planned for (Beaglebone Blacks,  XBee adapters, power converters, GPS, and XBees). “Consumables” were the weatherproof enclosures, connectors, batteries and holders, and unusable WiFi antennas which totalled $331.56. Unplanned, but necessary for real-time data collection in pastures (due to the distances involved) were the Ubiquiti AirMax WiFi and Enterprise WiFi equipment, totalling $1212.85.

  • Base stations (not including consumables) including the long-distance WiFi, cost $631 each
  • Each ear tag cost about $41 each

Another purchased item was a power inverter to expedite testing and “in field radio surveying” for $50.00. This was used to power a personal laptop and antenna to find places of radio interference in the fields we were testing in because there was no A/C power in the field. Although it is not absolutely necessary to this project, it was a big help in establishing radio communications with the WiFi Router.

Note that a number of items were used that are not listed above, such as wire, solder, batteries, tractors/trucks, … that are available on most farms.

Summary:

The base station costs were more than double the anticipated cost of $300/base station this was due to unexpected development costs.  Base station cost can and will be reduced if  and when volume units are produced.

Each ear tag cost about $41 which is very close to the projected cost of  $35 per tag.

Antenna and Base Station 1

Base Station 2Base Station and Antenna 3Base Station

This antenna and base station was setup with line of sight to the router positioned at the top of the barn. Base Station 2 with a directional antenna are setup with line of sight to the router in the barn.
This base station used an omni-directional antenna.      

WiFi Router in the barnLivestock Ear TagThe Base Stations collect data using radio waves from the livestock ear tags. Using XBee technology each ear tag used radio signals to communicate with the base stations.  

 

 

 

 

 

 

 

WiFi RouterWiFi RouterThe WiFi Router was positioned so it was line of sight with all three base stations.  The WiFi Router was housed in the barn and was line of sight to all the Base Stations.  The WiFi Router gathered information from the Base Stations.

 

Research results and discussion:

The testers reviewed the data collected during testing. They evaluated the following:

  • Ease of reading data

In it’s raw form data was clear but too detailed.  A program needs to be written to convert the raw data to be displayed on a graphical interface.  Cattle locations should be displayed so they can be watched in real time on a screen.

  • Usefulness of data

There is great potential for the data to be useful but in its raw form it is not easy to determine where the livestock are in the field.  It is obvious that the program is tracking where each cow is.  This data needs to be converted so that it is easy for anyone to evaluate.

  • Ease of using the computer application both on a laptop or tablet and on a smartphone application

The raw data was correctly displayed on both a laptop and smart phone but again it was too detailed.  The data should be displayed as a graphical display so that livestock locations can be tracked.  Also an historical interface should also be made available.  The raw data is stored so an interface that allows a user to request data from a specific time can be made available.

Ear Tag on TopperCattle Ear tags.

Ear Tags were attached to halters on four cattle  Four head of cattle with ear tags were set loose in a pasture with base stations set on the perimeters

Cattle Tracking

Cattle wearing radio frequency ear tags were set loose in a five acre field

Research conclusions:

This project has accomplished the following:

  • Created three base stations that communicate with each ear tag, operate it under winter weather conditions, and updates the central server.
  • Create five “ear tags” that work with the base stations.
  • Created “Internet in a field” that allows the base stations to talk to and update a remote centralized database server with each tag’s location from each base station.  This accomplishment was not anticipated at the project’s start, but was required to debug and diagnose (in real time) the project as it neared completion.
  • Created several programs (software):
    • gpscap - monitors the GPS for position changes and updates
    • pingtags - sends a “ping” to each ear tag and measures the time-of-flight of the signal. This is the heart of this project.
    • xbeeat - configures (at a proprietary level) XBee radios for use with this project
    • scantags - scans the XBee network for all tags it can see.
    • settagid - configures (at a higher level) XBee radios or use with this project
    • setapi - Turns on API mode on the XBee radios.
    • Misc - a number of miscellaneous software was created to assist in the development and deployment of the system. These are not list here, but are included in the kit.

libxbee - An open source Application Program Interface that permits software to communicate with XBee radios at the API level instead of the less powerful terminal command line level. This was developed by Attie Grande http://www.attie.co.uk, and is included in the kit without change.

Participation Summary

Education & Outreach Activities and Participation Summary

Participation Summary:

Education/outreach description:

The results of this project were presented at the 10th Annual Granite State Graziers New Hampshire Grazing Conference called, "The Dollars and Cents of Grazing,"   on Saturday, February 20, 2016.  The presentation for this conference is attached.  At the conference we demonstrated how the systems works using two of the base stations and the WiFi Router.  We also put a tag on a small pig pretending that the room was a field and the pig a cow to demonstrate how the tagging system works.

In additional we will make a document including the design specifications, a list of components, install instructions and management software available to the public as Open Source; Open Source software is available free to the public. We will keep this document current as changes and upgrades become available in the future. We will create a blog on our Website (www.milessmithfarm.com) to also share findings and links this Open Source software and documentation.

The project is currently listed on the Farm Hack website at http://farmhack.net/tools/farm-item-locator The kits can be downloaded from:

The above two files contain a full kit including source code and build instructions (see the README file in the kit). Each kit is for a different architecture; the “armv7” is the kit for the base stations; and the “x86_64” is the kit for development on a desktop workstation.

The “official” site is farmhack.net, but it is not currently able to handle software distribution.

Bruce presented at the Granite State Graziers Conference.  See announcement attached.

Livestock Tracking System Power Point GraniteStateGraziersConference2 Livestock Tracking Program Documentation

ProgramDocumentation

Tracking Tazzy the pig (aka Cow) Tracking Livestock (indoors)To demo the project two antennas and base stations were setup to track an ear tag attached to a pig (dressed up like a cow)
An ear tag was attached to a small pig (disguised as a cow) at the Granite State Graziers Conferenece to demo the system.

Project Outcomes

Assessment of Project Approach and Areas of Further Study:

Potential Contributions

Bruce Dawson reached out to several other organizations during the project. However, with the notable exception of BovControl (http://www.bovcontrol.com), no others have expressed a desire to continue a relationship.

BovControl made available their development lab in Boston, MA so that we can develop a better “ear tag”. We were able to come up with a small box that would house both the XBee and two coin batteries. And it was during the on-site testing that we discovered battery power was a real problem for the ear tags.

Future Recommendations

The following learnings occurred during this project:

  • The longer-range XBee radios use up a lot of battery power. So much that we were unable to get a tag to last longer than 30 seconds using the original coin-cell batteries. I would recommend that some intelligence or power abatement system be used on the ear tags along with a solar or kinetic charger. Unfortunately, this is likely to increase the price of each tag.
  • The original goal of using WiFi to update the location data on the server was unrealistic. Standard WiFi has a range of about 600’. We were able to find a system that would increase the range to 12 kilometers, but this increased the cost of each base station by about $120. An alternative plan would be to not provide data real-time, but store it on each base station until storage runs out or the farmer downloads it. Also, longer sample times could be used to reduce the data collection.  This capability (increasing the sample time) is in the current version of the software. As is the ability to locally store the data.
  • More time is required to make things “farmer proof”. I’m not confident that most farmers can set up a network that is as sophisticated as the one required by this project. Or that they understand some of the requirements of setting up long-distance radio stations.
  • The “deltatimes” (time of flight of the radio signal between the base station and each ear tag), is in the million of nanoseconds. Ideally, this should be in the thousands. However, there was not enough time allocated in the project to remove the overhead introduced by the base station’s computer and XBee’s radio protocol.
  • More time is required to make an “obvious looking” graphical map that will show the precise position of each animal at any point in time. The project currently produces the data that supports such a map, but there was not sufficient time available to create the software that would render such a map on a web site.
  • Replace my “gpscap” software with a more “standardized” Open Source software “gpsd” (Earlier in the project, I could not get gpsd to work on the base stations, but now believe it can be done.)

Information Products

Any opinions, findings, conclusions, or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the view of the U.S. Department of Agriculture or SARE.