【正文】
、倒車檢測均采 用ORD 226干簧片開關(guān)傳感器。 檢測汽車制動(dòng)器摩擦片的磨損情況使用磨損檢測傳感器。在汽車的后保險(xiǎn)杠兩端裝設(shè)超聲波發(fā)射/接收器 ,兩個(gè)發(fā)射 /接收器以均等時(shí)間的方式 ,依次發(fā)射 /接收超聲波 ,循環(huán)反復(fù)進(jìn)行。因此在該系統(tǒng)中 ,利用駕駛員在行駛過程中慣常有的點(diǎn)動(dòng)制動(dòng)動(dòng)作 ,檢測輪胎與路面滑移率 (驅(qū)動(dòng)輪和非驅(qū)動(dòng)輪的轉(zhuǎn)速差與驅(qū)動(dòng)輪速度之比 ),并據(jù)此估算路面的狀8 況。 系統(tǒng)通電后 ,主程序先完成初始化工作 ,包括設(shè)堆棧指針 ,設(shè)定定時(shí)器 /計(jì)數(shù)器的工作方式及初值 ,將有關(guān)存儲(chǔ)單元置初值 ,啟動(dòng)定時(shí)器 /計(jì)數(shù)器 ,開中斷等等。根據(jù)信號(hào)接收和計(jì)算的結(jié)果 ,可以判斷車輛后左方和后右方是否有障礙物。 總結(jié) 利用各種傳感器 ,該系統(tǒng)可以檢測出多種危險(xiǎn)情況并及時(shí)發(fā)出語音報(bào)警 ,防患于未然 ,避免事故的發(fā)生 ,成為駕駛員安全行車的好幫手。此外, MCS51采用模塊化結(jié)構(gòu),可方便地增刪一個(gè)模塊就可引腳和指令兼容的新產(chǎn)品。 MCS51把微型計(jì)算機(jī)的主要部件都集成在一塊心片上,使得數(shù)據(jù)傳送距離大大縮短,可靠性更高,運(yùn)行速度更塊。 8051是 MCS51系列單片機(jī)的典型產(chǎn)品,我們以這一代表性的機(jī)型進(jìn)行系統(tǒng)的講解。 并行輸入輸出 (I/O)口: 8051共有 4組 8位 I/O口 (P0、 P P2或 P3),用于對(duì)外部數(shù)據(jù)的傳輸。 。 中斷系統(tǒng): 8051具備較完善的中斷功能,有兩個(gè)外中斷、兩個(gè)定時(shí) /計(jì)數(shù)器中斷和一個(gè)串行中斷,可滿足不同的控制要求,并具有 2級(jí)的優(yōu)先級(jí)別選擇。 數(shù)據(jù)存儲(chǔ)器 (RAM): 8051內(nèi)部有 128個(gè) 8位用戶數(shù)據(jù)存儲(chǔ)單元和 128個(gè)專用寄存器單元,它們是統(tǒng)一編址的,專用寄存器只能用于存放 控制指令數(shù)據(jù),用戶只能訪問,而不能用于存放用戶數(shù)據(jù),所以,用戶能使用的的RAM只有 128個(gè),可存放讀寫的數(shù)據(jù),運(yùn)算的中間結(jié)果或用戶定義的字型表。因此,在工業(yè)測控系統(tǒng)中,使用單片機(jī)是最理想的選擇。 MCS51單片機(jī)的工作頻率為 212MHz,當(dāng)振蕩頻率為 12MHz時(shí),一個(gè)機(jī)器周期為 1us,這個(gè)速度應(yīng)該說是比較快的。 第二篇: MCS51單片機(jī)特性 和結(jié)構(gòu) 8051是 MCS51系列單片機(jī)中的代表產(chǎn)品,它內(nèi)部集成了功能強(qiáng)大的中央處理器,包含了硬件乘除法器、 21個(gè)專用控制寄存器、 4kB的程序存儲(chǔ)器、 128字節(jié)的數(shù)據(jù)存儲(chǔ)器、 4組 8位的并行口、兩個(gè) 16位的可編程定時(shí) /計(jì)數(shù)器、一個(gè)全雙工的串行口以及布爾處 理器。設(shè)定定時(shí)器T 0為 250μs ,因此 ,在定時(shí)器T 0的溢出中斷服務(wù)程序中 ,根據(jù)是否溢出2020次來判斷是否到達(dá) 0 5s ,同時(shí)對(duì)車輪轉(zhuǎn)速和滑移率的計(jì)算也在該中斷服務(wù)程序中完成。例如 ,當(dāng)傳感器檢測到汽車正在倒車時(shí) ,CPU選定要觸發(fā)的發(fā)射點(diǎn)地址 ,然后啟動(dòng)發(fā)射電路并開始計(jì)時(shí) ,在給定時(shí)間內(nèi)如接收到信號(hào)則由延遲時(shí)間可以計(jì)算出障礙物到發(fā)射點(diǎn)的距 離。 系統(tǒng)軟件 主程序框圖如圖 2所示。汽車距障礙物的距離是通過聲納發(fā)出到反射回來這段行程所花費(fèi)的時(shí)間來測定并進(jìn)行計(jì)算的 ,計(jì)算式 如下 : d =12ctc =331+0 6θ 式中 d ——— 汽車距障礙物的距離 c ——— 超聲波在空氣中傳播的速度 t ——— 測定的時(shí)間 θ ——— 車外空氣溫度角 聲納可測得的障礙物大約在 50cm范圍以內(nèi) ,當(dāng)障礙物距汽車不到 50cm時(shí) ,發(fā)出語音報(bào)警。 為了檢測駕駛員是否飲酒 ,選用適用于乙醇?xì)怏w檢測的半導(dǎo)體氣敏元件 ,當(dāng)駕駛室空氣中的酒精含量達(dá)到一定濃度時(shí) ,向單片機(jī)發(fā)出報(bào)警信號(hào)。 對(duì)發(fā)動(dòng)機(jī)機(jī)油油量和制動(dòng)油油量的檢測均采用CE 415型浮子 簧片液位傳感器。在本設(shè)計(jì)中T 6668采用CPU操作模式與 8031連接 ,其指令通過T 6668的CPU接口寫入。 系統(tǒng)硬件 為完成上述的各項(xiàng)檢測及語音輸出要求 ,本系統(tǒng)采用如圖 1所示的硬件結(jié)構(gòu)。 g 制動(dòng)失靈危險(xiǎn) 。 c機(jī)油油量不足 。 汽車發(fā)動(dòng)機(jī)起動(dòng)后系統(tǒng)開始檢測 ,當(dāng)發(fā)現(xiàn)異常情況時(shí) ,如車門未關(guān)緊、冷卻水溫過高、油量不足、倒車時(shí)車后障礙物過近、摩擦片過度磨損、路面摩擦系數(shù)過小、駕駛室的空氣中酒精含量過高等 ,7 便啟動(dòng)安全語音提示系統(tǒng)發(fā)出語音提示。 e 汽車倒車時(shí) ,檢測車后障礙物情況 。 系統(tǒng)設(shè)計(jì)思想 根據(jù)引發(fā)事故的常見因素 ,這套系統(tǒng)將實(shí)現(xiàn)下列檢測功能 : a 關(guān)車門時(shí) ,檢測門鎖是否扣 緊 。s cab reaches certain density, sends a alarm signal to the single chip microputer. When automobile back a car , system uses the barrier of supersonic detection vehicle rear. The rear bumper two ends of automobile pack to set up supersonic project/receiver, two project/receiver with the way of equal time, project/in proper order to take over supersonic , is circulating to go on again and again. Because of this cycle time is from CPU control, therefore this system will not get the wrong signal influence from external sound wave. Automobile distance the distance of barrier is pass through sonar send reflection return the time that this route spends e to survey and calculate , calculation has following type. d =1/2*ct c =331+ In type d — — — automobile far from the distance of barrier c — — — supersonic the speed that propagated in air t — — — the time of mensuration θ — — — vehicle outside air temperature Angle sonar the barrier that can be measured approximate in 50cm scope within, pawn barrier distance automobile do not go to 50cm , send speech sound to report to alarm. On the road surface that the moist of rainy day or ice snow covers , between road surface and wheel tyre, coefficient of friction is little , vehicle is all right with high speed or sudden braking makes automobile overturn easily, which knows vehicle course Central Africa, is frequently dangerous. Therefore in this system spoil frequently some point using driver in the course of traveling to move brake movement, detection tyre and the slip rate of road surface ( racial of drive wheel and the bad speed of rotational speed of undrive wheel of drive wheel), and the accordingly estimation condition of road surface. And beg the specific practice of slip rate is the sensor of rotational speed of edd current installation in drive with undrive wheel on, measure the differe