
Figure 1: Sheep and goats pasturing
Introduction
For centuaries livestock has been a backbone to many communities in Kenya. It acts as a source of livelihood, food, income, asset saving, employment, farm input, means of transport and agricultural transactions among others. It is continually changing the food and agriculture landscape. This is attributed to the projected increase in demand for food in the next 30-40 years due to rapid increase in population, urbanization and climatic changes. In addition, it contributes 12% of the national GDP and the practice is one of the main sources of livelihood. Majority of the actors are small scale farmers who contribute 90% to beef and 80% to milk. They are located in various parts of the country where veterinary and animal husbandry services are limited also different climatic conditions. They have limited access to livestock production technology
Lately, interest among researchers, scientists in pet, livestock and wildlife tracking has grown. Technology and solutions has been developed to solve various problems relating to livestock production virticals. However, the technology is expensive. In addition, getting the right technology to effectively solve livestock production needs is challenging. More often the farm animals management process becomes challenging, erreneous and time consuming and cost inefficient which brings losses to farmers.

Figure 2: A sheep with a BLE collar device at DeKUT farm
We designed and developed Internet of Things (IoT) Bluetooth Low Energy (BLE) based animals management system for, scanning, counting, tracking and localising animals near realtime and display relevant data locally for decision making. Monitoring farm animal gives more information about all animals hence productivity can be improved. When the number of animals increase, it becomes hard to manage them.
The system is based on Arduino Nano 33 BLE Sense development board (Arduino MCU). It has Nina-b306 module with nRF52840 processor and bluetooth 5 wireless connectivity. The board has ideal form factor thus useful for collar and ear tag devices. It is power efficient and covers longer ranges (approximately 20m diameter).

Figure 3: Arduino Nano 33 BLE Sense board

Figure 4: Initial collar prototypes powered by 9V Pkcell battery
We did a second iteration on the system devices. Changes made on collar devices include; the hardware casing, belt and power management (can draw current of 1.54mA when advertising). On the central device we modified the display and integrated a new 4 digit 7 segment display for displaying total count of up to 9,999 animals and a buzzer for localizing specific animal in the flock.

Figure 5: Latest version of collar and central devices
The system was deployed at Dedan Kimathi University of Technology (DeKUT) farm, where they keep various types of farm animals including cows, pigs, goats and sheep. One Sheep and a goat were selected to deploy collar devices. They have approximately 125 sheep and goats in total and are gregarious in nature. The system uses Received Signal Strength Indication (RSSI) and a buzzer to locate a specific animal. A single collar device weighs 92g, which is within required limits for animal collars (should not exceed 4%-12% of the total animals weight). Also, the battery life is 10 days.
We express our gratitude to Dr. Mwirigi, DeKUT's farm manager for giving us oportunity to work on the system and permission to visit the farm for deployment. Also, we wish to thank Dr. Ciira wa Maina for immence support in designing and developing the system. Finallly, DeKUT - Centre for Data Science and Artificial Intelligence (DSAIL) fraternity for their support. Make sure you check out a paper that will be published soon here to share the results and future work.