歡迎來到裝配圖網(wǎng)! | 幫助中心 裝配圖網(wǎng)zhuangpeitu.com!
裝配圖網(wǎng)
ImageVerifierCode 換一換
首頁 裝配圖網(wǎng) > 資源分類 > DOCX文檔下載  

智能小車設(shè)計(jì)報(bào)告智能小車設(shè)計(jì)報(bào)告

  • 資源ID:56730301       資源大小:5.57MB        全文頁數(shù):37頁
  • 資源格式: DOCX        下載積分:5積分
快捷下載 游客一鍵下載
會(huì)員登錄下載
微信登錄下載
三方登錄下載: 微信開放平臺(tái)登錄 支付寶登錄   QQ登錄   微博登錄  
二維碼
微信掃一掃登錄
下載資源需要5積分
郵箱/手機(jī):
溫馨提示:
用戶名和密碼都是您填寫的郵箱或者手機(jī)號(hào),方便查詢和重復(fù)下載(系統(tǒng)自動(dòng)生成)
支付方式: 支付寶    微信支付   
驗(yàn)證碼:   換一換

 
賬號(hào):
密碼:
驗(yàn)證碼:   換一換
  忘記密碼?
    
友情提示
2、PDF文件下載后,可能會(huì)被瀏覽器默認(rèn)打開,此種情況可以點(diǎn)擊瀏覽器菜單,保存網(wǎng)頁到桌面,就可以正常下載了。
3、本站不支持迅雷下載,請(qǐng)使用電腦自帶的IE瀏覽器,或者360瀏覽器、谷歌瀏覽器下載即可。
4、本站資源下載后的文檔和圖紙-無水印,預(yù)覽文檔經(jīng)過壓縮,下載后原文更清晰。
5、試題試卷類文檔,如果標(biāo)題沒有明確說明有答案則都視為沒有答案,請(qǐng)知曉。

智能小車設(shè)計(jì)報(bào)告智能小車設(shè)計(jì)報(bào)告

電子設(shè)計(jì)大賽設(shè)計(jì)報(bào)告 題目名稱_智能搬運(yùn)小車 _學(xué)生學(xué)院_物理與光電工程學(xué)院 _隊(duì)員 莊偉林 林鑒杰 陳奕利 2009年 5月 1日裝配圖(正面)智能搬運(yùn)小車設(shè)計(jì)報(bào)告一、 總體框架(1)、本搬動(dòng)小車通過單片機(jī)AT89S52,用三個(gè)373分時(shí)輸入外部信號(hào),通過分析處理,再用一個(gè)573芯片輸出步進(jìn)電機(jī)驅(qū)動(dòng)信號(hào),成功地實(shí)現(xiàn)了取放黑鐵,尋找右光源和左光源的功能。(2)、電路方框圖。步進(jìn)電機(jī)運(yùn)轉(zhuǎn)直流電機(jī)驅(qū)動(dòng)取放鐵片普通光敏電阻控測(cè)光源光敏對(duì)管PRP控測(cè)黑鐵片輸出聲光信號(hào)(3)系統(tǒng)總框圖。四相六線步進(jìn)電機(jī)LM2003主控芯片AT89S52系統(tǒng)總框圖二、硬件實(shí)現(xiàn)及單元電路設(shè)計(jì)。1、主控芯片AT89S52。AT89S52 主要性能; 與MCS-51單片機(jī)產(chǎn)品兼容 、8K字節(jié)在系統(tǒng)可編程Flash存儲(chǔ)器、 1000次擦寫周期、 全靜態(tài)操作:0Hz33Hz 、 三級(jí)加密程序存儲(chǔ)器 、 32個(gè)可編程I/O口線 、三個(gè)16位定時(shí)器/計(jì)數(shù)器 八個(gè)中斷源 、全雙工UART串行通道、 低功耗空閑和掉電模式 、掉電后中斷可喚醒 、看門狗定時(shí)器 、雙數(shù)據(jù)指針 、掉電標(biāo)識(shí)符 。功能特性描述 At89s52 是一種低功耗、高性能CMOS8位微控制器,具有 8K 在系統(tǒng)可編程Flash 存儲(chǔ)器。使用Atmel 公司高密度非 易失性存儲(chǔ)器技術(shù)制造,與工業(yè)80C51 產(chǎn)品指令和引腳完 全兼容。片上Flash允許程序存儲(chǔ)器在系統(tǒng)可編程,亦適于 常規(guī)編程器。在單芯片上,擁有靈巧的8 位CPU 和在系統(tǒng) 可編程Flash,使得AT89S52為眾多嵌入式控制應(yīng)用系統(tǒng)提 供高靈活、超有效的解決方案。 AT89S52具有以下標(biāo)準(zhǔn)功能: 8k字節(jié)Flash,256字節(jié)RAM, 32 位I/O 口線,看門狗定時(shí)器,2 個(gè)數(shù)據(jù)指針,三個(gè)16 位 定時(shí)器/計(jì)數(shù)器,一個(gè)6向量2級(jí)中斷結(jié)構(gòu),全雙工串行口, 片內(nèi)晶振及時(shí)鐘電路。另外,AT89S52 可降至0Hz 靜態(tài)邏輯操作,支持2種軟件可選擇節(jié)電模式??臻e模式下,CPU 停止工作,允許RAM、定時(shí)器/計(jì)數(shù)器、串口、中斷繼續(xù)工 作。掉電保護(hù)方式下,RAM內(nèi)容被保存,振蕩器被凍結(jié), 單片機(jī)一切工作停止,直到下一個(gè)中斷或硬件復(fù)位為止。8 位微控制器 8K 字節(jié)在系統(tǒng)可編程 Flash AT89S52。 2、直流電機(jī)驅(qū)動(dòng)取放鐵片??紤]到電磁鐵耗電很大,所以我們選擇用直流電機(jī)機(jī)械方式實(shí)現(xiàn)鐵片的取放。通過L298芯片驅(qū)動(dòng),用直流電機(jī)實(shí)現(xiàn)磁鐵的磁鐵上升(放下鐵塊)或下降(吸上鐵片)。我們考慮了幾種方案實(shí)現(xiàn)直流電機(jī)的驅(qū)動(dòng);L298電路圖如下。直流電機(jī)驅(qū)動(dòng)電路圖L298電路圖升上磁鐵,放下鐵片天然磁鐵平衡臂步進(jìn)電機(jī)直流電機(jī)鐵片萬向輪放下鐵片放鐵片原理圖直流電機(jī)天然磁鐵平衡臂步進(jìn)電機(jī)放下磁鐵,吸上鐵片鐵片萬向輪取鐵片原理圖3、 探測(cè)黑白鐵片與邊界。以下為我們考慮的方案;我們使用PRP光電對(duì)管實(shí)現(xiàn)對(duì)黑白鐵以及邊界的探測(cè)。光電對(duì)管實(shí)物圖電壓比較器TL084信號(hào)處理實(shí)物圖PRP光電一體化對(duì)管原理圖R21M光電對(duì)管檢測(cè)電路圖4、 步進(jìn)電機(jī)與驅(qū)動(dòng)。方案選擇;由于本系統(tǒng)為智能電動(dòng)車,其驅(qū)動(dòng)輪的驅(qū)動(dòng)電機(jī)的選擇就顯得十分重要。由于小車要實(shí)現(xiàn)對(duì)路徑的準(zhǔn)確定位和精確測(cè)量,我們綜合考慮了一下兩種方案:方案1;采用步進(jìn)電機(jī)作為該系統(tǒng)的驅(qū)動(dòng)電機(jī)。由于其轉(zhuǎn)過的角度可以精確地定位,可以實(shí)現(xiàn)小車前進(jìn)路程和位置的精確確定位。方案2:采用直流減速電機(jī)。直流減速電機(jī)轉(zhuǎn)動(dòng)力矩大,體積小,重量輕,裝配方便,但是不能做到很好的定位。權(quán)衡利弊,我們選擇了第一方案。小車驅(qū)動(dòng)部份我們選擇用二相六線步進(jìn)電機(jī)。因?yàn)椴竭M(jìn)電機(jī)可以很好地實(shí)現(xiàn)同步與精確控制功能,但是缺點(diǎn)是耗電大,震動(dòng)大。但權(quán)衡利弊,與直流電機(jī)相雙,步進(jìn)電機(jī)驅(qū)動(dòng)力強(qiáng)大,所以我們選擇用步進(jìn)電機(jī)。步進(jìn)電機(jī)作為執(zhí)行元件,是機(jī)電一體化的關(guān)鍵產(chǎn)品之一, 廣泛應(yīng)用在各種自動(dòng)化控制系統(tǒng)中。隨著微電子和計(jì)算機(jī)技術(shù)的發(fā)展,步進(jìn)電機(jī)的需求量與日俱增,在各個(gè)國民經(jīng)濟(jì)領(lǐng)域都有應(yīng)用。步進(jìn)電機(jī)是一種將電脈沖轉(zhuǎn)化為角位移的執(zhí)行機(jī)構(gòu)。當(dāng)步進(jìn)驅(qū)動(dòng)器接收到一個(gè)脈沖信號(hào),它就驅(qū)動(dòng)步進(jìn)電機(jī)按設(shè)定的方向轉(zhuǎn)動(dòng)一個(gè)固定的角度(稱為“步距角”),它的旋轉(zhuǎn)是以固定的角度一步一步運(yùn)行的。可以通過控制脈沖個(gè)數(shù)來控制角位移量,從而達(dá)到準(zhǔn)確定位的目的;同時(shí)可以通過控制脈沖頻率來控制電機(jī)轉(zhuǎn)動(dòng)的速度和加速度,從而達(dá)到調(diào)速的目的。步進(jìn)電機(jī)可以作為一種控制用的特種電機(jī),利用其沒有積累誤差(精度為100%)的特點(diǎn),廣泛應(yīng)用于各種開環(huán)控制?,F(xiàn)在比較常用的步進(jìn)電機(jī)包括反應(yīng)式步進(jìn)電機(jī)(vr)、永磁式步進(jìn)電機(jī)(pm)、混合式步進(jìn)電機(jī)(hb)和單相式步進(jìn)電機(jī)等。永磁式步進(jìn)電機(jī)一般為兩相,轉(zhuǎn)矩和體積較小,步進(jìn)角一般為7.5度 或15度;反應(yīng)式步進(jìn)電機(jī)一般為三相,可實(shí)現(xiàn)大轉(zhuǎn)矩輸出,步進(jìn)角一般為1.5度,但噪聲和振動(dòng)都很大。反應(yīng)式步進(jìn)電機(jī)的轉(zhuǎn)子磁路由軟磁材料制成,定子上有多相勵(lì)磁繞組,利用磁導(dǎo)的變化產(chǎn)生轉(zhuǎn)矩?;旌鲜讲竭M(jìn)電機(jī)是指混合了永磁式和反應(yīng)式的優(yōu)點(diǎn)。它又分為兩相和五相:兩相步進(jìn)角一般為1.8度而五相步進(jìn)角一般為 0.72度。這種步進(jìn)電機(jī)的應(yīng)用最為廣泛,也是本次細(xì)分驅(qū)動(dòng)方案所選用的步進(jìn)電機(jī)。我們的步進(jìn)電機(jī)使用的驅(qū)動(dòng)芯片是lm2003。步進(jìn)電機(jī)驅(qū)動(dòng)芯片LM2003實(shí)物圖LM2003芯片原理圖步進(jìn)電機(jī)實(shí)物圖LM2003步進(jìn)電機(jī)驅(qū)動(dòng)相圖二相六線步進(jìn)電機(jī)接線圖5、 尋找光源。當(dāng)光敏二極管正對(duì)光源時(shí),電阻變小,經(jīng)過電壓比較器向單片機(jī)輸入信號(hào)。尋找光源用的光敏對(duì)管,為了防止干擾,用筆筒套上光敏電阻。6、 電路板。我們通過Protel dxp繪制電路圖后,采用熱轉(zhuǎn)印方法制成PCB雙面板。蜂鳴器與發(fā)光二極管,輸出聲光信號(hào)74hc373作為光電對(duì)管信號(hào)輸入鎖存器,PO分時(shí)讀取外部鎖存器,實(shí)現(xiàn)單片機(jī)的輸出口和輸入口擴(kuò)展主控電路AT89S52輸出鎖存器74hc573,作為單片機(jī)分時(shí)存出的輸出口。主板穩(wěn)壓電路1602lcd插口主電路板實(shí)物圖(正面)主電路板實(shí)物圖(反面)主電路板pcb圖主電路板各部分原理圖如下:6智能小車程序框圖。初始化前進(jìn)定時(shí)器T2定時(shí)中斷,中斷子程序輸入光電對(duì)管信號(hào),判斷是否遇到黑色信號(hào)或白色信號(hào)。白鐵黑鐵判斷遇到黑鐵或白鐵或邊界尋找左光源,返回A停車區(qū)。尋找右光源,返回B停車區(qū)。否向前對(duì)齊,繼續(xù)掃描是否取完3塊鐵片返回停車區(qū),結(jié)束。7、 智能小車源程序。#include<at89x52.h>unsigned int minute=0;second=0,sum=0;unsigned char idata minute1=0,second1=0;sum1=0;unsigned char idata recordminute1=0,recordsecond1=0,recordsum1=0;unsigned char idata recordminute2=0,recordsecond2=0,recordsum2=0;unsigned char bdata status=0;unsigned char bdata status1=0;unsigned char bdata status2=0;unsigned char bdata prpflagd;unsigned char bdata prpflage;unsigned int idata time0=0;unsigned long int idata time2=0;unsigned long int idata time2_1;unsigned int idata time2_2;unsigned char data motor=0;unsigned char bdata d=0;unsigned char bdata e=0;unsigned char bdata d1=0;unsigned char bdata e1=0;unsigned char lightcount=0;unsigned char v0;unsigned char vb;sbit prp5_0=d16;sbit prp5_1=d17;sbit prp1_0=d14;sbit prp1_1=d15;sbit prp6_0=d12;sbit prp6_1=d13;sbit prp2_0=d10;sbit prp2_1=d11;sbit prp7_0=e16;sbit prp7_1=e17;sbit prp3_0=e14;sbit prp3_1=e15;sbit prp8_0=e12;sbit prp8_1=e13;sbit prp4_0=e10;sbit prp4_1=e11;sbit prp5_000=prpflagd6;sbit prp5_001=prpflagd7;sbit prp1_000=prpflagd4;sbit prp1_001=prpflagd5;sbit prp6_000=prpflagd2;sbit prp6_001=prpflagd3;sbit prp2_000=prpflagd0;sbit prp2_001=prpflagd1;sbit prp7_000=prpflage6;sbit prp7_001=prpflage7;sbit prp3_000=prpflage4;sbit prp3_001=prpflage5;sbit prp8_000=prpflage2;sbit prp8_001=prpflage3;sbit prp4_000=prpflage0;sbit prp4_001=prpflage1;sbit prp5_00=d6;sbit prp5_01=d7;sbit prp1_00=d4;sbit prp1_01=d5;sbit prp6_00=d2;sbit prp6_01=d3;sbit prp2_00=d0;sbit prp2_01=d1;sbit prp7_00=e6;sbit prp7_01=e7;sbit prp3_00=e4;sbit prp3_01=e5;sbit prp8_00=e2;sbit prp8_01=e3;sbit prp4_00=e0;sbit prp4_01=e1;sbit forward=status0;sbit backward=status1;sbit turnleft=status3;sbit turnright=status2;sbit rightforward=status5;sbit rightbackward=status4;sbit leftforward=status6;sbit leftbackward=status7;sbit flag=status15; sbit whiteiron=status16;sbit blackiron=status20;sbit searchiron=status10;sbit searchrightlight=status11;sbit seachleftlight=status12;unsigned char interfere;unsigned char uninterfere;sbit rightorleft=status14;sbit unflag=status23;sbit foundblack=status24;sbit foundwhite=status25;sbit foundboundary=status26;unsigned char whiteironcount=0;unsigned char blackironcount=0;unsigned char ironcount=0;void timer0initializtion();void timer2initializtion();void turnright90degree();void turnleft90degree();void putdown();void goforwardaccelerat();void gobackwardaccelerat();void putup();void foundblackiron();void foundwhiteiron();void turnright180degree();void backwardalign();void forwardalign();void estimate();void boundaryturnright90degree();void boundaryturnright180degree();void boundaryturnleft180degree();void searchlightblackiron();void oneturnleft80degree();void oneturnright80degree();void oneturnright180degree();void oneturnleft80degree();void searchlightwhiteiron();void searchlightwhiteiron();void scan();void main()timer0initializtion();timer2initializtion();time2=0;while(time2<=50);rightorleft=0;status=0;goforwardaccelerat();flag=0;while(flag=0);estimate();if(foundboundary=1)boundaryturnright90degree();scan();estimate();if(foundwhite=1)putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1)putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1)putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1) putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();goto end0200;elseif(foundblack=1)putdown();searchlightblackiron();scan();estimate();if(foundwhite=1) putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1)putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1) putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();goto end0200;elseif(foundwhite=1)putdown();searchlightwhiteiron();scan();estimate();if(foundwhite=1)putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1) putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();scan();estimate();if(foundwhite=1) putdown();searchlightwhiteiron();elseputdown();searchlightblackiron();end0200:while(1);void goforwardaccelerat()status=0;forward=1;vb=5;time2=0;while(time2<=8);vb=4;time2=0;while(time2<=8);vb=3;time2=0;while(time2<=8);vb=2;time2=0;while(time2<=8);vb=1;void gobackwardaccelerat()status=0;backward=1;vb=5;time2=0;while(time2<=8);vb=4;time2=0;while(time2<=8);vb=3;time2=0;while(time2<=8);vb=2;time2=0;while(time2<=8);vb=1;void scan()status=0;while(foundblack!=1)&&(foundwhite!=1)goforwardaccelerat();flag=0;while(flag=0);status=0;estimate();if(foundboundary=1)foundboundary=0;if(rightorleft=1)rightorleft=0;boundaryturnleft180degree();time2=0;while(time2<=8);status=0;elserightorleft=1;boundaryturnright180degree();time2=0;while(time2<=8);status=0;void searchlightblackiron()unsigned long int lightdalign;rightorleft=0;vb=4;turnright=1;while(prp8_01=1);status=0;time2=0;while(time2<=20);turnright=1;time2=0;while(time2<=30);time2=0;while(prp8_01=1);status=0;if(time2<=180)goto b0173; status=0;turnright=1;time2=0;while(time2<=20);while(prp8_01=1);time2=0;while(time2<=10);status=0;time2=0;while(time2<=20);b0173:time2_1=0;goforwardaccelerat();time2=0;while(time2<=40);flag=0;while(flag=0);time2=0;while(time2<=40);status=0;putup();time2=0;while(time2<=8);turnright180degree();goforwardaccelerat();time2=0;while(time2<=90);b0294:status=0;forward=1;flag=0;while(flag=0);estimate();if(foundboundary=0)goto b0294;status=0;time2=0;while(time2<=8);gobackwardaccelerat();forwardalign();status=0;vb=4;turnright=1;time2=0;while(prp8_01=1);status=0;lightdalign=time2;if(lightdalign<=150)turnleft=1;time2=0;while(time2<=lightdalign);status=0;turnleft90degree();turnleft=1;time2=0;while(time2<=20);status=0;time2=0;while(time2<=8);b0621:vb=1;forward=1;flag=0;while(flag=0);status=0;estimate();if(foundboundary=1)forwardalign();boundaryturnright90degree();elsegoto b0621;elsetime2=0;while(time2<=8);turnleft=1;time2=0;while(time2<=lightdalign);status=0;forwardalign();boundaryturnright90degree();void searchlightwhiteiron()unsigned long int lightdalign;rightorleft=0;vb=4;turnleft=1;while(prp8_01=1);status=0;time2=0;while(time2<=20);turnleft=1;time2=0;while(time2<=30);time2=0;while(prp8_01=1);status=0;if(time2<=180)goto b0374; status=0;turnleft=1;time2=0;while(time2<=20);while(prp8_01=1);time2=0;while(time2<=10);status=0;time2=0;while(time2<=20);b0374:time2_1=0;goforwardaccelerat();time2=0;while(time2<=40);flag=0;while(flag=0);time2=0;while(time2<=40);status=0;putup();time2=0;while(time2<=8);turnright180degree();goforwardaccelerat();time2=0;while(time2<=90);b0410:forward=1;flag=0;while(flag=0);estimate();if(foundboundary=0)goto b0410;status=0;time2=0;while(time2<=8);gobackwardaccelerat();forwardalign();status=0;vb=4;turnleft=1;time2=0;while(prp8_01=1);status=0;lightdalign=time2;if(lightdalign<=150)turnright=1;time2=0;while(time2<=lightdalign);status=0;turnright90degree();turnright=1;time2=0;while(time2<=20);status=0;time2=0;while(time2<=8);b0431:vb=1;forward=1;flag=0;while(flag=0);status=0;estimate();if(foundboundary=1)forwardalign();boundaryturnright90degree();elsegoto b0431;elsetime2=0;while(time2<=8);turnright=1;time2=0;while(time2<=lightdalign);status=0;forwardalign();boundaryturnright90degree();void boundaryturnright90degree()status=0;vb=3;backward=1;time2=0;while(time2<=30);vb=4;status=0;turnright=1;time2=0;while(time2<=122);status=0;time2=0;while(time2<=10);void oneturnright80degree()status=0;vb=5;leftforward=1;time2=0;while(time2<=215);status=0;time2=0;while(time2<=8);void oneturnleft180degree()status=0;vb=5;rightforward=1;time2=0;while(time2<=505);status=0;time2=0;while(time2<=8);void oneturnright180degree()status=0;vb=5;leftforward=1;time2=0;while(time2<=505);status=0;time2=0;while(time2<=8);void oneturnleft80degree()status=0;vb=5;rightforward=1;time2=0;while(time2<=225);status=0;time2=0;while(time2<=8);void boundaryturnleft180degree()status=0;forwardalign();vb=3;status=0;backward=1;time2=0;while(time2<=68);status=0;oneturnleft180degree();time2=0;while(time2<=10);backwardalign();time2=0;while(time2<=8);void boundaryturnright180degree()status=0;forwardalign();vb=3;status=0;backward=1;time2=0;while(time2<=68);status=0;oneturnright180degree();time2=0;while(time2<=10);backwardalign();time2=0;while(time2<=8);void forwardalign()vb=4;status=0;backward=1;time2=0;while(time2<=15);unflag=0; while(unflag=0)time2=0;if(time2>=50)break;status=0;time2=0;while(time2<=10);forward=1;while(prp4_000=0);status=0;time2=0;while(time2<=10);if(prp7_000=1)&&(prp1_000=0)status=0;turnright=1;while(prp1_000=0);status=0;time2=0;while(time2<=10);if(prp7_000=1)rightbackward=1;while(prp7_000=1);elserightforward=1;while(prp7_000=0);elseif(prp7_000=0)&&(prp1_000=1)status=0;turnleft=1;while(prp7_000=0);status=0;time2=0;while(time2<=10);if(prp1_000=1)leftbackward=1;while(prp1_000=1);elseleftforward=1;while(prp1_000=0);status=0;time2=0;while(time2<=18); void backwardalign()unsigned char backwardaligncount=0;b0353:backwardaligncount+;status=0;vb=4;forward=1;time2=0;while(time2<=15);unflag=0; while(unflag=0)time2=0;if(time2>=50)break;status=0;time2=0;while(time2<=10);backward=1;while(prp4_000=0);status=0;time2=0;while(time2<=10);if(prp6_000=1)&&(prp1_000=0)turnleft=1;while(prp1_000=0);status=0;time2=0;while(time2<=10);if(prp6_000=1)rightforward=1;while(prp6_000=1);elserightbackward=1;while(prp6_000=0);elseif(prp6_000=0)&&(prp1_000=1)turnright=1;while(prp6_000=0);status=0;time2=0;while(time2<=10);if(prp1_000=1)leftforward=1;while(prp6_000=1);elseleftbackward=1;while(prp6_000=0);status=0;time2=0;while(time2<=18);if(backwardaligncount<=3)goto b0353; status=0;void turnleft90degree()vb=4;status=0;turnleft=1;time2=0;while(time2<=110);status=0; time2=0;while(time2<=10);void turnright90degree()vb=4;status=0;turnright=1;time2=0;while(time2<=115);status=0;time2=0;while(time2<=10);void turnright180degree()vb=4;status=0;turnright=1; time2=0;while(time2<=230); turnright=0;time2=0;while(time2<=15);vb=3;void putup()status=0;time2=0;while(time2<=80)status=0;P1=0x05;P1=0xff;time2=0;while(time2<=30);time2=0;while(time2<=80)status=0;P1=0x05;P1=0xff;time2=0;while(time2<=30);time2=0;while(time2<=80)status=0;P1=0x05; P1=0xff;void putdown()status=0;forward=1;time2=0;while(time2<=3);status=0;time2=0;while(time2<=150)P1=0x03;P1=0xff;time2=0;while(time2<=8);vb=3;status=0;forward=1;time2=0;while(time2<=16);status=0;time2=0;while(time2<=8);vb=3;status=0;backward=1;time2=0;while(time2<=32);status=0;time2=0;while(time2<=8);forward=1;time2=0;while(time2<=16);status=0;time2=0;while(time2<=8); void estimate()unsigned char bj1=0;unsigned char bj2=0;unsigned char bj3=0;unsigned char bj4=0; unsigned char bj5=0;foundblack=0;foundboundary=0;foundwhite=0;e1=e;d1=d;vb=2;forward=1;time2=0;while(time2<=50)if(prp1_000=1)bj1=1;if(prp3_000=1)bj2=1;if(prp5_000=1)bj5=1;if(prp7_000=1)bj4=1;if(prp1_001=0)|(prp2_001=0)|(prp3_001=0)|(prp4_001=0)|(prp5_001=0)|(prp6_001=0)|(prp7_001=0)bj3=1;status=0;backward=1;time2=0;while(time2<=50);status=0;if(bj5=1)&&(bj1=1)|(bj2=1)&&(bj4=1)foundboundary=1;elseif(bj3=1)foundwhite=1;WR=0;time2=0;while(time2<=18);WR=1;elsefoundblack=1;WR=0;time2=0;while(time2<=18);WR=1;time2=0;while(time2<=18);WR=0;time2=0;while(time2<=18);WR=1;time2=0;while(time2<=18);WR=0;time2=0;while(time2<=18);WR=1;time2=0;while(time2<=18);void timer0initializtion()TMOD=0X01;TH0=0xd8;TL0=0xef;EA=1;ET0=1;PT0=0;TR0=1; void timer2initializtion() /50MSET2=1;TCLK=0;RCLK=0;CP_RL2=0;T2MOD=0x0;C_T2=0;RCAP2H=0x3c;RCAP2L=0xb0;PT2=1;TR2=1; void T2interrupt() interrupt 5 unsigned char idata i;time2+;time2_1+;time2_2+;sum=sum+1;sum1=sum1+1;if(sum=20)sum=0;second=second+1; if(second=60) second=0; minute=minute+1; if(minute=60) minute=0; if(sum1=20)sum1=0;second1=second1+1;if(second1=60) second1=0; minute1=minute1+1; RD=0;P2=0x8c;P0=0xff;for(i=0;i<=2;i+);d=P0;d=P0;P2=0x84;P0=0xff;for(i=0;i<=2;i+);e=P0;e=P0;RD=1;P2=0xff;if(d!=0xaa)|(e&0xf3)!=0xa2)if(interfere<=2)interfere+;if(interfere=3)flag=1;prpflagd=d;prpflage=e;interfere=0;elseinterfere=0; if(d=0xaa)&&(e&0xf3)=0xa2)if(uninterfere<=3)uninterfere+;if(uninterfere=4)unflag=1;flag=0;prpflagd=d;prpflage=e;uninterfere=0;elseuninterfere=0; TF2=0;void tO() interrupt 1 /V=9cm/s interrupt time=13msTH0=0xcd;TL0=0x38;time0+;v0+;P2=0x9c;if(status=0x01) /V=9cm/sif(v0>=vb)v0=0;if(motor=0x18)motor=0x42;else if(motor=0x42) motor=0x24; else if(motor=0x24) motor=0x81; else if(motor=0x81) motor=0x18; else motor=0x18; if(status=0x02) / V=9cm/sif(v0>=vb)v0=0;if(motor=0x81)motor=0x24;else if(motor=0x24) motor=0x42; else if(motor=0x42) motor=0x18; else if(motor=0x18) motor=0x81; else motor=0x18; if(status=0x04)if(v0>=vb)v0=0;time0=0;if(motor=0x11)motor=0x44;else if(motor=0x44) motor=0x22; else if(motor=0x22) motor=0x88; else if(motor=0x88) motor=0x11; else motor=0x11; if(status=0x08)if(v0>=vb)v0=0;time0=0;if(motor=0x88)motor=0x22;else if(motor=0x22) motor=0x44; else if(motor=0x44) motor=0x11; else if(motor=0x11) motor=0x88; else motor=0x11;

注意事項(xiàng)

本文(智能小車設(shè)計(jì)報(bào)告智能小車設(shè)計(jì)報(bào)告)為本站會(huì)員(細(xì)水****9)主動(dòng)上傳,裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。 若此文所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng)(點(diǎn)擊聯(lián)系客服),我們立即給予刪除!

溫馨提示:如果因?yàn)榫W(wǎng)速或其他原因下載失敗請(qǐng)重新下載,重復(fù)下載不扣分。




關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號(hào):ICP2024067431號(hào)-1 川公網(wǎng)安備51140202000466號(hào)


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺(tái),本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請(qǐng)立即通知裝配圖網(wǎng),我們立即給予刪除!