摘要
为了实现奶牛健康的实时检测,提出了一种基于STC12C5A60S2单片机的奶牛健康检测系统.该系统由基于单片机的下位机装置、基于Lab VIEW的上位机程序和基于FTP(File transfer protocol)协议的服务器3部分组成.下位机采用STC12C5A60S2单片机构建控制核心,使用温度传感器、心率传感器和运动传感器对奶牛特征参数进行检测,使用串口有线通讯和Wi Fi无线通讯的可选模式将数据传输至上位机;上位机软件使用虚拟仪器Lab VIEW技术进行构建,使用TCP(Transfer control protocol)协议对下位机进行通讯和控制,诊断算法可以对奶牛的健康数据进行诊断计算和简单的健康结果诊断;服务器使用服务器专用计算机构建,通过FTP协议为系统提供服务.系统测试结果表明,下位机检测数据的有效性最高达75%,有线数据传输正确率达92%,无线传输正确率达80%,服务器数据服务传输正确率达99%,诊断算法依赖经验库设计方案可行.在工作模拟测试中,运用该系统随机对10头奶牛的体温,运动量和心率进行了远程检测试验,10头奶牛的平均体温心率分别为34.5℃和63次/min;运动量白天平均为163次/min、夜晚平均为47次/min,奶牛的数据平均值的诊断结果为"健康,准确度:88%".系统具有一定的实用性,希望能给类似设计提供参考.
In order to realize monitoring of cow health in real-time, a cow health detecting system based on STC12CSA60S2 microcontroller was presented. The system consisted of three parts, the lower comput- er which was based on MCU detection device, software on upper computer which was based on LabVIEW program and network server which was based on FTP ( File Transfer Protocol). To detect dairy health pa- rameters of cows, a temperature sensor, a heart rate sensor and a motion sensor were used and the control core of lower computer adopted STC12CSA60S2 MCU. The lower computer concerned with upper com- puter and exchanged data with selectable mode, the serial port or WiFi. The software on upper computer was programmed by LabVIEW virtual instrument technology and concerned with lower computer in TCP (Transfer Control Protocol) for communicating and controlling. The health data was calculated with algo- rithm for diagnosing on upper computer and simple result for health was obtained and displayed. The net- work server was built up on a dedicated server computer and provided data services to the system through the FFP. The results of system testing were shown that validity of the detection data of the lower computer was 75% at most, the correct rate of the serial port transmission was 92% and rate of WiFi was 80% in indoor environment. To the upper computer, correct rate to exchange data with server service was 99% and the algorithm depends on the experience database was effective. The data of simulating test for the system were from ten cows with random selection and their heart rate, body temperature and motion meas-ures were detected with the system. The average body temperature and heart rate of 10 cows were 34. 5℃ and 63 times/min, the average motion measures were 163 times/min in daytime and 47 times/min in night time. The average data of 10 cows were get " health, reliability rate: 88% " after calculating thought the algorithm. It was applied, well worth to extension and hopefully to be reference for similar designing.
作者
陈亚勇
黄伟锋
唐宇
黄雪冰
CHEN Yayong;HUANG Weifeng;TANG Yu;HUANG Xuebing(College of Automation, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China;College of Animal Science and Technology, Zhongkai University of Agriculture and Engineering, Guangzhou 510225, China)
出处
《仲恺农业工程学院学报》
CAS
2017年第4期8-14,25,共8页
Journal of Zhongkai University of Agriculture and Engineering
基金
2015年省级大学生创新创业训练计划(201511347025)资助项目