【正文】
. . . .. . 摘 要本論文介紹了一種基于AT89C51單片機(jī)平臺(tái),采用光電傳感器進(jìn)行電機(jī)轉(zhuǎn)速測(cè)量的方法,介紹了該測(cè)速法的基本原理、實(shí)現(xiàn)步驟和軟硬件設(shè)計(jì)。為了設(shè)計(jì)簡(jiǎn)單可靠的直流電機(jī)測(cè)速裝置,提出了基于單片機(jī)為核心的電機(jī)轉(zhuǎn)速測(cè)量系統(tǒng)。整個(gè)系統(tǒng)的構(gòu)架包括轉(zhuǎn)速信號(hào)的采集,光電轉(zhuǎn)換及信號(hào)處理電路設(shè)計(jì),整形驅(qū)動(dòng)電路設(shè)計(jì),復(fù)位電路設(shè)計(jì),晶振電路設(shè)計(jì),LED顯示電路設(shè)計(jì)。整形放大電路主要是將傳感器輸出的不穩(wěn)定的電信號(hào)轉(zhuǎn)化成脈沖信號(hào)。 轉(zhuǎn)速的計(jì)算利用單片機(jī)AT89C51 的定時(shí)器和計(jì)數(shù)器。根據(jù)系統(tǒng)編寫(xiě)源程序,并通過(guò)運(yùn)行試驗(yàn)證明。該系統(tǒng)結(jié)構(gòu)簡(jiǎn)單,測(cè)量結(jié)果穩(wěn)定可靠,滿足電機(jī)的測(cè)速要求。 關(guān)鍵詞:轉(zhuǎn)速測(cè)量;單片機(jī);光電傳感器;電機(jī) Abstract This paper introduces a platform based on AT89C51, adopt the method of photoelectric sensor to implement motor speed measurement, introduces the basic principle of the speed measuring method, implementation steps and the hardware and software design. In order to design a simple and reliable device for dc motor speed estimation, motor speed measurement system based on single chip microputer as the core is put forward. The architecture of the whole system including the speed signal acquisition, rotation speed signal processing, speed calculation and display. Plastic amplifying circuit is mainly the sensor output with outside noise of the unstable signal into pulse signal。 Rotational speed of the calculation of AT89C51 singlechip timer and counter. Write the source program according to the system, and by running the experiment proved that the system has simple structure, stable and reliable measurement results, satisfy the requirement of the motor speed.Keywords:Speed measurement。 Single chip microputer。 Photoelectric sensor。 The motor 學(xué)習(xí)好幫手. . . .. .目 錄1 概述 1 1 本設(shè)計(jì)課題的目的和意義 12 轉(zhuǎn)速測(cè)量系統(tǒng)的原理與方法 2 2 23 系統(tǒng)方案提出和論證 4 4 44 系統(tǒng)硬件設(shè)計(jì) 5 轉(zhuǎn)速信號(hào)采集 6 7 8 8 最小系統(tǒng)的設(shè)計(jì) 10 10 晶振電路設(shè)計(jì) 12 135 系統(tǒng)軟件設(shè)計(jì) 15 主程序初始化 15 15 16 總 結(jié) 20 參考文獻(xiàn) 21 致 謝 221 概述 目前國(guó)內(nèi)外測(cè)量電機(jī)轉(zhuǎn)速的方法很多,按照不同的理論方法,先后產(chǎn)生過(guò)模擬測(cè)速法(如離心式轉(zhuǎn)速表、用電機(jī)轉(zhuǎn)矩或者電機(jī)電樞電動(dòng)勢(shì)計(jì)算所得)、同步測(cè)速法(如機(jī)械式或閃光式頻閃測(cè)速儀)以及計(jì)數(shù)測(cè)速法。計(jì)數(shù)測(cè)速法又可分為機(jī)械式定時(shí)計(jì)數(shù)法和電子式定時(shí)計(jì)數(shù)法。傳統(tǒng)的電機(jī)轉(zhuǎn)速檢測(cè)多采用測(cè)速發(fā)電機(jī)或光電數(shù)字脈沖編碼器,也有采用電磁式(利用電磁感應(yīng)原理或可變磁阻的霍爾元件等)、電容式(對(duì)高頻振蕩進(jìn)行幅值調(diào)制或頻率調(diào)制)等,數(shù)字化測(cè)速法具有測(cè)速精度高,分辨能力強(qiáng),受器件影響小的優(yōu)點(diǎn),被廣泛應(yīng)用于調(diào)速要求高,調(diào)速范圍大的調(diào)速系統(tǒng)。其中應(yīng)用最廣的是光電式測(cè)速系統(tǒng),它具有低慣性、低噪聲、高分辨率和高精度的優(yōu)點(diǎn),使得光電傳感器在檢測(cè)和控制領(lǐng)域得到了廣泛的應(yīng)用。而光電傳感器的電機(jī)轉(zhuǎn)速測(cè)量系統(tǒng)則有準(zhǔn)確度高、采樣速度快、測(cè)量范圍寬和測(cè)量精度與被測(cè)轉(zhuǎn)速無(wú)關(guān)等優(yōu)點(diǎn),具有廣闊的應(yīng)用前景。 本設(shè)計(jì)課題的目的和意義 在工程實(shí)踐中,經(jīng)常會(huì)遇到各種需要測(cè)量轉(zhuǎn)速的場(chǎng)合,例如在發(fā)動(dòng)機(jī)、電動(dòng)機(jī)、卷?yè)P(yáng)機(jī)、機(jī)床主軸等旋轉(zhuǎn)設(shè)備的試驗(yàn)、運(yùn)轉(zhuǎn)和控制中,常需要分時(shí)或連續(xù)測(cè)量和顯示其轉(zhuǎn)速及瞬時(shí)轉(zhuǎn)速。要測(cè)速,首先要解決是采樣問(wèn)題。在使用模技術(shù)制作測(cè)速表時(shí),常用測(cè)速發(fā)電機(jī)的方法,即將測(cè)速發(fā)電機(jī)的轉(zhuǎn)軸與待測(cè)軸相連,測(cè)速發(fā)電機(jī)的電壓高低反映了轉(zhuǎn)速的高低。為了能精確地測(cè)量轉(zhuǎn)速外,還要保證測(cè)量的實(shí)時(shí)性,要求能測(cè)得瞬時(shí)轉(zhuǎn)速方法。因此轉(zhuǎn)速的測(cè)試具有重要的意義【1】。 論文設(shè)計(jì)以單片機(jī)為中心,設(shè)計(jì)出全數(shù)字化測(cè)量轉(zhuǎn)速系統(tǒng),采用單片機(jī)構(gòu)成控制系統(tǒng),可以節(jié)