Smart Bran Dispenser for Animal Husbandry Purpose

The creation of technology in this century changes people’s life. Technology plays an important role that benefits young people and has increased agriculture production’s efficiency and profitability. Innovative technology mainly involved in animal feeding automation is currently one of Smart Bran Dispensers’ new inventions. This project approaches an innovative animal husbandry management system to improve the agricultural system’s efficiency, particularly livestock nutrition and feed resources. The benefit of this project is to facilitate animal feeding for breeders, which can be remotely controlled and detected by a tracking module that transmits a signal to the user and informs them of the status of the bran dispenser through the Blynk server. NodeMCU ESP8266 and Arduino UNO were implemented as the main controller. Keywords— animal feeding, bran dispenser, Arduino, NodeMCU ESP8266


I. INTRODUCTION
Animal husbandry is about applying to breed and taking care of the animals, such as cows, goats, horses, sheep and dogs, for some advantage, especially in business. Speaking of animal husbandry, it is all about raising and maintaining livestock. Nowadays, we even have no time to care for ourselves, so how could we look after our animals or pets by consistently filling up their stock and monitoring their healthiness too. From the other point of view, breeders, who ran a large business scale, are fully occupied with never-ending schedules. They sometimes forget which part needs to be filled and which one is already done. Thus, the establishment of technology, particularly the Internet of Things (IoT), somehow helps in advancing the livestock's control, the animal husbandry management system, and its safety as well [1][2] [3]. There are several projects in this field employing this kind of technology, such as fish feeder [4] [5], dog feeder [6], psychological and environmental monitoring system [7], and general pet feeding [8] [9]. Some system has been developed to detect the presence of animal [10]. Despite that, an autonomous dispenser has successfully been expanded for multi-purpose use for pill mechanizing [11] [12]. With all of these kinds of technology developed, this project aims to foster an animal husbandry management system involving large-scale businesses. This improves the agricultural system's efficiency, particularly in livestock nutrition and feed resources purpose, by helping the breeders maintain all the animal's needs.
The breeder always encounters time constraint problems that might contribute to a lack of nutrition, disturbing the animal's growth process due to insufficient nutrients. A bran dispenser system should be constructed to support breeders in animal husbandry to maintain a regular feeding schedule for their animals. Therefore, in this project, a WiFi system moduled by ESP8266 will diversify breeders to control the bran dispenser to feed at the right schedule's time. It provides a GPS locator device so that the Blynk server could solve the problem regarding the food feeder's stock location and identify the food's availability in the storage box. Once the microprocessor collects these values, it performs the actions required to run the solenoid valve (food valve) [4]. The GPS facilitates the breeder by locating which stock has run out of food. This technology helps the breeder minimize the cost to hire staff due to the full system being autonomously controlled by the system of the Internet of Things (IoT). Furthermore, livestock owners would also worry less because this smart bran dispenser provides sufficient quantities of food and drink to their animals.
In this project, a smart bran dispenser prototype is developed using NodeMCU ESP8266 to integrate the Blynk server to provide the food dispenser system's location. NodeMCU ESP8266 plays a major role as it is a brain for the whole system. It is a programmed microcontroller circuit board with a circuit connection of analog and digital input and output pins. Blynk is a server used in most countries for mobile communication and an alert system. This project aims to develop a system that manages to facilitate humans like breeders to preserve their animals. These are two specific objectives to be achieved: developing an efficient device for managing feeding's schedule for animal husbandry purpose and installing Smart Bran Dispenser by embedding WiFi module (ESP8266) and Blynk server to locate and control the product from elsewhere.

II. METHODOLOGY
In essence, as discussed previously, the main purpose of this project is to help the breeder to look after those animals easily and properly. In other words, it benefits the breeder to control the feeding system. The main electronic board of this project employs the NodeMCU ESP8266 microcontroller that has been successfully programmed. In addition, Arduino UNO acts as a second microcontroller for the water feeding system. Fig. 1 shows the whole picture of the methodology in this project.

B. Hardware Implementation for NodeMCU ESP8266
NodeMCU ESP8266 has been selected as a WiFi module to allow the microcontroller access to a WiFi network. Having the network will make the systems function well in receiving the data about its location by Geolocation API. When the bran's stock in the storage box runs out, the breeder will receive notification through the Blynk application, where the HC-SR04 Ultrasonic Sensor is used to measure the bran's existence. Furthermore, if feeding occurs at the time set, the breeder will receive notification by Blynk that feeding is done. If the dispenser failed to drop the bran, the breeder would notify that the attempted process failed. Fig. 3 shows the schematic diagram connection of NodeMCU.

C. Hardware Implementation for Arduino UNO
Arduino UNO has been used in this project as a medium to control the water feeding system. Once the feeding schedule was set, the components are connected to the NodeMCU. Here, the water pump and HC-SR04 will operate by pumping the water from the container's source. This process only occurs when the smart bran dispenser has completed water feeding the animal, which means this tool is used for the feeding system. If the feeding process occurs over the time set coded in the IDE, the water pump will stop working. Fig. 4 shows the schematic diagram connection of Arduino UNO with a water pump and ultrasonic sensor HC-SR04.  Table 1 displays the components that have been used in this project to construct the smart bran dispenser for animal husbandry purpose.

E. Software Implementation
Blynk server and Geolocation API is employed for software implementation in this project. Before that, the NodeMCU ESP8266 must be programmed using the C language to start the application. This process is to instruct the NodeMCU ESP8266 of the WiFi module required.
NodeMCU plays the main role in this project as it controls the whole system by interfacing with some hardware devices. The remaining other hardware devices are then connected to the Arduino UNO. NodeMCU controls this project's main system: the bran feeding system and bran storage system, having each inputs signal. Meanwhile, the Arduino is for controlling the water feeding system. This system is then set up to send the notification through the Blynk server to the mobile phone by the NodeMCU ESP8266 programmed.
This project helps the breeder locate the bran dispenser's location from somewhere that runs out of bran in the storage and details the longitude and latitude through the Geolocation API. Fig. 5 interprets the flowchart for the Geolocation API.

F. Measuring Implementation
Three units of HC-SR04 ultrasonic sensors are used in this project to execute input signals to the NodeMCU and Arduino as information for the outputs. HC-SR04 ultrasonic sensor works when this component detects a high level of food sufficient, which sends data to NodeMCU to stop the process of Servo MG90S that occurs for the feeding system.
The HC-SR04 Ultrasonic sensor works to detect the presence of bran in the food storage box and measure the high water level in the container used for the water feeding system. Fig. 6 shows how the NodeMCU functioning in the bran feeding system while Fig. 7 shows the water feeding system's flowchart. Fig. 6 The flowchart on how the NodeMCU functioning in the bran feeding system Fig. 7 The flowchart of the water feeding system

III. EXPERIMENTAL RESULTS
Firstly, the systems should be checked to ensure the process runs well after implementing its hardware and software. Some tests are performed showing that it can function as expected for this Smart Bran Dispenser. Every system of this tool, such as the food feeding system, water feeding system, and food storage system, functions very well. The result of each test is shown and discussed in this section.

A. Hardware and Software Implementation Test
Smart bran dispenser starts to operate with the feeding system. This process is set-up to occur twice daily and programmed trough the Blynk server at 8 am and 5 pm a day. When the process happens, the HC-SR04 starts operating to detect the presence of bran in the container. Moreover, when the bran reaches the maximum high, 3 cm from where the ultrasonic is placed, the servo will stop working. Then, NodeMCU starts to send data and notifications to the mobile phone through the Blynk application, such as "feeding done". Figure 8 shows the notification image via the Blynk application.
Once the bran level in the storage box reaches 20 cm or more than the programmed distance from the HC-SR04 placed at the storage box, the breeder receives notification that the bran is exhausted and the bran dispenser location. The tool's notifications and location are sent through the use of the Blynk application with Internet access by ESP8266. The purpose of submitting location is to facilitate the breeder to track which location has lots of tools. Fig. 9 (a and b) below indicates the food storage system at three different food level conditions, while Fig. 10 (a to c) shows the appearance of notification by the Blynk application.  Finally, the water feeding system would also be tested. This system is programmed to be always working as long as this Smart Bran Dispenser functions. However, this system is programmed to start operating when the high water level, the distance of water from HC-SR04 placed at the water container reaches 3 cm and above. When the water distance and HC-SR04 reach 3 cm, the water pump will stop working for the water feeding system. Fig. 11 shows the combination circuit of the food feeding and food storage system of the Smart Bran Dispenser; meanwhile, Fig. 12 shows the circuit of the water feeding system.  Table II indicates the summary for each part of the devices that have been implemented in the food feeding system for the Smart Bran Dispenser.    Table IV indicates the summary for each part of the device implemented in the Smart Bran Dispenser water feeding system.  Table V indicates the summary for each part of the device implemented in the Smart Bran Dispenser as a whole system.

IV. CONCLUSION
The advancement of the Internet of Things (IoT) had a significant impact on humans' lives. One of the biggest effects of IoT in technology is making things easier, such as controlling something remotely without interrupting daily life like the Smart Bran Dispenser. Therefore, it was successfully designed and developed to assists breeders. In the past, breeders had to work hard for the feeding schedule to maintain their livestock. In addition, the innovation of this dispenser by embedding IoT benefits both breeders and livestock as the breeders could save energy and time in managing their livestock. In contrast, the livestock would benefit from having the right food at the right time with the right quantity. Furthermore, the Smart Bran Dispenser system is convenient for users during emergencies or on vacation because this dispenser can be controlled through mobile phones.