【正文】
n in the form of text messages or phone calls to your mobile phone number of deposited on mobile phones, remote monitoring, close alarm buzzer alarm at the same time to realize. This design using STC89C52RC as the main controller system, using DS18B20 digital temperature sensor, digital humidity sensor DHT11, MQ 2 smoke sensor as the detecting element the physical properties of the testing environment, and then use LCD12864 LCD display sensors measured values. When the system is working, if sensors numerical more than set value system will automatically through GSM munication module and MCU munication can realize the function of family security alarm, is it dangerous to timely control of the family, if yes, can take timely measures to deal with, to avoid some unnecessary danger happening. KEYWORDS Smoke alarm/Temperature alarm/GSM/STC89C52RC 目 錄 摘 要 ..................................................... I ABSTRACT .................................................. II 1 緒論 ..................................................... 1 本設(shè)計(jì)的研究背景及意義 ............................... 1 設(shè)計(jì)要求與預(yù)期結(jié)果 ................................... 1 2 系統(tǒng)總體設(shè)計(jì)及論證 ....................................... 2 控制器選定與論證 .................................... 2 顯示模塊的選定與論證 ................................ 2 傳感器檢測(cè)模塊的選定 ................................. 3 溫度傳感器的選定 ........................................... 3 濕度傳感器的選定 ........................................... 3 煙霧傳感器的選定 ........................................... 4 GSM 通訊模塊選定 ..................................... 4 電源模塊選定與論證 ................................... 4 按鍵設(shè)置的選定與論證 ................................ 5 系統(tǒng)總體設(shè)計(jì)框圖 .................................... 6 3 系統(tǒng)硬件設(shè)計(jì) .............................................. 7 單片機(jī)最小系統(tǒng) ...................................... 7 STC89C52RC 單片機(jī)簡(jiǎn)介 ...................................... 7 單片機(jī)復(fù)位電路 ............................................. 8 單片機(jī)晶振電路 ............................................. 9 液晶顯示器 12864 .................................... 10 LCD12864 液晶顯示器簡(jiǎn)介 ................................... 10 液晶顯示電路 ............................................. 11 溫度傳感器 ......................................... 11 DS18B20 溫度傳感器簡(jiǎn)介 .................................... 11 DS18B20 檢測(cè)電路 .......................................... 12 濕度傳感器 ......................................... 13 DHT11 濕度傳感器簡(jiǎn)介 ...................................... 13 DHT11 傳感器檢測(cè)電路 ...................................... 13 煙霧傳感器 ......................................... 14 MQ2 煙霧傳感器簡(jiǎn)介 ....................................... 14 MQ2 傳感器檢測(cè)電路 ....................................... 15 時(shí)鐘電路設(shè)計(jì) ....................................... 16 DS1302 時(shí)鐘芯片簡(jiǎn)介 ....................................... 16 DS1302 時(shí)鐘電路 ........................................... 17 穩(wěn)壓電源設(shè)計(jì) ....................................... 17 SIM900A 模塊簡(jiǎn)介 .................................... 18 4 軟件設(shè)計(jì) ................................................ 19 軟件設(shè)計(jì)流程圖 ...................................... 19 溫度報(bào)警軟件設(shè)計(jì) .................................... 20 火焰報(bào)警軟件設(shè)計(jì) .................................... 20 GSM 電話(huà)短信軟件設(shè)計(jì) ................................ 21 5 系統(tǒng)調(diào)試與結(jié)果 ........................................... 23 致 謝 .................................................... 25 參考文獻(xiàn) .................................................. 26 附 錄 1 .................................................. 27 附 錄 2 .................................................. 28 附 錄 3 .................................................. 29 1 1 緒論 本設(shè)計(jì)的研究背景及意義 由于科學(xué)技術(shù)的快速發(fā)展,電子產(chǎn)品變得越來(lái)越智能化。然而為了讓生產(chǎn)生活加倍的方便化、自動(dòng)化、智能化。全國(guó)每年因?yàn)榛馂?zāi)會(huì)失去很多無(wú)辜的生命,使許多家庭家破人亡。 設(shè)計(jì)要求與預(yù)期結(jié)果 1) 利用 LCD12864 液晶顯示時(shí)間、溫度、濕度,實(shí)現(xiàn)人機(jī)交互界面; 2) 利用煙霧傳感器 MQ2 檢測(cè)室內(nèi)煙霧濃度,當(dāng)煙霧濃度達(dá)到一定數(shù)值時(shí), GSM 模塊發(fā)送短信提醒,實(shí)現(xiàn)遠(yuǎn)程監(jiān)控; 3) 利用 DS18B20 數(shù)字溫度傳感器檢測(cè)室內(nèi)溫度,當(dāng)溫度達(dá)到預(yù)定值時(shí), GSM 會(huì)自動(dòng)發(fā)送短信提醒室內(nèi)溫度過(guò)高,實(shí)現(xiàn)遠(yuǎn)程監(jiān)控; 4) 利用火焰?zhèn)鞲衅鳈z測(cè)室內(nèi)煙霧濃度,當(dāng)檢測(cè)到火焰時(shí), GSM 模塊發(fā)送短信提醒,實(shí)現(xiàn) 遠(yuǎn)程監(jiān)控; 5) 利用 PNP 三極管作為控制元件,當(dāng)檢測(cè)元件檢測(cè)到的數(shù)據(jù)大于設(shè)定值時(shí),由程序控制三極管驅(qū)動(dòng)蜂鳴器報(bào)警提