摘 要:現實生活中有很多地方對環境的要求非常苛刻,在此以AVR單片機為控制核心,通過傳感器檢測室內利用制冷片和加濕器等設備,對室內的溫濕度、光照度進行調節,已達到室內的環境控制的目的。同時,該設備還具有鍵盤和顯示功能,能夠依據具體的環境要求,自主設定和顯示室內環境值。該系統與市面上的一般同類器件相比具有價格便宜,功能強大的優點。該系統在實際測試中取得了令人滿意的效果。關鍵詞:室內環境; 溫濕度、光照傳感器; AVR單片機; 溫度控制
中圖分類號:TN911-34文獻標識碼:A
文章編號:1004-373X(2010)18-0038-03
Control System for Domestic Small-scale Environment
WU Xiang-jian, WANG Hui, CAI Jin-ke
(Electronic and Information College, Nanjing University of Information Science and Technology, Nanjing 210044, China)
Abstract:As the demand on environment is needed strictly in current daily life, a control system, which takes AVR microcontroller as controlling core, adopts the sensors to detect indoor conditions, and utilizes the cooling films, humidifiers and other equipments to change the indoor temperature, humidity and illumination, is proposed. The purpose to control the indoor environment has been realized by the system which configurates a keyboard and display screen to set and show the values of the indoor environment according to the specific environmental requirements. The system has the advantages of lower cost and more powerful functions in comparison with similar systems on the market. The satisfactory result was obtained in practical test of the system.Keywords: indoor environment; temperature, humidity and illuminance sensor; AVR single chip microcomputer; temperature control
0 引 言
現實生活中有很多地方對環境的要求非常嚴格,比如說:葡萄酒的儲藏,蘑菇等菌類植物的培養等等。這些地方對環境的要求高,因而其造價也高。所以一些比較大的酒窖,菌類培育基地等地方,很少出現在日常家用中。該系統從這一點出發,面向對象為一般家用。以AVR單片機為控制核心[1-2],運用傳感器檢測室內的溫度、濕度、光照度這三個量,再使用加濕器、制冷片、加熱器、百葉窗、燈泡和排風扇,實現動態調節。該系統在一般家用環境的調節中精確度高,穩定度高,反應靈敏,造價適中,功能強大,同時該系統帶有鍵盤顯示功能,能夠實現在常見的不同環境中進行切換,還可以讓用戶在一定的范圍內自主地設置溫度、濕度及光照度的值。
1 整體的系統框圖
系統主要由測量部分和執行裝置組成,其整體框圖如圖1所示。
1.1 溫度控制部分
作為測溫電路,主要采用了先進的單總線數字溫度傳感器DS18B20對溫度信號進行采集及處理,實現對環境溫度的智能控制功能。……