【正文】
實(shí)現(xiàn)對電機(jī)轉(zhuǎn)速的測量。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 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 3 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 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 4 目 錄 摘 要 ...................................................... 1 Abstract .................................................... 2 1 序 言 .................................................... 4 2 系統(tǒng)功能分析 .............................................. 2 系統(tǒng)功能概述 ......................................... 2 系統(tǒng)要求及主要內(nèi)容 ................................... 3 3 系統(tǒng)總體設(shè)計 .............................................. 4 硬件電路設(shè)計思路 ..................................... 4 軟件設(shè)計思路 ......................................... 5 4 硬件電路設(shè)計 .............................................. 6 單片機(jī)模塊 ........................................... 6 處理執(zhí)行元件 ................................... 6 時鐘電路 ...................................... 10 復(fù)位電路 ...................................... 11 顯示電路 ...................................... 12 霍爾傳感器簡介 ...................................... 15 霍爾器件概述 .................................. 15 霍爾傳感器的應(yīng)用 .............................. 17 AH41 霍爾開關(guān) .................................. 17 5 軟件設(shè)計 ................................................. 22 單片機(jī)轉(zhuǎn)速程序設(shè)計思路及過程 ........................ 23 單片機(jī)程序設(shè)計思路 ............................ 23 單片機(jī)轉(zhuǎn)速計算程序 ............................ 24 二 十進(jìn)制轉(zhuǎn)換程序 ............................. 25 程序設(shè)計 ............................................ 28 6 系統(tǒng)調(diào)試 ................................................. 30 硬件調(diào)試 ............................................ 30 軟件調(diào)試 ............................................ 31 綜合調(diào)試 ............................................ 33 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 5 故障分析與解決方案 .................................. 34 結(jié)論與經(jīng)驗(yàn) .......................................... 35 參考文獻(xiàn) ................................................... 37 致 謝 ................................................... 38 總電路圖 ....................................................39 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 1 1 序 言 智能化轉(zhuǎn)速測量可以對電機(jī)的轉(zhuǎn)速進(jìn)行測量,電機(jī)在運(yùn)行的過程中,需要對其平穩(wěn)性進(jìn)行監(jiān)測,適時對轉(zhuǎn)速的測量有效地可以反映電機(jī)的狀況。 關(guān)鍵字 : MSC51(單片機(jī)); 轉(zhuǎn)速; 傳感器 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 2 Abstract 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。 本文重點(diǎn)是測量速度并顯示 在 5位 LED 數(shù)碼管上。 詳細(xì)介紹了 單片機(jī)的測量轉(zhuǎn)速系統(tǒng)及 PC機(jī)與單片機(jī)之間的串行通訊。本系統(tǒng)就是對電機(jī)轉(zhuǎn)速進(jìn)行測量,并可以和 PC 機(jī) 進(jìn)行 通信,顯示電機(jī)的轉(zhuǎn)速,并觀察電機(jī)運(yùn)行的 基本 狀況。 本文便是 運(yùn) 用 AT89C51 單片機(jī)控制的 智能化轉(zhuǎn)速測量儀。數(shù)字式通常采用光電編碼器,霍爾元件等為檢測元件,得到的信號是脈沖信號?;趩纹瑱C(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 1 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 作者: 張英林 指導(dǎo)老師:馬德貴 (安徽農(nóng)業(yè)大學(xué) 繼續(xù)教育 院 09級電子信息工程 合肥 ) 摘 要 在工程實(shí)踐中,經(jīng)常會遇到各種需要測量轉(zhuǎn)速的場合,測量轉(zhuǎn)速的方法分為模擬式和數(shù)字式兩種。模擬式采用測速發(fā)電機(jī)為檢測元件,得到的信號是模擬量。隨著微型計算機(jī)的廣泛應(yīng)用,特別是高性能價格比的 單片機(jī)的出現(xiàn),轉(zhuǎn)速測量普遍采用以單片機(jī)為核心的數(shù)字式測量方法 。電機(jī)在運(yùn)行過程中,需要對其進(jìn)行監(jiān)控,轉(zhuǎn)速是一個必不可少的一個參數(shù)。 本設(shè)計主要用 AT89C51 作為控制核心, 由霍爾傳感器、 LED 數(shù)碼顯 像管 、 HIN232CPE 電平轉(zhuǎn)換 、 及 RS232 構(gòu)成。 充分發(fā)揮了單片機(jī)的性能。 其優(yōu)點(diǎn)硬件 是 電路簡單,軟件功能完善, 測量速度快、精度高、 控制系統(tǒng)可靠,性價比較高等特點(diǎn) 。s widespread application, specially high performance price pared to monolithic integrated circuit39。 本系統(tǒng)主要由傳感器,單片機(jī) AT89C51 構(gòu)成。 單片機(jī)的英文名稱是 Micro Controller unit,縮寫為 MCU,又稱為微控制器,它是一種面向控制的大規(guī)模集成電路芯片。 本文首先在第二 章緒論介紹了此系統(tǒng)的功能、技術(shù)指標(biāo)以及主要內(nèi)容等 ;在第三 章論述了總體設(shè)計過程 ,確定了技術(shù)指標(biāo)及器件的選擇;第四章著重描述了系統(tǒng)硬件電路設(shè)計、硬件設(shè)計框圖及所使用的各種芯片功能與特性 ; 在第五 章 中重點(diǎn)剖析了軟件設(shè)計的過程;最后在第六 章中具體論述單片機(jī)、電平轉(zhuǎn)換電路、通信的處理及調(diào)試。在這里懇請指導(dǎo)老師和各位專家老師批評指正。 基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 2 2 系統(tǒng)功能分析 系統(tǒng)功能概述 功能: 系統(tǒng)主要實(shí)現(xiàn)功能是 :AT89C51 單片機(jī)接收霍爾 傳感器傳來的脈沖信號 ,單片機(jī)根據(jù)外部中斷 ,以及內(nèi)部定時器進(jìn)行記數(shù)計算出電機(jī)轉(zhuǎn)速送到LED 顯示,同時數(shù) 據(jù)傳給 PC 機(jī) ,并在 PC 機(jī)屏幕上顯示出來。 組成及框圖 : 本系統(tǒng)通信部分是單片機(jī)經(jīng)電平轉(zhuǎn)換電路 HIN232CP 之后,通過串口RS232 發(fā)送數(shù)據(jù),由 PC 微機(jī)接收,微機(jī)部分用 Visual Basic 軟件編寫的界面作為 PC 機(jī)部分與單片機(jī)進(jìn)行串口之間通信 。 圖 21 系統(tǒng)硬件電路 應(yīng)用 : 從實(shí)用的角度看,評價一個系統(tǒng)實(shí)用價值的重要標(biāo)準(zhǔn),就是這個系統(tǒng)對社會生活和科技觀念有多大的貢獻(xiàn)。 系統(tǒng)要求及主要內(nèi)容 將霍爾傳感器產(chǎn)生的脈沖信號輸出入到單片機(jī)的外部中斷 0 口,單片機(jī)工作在內(nèi)部定時器工作方式 0,對周期信號進(jìn)行內(nèi)部記數(shù),調(diào)用計算公式算出轉(zhuǎn)速,調(diào)用顯示程序顯示在 LED 上,同時通過串口向 上位機(jī)發(fā)送轉(zhuǎn)速 數(shù)據(jù)。 ( 4) PC 機(jī)部分主要完成將數(shù)據(jù)顯示在界面并描繪出 VT 圖 系統(tǒng)技術(shù)指標(biāo) 系統(tǒng)主要完成以下功能: 測量系統(tǒng): ; ; 5位 LED 上,精度為 %; ; 9 針 RS232 即可; 通信部分: Visual Basic 編制 RS— 232 通信軟件; ; ,用時間曲線表示; 根據(jù)系統(tǒng)要實(shí)現(xiàn)的功能以及要求,要實(shí)現(xiàn)單片機(jī)的轉(zhuǎn)速測量主要是各個模塊的設(shè)計,定時器記數(shù)功能、以及 LED 驅(qū)動、電平轉(zhuǎn)換及 PC 機(jī)之間基于單片機(jī) 的電機(jī)轉(zhuǎn)速測量系統(tǒng)設(shè)計 4 的通信。以它為系統(tǒng)核心的控制模塊可實(shí)現(xiàn)主從控制,完成預(yù)定的任務(wù)。 89C51單片機(jī)通過 INT0輸入傳感器的脈沖信號, P0口 P2口接 LED動態(tài)顯示。 轉(zhuǎn)速測量部分 的 硬件設(shè)計思路:本次設(shè)計單片機(jī) 部分的硬件框圖如 圖 2- 1所示。 復(fù)位電路