With the influx of modern information technology into agricultural production,a large number of intelligent devices have been used in the plant growing and livestock breeding industries.And since pork accounted for a relatively large share of China’s overall meat consumption,the hog farming industry has been also actively introducing high technology in order to improve farming efficiency.Sow feeding,as the power source of hog farming,has a significant impact on pork prices in terms of its production quality.At present,intelligent sow feeding control system has an important role in improving the production efficiency of large-scale sow farms,however,the penetration rate of such equipment in China was low.In addition,most of the domestic pig farms still relied on import to get the feeding control system because the technology level of domestic feeding control system was lagging behind that of foreign countries.In view of the fact that small and medium sized farmers accounted for a large proportion of pork distribution in China and few small and medium sized farms used imported equipment due to its high cost,this study developed a sow feeding control system based on Io T that integrates various functions such as temperature measurement,weighing,underwater feeding and movement monitoring,etc.It can detect the sow’s physical status while feeding accurately and upload the relevant data to the back office in time after feeding is completed.It can upload the relevant data to the backstage for the management staff’s easy viewing after the feeding was finished,and realize the liberation of human resources.The main contents of the study were as follows:(1)The general framework design of the control system.By analyzing the functional needs and performance requirements of group sow feeding,a dedicated ARM hardware platform was selected and a software implementation plan was developed.In addition,considering the environment of the pig farm and other factors,the communication method between the modules was determined as Zig Bee wireless transmission.(2)Design,drawing and debugging of the control circuit.For the functional requirements of different controllers,Exynos4412 and STM32F103CBT6 were selected as the MCU of main controller and discrete unit respectively,and the corresponding resource pins were drawn out according to the system requirements to realize the functions of underwater feeding,entry door control,feeding-related signal acquisition and sow body surface temperature acquisition.(3)Software development of the underlying hardware driver and application layer of the main controller in the control system.Based on the Linux kernel,the underlying drivers of the watering system,feeding system and temperature measurement module were written,and the function relationship was established through calibration experiments to realize the precise control of watering and feeding amount;following the event-driven programming idea,the whole sow feeding logic was realized in the Linux application layer through multi-thread programming,epoll high concurrency,POSIX timer,semaphore and cache pool,etc.(4)Automatic door opening and closing logic design of the inlet door and dynamic filtering algorithm development of sow weight.The independent inlet door control unit was developed,which can accurately determine the current position of the sow through the monitoring of multiple sensors and automatically control the door opening and closing time according to the sow’s living habits and the feeding logic of this feeding control system;the corresponding curve was fitted by collecting the weight change when the sow walked across the scale several times.According to the rising and falling curves and the position of the inflection point,a set of dynamic weight filtering algorithm was written with the sliding average algorithm as the core to realize the dynamic weighing of the sow.(5)Feeding test verification of actual feeding scenarios.Actual feeding tests were conducted in two pig farms in Hechuan District,Chongqing,to collect and analyze relevant data and further verify the feasibility of the feeding logic used in the study.The final test results show that: the maximum error of system watering does not exceed 5%,and the average error is less than 2%;the average error of feeding is less than1.5%,and the action trigger rate is 100%;the error of weighing performance does not exceed 2% under both static and dynamic measurement methods,and the error of temperature measurement is less than ±0.2℃;the maximum packet loss rate of Zig Bee does not exceed 0.5%,and both Zig Bee and Socket connection can be disconnected and reconnected in a short time.In actual use,the system has been working continuously under unattended condition for the longest time close to one month.Overall,the system has achieved the basic requirements of modern sow feeding control system and has certain application value. |