【正文】
s a wide range of application in society. The project use photoconductive resistance as a sensor of light intensity, the tolerance of the photoconductive resistance changes when the light intensity changes(the incident light strong, resistance decreased。 編 號(hào): 審定成績: 重慶郵電大學(xué) 畢業(yè)設(shè)計(jì)(論文) 設(shè)計(jì)(論文)題目: 基于單片機(jī)的光照度傳感器設(shè)計(jì) 學(xué) 院 名 稱 : 通信與信息工程學(xué)院 學(xué) 生 姓 名 : 專 業(yè) : 通信工程 班 級(jí) : 學(xué) 號(hào) : 指 導(dǎo) 教 師 : *** 答辯組 負(fù)責(zé)人 : 填表時(shí)間: 年 月 重慶郵電大學(xué)教務(wù)處制重慶郵電大學(xué)本科 畢業(yè)設(shè)計(jì)(論文) I 摘 要 在科學(xué)技術(shù) 迅猛發(fā)展的現(xiàn)代 ,作為 信息獲得的一種重要途徑 —— 傳感器技術(shù)得到廣泛的應(yīng)用,其在各個(gè)行業(yè)中發(fā)揮著不可替代的作用,同時(shí)對傳感器的要求與要求顯著提高。本設(shè)計(jì)電路結(jié)構(gòu)簡單,成本相對較低,通過對光敏電阻阻值的變化的運(yùn)算處理,從而檢測不同的光照強(qiáng)度,實(shí)用性較強(qiáng)。人類的直接感觀是沒有辦法取得這類信息的,如果 沒有相應(yīng)的傳感器 技術(shù),那么對于此領(lǐng)域的研究將不再可能。顧名思義,靜態(tài)特性是指傳感器的輸入與時(shí)間無關(guān),即指傳感器的輸入輸出量是在被測量量處于穩(wěn)定狀態(tài)下進(jìn)行的。 3 第二節(jié) 光敏傳感器 一、 光照強(qiáng)度相關(guān)知識(shí) 光照強(qiáng)度 :是 指光照的強(qiáng)弱 ,它 以單位面積上所 能 接受可見光的能量來量度。 圖 光敏電阻符號(hào) 在無光的情況下,光敏電阻的阻值很高一般在 1 MΩ以上;有光線射入時(shí),當(dāng)光子能量大于其半導(dǎo)體材料的導(dǎo)通能量,則半導(dǎo)體材料中的電子吸收一個(gè)光子的能量便成為導(dǎo)體,光照強(qiáng)度越大,則進(jìn)入的光子的數(shù)量越多,于是半導(dǎo)體中的電子變?yōu)榭蓪?dǎo) 4 體的數(shù)量就越多,導(dǎo)電能力就越好,即光敏電阻的阻值就越小。其作用是把外來送入的光源轉(zhuǎn)換電信號(hào),從而用這種信號(hào)去控制所需要的電器設(shè)備。 由此可見,傳感器的發(fā)展主要朝著以下幾個(gè)方向進(jìn)行: 高精度 傳感器的精度直接影響著測控的精度,因此要提高測控精度,必須先提高傳感器的精度。 傳感器的研究與發(fā)展已成為各個(gè)行業(yè)發(fā)展前進(jìn)的先驅(qū)動(dòng)力學(xué)科,各國對其重視程度日益增加 。而常用的光控電路使用的光敏器件電路為主要的光控電路部分。 8 AT89C51 具有 4K 字節(jié)的 Flash 閃存以及 128 字節(jié)的 RAM, 32 個(gè) I/O 口線,兩個(gè)16 位定時(shí) /計(jì)數(shù)器, 兩級(jí)中斷結(jié)構(gòu), 一個(gè)全雙工串行通信口,片內(nèi)振蕩器及時(shí)鐘電路等主要結(jié)構(gòu) 構(gòu)成 。 它具有高速度,高效率和高精確度等特點(diǎn)。 UR E F ui d2 d1 d0 R /2 R R R R R R CP 電壓比較器 FF7 FF6 FF5 FF4 FF3 FF2 FF1 寄存器 編碼器 15U13REF 15U11REF 15U9REF 15U7REF 15U5REF 15U3REF 15U1REF 12 并行比較型 A/D 轉(zhuǎn)換器有如下特點(diǎn): 優(yōu)點(diǎn):轉(zhuǎn)換速度很快,故又稱高速 A/D 轉(zhuǎn)換器。逐次逼近型 A/D 轉(zhuǎn)換器 的工原理如 圖 所示 : 圖 逐次逼近型 A/D 轉(zhuǎn)換器 工原理 第二節(jié) ADC0832 芯片簡介 ADC0832 芯片 具有以下特點(diǎn): 8 位分辨率; 雙通道 A/D 轉(zhuǎn)換; 輸入輸出電平 和 TTL/CMOS 具有較好的兼容性 ; 一般功耗僅為 15mW; 8P、 14P— DIP(雙列直插)、 PICC 多種封裝; 取樣 — 保持 n 位 D A C 控制邏輯 + + C 時(shí)鐘源 Q n 1 Q n 2 Q n 3 … Q 2 Q 1 Q 0 逐位逼近寄存器 ( S A R ) 輸出寄存器 轉(zhuǎn)換控 制信號(hào) 模擬輸入 u 1 u 1 ’ 偏移電壓 u 0 ’ u 0 - Δ /2 U RE F 比較器 U C CP U S d n 1 ( M S B ) d n 2 … n 位并行 d 2 數(shù)字輸出 d 1 d 0 (L SB ) 13 芯片頂視圖如圖 : 圖 ADC0832芯片頂視圖 芯片接口說明: CS_ 片選信號(hào),低電平有效 。 ADC0832 與單片機(jī)的接口電路如圖 : 14 圖 ADC0832接口電路 單片機(jī)對 ADC0832 的控制原理: 一般情況下, ADC0832通過四條數(shù)據(jù)線與單片機(jī)相聯(lián),如上圖所示,由于 DO與 DI不同進(jìn)與單片機(jī)進(jìn)行通信,固可接到同一管腳上。由于微機(jī)電路 都是時(shí)序數(shù)字電路,因此需要穩(wěn)定的時(shí)鐘信號(hào), 在電源上電時(shí), 在 只有當(dāng) VCC 超過 且 低于 ,以及晶振穩(wěn)定工作的情況下 ,復(fù)位信號(hào)才 會(huì) 被撤除,微機(jī)電路 才能 開始正常工作。 上電復(fù)位 由于單片機(jī) RST 端的內(nèi)部有一個(gè)下拉電阻,從而可以選用此下拉電阻實(shí)現(xiàn)復(fù)位功能,此時(shí)可以去掉外接電阻,外接電容為 10PF 左右。按鍵復(fù)位 的 電路 圖 如圖 41 所示: 圖 復(fù)位電路圖 第二節(jié) 時(shí)鐘電路模塊設(shè)計(jì) 一、 時(shí)鐘電路介紹 時(shí)鐘電路的作用是 產(chǎn)生 MCS51 單片機(jī) 在工作時(shí)所必需 的時(shí)鐘控制信號(hào),單片機(jī)的內(nèi)部電路 必須要 在時(shí)鐘信號(hào)的控制下, 才能 嚴(yán)格的執(zhí)行 相關(guān) 指令進(jìn)行 正常 工作。為了減少寄生電容,晶振和電容在安裝時(shí)應(yīng)盡量靠近單片機(jī)。相應(yīng)電路 如 圖 所示: 21 圖 A/D 轉(zhuǎn)換電路 A/D 轉(zhuǎn)換模塊相關(guān)程序設(shè)計(jì)如下 : uchar Get_AD_Result() { uchar i,dat1=0,dat2=0。 _nop_()。 //第二個(gè)下降延之前,設(shè) DI= 0/1,選擇 CH0/CH1 CLK=0。 //第三個(gè)下降延之前,設(shè) DI= 1; CLK=0。 _nop_()。 CLK=1。 return(dat1==dat2) ? dat1:0。0x80)。 _nop_()。 //LCD 忙狀態(tài)檢測 RS=1。 } /******************LCD 初始化 **********************/ void LCD_Initialise() { LCD_Write_Command(0x38)。 } 25 第五章 硬件仿真實(shí)驗(yàn) 為了驗(yàn)證本設(shè)計(jì)的合理性與有效性,運(yùn)用 PROTRES 軟件對其進(jìn)行硬件仿真,仿真電路圖設(shè)計(jì)如圖 所示: 圖 仿真電路圖 運(yùn)行仿真電路,觀察電壓表示數(shù)與 LCD1602 液晶顯示的示數(shù)是否一致。首先我要感謝我的導(dǎo)師郭曉金老師,他在我完成論文的過程中,給予了我很大的幫助。 process three parts, namely sensor technology, munication, puter technology. Because of ultra large scale integrated circuit’s rapid development after having been developed, Modern puter technology and munication, not only requests sensor precision, reliability, speed of response and gain information content request more and more high, but also requests its cost to be inexpensive. The obvious traditional sensor is eliminated gradually because of the function, the characteristic, the volume, the cost and so on. As world develop many countries are speeding up to the sensor new technology’s research and the development, and all has obtained the enormous breakthrough. Now the sensor new technology development, mainly has following several aspects: Firstly, discovering and using Using the physical phenomenon, the chemical reaction, and the biological effect as the sensor principle therefore the researches, which discovered the new phenomenon and the new effect, are the sensor technological improving ways. It is important studies to develop new sensors the foundation. Japanese Sharp Corporation uses the superconductivity technology to develop successfully the high temperature 30 superconductivity magic sensor and get the sensor technology significant breakthrough. Its sensitivity is so high and only inferior in the superconductivity quantum interference ponent. Its manufacture craft is far simpler than the superconductivity quantum interference ponent. May use in magism image formation technology. So it has the widespread promoted value. Using the immune body and the antigen meets one another pound when the electrode surface. It can cause the electrode potential change and use this phenomenon to be possible to generate the immunity sensor. The immunity sensor makes with this kind of immune body may to some anism in whether has this kind of anti original work inspection. Like may inspect somebody with the hepatitis virus immune body whether contracts the hepatitis, plays to is fast, the accurate role. The US UC sixth branch has developed this kind of sensor. Secondly, using the new material The