Application of the Internet of Things Technology in the Automation of the Production of Compound Feed and Premixes Nikolay Kikteva,b, Taras Lendiela and Volodymyr Osypenkoc a National University of Life and Environmental Sciences of Ukraine, Heroev Oborony str.,15, Kyiv, Ukraine b Taras Shevchenko National University of Kyiv, Volodymyrs’ka str., 64/13, Kyiv, Ukraine c Kyiv National University of Technologies and Design, Nemirovicha-Danchenko str., 2, Kyiv, Ukraine Abstract There was analysed the expediency of using IoT technology in agricultural production. Implemented hardware and software realisation of the information and control system based on the integrated Arduino board. In addition to reading information from sensors, there was also developed an operator interface and was provided the recording of measured values into a database for further processing. Data is stored on a memory device in table form, unified with data processing programs. There is the possibility of storing files in the cloud and remote control of technological processes. Also, the software provides for address polling of sensors, which makes it possible to evaluate how the monitored parameter has changed where the sensor is installed. With IoT technology, there was substantiated the possibility of monitoring and managing the production of compound feeds and premixes. Keywords 1 Internet of things, cloud technologies, platform, software, algorithm, poultry feed, premixes, interface, automatic of technological processes. 1. Introduction An increase the efficiency of using the technological opportunities of agricultural units is achieved through extensive automation of production processes and the development of a computer control system. An effective solution of the problem of rational animal feeding in modern conditions of agribusiness is possible by creating information management systems in production. Food preparation must be carried out in strict accordance with the recipe for the given type and purpose of the animal. In this regard, the problem arises in creating a hardware and software complex based on modern automation tools. In recent years, there is actively developing a new direction - cloud technologies and the Internet of Things (IoT), which can also be used in the automation of agricultural production, including in the production of poultry feed and premixes. The IoT is the most advanced tool in industrial automation. 2. Problem Statement Good nutrition serves as the basis for high fertility and productivity of adult animals and promotes maturation and an increase in live weight of young animals, which ultimately contributes to an increase in the efficiency of animal husbandry. Correct use of poultry feed is one of the major reserves for increasing and reducing the cost of production of animal husbandry products. Given the above, to increase the efficiency of feed production and product quality it is necessary: IT&I-2020 Information Technology and Interactions, December 02–03, 2020, KNU Taras Shevchenko, Kyiv, Ukraine EMAIL: nkiktev@ukr.net (N. Kiktev); taraslendel@gmail.com (T. Lendiel); vvo7@ukr.net (V. Osypenko) ORCID: [0000−0001−7682−280X] (N. Kiktev); [0000-0002-6356-1230] (T. Lendiel); [0000−0002−1077−1461] (V. Osypenko) ©️ 2020 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) 124  to improve the control system of technological processes in the production of poultry feed by developing a two-tier computer-integrated control system;  to apply modeling of individual technological processes;  at the second level of the integrated control system to apply software to calculate the best feed recipe for nutritional qualities;  using of modern cloud technologies and the Internet of Things for remote monitoring of the process via the Internet. Purpose of the research. This work solves the problem of developing a hardware and software complex for managing the production of poultry feed using cloud technologies and the Internet of things. 3. Literature Servey With the advent of production automation, this area also applied to poultry feed production. Many scientists and engineers in the USSR dealt with the problems of optimizing the feed ration for different animals, automating certain technological processes of feed production (granulation, dosing, mixing, transportation, etc.), complex automation of feed mills, software development to calculate feed composition based on animal nutrients. Thus, in [10, 11, 13] researchers investigate how to obtain the optimal composition of feed. It is usually performed using the simplex method, in [10] shows a three-dimensional dependence of the study of feed production in the coordinate system "grinding energy - cost - compliance with the recipe", performed in the software environment Object Pascal / Delphi. The developed methodology for assessing the effectiveness takes into account the conditions for the functioning of the poultry feed production complex, not due to the automation of the technological process. An important role in the design of feed mills is played by the works of V.T. Diordiev. For an automated production complex design, the main input parameter was the direction of the farm or the recipe. According to the specified input data, there is generated a production complex, and its economic and its technological parameters are estimated by an integral criterion [1, 3]. The synthesis of the poultry feed formulation and the automation of the projected production complex for the preparation of feed has been put on the same level. The problems of substantiating the necessary degree of informatization and phasing in the introduction of new control systems, choosing their structure and technical support, developing a mathematical description and searching for a system of operating technological equipment of industrial complexes with microprocessor control, identifying the process of producing animal husbandry products as a control object have not been solved [2]. Consider the possibilities of using IoT technologies in agriculture. These technologies have already found application in tracking the location of livestock while herding, as well as their housing conditions and growing methods. Monitoring milk production, animal health includes tracking data using IoT tools to know when to change feed ingredients. There are also technologies for monitoring the quality and quantity of feed grains and oil crops [5]. According to the authors, IoT technology is better suited for tracking the location and feeding of animals in a meadow or barn. Connecting a collar with sensors to cows allows continuous monitoring and optimal nutrition planning. Aquaculture vision Nutreco Skretting will work directly with Eruvaka to bring the latest precision farming technologies to the fore, primarily in Latin America. This technology will be included in AquaSim, a set of custom IoT productivity tools for Skretting [6]. The technologies of the Internet of Things in agriculture are also used in India, where the problem of food saturation is acute with the growth of population. The project includes the automation of agriculture, including the measurement of soil moisture, i.e. dry or wet so that the farmer can decide to use wet or dry crops depending on the conditions, water level measurement - automation of irrigation - a system based on soil moisture and water level, measuring moisture, temperature and dew point, - lighting control - automation with the purpose to save energy, burglar alarms using infrared radiation and, finally, sending a sensor and outputting a report to the farmer from a location console or farmland using a notification system [17]. 125 One of the options for applying the technologies was proposed by professors of the Institute of Electrical and Electronics Engineers K.A. Patil and N.R. Keil [14]. There was developed a “Smart Agriculture Model Using the Internet of Things”, which implements a real-time soil monitoring system, monitors soil moisture content, acidity and temperature, and these values are used to deploy a decision support system. This system helps in identifying crop pests and diseases and sends SMS alerts to the owner. The proposed architecture consists of three modules: client-side, server-side, and farm-side. Standard Ubi-Sense Mote (M) sensor board is used to measure temperature, humidity, barometric pressure and proximity. The data collected by Ubi-Sense Mote is sent to the server. The server part consists of a decision support system. Then the decision support system sends the required information received from the sensors to the client side, which consists of a web application and an Android mobile application. The disadvantage of this system is that no methodology for improving irrigation facilities is proposed, and the mobile application is not available for iOS phones. Another proposed system is the "Intelligent irrigation system for automating the maintenance of field conditions based on the Internet of Things" proposed by N. Rao and B. Sidhar in 2018 [4]. Two sensors, a soil moisture sensor and a temperature sensor, are placed in the crop field. Data from these sensors is collected using a Raspberry Pi microcontroller. The Raspberry Pi is a series of single board minicomputers originally developed in the UK for teaching in schools but with widespread adoption. These sensor values transmit them to the Raspberry Pi where the Apache web server is configured. The Raspberry Pi also has a SQL database for storage or container. The ZigBee module was used to establish a communication channel between the sensor arrays and the server. The farmer can access the field status server anytime, anywhere, thereby reducing labor and time. There was implemented multi-hop communication to increase the communication range. Data from arrays of sensors are transmitted through neighboring sensor matrices, which transmit them further to their neighbors. Then the data is sent to a database using WiFi, so the user of this system can track changes and make an irrigation plan at their own discretion. The disadvantage of this method is that no security protocols are implemented in the system. In article [17] describes the implementation of Dijkstra's algorithm in SDN environments to support applications deployed in Cloud / Edge and IoT scenarios. In particular, given the highly scalable network topology that includes thousands of network devices, a revised MapReduce approach of Dijkstra's algorithm is proposed to reduce path computation.. But IoT animal husbandry management solutions can make livestock monitoring more affordable than ever before. Animal husbandry monitoring solutions are based on sensors associated with wearable animals. These sensors can track heart rate, blood pressure, temperature, respiratory rate and even digestion and send the data to a central computer for further analysis. With these sensors, farmers can also track the location of individual farm animals and even identify sick animals by tracking their optimal grazing patterns. They can help farmers respond quickly to an infected animal and stop disease transmission to other animals in the herd [19]. Another method, considered by P. Patil and A. Narhidi, "Automation of the agricultural environment in real time" [5], involves the use of a soil moisture sensor, which measures the value of the moisture content in the soil at fixed intervals. When the soil moisture level is registered below the threshold value, an SMS notification is sent to the user. The main disadvantage of using this method is that data is sent at a fixed time interval. Minimizing the interval will result in excessive electrical costs, and increasing the interval may damage the crop. 4. Formulation and solution of the problem of optimizing the feeding ration of animals The objective function of the feeding optimization problem can be written as follows: m Z   C j X j  min , j 1 where Cj is cost or purchase price of the j-th type of feed; Xj is the required amount of the j-th type of feed in the daily diet, under restrictions (conditions): Nutrients in the diet contain at least the required amount: 126 m A X  B , j 1 ij j i where Aij is the content of the i-th nutrient per unit of the j-th type of feed; Bi is daily requirement of the animal in the i-th nutrient. In this example the number of feed components n = 6, and the variables 𝑥j characterize: X1 is wheat bran; X2 is ground barley; X3 is herbal flour; X4 is corn hammer; X5 is sunflower meal; X6 is hay. The amount of nutrients and vitamins are represented in this example by the vector B, which shows the amount of: B1 is calcium; B2 is phosphorus; B3 is magnesium; B4 is carotene; B5 is cobalt; B6 is vitamin E. Certain groups of feeds are included in the diet within zootechnically justified limits: m  X  A X   X , hj j hj j hj j j 1 where ahj,bhj is respectively, the minimum and maximum allowable proportion of the h-th group of feeds in the total nutritional value of the diet, expressed in feed units; Ahj is the content of feed units in the unit of measurement of the j-th type of feed of the h-th group of feeds. The ratio of certain types of feed and feed additives is observed in the diet L m W X  W ' X  0 j 1 ij j j  L 1 ij j where Wij , W'ij - coefficients of proportionality between feed groups. Auxiliary restriction on the total number of feed units in the die A X  X , ij j j where X j - the total number of feed units in the diet. Positivity condition of variables X j  0, X j  0 The interface, written using electronic SQL databases and the C # programming language, provides wide opportunities for the implementation of functional and cheap solutions in the field of computational processes [8, 9, 10], which is reflected in the practical part of this work. However, the disadvantage of this solution is the need for specialists to have knowledge of program development. The choice of this or that solution should be carried out in accordance with the financial and human resources of agricultural enterprises, since these points are limiting. 5. Control system operation algorithm The operation of the feed production control system is as follows. The grain comes from the loading hoppers through the pipeline to the ripper passing the flow sensor 1a, which removes the flow rate. The signal from the flow sensor is fed to the flow meter which control signal through the actuator closes or opens the valves of the grain loading hoppers. After the baking powder, the raw material enters the hammer crusher. And from the crusher it already gets to the dosing hopper and the hopper with additives. Level sensors are installed on the hopper: upper and lower. The signals from the level sensors will go to the discrete signals of the controller. Bunker systems consist of 4 hoppers each, they open the air valve, after which the feed is poured on the scales and measured with strain gauges (4 sensors for each group of feed components) M50, which measure the weight of the substance in the middle of the weight module and sends data through 127 the channel of communication CanOpen to the controller, which compares with the indicators of the level indicator monitors the position of the air valves by means of actuators. The hopper is also equipped with three level sensors that are connected to the level indicator. The level indicator sends a signal to the flow meter. There are two dampers with flow sensors on the pipelines that supply raw materials, as well as at the outlet of the hopper. The signal from the flow sensors and gets to the flow meter and is compared with the level indicator, after which it sends a control signal to the actuators that control the position of the valves. Raw materials from the hopper and crusher through the pipeline enters the hopper of finished raw materials. It is proposed to create a control system for the technological process of feed production using the technology of the Internet of Things, namely the principle of remote control and monitoring of technological processes. In project we use an Arduino MEGA2560 + WiFi R3 controller from RobotDyn (Fig. 1a) [19]. The board has pin connectors for connection to the ESP8266 contacts and several switches. The main idea of using the board is that with the help of switches you can configure the interaction of its three components: Atmega2560 chip, ESP8266EX chip and CH340G USB-TTL converter (Fig. 1b) [20]. a b Figure 1: Arduino MEGA2560+WiFi R3(a) and Contacts ESP8266 (b) The structure of the developed system is shown in Fig. 2 and includes: - Sending into IoT action; - Sharing the collected IoT data; - Saving data; - Receving data from IoT. There are both single and complex connections that allow you to organize many options for the interaction of all parts of the board. This opens up great opportunities for building different devices. In addition to Wi-Fi, the microcontroller is able to run programs from external flash memory with SPI interface. Сonnections that allow you to organize many options for the interaction of all parts of the board. This opens up great opportunities for building different devices. In addition to Wi-Fi, the microcontroller is able to run programs from external flash memory with SPI interface. Schematically, the control system is shown in Fig. 3. The algorithm of the control system is presented in Fig. 4. The system works as follows: 1) The algorithm of the control system is presented in Fig. 4. The system works as follows: 2) after power supply, the entire system is initialized; 3) the current value of time t is compared with the critical value of time tk (time for which the whole technological process); 4) measurement of technological parameters; 5) check of wireless communication; 6) under the condition of wireless connection, the measured value is displayed; 7) waiting for the command; 8) go to step 2; 9) in the absence of wireless communication, the system goes into automatic mode; 10) after the transfer of control action to the actuators, the data is sent to the personal computer of the general control system; 11) go to step 2; 128 12) when the critical time value is reached, the program is terminated. Figure 2: The architecture of the developed information system M Motors Relays Tablet Sensors Arduino MEGA+WIFI PC Figure 3: Symbolic circuits of the control system The control system is programmed in the "Arduino IDE" environment. The results of the experiment are presented in table 1. We have the following results for the selected species of animals " Laying chickens". 129 Start Initialization, t No t < tk Yes Measurement On Off WLAN Print settings Automatic control Waiting time Sending data to a PC t > 10 s t++ Command t++ Stop Figure 4: Algorithm of control system operation Table 1 The results of calculations by the program Ingredient number Number of portions of 100 g 1 0 2 1,1 3 0 4 0 5 0 6 0,02 130 6. Processing Experimental Results Finally, you can demonstrate the work of the program and the process of optimizing the diet of a particular animal. when the user clicks on the button of the main menu "Recipe", the program will calculate the optimal (according to the simplex method) diet for the composition of vitamins in it for the selected animal from the drop-down list in the main menu. The results of the calculations are shown in Fig. 5a. In order to view the already calculated recipes (read - the optimal diet) for the selected animal from the drop-down list in the main menu of the program, you should click on the main menu button "View existing recipes". The results of pressing the specified button are shown in Fig. 5b. The last function of the program is the details of the ingredient. By clicking on the main menu button "View ingredient details", you can open a dialog box that interactively offers to view the composition of vitamins, energy value and cost of the selected ingredient from the drop-down list of this dialog box. The results of execution are shown in Fig. 6. Wireless debugging of the control system is shown in Fig. 7. a b Figure 5: The optimal diet for "Laying chickens" (a) and Existing recipes for "Laying chickens" (b) 7. Results and discussion Сonducted experimental researches have shown that there is developed the control system of technological process of production of compound feed with use of technology of the Internet of things. There is implemented an algorithm of control of technological process with use of technology of the Internet of things and is considered at the same time the objective function of a problem of optimization of feeding. Research has been carried out to assess the possibility of using an automated device with a developed system for monitoring technological parameters. In particular, there is created a prototype of the installation with the proposed module for monitoring and maintaining technological parameters. The layout included an Arduino MEGA2560 + WiFi R3 controller from RobotDyn, level sensors, actuators and a PC. As can be seen from Fig. 4.2, the cost of this diet will be 21.17 penny per day, and per month - 30 days × 21.17 penny a day = 6.35 USD. 8. Conclusion As a result of research, it has been established that for the mass introduction of a control system for the technological process of mixed feed production using the Internet of Things technology, it is necessary to conduct additional research aimed at increasing the reliability and stability of the 131 monitoring system of technological parameters and the control system as a whole. Also it is necessary to optimize the measurement algorithms. In the future, for the development of the project, you can apply multi-criteria optimization [18]. Figure 6: Details for "Wheaten bran" Figure 7: Wireless debugging of the control system 9. References [1] Wang, Xin, Tapani Ahonen, and Jari Nurmi. "Applying CDMA technique to network-on- chip." IEEE transactions on very large scale integration (VLSI) systems 15.10 (2007): 1091-1100. [2] D. Khort, A. Kutyrev, R. Filippov, N. Kiktev, and D. Komarchuk. “Robotized Platform for Picking of Strawberry Berries.” 2019 IEEE International Scientific-Practical Conference Problems of Infocommunications, Science and Technology (PIC S&T), Kiev, 8-11 Oct. (2019): 873-876. DOI: 10.1109 / PICST47496.2019.9061448 [3] N. Kiktev, H. Rozorinov, and M. Masoud. “Information Model of Traction Ability Analysis of Underground Conveyors Drives.” 2017 XIII-th International Conference MEMSTECH, Lviv, 20-23 Apr. (2017): 143-145. DOI: 10.1109 / MEMSTECH.2017.7937552 132 [4] V. Lysenko, T. Lendiel, and D. Komarchuk. “Phytomonitoring in a greenhouse based on arduino hardware.” 2018 International Scientific-Practical Conference on Problems of Infocommunications Science and Technology (PIC S&T), Kharkov, 9-12 Oct (2018): 365-368. doi:10.1109/INFOCOMMST.2018.8632030 [5] A. Einstein-Curtis. “What role exists for IoT technologies in the feed industry.” FeedNavigator.com (2018). URL: https://www.feednavigator.com/article/2018/05/31/what-role- exists-for-iot-technologies-in-the-feed-industry [6] Feed Update: Latest insights from the global feed industry (2018). URL: https://www.allaboutfeed.net/Home/General/2018/5/Feed-Update-Latest-insights-from-the- global-feed-industry-283164E/ [7] L. Abhishek, and B. Rishi Barath. “Automation in Agriculture Using IOT and Machine Learning.” International Journal of Innovative Technology and Exploring Engineering (IJITEE) ISSN: 2278-3075, Volume-8, Issue-8, June (2019): 1520-1524. DOI: 10.1016/j.procs.2020.03.440 [8] S. Coppol. “How the Internet of Things (IoT) Is Helping the Agriculture Sector.” colocationamerica.com (2019). URL: https://www.colocationamerica.com/blog/how-the- internet-of-things-iot-is-helping-the-agriculture-sector [9] K.R. Raghunandan, L.J. Quadras, S. Gurunandan, S.S. Karthik. “Usage of Internet of Things in Agriculture Automation.” International Journal of Computer Trends and Technology (IJCTT), Vol. 58, Issue 1, April (2018): 35-39. DOI: 10/14445/22312803/IJCTT-V58P106 [10] А.О. Kashkariov. “Pro efektyvnist` skladannya receptiv kombikormu.” [On the effectiveness of compound feed recipes]. Konferenciya molodyh vchenyh ТDАU, (2010): 1-3. (In Ukranian). [11] V.T. Diordiev Skhemnye resheniya issledovanie sistem upravleniya elektrotekhnologicheskimi kompleksami proizvodstva kombikormov v APK [Schematic solutions study of control systems for electrotechnological complexes of compound feed production in agro-industrial complex]. Naukovyj visnyk TDAU, Issue-2, Vol. 4, (2012): 65-79. (In Russian). [12] Samokhvalov, Y.Y. Development of the Prediction Graph Method Under Incomplete and Inaccurate Expert Estimates. Cybern Syst Anal 54, 75–82 (2018). DOI: 10.1007/s10559-018-0008-1 [13] V.T. Diordiev, and A.G. Sabo. “Optimizaciya receptov kombikormov - put' povysheniya effektivnosti ispol'zovaniya fermerskih kombikormovyh ustanovok [Optimization of compound feed recipes - a way to increase the efficiency of using farm feed installations], IV sympozjum “Problemy budowy oraleksploatacji maszyn I urzadzen rolniczych,” Plock, PolitetechnikaWarszawska (1994): 125-127. (In Russian). [14] K.A. Patil, and N.R. Kale. "A Model of Smart Agriculture Using IoT." 2016 International Conference on Global Trends in Signal Processing, Information Computing and Communication (ICGTSPICC), IEEE, Dec. (2016): 543 – 545. DOI: 10.1109 / ICGTSPICC.2016.7955360. [15] Nageswara Rao and B. Sridhar “IoT based smart cropfield monitoring and automation irrigation system ” 2nd International Conference on Inventive Systems and Control (ICISC), IEEE, Jan. 2018, Pages: 478 – 483. [16] Prachi Patil, Akshay Narkhede, Ajita Chalke, Harshali Kalaskar, and Manita Rajput. “Real Time Automation of Agricultural Environment.”, International Conference for Convergence for Technology-2014, 6-8 April 2014, Pune, India, pp. 1-4. DOI: 10.1109/I2CT.2014.7092040 [17] A. Buzachis, A. Galletta, A. Celesti, and M. Villari. “An Innovative MapReduce-Based Approach of Dijkstra’s Algorithm for SDN Routing in Hybrid Cloud, Edge and IoT Scenarios.” 7th IFIP WG 2.14 European Conference, ESOCC 2018, Como, Italy, September 12-14, (2018): 185-198. DOI: 10.1007/978-3-319-99819-0_14. [18] Hnatiienko H. Choice. Manipulation in Multicriteria Optimization Problems / Selected Papers of the XIX International Scientific and Practical Conference "Information Technologies and Security" (ITS 2019), pp. 234–245 (2019). [19] Developer board Arduino MEGA2560 WiFi R3 from RobotDyn. URL: https://arduino.ua/prod2039-plata-razrabotchika-arduino-mega2560wifi-r3-ot-robotdyn [20] Review of NodeMcu v2 board on ESP8266-12E. URL: https://robotchip.ru/obzor-platy- nodemcu-v2-na-esp8266-12e/ 133