1、 机库环境监控机库环境监控系统系统的的设计设计 摘摘 要:要:机库环境监控系统是以单片机技术和传感器技术为核心,并集成了温湿度信号 采集、烟雾浓度与光照强度信号采集、外部设备控制、极限值设置、系统超限报警、数 据串、并行显示等功能,来实现系统对机库环境的远程监测控制。系统以 STC89C52 单 片机为核心,分别以 DS18B20、HS1101 作为温、湿度信号的测量元件,而继电器则用来 控制通风设备的启动与停止。在室内通风控制系统中,不仅要实现信号的采集、数据的 实时显示、极限值的存储、超限报警等辅助功能,还要实现上位机 LabVIEW 界面监视的 功能.这是以 PC 机作为监控系统的中心,
2、通过 RS232 总线与单片机通信,将采集到的数 据传输到监控计算机,并行显示。 关键词:关键词:单片机,温度,湿度,传感器,空气品质 Abstract:The indoor ventilation-controlled system is based on Microcontroller unit control technology and sesor technology as the core,in order that the system can realize the function of indoor ventilation-controled , the system al
3、so integrated the function of temperature and humidity signal acquisition,extremal parameter-setting , over-limited-parameter alarm systems,the data-displaying function and so on.To achieve the aim,the system takes STC89C52 as the core,and DS18B20 as the temprature sensor,at the same time,HS1101 as
4、the humidity sensors as a measuring device.and use rely to control the indoor ventilations startup or stop.the ventilation doesnt only realize the fuction of signal acquisition,real-time data display,the extramal parameter-setting,warning when beyong the limited pronunciation and other auxiliary fun
5、ctions. But also achieve the function of computer monitoring system.the computer as the center of computer monitoring system.The Microcontroller Unit commnicate with computer through the RS232 system bus and transmit the collected date to monitor computer. Keywords:Microcontroller Unit,temperature,h
6、umidity,sensor ,air quality 目目 录录 1 绪论绪论. 1 2 系统总体设计系统总体设计. 2 2.1 系统总体设计 .2 2.2 系统功能设计 2 3 系统硬件设计系统硬件设计. 3 3.1 主控单元 3 3.2 湿度测量电路 .4 3.3 温度测量电路 .5 3.4 系统电源电路 5 3.5 继电器控制模块 .6 3.6 LCD12864 显示电路 .7 3.7 报警电路 8 3.8 串口通信电路 8 4 软件软件设计设计 9 4.1 主程序软件流程.9 4.1.1 初始化程序 9 4.1.2 主程序 .9 4.2 按键扫描程序 .11 4.3 湿度信号采集及显示程序 .11 4.4 温度信号采集及显示 13 5 5 上位机软件设计上位机软件设计 15 5.1 LABVIEW 界面设计 15 5.2 上位机软件控制过程.17 6 6 系统调试系统调试 18 7 7 结论结论. 19 8 8 致谢致谢. 20 9 9 参考文献参考文献 21 附