【正文】
基于攝像頭循跡的四旋翼飛行器設計 I 摘 要 本 系統(tǒng)設計 并制作 一 架基于攝像頭 循跡 四旋翼自主飛行器 , 其所需循跡的道路是白底的黑色引導線。 本 系統(tǒng) 采用模塊結構 化 設計的方法, 包括飛行控制 模塊、 驅動 模塊、電源 模塊 、 循跡 飛行、 高度檢測系統(tǒng)等 , 以 Freescale Kinites60 單片機 為數(shù)據(jù)處理 控制中心 , 將各個模塊 有效配合 形成整體。 其中飛行控制模塊以 STM32F407 為控制核心,用來 調整 四旋翼 自主飛行器的飛行姿態(tài);而 循跡模塊以 Freescale Kinites60 為核心控制器, 處理 攝像頭 OV7725 采集 的圖像信息 后 , 把路徑信息反饋給飛行控制模塊, 使 飛行器能夠按照 給 定的黑色引導線 循跡 飛行 ; 超聲波模塊 獲取 飛行器離地高度 信息 , 并將 信息 傳遞 給 飛行控制模塊 ,從而 調整飛行姿態(tài) , 實現(xiàn) 設計 要求。 循跡 模塊和超聲波模塊 與飛 行控制 模塊 通過串口 保持即時通信, 飛 行控制 模塊 根據(jù)實時 反饋的信息, 控制 電調驅動四個 無刷 電機完成自主 穩(wěn)定 飛行。 關鍵詞 :四旋翼 自主飛行器 ,單片機, 攝像頭 循跡, 超聲 波 ,無刷電機 基于攝像頭循跡的四旋翼飛行器設計 II ABSTRACT The system intended to design and make a four rotor autonomous vehicle, and the intelligent model tracked its way by camera. At the same time, the tracking way had a black line on the white background. The project adopted the measure of modular structural design, including flight controlling module, driving module, power module, flight tracking and height detection system and so on. The design took Freescale Kinites60 MCU as data processing and controlling central, and the single ship effectively integrated various modules into a whole,of which the flight module put the STM32F407 as controlling core, in order to adjust autonomous vehicle’s flying attitude. However the flight tracking module took Freescale Kinites60 as core controller, which dealt with the image information collected by camera, then feedback path information to flight controlling module so that the four rotor autonomous vehicle could fly according to the black guiding line. The ultrasonic module got the information of the aircraft altitude and transformed the message to flight controlling module as to adjust flying attitude and met the design requirement. The tracking module, ultrasonic module and flight control module should maintain instant munication through the serial port, then the flight controlling module controlled ESC to drive four brushless motor and pleted autonomous stable flight by the realtime feedback information. Key words: four rotor autonomous vehicle, MCU, camera tracking, ultrasonic module, brushless motor 基于攝像頭循跡的四旋翼飛行器設計 III 目 錄 1 概論 .......................................................................................................................... 1 選題背景 .......................................................................................................... 1 國內外飛行器的研究現(xiàn)狀 .............................................................................. 1 四旋翼飛行器的主要生產(chǎn)公司 ...................................................................... 3 本研究的目的和意 義 ...................................................................................... 3 小結 .................................................................................................................. 4 2 系統(tǒng)總體設計方案 ............................................................................................... 4 2. 1 驅動模塊的論證與選擇 ................................................................................. 5 2. 2 傳感器模塊的選擇 ......................................................................................... 6 2. 2 電源模塊的論證與選擇 ................................................................................. 8 2. 3 飛行控制模塊的論證與選擇 ......................................................................... 8 2. 4 攝像頭模塊的論 證與選擇 ............................................................................. 8 2. 5 高度檢測系統(tǒng)的論證與選擇 ....................................................................... 10 2. 6 小結 ............................................................................................................... 11 3 系統(tǒng)理論分析 ...................................................................................................... 11 3. 1 四旋翼飛行器的模型簡析 ........................................................................... 11 3. 2 四旋翼飛行器坐標系的建立 ....................................................................... 12 3. 3 四旋翼飛行 器上總的力和力矩 ................................................................... 14 3. 4 四旋翼飛行器力學控制原理 ....................................................................... 14 3. 5 小結 ............................................................................................................... 18 4 硬件電路部分設計 ............................................................................................. 19 4. 1 系統(tǒng)硬件總體設計 ....................................................................................... 19 4. 2 電機驅動模塊 ............................................................................................... 19 4. 3 電源模塊 ....................................................................................................... 20 4. 4 小結 ............................................................................................................... 21 5 系統(tǒng)設計軟件部分設計 ................................................................................... 22 5. 1 程序設計總論 ............................................................................................... 22 5. 2 軟件開發(fā)工具簡介 ....................................................................................... 22 5. 3 程序流程圖 ................................................................................................... 23 5. 4 各模塊初始化 ............................................................................................... 25 5. 5 算法設計 ....................................................................................................... 26 5. 6 小結 ............................................................................................................... 30 6 系統(tǒng)調試 .........................