国产精品婷婷久久久久久,国产精品美女久久久浪潮av,草草国产,人妻精品久久无码专区精东影业

基于單片機的錐管螺紋參數(shù)測量系統(tǒng)的開發(fā)與設計.doc

約63頁DOC格式手機打開展開

基于單片機的錐管螺紋參數(shù)測量系統(tǒng)的開發(fā)與設計,摘 要螺紋連接作為石油油管的常見連接方式,因此在采油作業(yè)中螺紋連接效果至關重要。本文選取資源豐富的c8051f005單片機,以該單片機為系統(tǒng)核心,提出了一種新的、基于單片機的錐管螺紋幾何參數(shù)自動測量方法。其具體過程為:通過光柵和編碼器兩種傳感方式測量螺紋垂直和水平兩個方向的數(shù)...
編號:99-157175大小:5.63M
分類: 論文>通信/電子論文

內容介紹

此文檔由會員 yanglin224 發(fā)布

基于單片機的錐管螺紋參數(shù)測量系統(tǒng)的開發(fā)與設計

摘 要
螺紋連接作為石油油管的常見連接方式,因此在采油作業(yè)中螺紋連接效果至關重要。本文選取資源豐富的C8051F005單片機,以該單片機為系統(tǒng)核心,提出了一種新的、基于單片機的錐管螺紋幾何參數(shù)自動測量方法。其具體過程為:通過光柵和編碼器兩種傳感方式測量螺紋垂直和水平兩個方向的數(shù)據(jù),并將數(shù)據(jù)傳輸?shù)絇C機,然后用PC機處理數(shù)據(jù)信息來獲得被測錐管螺紋的相關幾何參數(shù)。論文主要包括機械結構、硬件電路和軟件程序三個方面的內容。 
機械結構部分:機械結構部分是系統(tǒng)正常運動的基礎。本系統(tǒng)機械結構部分使用步進電機為系統(tǒng)動力來源,采用電機帶動絲桿轉動,絲桿帶動其上的螺母左右移動來實現(xiàn)螺紋測量。
硬件電路部分:主要包括單片機最小系統(tǒng),電源模塊的設計;光柵信號的細分辨向處理以及對細分后得到的數(shù)據(jù)進行采集與存儲, 編碼器信號的辨相及對數(shù)據(jù)的采集與存儲;液晶電路用于測量數(shù)據(jù)的顯示;步進電機控制電路完成對步進電機起停以及轉向的控制;單片機和PC機數(shù)據(jù)的串口通信部分,實現(xiàn)把采集來的數(shù)據(jù)通過串口送入PC機進行保存、處理。
單片機軟件程序的設計:本課題采用C語言,使用目前流行的keil開發(fā)環(huán)境,基于模塊化、便于調試的原則編寫了單片機軟件程序。
    PC機軟件部分的設計。由于Visual C++功能強大、應用靈活,選用Visual C++作為系統(tǒng)編程軟件;PC機程序部分包括串口通信,數(shù)據(jù)實時顯示,系統(tǒng)運動控制,被測件輪廓曲線顯示,數(shù)據(jù)保存、讀取、處理及顯示等五大模塊。
通過實驗驗證,該系統(tǒng)功能完善、智能性高,能達到多種領域的測量要求,具有很好的應用價值。
關鍵詞:螺紋;C8051F005;Visual C++;步進電機控制
   
 
DEVELOPMENT OF MEASURING CONICAL SCREW THREAD PARAMETER BASED ON MICROCONTROLLER
Abstract
Tube use screw thread to connect more to entirety. So it is important to examine the screw thread for normal oil production. This paper introduces an instrument for auto-measuring parameters of screw thread. This use C8051F005 microcontroller as the core of the system, grating sensor and rotary encode sensor, to get level data and vertical data, then send the data to PC, finally, calculation and treatment. This paper includes the following content:
Design of mechanical of system: mechanical is the base of moving of system, stepper motor is used to provide power, stepper motor drive screw rotation, screw drive screw nut move around, then the system can measure.
Design of hardware circuit of system: mainly include minimum system of microcontroller, design of power, the subdivision and sensing treatment of the grating signals, as well as collection and storage of grating data. The distinguish direction of rotary encode sensor, the part of LCD is used to display the data. electrical machine control circuit finished the controlling of the start, stop and direction of motor, serial connecting circuit is used to communicate with the PC.
Design of software of MCU: C Language Programming is used in this paper, use the pop compile environment keil, module principle is adopted in program.
Design of software of PC: on considering several interface programming software, because of the power, application flexibility of Visual C++, it is used. This part mainly includes serial connecting program, displaying of data, controlling of motor, saving and reading of data, displaying of curve and result.
It is proved that the design has the characteristic of featured and high intelligence, It has a very good application.
Key words: Screw thread, C8051F005, C++, Stepper Motor Control

 
目  錄
1 緒論 1
1.1 課題的研究背景 1
1.2螺紋傳統(tǒng)的測量方法 1
1.3螺紋測量的研究現(xiàn)狀 3
1.3.1國外研究現(xiàn)狀 3
1.3.2國內研究現(xiàn)狀 3
1.3.3發(fā)展趨勢 4
1.4本課題的研究內容及研究意義 4
2 系統(tǒng)總體方案的研究與設計 6
2.1 系統(tǒng)總體設計思路 6
2.2 系統(tǒng)機械原理圖 7
2.3 系統(tǒng)硬件和軟件總體方案設計 9
2.3.1 系統(tǒng)總體硬件設計 9
2.3.2 系統(tǒng)總體軟件設計 10
2.4 本章小結 12
3系統(tǒng)硬件電路研究與設計開發(fā) 13
3.1單片機及最小系統(tǒng)電路 13
3.1.1 C8051F005單片機介紹 13
3.1.2單片機外圍電路 14
3.1.3電源及電源管理模塊 14
3.1.4 系統(tǒng)時鐘電路 15
3.1.5 JTAG接口電路 16
3.2光柵信號采集處理電路 16
3.2.1光柵傳感器的工作原理 16
3.2.2光柵傳感器的技術參數(shù) 18
3.2.3 光柵傳感器數(shù)據(jù)的處理 19
3.3編碼器信號采集處理電路 20
3.3.1 編碼器 20
3.3.2編碼器數(shù)據(jù)的處理 21
3.4 LCD顯示部分電路 21
3.5 USB轉UART橋接通信電路 23
3.5.1 USB通訊技術 23
3.5.2 CP2102芯片簡介 23
3.6 數(shù)據(jù)存儲電路 24
3.6.1 I2C串行通訊技術 24
3.6.2存儲器接口電路 25
3.7 步進電機驅動電路 25
3.8 本章小結 27
4系統(tǒng)軟件設計 28
4.1 下位機軟件設計 28
4.1.1 Keil簡介 28
4.1.2主程序設計 29
4.1.3 LCD顯示程序 29
4.1.4 數(shù)據(jù)采集函數(shù) 32
4.1.5 串口通信程序 32
4.1.6 數(shù)據(jù)存取程序設計 34
4.1.7 步進電機控制程序 35
4.2上位機軟件設計 36
4.2.1面向對象編程 36
4.2.2 上位機界面設計 37
4.2.3 串口通信模塊 38
4.2.4電機運動控制模塊 41
4.2.5數(shù)據(jù)實時顯示及繪圖模塊 41
4.2.6 采樣數(shù)據(jù)的保存與讀取 42
4.3 本章小結 43
5 系統(tǒng)調試及實驗驗證 44
5.1 系統(tǒng)硬件調試 44
5.1.1 上電前檢查 44
5.1.2 電源電路調試 44
5.1.3 單片機最小系統(tǒng)調試 45
5.1.4 單片機外圍電路調試 45
5.2系統(tǒng)驗證 46
5.2.1螺紋幾何參數(shù)的測量 46
5.2.2實驗驗證 47
5.3本章小結 49
6 總結與展望 50
致謝 51
參考文獻 52
附錄A 55
附錄B 58