【正文】
醒的認(rèn)識(shí)我們存在的差距,才能不斷的進(jìn)步。以此達(dá)到節(jié)能環(huán)保的作用。關(guān)鍵詞:51單片機(jī) 光控電路 聲控電路 光敏電阻 駐極體話筒 Design Of Acoustic And Electric Lamp ABSTRACT With the rapid development of science and technology, automation has been used in every aspect of life, but the street is a good example of. How to realize the energy saving lamp as the central processor is the main content of this design using 51 singlechip microputer. Through the book knowledge learning, teacher39。通過書本知識(shí)學(xué)習(xí)、指導(dǎo)老師的輔導(dǎo)以及資料文獻(xiàn)的查閱,確定51單片機(jī)為主要芯片,然后因?yàn)橐獙?shí)現(xiàn)聲光控功能,那就必須使用到光敏電阻和駐極體話筒電阻來實(shí)現(xiàn)光和聲音轉(zhuǎn)換為電信號(hào),利用單片機(jī)最小系統(tǒng)模塊、聲控模塊、光控模塊等幾大模塊為主的硬件來實(shí)現(xiàn)本次設(shè)計(jì)。. .. . ..本設(shè)計(jì)分別通過利用聲控和光控模塊的駐極體話筒和光敏電阻將聲音信號(hào)和光信號(hào)通過轉(zhuǎn)換為51單片機(jī)能夠識(shí)別的電信號(hào)來實(shí)現(xiàn)聲光控功能。s guidance and literature data access, to determine the 51 microcontroller as the main chip, then because of the need to achieve sound and light control function, it must use the photosensitive resistance and the electret microphone resistance to realize the conversion of light and sound into electrical signals, use the MCU minimum system module, voice module, optical module several modules of hardware to implement the design. The design of sound and light control module respectively through the electret microphone and photosensitive resistance will sound signals and optical signals are converted to electrical signals by 51 single chip puter can recognize to achieve sound and light control function. Through the use of drawing the system principle diagram, the whole circuit diagram, program flow chart of the knowledge and the necessary graphics simulation software, plete the system circuit design, mold design, the photosensitive sensor electric transform voice rectifier filter amplifier and programming, simulation, hardware debugging, finally designed and implemented by using 51 single chip puter that day by the light control circuit function control light does not shine, the night by the sound control circuit function control switch lights, and a delay time out. So as to achieve the purpose of energy saving and environmental protection, ultimately achieve the requirements.Keywords: 51 Singlechip Lightoperated circuit Soundcontrol circuit photoresistor Electret microphone目 錄 第一章 緒 論 1 1第二章 論文設(shè)計(jì)概述 論文主要要求 3 3 3 4第三章 系統(tǒng)硬件設(shè)計(jì) AT89C52 5 5 7 8 雙電壓比較集成器LM393 9: 11 光控電路模塊 11 聲控電路模塊 12 串口通信模塊 12 電源電路模塊 12 復(fù)位電路模塊 12 時(shí)鐘電路模塊 12第四章 系統(tǒng)電路設(shè)計(jì) 16 51單片機(jī)系統(tǒng)及功能實(shí)現(xiàn) 17 17 17 光控電路 18 聲控部分 19第五章 系統(tǒng)程序設(shè)計(jì) 20 21 系統(tǒng)電路設(shè)計(jì) 19第六章 調(diào)試仿真 22 22 光控部分 22 22 22參考文獻(xiàn) 28附錄 29后記 31 學(xué)習(xí)參考. .. . .. 第一章 緒 論在學(xué)校,機(jī)關(guān),廠礦企業(yè)等單位的公共場所以及居民區(qū)的公共樓道,長明燈現(xiàn)象十分普遍,這造成了能源的極大浪費(fèi)。由于近年我國的照明器材行業(yè)的迅速崛起,中國已經(jīng)成為電光源產(chǎn)品 的主要輸出國之一。美國、法國、荷蘭、英國、意大利等國家從上世紀(jì)90年代起,紛紛制定出相關(guān)扶持政策,用于推廣節(jié)能燈等節(jié)能產(chǎn)品。可見節(jié)能燈在國內(nèi)外都有著重大的發(fā)展和重要作用。 基于單片機(jī)的聲光雙控路燈將在我國的未來城市發(fā)展中發(fā)揮更加廣泛的作用。這種控制主要根據(jù)光照強(qiáng)度和聲音來共同控制路燈的點(diǎn)亮與熄滅。本設(shè)計(jì)有兩種系統(tǒng),一種是光控系統(tǒng),另外一種是聲控系統(tǒng),這兩個(gè)功能均通過單片機(jī)控制,使其能達(dá)到如下功能:在白天有光照強(qiáng)度強(qiáng)時(shí),聲控不起作用,光控功能處于關(guān)閉狀態(tài),路燈在有聲音信號(hào)的情況下也不亮;在晚上黑暗狀態(tài)時(shí),聲控系統(tǒng)起作用,當(dāng)有聲響的時(shí)候路燈點(diǎn)亮,延時(shí)一段時(shí)間自動(dòng)熄滅。 方案二通過方案一與方案二的比較分析,可以清楚看到,如果在白天陰雨天氣等光照強(qiáng)度很弱的情況下路燈也不會(huì)點(diǎn)亮,方案一因?yàn)槭怯?jì)時(shí)器功能實(shí)現(xiàn)白天燈不亮,設(shè)計(jì)不夠靈活,而方案二則很靈活地可以通過光敏電阻進(jìn)行調(diào)節(jié),思路清晰明確且簡潔易懂,故選擇方案二。P0口:P0口為一個(gè)8位漏級(jí)開路雙向I/O口,每腳可吸收8TTL門電流。P1口:P1口是一個(gè)內(nèi)部提供上拉電阻的8位雙向I/O口,P1口緩