基于單片機(jī)的汽車車窗控制系統(tǒng).doc
基于單片機(jī)的汽車車窗控制系統(tǒng),摘 要本文設(shè)計的汽車電動車窗自適應(yīng)控制系統(tǒng)采用司機(jī)主控面板和乘客子控面板雙控制的方式來控制車窗的關(guān)閉和開啟。為了充分保障司機(jī)對整車的控制權(quán),主控面板的控制級別要高于分控制面板的控制。系統(tǒng)設(shè)有防夾功能,當(dāng)車窗上升過程中遇到障礙物無法前進(jìn)時會自動停止上升并下降一定幅度,并等待下次指令發(fā)出。此外為了滿足突發(fā)情況發(fā)生時乘客強(qiáng)...
![](http://img.queshao.com/images/pcgzh.gif)
![](http://preview.queshao.com/tobuy/213881.gif)
內(nèi)容介紹
此文檔由會員 雀巢的誘惑 發(fā)布摘 要
本文設(shè)計的汽車電動車窗自適應(yīng)控制系統(tǒng)采用司機(jī)主控面板和乘客子控面板雙控制的方式來控制車窗的關(guān)閉和開啟。為了充分保障司機(jī)對整車的控制權(quán),主控面板的控制級別要高于分控制面板的控制。系統(tǒng)設(shè)有防夾功能,當(dāng)車窗上升過程中遇到障礙物無法前進(jìn)時會自動停止上升并下降一定幅度,并等待下次指令發(fā)出。此外為了滿足突發(fā)情況發(fā)生時乘客強(qiáng)行關(guān)窗的需要,在司機(jī)主控面板處設(shè)有強(qiáng)行關(guān)窗指令按鍵,此時將忽略防夾功能進(jìn)行強(qiáng)行關(guān)窗。系統(tǒng)對車內(nèi)空氣實時監(jiān)測,對煙霧、酒精、丙烷等有害、可燃或其他危及車內(nèi)人員身體健康或人身安全的氣體進(jìn)行檢測,當(dāng)此類氣體達(dá)到一定濃度后會自行開窗通風(fēng)。為了防止汽車高速行駛時發(fā)生意外,在高速行駛時會自動關(guān)窗并上鎖,此時只有司機(jī)處的主控開關(guān)能夠控制車窗開啟。
該電動車窗自適應(yīng)控制系統(tǒng)線路比較簡單,為了節(jié)省成本同時為了便于維護(hù)和升級本系統(tǒng)采用獨(dú)立控制模式。采用AT89C52單片機(jī)作為主控器進(jìn)行指令采集、運(yùn)算分析、車窗動作控制和障礙物判斷等;采用鍵盤掃描的方式采集指令節(jié)省線路的同時節(jié)省控制器的接口資源;采用LM298驅(qū)動芯片結(jié)合光柵對車窗升降電機(jī)進(jìn)行驅(qū)動和閉環(huán)控制,并實現(xiàn)障礙物判斷;采用MQ-2氣體傳感器對車內(nèi)空氣檢測并在濃度過高時觸發(fā)主控器進(jìn)行控制操作。
本設(shè)計具有線路簡單、易實現(xiàn)、功能全和可維護(hù)性高等特點(diǎn),并通過實物演示可知本文設(shè)計的系統(tǒng)可以完整的實現(xiàn)預(yù)設(shè)功能。
Abstract
The design of the adaptive control car windows system in this paper using two control panel —the driver’s master control panel and passenger sub-control panel to control the closing and opening of windows. In order to fully guarantee the driver’s control power of the car, the control level of the main control panel is higher than the level of sub-control panel. The system is equipped with anti-trap function, the car window will stop rise and decline a certain range if encounter to obstacles when the car window is during the ascent and whit the next command. And in addition , the need of force closing of the window in some emergence situation, the system also with an button of force close command in the driver’s main control panel, in this situation system will ignore the obstacle to force rise. System real-time monitoring of the air inside the vehicle, detection the gas of alcohol, methane and other harmful, flammable or other endanger the body health or safety of personnel inside the vehicle. The windows will open to ventilate when these harmful gas reaches a certain concentration. In order to prevent accidents when the car is in the process of high speed, windows will be closed and locked in the process. At this time , only the driver’s main control panel can control the windows .
This system’s circuit is simple. In order to save costs and facilitate the maintenance and upgraded, this system with independent control mode. The AT89C52 microcontroller as a master instruction acquisition, operational analysis, windows motion control and obstacle judge; Keyboard scanning to acquisition instruction in order to reduce lines at the same time saving interface resources; LM298 driver chip combined with the grating on the window lift motor drive and closed-loop control; Using the MQ-2 gas sensor for detection of air inside the vehicle and in the concentration is too high to trigger the master control operations.
The design is Simple circuit, Easy to implement and Maintainability. The design of the system In this paper can complete default features through in-kind demonstration shows.
目 錄
摘 要 1
Abstract 2
引 言 1
1 設(shè)計方案 2
1.1 方案及功能概述 2
1.2 方案論證 3
1.2.1 升降和特殊功能按鈕連接方案 3
1.2.2 車窗完全關(guān)閉和完全打開判斷方案 4
1.2.3 防夾功能實現(xiàn)方案 4
1.2.4 車窗電機(jī)驅(qū)動方案 4
1.2.5 室內(nèi)空氣檢測方案 5
1.2.6 主電源斷電檢測方案 5
1.3 器件的選型 5
1.3.1 單片機(jī)選型 5
1.3.2 電機(jī)驅(qū)動芯片選型 5
1.3.3 氣體檢測傳感器選型 6
2 系統(tǒng)主要器件介紹 7
2.1 主控器STC89C52單片機(jī)介紹 7
2.1.1 STC89C52單片機(jī)主要引腳介紹 8
2.1.2 STC89C52單片機(jī)主要特性 11
2.2 L298N驅(qū)動芯片介紹 12
2.3 LM393電壓比較器介紹 16
3 硬件設(shè)計 18
3.1 電動車系統(tǒng)總體硬件組成 18
3.2 系統(tǒng)各模塊的設(shè)計 18
3.2.1 單片機(jī)系統(tǒng)電路設(shè)計 18
3.2.2 鍵盤掃描電路設(shè)計 19
3.2.3 電機(jī)驅(qū)動模塊的設(shè)計 20
3.2.4 脈沖防夾檢測模塊的設(shè)計 21
3.2.5 空氣檢測模塊的設(shè)計 22
3.3 系統(tǒng)硬件實物圖 22
4 系統(tǒng)軟件設(shè)計和算法實現(xiàn) 25
4.1 單片機(jī)開發(fā)軟件Keil介紹 25
4.2 程序設(shè)計思想和流程圖 26
4.2.1 整體程序控制流程 26
4.2.2 自適應(yīng)障礙物判斷程序 28
4.2.3 電機(jī)控制程序 29
4.2.4 一鍵關(guān)窗上鎖功能程序 30
4.3 重要控制模塊的實現(xiàn)程序 31
4.3.1 指令識別與判斷 31
4.3.2 電機(jī)驅(qū)動程序 32
4.3.3 特色功能實現(xiàn)程序 33
5 系統(tǒng)調(diào)試 36
5.1 指令識別模塊調(diào)試 36
5.2 空氣檢測模塊調(diào)試 36
5.3 PWM控制電機(jī)速度調(diào)試 36
5.4 系統(tǒng)聯(lián)調(diào) 37
5.5 調(diào)試過程中遇到的問題 37
結(jié) 論 38
參 考 文 獻(xiàn) 39
附錄A 系統(tǒng)其他主體程序補(bǔ)充 41
致 謝 45
TA們正在看...
- 人教版小學(xué)三年級下冊語文期中試卷.doc
- 人教版小學(xué)三年級下冊語文期中試題.doc
- 人教版小學(xué)三年級下冊語文燕子教案.doc
- 人教版小學(xué)三年級下冊語文畫楊桃課后練習(xí)題.doc
- 人教版小學(xué)三年級下冊語文第一單元練習(xí)題.doc
- 人教版小學(xué)三年級下冊語文第二單元練習(xí)題.doc
- 人教版小學(xué)三年級數(shù)學(xué)下冊期末測試卷.doc
- 人教版小學(xué)三年級語文上冊教案.doc
- 人教版小學(xué)三年級語文上冊期中測試卷(含答案)(1).doc
- 人教版小學(xué)三年級語文上冊期中測試卷(含答案).doc