【正文】
畢業(yè)設(shè)計(論文)說明書 I 摘 要 隨著科技的 迅速 發(fā)展,單片機的應(yīng)用 也越來越廣泛 , 并 帶動傳 統(tǒng)控制檢測 技術(shù)不斷 更新。 現(xiàn)在的車速表大多是電子式的,用 LED 數(shù)碼管或 LCD即時 顯示 , 顯示更加直觀。 電子式車速表 采用 接觸車速傳感器代替軟軸傳動 ,可使車速 表 的 安裝位置不受距離限制 ,進一步 有效地克服了機械式車速 表中的諸多不足 。 本次設(shè)計 給出了以 AT89C2051 為核心,利用單片機 的 運算和控制功能,并采用系統(tǒng)化 LED 顯示模塊實時顯示所測速度 的 設(shè)計方案 , 以及串口數(shù)據(jù)存儲電路和系統(tǒng)軟件。 該方案由于使用了 數(shù)碼管 顯示模塊和 E2PROM,以及高效快速算法,因 而可在節(jié)約系統(tǒng)資源和簡化程序設(shè)計的基礎(chǔ)上保證測量精度和系統(tǒng)實時性。 其中信號預(yù)處理電路包含信號放大、波形變換和波形整形: 信號預(yù)處理電路中的放大器用于對待測信號進行放大 ,以降低對待測信號的幅度要求 ; 波形變換和波形整形電路則用來將放大的信號轉(zhuǎn)換成可與單片機接口的 TTL 信號 。 通過單片機的設(shè)置可使 INT0 引腳能夠?qū)?nèi)部定時器 T0 的工作進行控制 ,這樣能精確地測出加到 INT0 引腳的正脈沖寬度 (即測出脈沖信號的 期 ) 。 速度顯示部分采用數(shù)碼顯示 , 所得的數(shù)據(jù)采用 I2C總線 , 并通過 E2PROM 來存儲 , 因而節(jié)省了所需 單片機的口線和外圍器件 , 同時也簡化了顯示部分的軟件編程。 本方案實現(xiàn)了電動車速度即時顯示,并可通過控制兩個按鍵顯示速度或里程,同時加入了超速語音報警功能,使之更加人性化。 關(guān)鍵詞 :單片機 ; 霍爾傳感器 ; 數(shù)碼 顯示 ; 語音報警 ; DC/DC 變換器 畢業(yè)設(shè)計(論文)說明書 II Abstract With the rapid development of technology, more and more widespread application of microputer, and promote the traditional control detection technology constantly updated. Most of the current electronic speedometer, and with the LED digital tube or LCD display realtime, display more intuitive. Electronic speedometer flexible shaft using the contact speed sensor instead of driving, speed tables can be installed without distance limitations, and further to effectively overe the mechanical disadvantages of speed in the table. The AT89C2051 is designed to give the core of puting and the use of microputer control, and adopting a systematic LED display module shows the measured realtime speed design, and the serial data storage circuits and system software. The program due to the use of the digital display module and E2PROM, and efficient fast algorithm, thus saving resources and simplifying programming system based on the system to ensure accuracy and realtime. Signal preprocessing circuit which includes signal amplification, wave conversion and waveform shaping: signal preprocessing circuit in the amplifier for the amplified signal could be to reduce the requirements on signal amplitude。 wave transformation and waveshaping circuitry is used to enlarge the signal converted into TTL signals with the microcontroller interface. Set by MCU enables INT0 pin to the work of the internal timer T0 control, so to accurately measure the INT0 pin is added to the pulse width (ie measured pulse signal period). Speed display part of a digital display, the data collected using I2C bus, and through E2PROM to store, thus saving the need microcontroller port lines and peripheral devices, but also simplifies the display part of the software programming. The program achieved the speed of realtime electric vehicle revealed two buttons can be displayed by controlling the speed or mileage, while adding a speed voice alarm function, make it more humane. Key words: microputer; Hall sensor; digital display; voice alarm; DC / DC converter 畢業(yè)設(shè)計(論文)說明書 III 目 錄 摘 要 ................................................I Abstract ..............................................II 1 引 言 ................................................1 選題背景 .........................................1 研究意義 .........................................1 研究內(nèi)容 .........................................2 2 總體設(shè)計方案 .........................................3 3 系統(tǒng)單元模塊概述 .....................................5 傳感器選擇 .......................................5 單片機選型 .......................................7 顯示模塊選型 .....................................8 報警電路選擇 .....................................9 速度算法概述 .....................................9 4 系統(tǒng)硬件設(shè)計 ........................................15 單片機主控電路 ...................................15 單片機概述 .................................15 復(fù)位電路 ...................................17 晶振電路 ...................................18 變換電路設(shè)計 ....................................19 傳感器電路設(shè)計 ..................................20 信號處理電路設(shè)計 ................................23 存儲器電路設(shè)計 ..................................24 I2C 總線概述 ................................24 存儲器電路 .................................25 報警電路設(shè)計 ....................................27 語音芯片概述 ...............................27 畢業(yè)設(shè)計(論文)說明書 IV 語音報警電路 ...............................28 顯示電路設(shè)計 ....................................31 掉電保護電路設(shè)計 ................................33 數(shù)據(jù)處理過程 ....................................35 5 系統(tǒng)仿真與分析 ......................................37 仿真結(jié)果 .........................................37 仿真分析 .........................................38 6 系統(tǒng)軟件設(shè)計 ........................................39 系統(tǒng)軟件總流程圖 ................................39 速度處理子程序 ..................................40 顯示子程序 ......................................41 7 總結(jié)與展望 ..........................................43 致 謝 ................................................44 參考文獻 ..............................................45 附錄 A 程序清單 ........................................46 附錄 B 電路圖 ..........................................57 河南理工大學畢業(yè)設(shè)計(論文)說明書 1 1 引 言 選題背景 在全球倡導綠色環(huán)保的大趨勢下,我國加大了對 車輛排放和噪聲的管理,由于電動自行車具有無污染、低噪聲和輕便快捷等優(yōu) 點, 是一種綠色環(huán)保的交通工具 。隨著我國城市規(guī)模的迅速擴大及農(nóng)村道路的日益改善,長期依靠腳踏自行車的人們將會把目標轉(zhuǎn)向電動自行車, 對電動自行車需求也 會越來越大。人們對環(huán)境的關(guān)注以及相關(guān)技術(shù)的更新 ,有力地促進了電動自行車的發(fā)展。 我國電動車的研究相比歐美國家起步較晚。直到上個世紀 90 年代中期,我國才掀起開發(fā)研究的高潮, 但 主要集中在上海、北京、廣東等地,到 90 年代后期基本覆蓋全國主要經(jīng)濟發(fā)達 地區(qū)如江蘇、浙江、山東等省。雖然我國電動車研究起步晚,但從技術(shù) 角度 來看 ,我們并 不 落后于世界。我國電動自行車產(chǎn)業(yè)基本保持與世界同步發(fā)展水平。 研究意義 傳統(tǒng)的機械式車速表是由旋轉(zhuǎn)磁場作用于轉(zhuǎn)動盤,使轉(zhuǎn)動盤連同車速表指針發(fā)生同向的偏轉(zhuǎn)。當電磁轉(zhuǎn)矩與彈簧產(chǎn)生的阻力矩平 衡時,指針偏轉(zhuǎn)停留在某一角度上。指針偏轉(zhuǎn)角與車速成正比,因而可用其表示車速。 機械式車速表的缺陷是明顯的。由于表盤指針偏轉(zhuǎn)程度正比于軟軸的轉(zhuǎn)動時產(chǎn)生的磁力 ,當轉(zhuǎn)速較低的時候,磁力較小,隨轉(zhuǎn)速變化波動較大。因此,低速時 車 速表指針擺動劇烈、測量及顯示精度不高。對于發(fā)動機后置的車輛 ,要將車速表指針的偏轉(zhuǎn)動力由變速箱經(jīng)軟軸等傳至駕駛室,軟軸必然布置的較長,如何將這種長長的轉(zhuǎn)動軟軸從結(jié)構(gòu)上布置妥當,肯定是一件十分