摘 要
本文旨在设计并实现一款基于单片机的猪场环境监测系统,以精准、稳定地监测猪场内的环境参数,包括温湿度、二氧化碳浓度等关键指标。
该系统采用STC89C52单片机作为核心控制器,结合DHT11温湿度传感器、MQ-135空气质量传感器等多种传感器,实现对猪场环境的实时监测。当监测到环境参数异常时,如温度过高、二氧化碳浓度超标或温度过低,系统能够自动启动相应的处理措施,如开启风扇进行降温通风、启动加热功能等,以确保猪舍内环境的舒适性和稳定性。此外,该系统还具备报警功能,当环境参数超出预设阈值时,将发出灯光报警,并通过远程监测功能实时传输相关数据至管理端。
与家禽养殖环境监测类似,本系统同样注重智能化、自动化和无线传输技术的应用,以提高系统的安装简便性、维护简单性和可操作性。目前,该系统已在猪场真实环境下调试成功,实现了对猪舍环境的实时监测与准确判断,为生猪养殖业的智能化、自动化发展提供了有力支持。
关键词:单片机;猪场环境监测系统;STC89C52;传感器技术;自动化控制
Abstract
This paper aims to design and realize a single-chip-based pig farm environmental monitoring system to accurately and stably monitor the environmental parameters, including temperature and humidity, carbon dioxide concentration and other key indicators.
The system adopts STC89C52 single chip computer as the core controller, combined with DHT 11 temperature and humidity sensor, MQ-135 air quality sensor and other sensors, to achieve real-time monitoring of the pig farm environment. When abnormal environmental parameters are detected, such as the temperature is too high, the carbon dioxide concentration exceeds the standard or the temperature is too low, the system can automatically start the corresponding treatment measures, such as opening the fan for cooling and ventilation, starting the heating function, etc., to ensure the comfort and stability of the environment in the piggery. In addition, the system also has the alarm function, when the environmental parameters exceed the preset threshold, the light alarm will be issued, and the relevant data will be transmitted to the management terminal in real time through the remote monitoring function.
Similar to poultry environmental monitoring, the system also focuses on the application of intelligent, automatic and wireless transmission technology to improve the installation, maintenance and operability of the system. At present, the system has been successfully tested in the real environment of the pig farm, realizing the real-time monitoring and accurate judgment of the pigsty environment, and providing strong support for the intelligent and automatic development of the pig breeding industry.
Key words: single chip computer; pig farm environmental monitoring system; STC89C52; sensor technology; automatic control
目 录
引言
1 绪论
1.1 选题背景及意义
1.1.1 选题背景
1.1.2 选题意义
1.2 国内外研究现状及发展趋势
1.2.1 国内研究现状
1.2.2 国外研究现状
1.2.3 发展趋势
1.3 研究主要内容
2 系统方案设计
2.1 主要元器件选择
2.1.1 主控芯片选择
2.1.2 检测温湿度方案选择
2.1.3 光照检测模块方案选择
2.1.4 混合气体检测模块方案选型
2.1.5 显示方案选择
2.2 整体设计方案
3 硬件电路设计
3.1 主控电路模块
3.2 光敏电阻检测模块电路
3.3 温湿度监测电路模块
3.4 LCD1602显示电路模块
3.5 MQ-135混合气体监测模块电路
3.6 独立按键电路模块
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 温湿度检测模块子流程
4.4 独立按键
4.5 LCD1602液晶显示子流程
5 仿真测试
5.1 仿真总体设计
5.2 光照采集检测仿真测试
5.3 温湿度检测仿真测试
5.4 混合气体监测仿真测试
6 实物测试
6.1 实物总体设计
6.2 光照采集检测实物测试
6.3 温湿度监测实物测试
6.4 混合气体监测实物测试
7 总结与展望
7.1 总结
7.2 展望
参考文献
致 谢














