【正文】
基于單片機(jī)的電機(jī)轉(zhuǎn)速測(cè)量系統(tǒng)設(shè)計(jì)(答辯版)完整畢業(yè)設(shè)計(jì)論文附圖及源程序河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 1摘 要 在工程實(shí)踐中,經(jīng)常會(huì)遇到各種需要測(cè)量轉(zhuǎn)速的場(chǎng)合,測(cè)量轉(zhuǎn)速的方法分為模擬式和數(shù)字式兩種。模擬式采用測(cè)速發(fā)電機(jī)為檢測(cè)元件,得到的信號(hào)是模擬量。數(shù)字式通常采用光電編碼器,霍爾元件等為檢測(cè)元件,得到的信號(hào)是脈沖信號(hào)。隨著微型計(jì)算機(jī)的廣泛應(yīng)用,特別是高性能價(jià)格比的單片機(jī)的出現(xiàn),轉(zhuǎn)速測(cè)量普遍采用以單片機(jī)為核心的數(shù)字式測(cè)量方法。 本文便是運(yùn)用AT89C51單片機(jī)控制的智能化轉(zhuǎn)速測(cè)量?jī)x。電機(jī)在運(yùn)行過程中,需要對(duì)其進(jìn)行監(jiān)控,轉(zhuǎn)速是一個(gè)必不可少的一個(gè)參數(shù)。本系統(tǒng)就是對(duì)電機(jī)轉(zhuǎn)速進(jìn)行測(cè)量,并可以和PC機(jī)進(jìn)行通信,顯示電機(jī)的轉(zhuǎn)速,并觀察電機(jī)運(yùn)行的基本狀況。 本設(shè)計(jì)主要用AT89C51作為控制核心,由霍爾傳感器、LED數(shù)碼顯像管、HIN232CPE電平轉(zhuǎn)換、及RS232構(gòu)成。詳細(xì)介紹了單片機(jī)的測(cè)量轉(zhuǎn)速系統(tǒng)及PC機(jī)與單片機(jī)之間的串行通訊。充分發(fā)揮了單片機(jī)的性能。本文重點(diǎn)是測(cè)量速度并顯示在5位LED數(shù)碼管上。 其優(yōu)點(diǎn)硬件是電路簡(jiǎn)單,軟件功能完善,測(cè)量速度快、精度高、控制系統(tǒng)可靠,性價(jià)比較高等特點(diǎn)。 關(guān)鍵字:MSC51(單片機(jī)); 轉(zhuǎn)速; 傳感器 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 2Abstract In the project practice, we will meet each kind to need frequently to survey the rotational speed the situation, the survey rotational speed method divides into the simulation type and the digital two kinds. The simulation type uses measured that the fast generator is the detecting element, obtains the signal simulates the quantity. Digital usually uses the electrooptical encoder, the Hall part and so on is the detecting element, obtains the signal is the signal impulse. Along with microputer39。s widespread application, specially high performance price pared to monolithic integrated circuit39。s appearance, the tachometric survey uses generally take the monolithic integrated circuit as the core digital measuring technique I graduated from the Design of the issue is control of the intelligent use of SCM speed measuring instrument. The system is the motor speed measurement, and PC and can municate that the motor speed, and to observe the motor running the basic situation. The main design AT89C51 control as the core, by the Hall sensor, LED digital CRT, HIN232CPElevel conversion, and a RS232. Detailed measurements of the speed of the SCM system and PC and the serial munication between the microcontroller. Give full play to the performance of the SCM. This paper is to measure the speed and displayed in five LED digital pipe. The advantage of a simple hardware and software capabilities improve, measuring speed, high precision and control system reliable, costeffective and so on. Keyword::::MSC51(Onechip puter);;;; sensor;;;; Tachometer 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 3目 錄 摘 要 ...................................................... 1 Abstract .................................................... 2 1 序 言 .................................................... 1 2 系統(tǒng)功能分析 .............................................. 2 系統(tǒng)功能概述 ........................................ 2 系統(tǒng)要求及主要內(nèi)容 .................................. 3 3 系統(tǒng)總體設(shè)計(jì) .............................................. 4 硬件電路設(shè)計(jì)思路 .................................... 4 軟件設(shè)計(jì)思路 ........................................ 4 4 硬件電路設(shè)計(jì) .............................................. 6 單片機(jī)模塊 .......................................... 6 處理執(zhí)行元件 ................................... 6 時(shí)鐘電路 ...................................... 10 復(fù)位電路 ...................................... 11 顯示電路 ...................................... 12 霍爾傳感器簡(jiǎn)介 ..................................... 15 霍爾器件概述 .................................. 15 霍爾傳感器的應(yīng)用 .............................. 16 AH41霍爾開關(guān) ................................. 17 發(fā)送模塊 ........................................... 18 5 軟件設(shè)計(jì) ................................................. 22 單片機(jī)轉(zhuǎn)速程序設(shè)計(jì)思路及過程 ....................... 22 單片機(jī)程序設(shè)計(jì)思路 ............................ 22 單片機(jī)轉(zhuǎn)速計(jì)算程序 ............................ 23 二十進(jìn)制轉(zhuǎn)換程序 ............................. 24 程序設(shè)計(jì) ........................................... 27 6 系統(tǒng)調(diào)試 ................................................. 29 硬件調(diào)試 ........................................... 29 軟件調(diào)試 ........................................... 30 綜合調(diào)試 ........................................... 32 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 故障分析與解決方案 ................................. 33 結(jié)論與經(jīng)驗(yàn) ......................................... 34 參考文獻(xiàn) ................................................... 36 致 謝 ................................................... 37 附 錄 ................................................... 38 附錄1 電路原理圖 ....................................... 38 附錄2 元器件清單 ....................................... 39 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 11 序 言 智能化轉(zhuǎn)速測(cè)量可以對(duì)電機(jī)的轉(zhuǎn)速進(jìn)行測(cè)量,電機(jī)在運(yùn)行的過程中,需要對(duì)其平穩(wěn)性進(jìn)行監(jiān)測(cè),適時(shí)對(duì)轉(zhuǎn)速的測(cè)量有效地可以反映電機(jī)的狀況。 本系統(tǒng)主要由傳感器,單片機(jī)AT89C51構(gòu)成??梢詫?duì)大范圍轉(zhuǎn)速進(jìn)行測(cè)量,測(cè)量的轉(zhuǎn)速精度高,還可以和PC機(jī)時(shí)時(shí)通信,實(shí)現(xiàn)對(duì)電機(jī)轉(zhuǎn)速的測(cè)量。 單片機(jī)的英文名稱是Micro Controller unit,縮寫為MCU,又稱為微控制器,它是一種面向控制的大規(guī)模集成電路芯片。它具有功能強(qiáng)、體積小、可靠性高、應(yīng)用簡(jiǎn)單靈活,因而使用非常廣泛,有力地推動(dòng)各行業(yè)的技術(shù)發(fā)展和更新?lián)Q代。 本文首先在第二章緒論介紹了此系統(tǒng)的功能、技術(shù)指標(biāo)以及主要內(nèi)容等;在第三章論述了總體設(shè)計(jì)過程,確定了技術(shù)指標(biāo)及器件的選擇;第四章著重描述了系統(tǒng)硬件電路設(shè)計(jì)、硬件設(shè)計(jì)框圖及所使用的各種芯片功能與特性;在第五章中重點(diǎn)剖析了軟件設(shè)計(jì)的過程;最后在第六章中具體論述單片機(jī)、電平轉(zhuǎn)換電路、通信的處理及調(diào)試。 由于本人水平有限,加之時(shí)間倉促,論文中難免會(huì)有錯(cuò)誤和不足之外,不夠理想、許多方面還需要繼續(xù)完善和改進(jìn)。在這里懇請(qǐng)指導(dǎo)老師和各位專家老師批評(píng)指正。在此特別感謝我的指導(dǎo)老師郭順京老師的大力指導(dǎo)。 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 22 系統(tǒng)功能分析 系統(tǒng)功能概述 功能: 系統(tǒng)主要實(shí)現(xiàn)功能是:AT89C51單片機(jī)接收霍爾傳感器傳來的脈沖信號(hào),單片機(jī)根據(jù)外部中斷,以及內(nèi)部定時(shí)器進(jìn)行記數(shù)計(jì)算出電機(jī)轉(zhuǎn)速送到LED顯示,同時(shí)數(shù)據(jù)傳給PC機(jī),并在PC機(jī)屏幕上顯示出來。記錄各時(shí)段的轉(zhuǎn)速,畫出VT坐標(biāo)圖。 組成及框圖: 本系統(tǒng)通信部分是單片機(jī)經(jīng)電平轉(zhuǎn)換電路HIN232CP之后,通過串口RS232發(fā)送數(shù)據(jù),由PC微機(jī)接收,微機(jī)部分用Visual Basic軟件編寫的界面作為PC機(jī)部分與單片機(jī)進(jìn)行串口之間通信。 傳感器電路、轉(zhuǎn)速測(cè)量、LED顯示、電平轉(zhuǎn)換電路設(shè)計(jì)等將在以下章節(jié)作詳細(xì)地設(shè)計(jì)。 圖21 系統(tǒng)硬件電路 應(yīng)用: 從實(shí)用的角度看,評(píng)價(jià)一個(gè)系統(tǒng)實(shí)用價(jià)值的重要標(biāo)準(zhǔn),就是這個(gè)系統(tǒng)對(duì)社會(huì)生活和科技觀念有多大的貢獻(xiàn)。轉(zhuǎn)速測(cè)量系統(tǒng)具有大范圍、高精度等優(yōu)點(diǎn)、測(cè)量速度快,這種系統(tǒng)將會(huì)有良好的應(yīng)用。 傳感器 單 片 機(jī) AT89C51 電 平 轉(zhuǎn) 換 電 路 LED顯示 驅(qū)動(dòng)電路 送PC機(jī)界面 河南理工大學(xué)畢業(yè)設(shè)計(jì)(論文)說明書 系統(tǒng)要求及主要內(nèi)容 將霍爾傳感器產(chǎn)生的脈沖信號(hào)輸出入到單片機(jī)的外