單片機(jī)外文翻譯----基于單片機(jī)的電動(dòng)智能小車_第1頁(yè)
已閱讀1頁(yè),還剩7頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、<p>  基于單片機(jī)的電動(dòng)智能小車</p><p>  通過(guò)研發(fā)實(shí)現(xiàn)了一種以光電傳感器為敏感元件,以 AT89C51 單片機(jī)為控制核心的電動(dòng)循跡小車的智能控,該系統(tǒng)還包括直流電機(jī)、L9110 芯片和 LM324 比較器等。本設(shè)計(jì)采用 AT89C51 單片機(jī)作為智能小車核心控制器。</p><p>  本系統(tǒng)以單片機(jī)為控制核心 ,實(shí)現(xiàn)電動(dòng)車的前進(jìn)、退、左轉(zhuǎn)和右轉(zhuǎn)功能.通過(guò)角度傳感

2、器 [ 1 ]檢測(cè)蹺蹺板角度的變化 ,利用增量式 PI算法 [ 2 ]控制電動(dòng)車尋找平衡點(diǎn) ,同時(shí)運(yùn)用光電傳感器檢測(cè)黑線 ,使電動(dòng)車在行駛過(guò)程中保持直線運(yùn)動(dòng)且不會(huì)脫離蹺蹺。</p><p><b>  一.方案設(shè)計(jì)</b></p><p>  電動(dòng)車的速度、位置、運(yùn)行狀況的實(shí)時(shí)測(cè)量 ,并將測(cè)量數(shù)據(jù)傳送至單片機(jī)進(jìn)行處理,然后由單片機(jī)根據(jù)所檢測(cè)的各種數(shù)據(jù)實(shí)現(xiàn)對(duì)電動(dòng)車的智能

3、控制。這種方案能實(shí)現(xiàn)對(duì)電動(dòng)車的運(yùn)動(dòng)狀 態(tài)進(jìn)行實(shí)時(shí)控制,控制,靈活可靠 ,精度高 ,可滿足對(duì)系統(tǒng)的各項(xiàng)要求。(1)直流調(diào)速系統(tǒng)直流調(diào)速系統(tǒng)采用脈寬調(diào)速系統(tǒng),其主電路采用脈寬調(diào)制式變換器,簡(jiǎn)稱PWM變換器。由于PWM調(diào)速 系統(tǒng)的開關(guān)頻率較高,僅靠電樞電感的濾波作用就可以獲得脈動(dòng)很小的直流電流,電樞電流容易 連續(xù),系統(tǒng)的低速運(yùn)行平穩(wěn),調(diào)速范圍較寬,可達(dá)1:10000左右。 由于電流波形比 V-M系統(tǒng)好,在相同的平均電流下,電動(dòng)機(jī)的損耗和發(fā)熱都

4、比較小。同樣由于開關(guān)頻率高,若與快速響應(yīng)的電機(jī)相配合,系統(tǒng)可以獲得很寬的頻帶,因此快速響應(yīng)性能好,動(dòng)態(tài)抗擾能力強(qiáng)。根據(jù)以上綜合 比較,以及本設(shè)計(jì)中受控電機(jī)的容量和直流電機(jī)調(diào)速的發(fā)展方向,本設(shè)計(jì)采用了H型單極型可逆 PWM變換器進(jìn)行調(diào)速。</p><p>  1.1 光電檢測(cè)模塊設(shè)計(jì)</p><p>  該智能小車在貼有黑線的白紙“路面”上行駛,因此本模塊設(shè)計(jì)需要檢測(cè)鋪在行駛區(qū) 的 黑 膠

5、帶,包 括直線行駛區(qū)和沿弧線行駛區(qū)兩個(gè)區(qū)域。由于黑線和白紙對(duì)光線的反射系數(shù)不同可根據(jù)接收到的反射光的強(qiáng)弱來(lái)判斷“道路”---黑線。本文采用的是簡(jiǎn)單實(shí)用的檢測(cè)方法,即紅外探測(cè)法。</p><p>  紅外探測(cè)法,即利用紅外線在不同顏色的物理表面具有不同的反射性質(zhì)的特點(diǎn)。在小車行駛過(guò)程中不斷地向地面發(fā)射紅外光,當(dāng)紅外光遇到白色地面時(shí)發(fā)生漫發(fā)射,反射光被裝在小車上的接收管接收; 如果遇到黑線則紅外光被吸收,則小車上的接

6、收管接收不到信號(hào)。</p><p>  1.2 信號(hào)比較模塊設(shè)計(jì)</p><p>  輸送給單片機(jī),用于檢測(cè)傳感器的敏感性,電路圖如圖 5 所示。當(dāng)兩個(gè)傳感器同時(shí)檢測(cè)到光時(shí),直線前進(jìn)。當(dāng)傳感器檢測(cè)不到光時(shí),處于截止?fàn)顟B(tài),雙運(yùn)算放大器 LM324 輸出低電平給單片機(jī),由程序處理; 若左路未檢測(cè)到光,則向左糾正方向; 若右路未檢測(cè)到光,則向右糾正方向。</p><p>

7、  1.3 電機(jī)控制與驅(qū)動(dòng)模塊設(shè)計(jì)</p><p>  由于采用的是雙驅(qū)動(dòng)的小車,這部分電路必須能夠輸出兩個(gè)不同的電壓值,分別去控制小車的左、右兩個(gè)驅(qū)動(dòng)電機(jī),使小車的兩個(gè)車輪的轉(zhuǎn)速和方向相同或不同,從而來(lái)控制它的前進(jìn)和轉(zhuǎn)彎。在系統(tǒng)的設(shè)計(jì)過(guò)程中,用兩個(gè) L9110 芯片來(lái)分別連接單片機(jī)和直流電機(jī)。L9110 是為控制和驅(qū)動(dòng)電機(jī)設(shè)計(jì)的兩通道推挽式功率放大專用集成電路器件,將分立電路集成在單片 IC 之中,使外圍器件成

8、本降低,整機(jī)可靠性提高。該芯片有兩個(gè) TTL / CMOS 兼 容 電 平 的 輸 入,具 有良好的抗干擾性; 兩個(gè)輸出端能直接驅(qū)動(dòng)電機(jī)的正反向運(yùn)動(dòng),它具有較大的電流驅(qū)動(dòng)能力,每通道能通過(guò)800mA 的持續(xù)電流,峰值電流能力可達(dá) 1.5 ~ 2.0A; 同時(shí)它具有較低的輸出飽和壓降與靜態(tài)電流; 內(nèi)置的鉗位二極管能釋放感性負(fù)載的反向沖擊電流,使它在驅(qū)動(dòng)繼電器、直流電機(jī)、步進(jìn)電機(jī)或開關(guān)功率管的使用上安全可靠。</p><

9、p>  循跡小車系統(tǒng)以常見的 AT89C51 單片機(jī)為核心,輔以較簡(jiǎn)單的元器件和電路設(shè)計(jì),在順利完成循跡功能的前提下,又充分考慮到了外觀、成本等問(wèn)題,因此小車的大部分電路由手工焊接完成。在設(shè)計(jì)中,我們沒(méi)有在電路中增加冗余的功能,但是保留了各種硬件接口和軟件子程序接口,方便以后的擴(kuò)展和開發(fā)。</p><p><b>  二. 系統(tǒng)硬件設(shè)計(jì)</b></p><p>

10、  2. 1 電機(jī)驅(qū)動(dòng)模塊設(shè)計(jì)</p><p>  在制作智能小車時(shí), 后左、右輪分別用兩個(gè)轉(zhuǎn)速和力矩基本完全相同的直流減速電機(jī)進(jìn)行驅(qū)動(dòng), 車頭前部裝一個(gè)方向輪, 然后通過(guò) I/O 口控制兩個(gè)直流減速電機(jī)的轉(zhuǎn)速和轉(zhuǎn)向就可以實(shí)現(xiàn)小車的左轉(zhuǎn)、右轉(zhuǎn)和直行。</p><p>  電機(jī)驅(qū)動(dòng) 采用 一片 集成電機(jī)驅(qū)動(dòng)芯片L 298N。L298N是ST公司的產(chǎn)品, 內(nèi)部包含 4通道邏輯驅(qū)動(dòng)電路, 是一種

11、二相和四相電機(jī)的專用驅(qū)動(dòng)器, 即內(nèi)含二個(gè)H 橋的高電壓大電流雙全橋式驅(qū)動(dòng)器, 接收標(biāo)準(zhǔn) TTL邏輯電平信號(hào), 可驅(qū)動(dòng) 46V、2A 以下的電機(jī)。</p><p>  2. 2 尋跡模塊設(shè)計(jì)</p><p>  尋跡模塊主要由光電反射式傳感器組成。光敏電阻的阻值隨周圍環(huán)境光線的變化而變化, 當(dāng)光線照射到白線上面時(shí), 光線發(fā)射強(qiáng)烈; 光線照射到黑 線上面時(shí), 光線發(fā)射較弱。因此當(dāng)光敏電阻在白線

12、和黑線上方時(shí), 阻值會(huì)發(fā)生明顯的變化, 將阻值的變化值經(jīng)過(guò)比較器就可以輸出高低電平。但是這種方式受環(huán)境影響大, 工作不穩(wěn)定。本文實(shí)際采用的是 RPR220 型反射式傳感器制作的尋跡模塊。</p><p>  RPR220是一種一體 化反射型光電探測(cè)器, 其發(fā)射器是一個(gè)砷化鎵紅外發(fā)光二極管, 而接收器是一個(gè)高靈敏度硅平面光電三極管。當(dāng)發(fā)光二極管發(fā)出的光反射回來(lái)時(shí), 三極管導(dǎo)通并輸出低電平。</p>&

13、lt;p>  2. 3 避障模塊設(shè)計(jì)</p><p>  避障模塊主要由紅外反射式傳感器組成。紅外反射式傳感器由 1 個(gè)紅外發(fā)射管 (發(fā)射器 )和 1個(gè)光電二極管 (接收器 )構(gòu)成, 紅外發(fā)射管發(fā)出的紅外光在遇到反光性較強(qiáng)的物體后被折回, 被光電二極管接收, 引起光電二極管光生電流的增大, 將此變化轉(zhuǎn)為電壓信號(hào), 就可以被處理器接收并處理。</p><p>  2. 4 遙控模塊設(shè)計(jì)

14、</p><p>  本模塊發(fā)射端采用高靈敏的 H L - 5000型萬(wàn)能電視遙控器, 接收端采用接收頻率為 38kH z的萬(wàn)能接收頭 1838, 該模塊與單 片機(jī)接口非常方便。另外, 對(duì)于經(jīng) 紅 外 接 收 后 的 編 碼 信 號(hào), 本系統(tǒng)設(shè)計(jì)時(shí)運(yùn)用AT89C52單片微機(jī)的外部中斷來(lái)接收, 信號(hào)的下降沿觸發(fā)外部中斷。為了識(shí)別一個(gè)完整的鍵信號(hào), 必須對(duì)每一個(gè)編碼脈沖的寬度進(jìn)行測(cè)量, 以判別接收到的脈是 ! 0?還

15、是 ! 1?, 利用單片機(jī)中的定時(shí)器 /計(jì)數(shù)器來(lái)測(cè)量脈沖寬度。定時(shí)器 /計(jì)數(shù)器的除分比是可以設(shè)定的, 從除 2到除 2048, 可測(cè)量的脈沖寬度可達(dá) 500m s。本文設(shè)定的除分比為 12, 即 12分頻, 因?yàn)橥獠繒r(shí)鐘約為 12MH z, 時(shí)鐘周期為 1 s, 所以定時(shí)器 /計(jì)數(shù)器每計(jì)時(shí)一次為 1 s。</p><p>  2. 5 報(bào)警模塊設(shè)計(jì)</p><p>  報(bào)警模塊的核心芯片選

16、擇 110報(bào)警 IC, 可應(yīng)用于汽車、摩托車、防盜器、個(gè)人防暴器、門磁報(bào)警 器等場(chǎng)所。</p><p><b>  三. 系統(tǒng)軟件設(shè)計(jì)</b></p><p>  本系統(tǒng)軟件采用模塊化結(jié)構(gòu), 由主程序﹑初始化子程序、中斷子程序、延時(shí)子程序、按鍵發(fā)音子程序、按鍵掃描子程序構(gòu)成。</p><p>  3. 1 尋跡子程序設(shè)計(jì)</p>

17、<p>  尋跡模塊設(shè)計(jì)是通過(guò)把左 右光電傳感器 的輸出端分別接到單 片機(jī)的 P 22 和 P23 管腳 上, 然后 通過(guò)單片機(jī)編程, 產(chǎn)生 PWM 控制信號(hào), 通過(guò) L 298控制電機(jī)的轉(zhuǎn)速, 讓小車達(dá)到前進(jìn)、左轉(zhuǎn)、右轉(zhuǎn)及停止行駛的目的。</p><p>  3. 2 避障子程序設(shè)計(jì)</p><p>  避障模塊設(shè)計(jì)是通過(guò)把左右紅外反射式傳感器模塊的輸出端分別接到單片機(jī)的 P2

18、0和 P21管腳上, 然后通過(guò) 單片機(jī)編程, 產(chǎn)生 PWM 控制信號(hào), 通過(guò) L298控制電機(jī)的轉(zhuǎn)速, 讓小車達(dá)到前進(jìn)、左轉(zhuǎn)、右轉(zhuǎn)及停止行駛的目的。</p><p>  3. 3 遙控子程序設(shè)計(jì)</p><p>  遙控模塊設(shè)計(jì)是通過(guò)把紅外接收頭 1838的輸出端接到單片機(jī)的 P32管腳上, 然后用萬(wàn)能遙控器對(duì)其進(jìn)行遙控, 接著讓單片機(jī)解碼, 產(chǎn)生 PWM 控制 信號(hào),通過(guò) L298控制電

19、機(jī)的轉(zhuǎn)速, 讓小車達(dá)到前進(jìn)、左轉(zhuǎn)、右轉(zhuǎn)及停止行駛的目的。</p><p><b>  四.總結(jié)</b></p><p>  采用單片機(jī)為核心, 利用光電傳感器和紅外反射式傳感器作為探測(cè)系統(tǒng), 設(shè)計(jì)了可以實(shí)現(xiàn)自動(dòng)尋線行走、自動(dòng)避障、報(bào)警以及遙控等功能的智能小車。該設(shè)計(jì)的顯著優(yōu)點(diǎn)是電路簡(jiǎn)單、可靠性強(qiáng)、成本低, 并且非常易于功能進(jìn)一步完善和擴(kuò)展。</p>&l

20、t;p>  Electric intelligent car based on SCM </p><p>  Through research and to realize a photoelectric sensor for sensitive components, with AT89C51 as control core electric tracing of intelligent control

21、carbonylation-the car,The system is also including dc motor, L9110 chips and LM324 comparator etc. The design USES AT89C51 as intelligent car core controller。</p><p>  The system takes microcontroller as con

22、trol core and realization of electric before Enter, back, turn left and right turn function. Through the Angle sensor [1] detection The seesaw Angle change, use incremental PI algorithm [2] to control the electric Car fo

23、r balance, and using photoelectric sensor detection black line, make the electricity Actuation vehicle in the course of driving keep linear motion and don't skip from atrium。</p><p>  1.Project Design<

24、;/p><p>  light by a sensor, the reality of the electric car is moving quickly degrees, bit, buy, transportation line shape when measured quantity of real condition, and will be measured quantity number accordi

25、ng to preach sent to monolithic machine into line processing, but by single chip machine according to the measured by root different forms of several inspection according to real now to electric actuation vehicle wisdom

26、can control system. This kind of square case can real now to electric actuation </p><p>  1.1 photoelectric detection module design</p><p>  The intelligent car was stuck on the black line runni

27、ng on white paper "road", so this module design need to detect shop on the black rubber belt drive area, including Run straight along the arc district and driving district two area. Because of the black and whi

28、te paper to light reflection coefficient is different, can according to receive reflected light.</p><p>  The strength of the judge "road" - the black line. This paper USES is simple and practical

29、detection methods, namely the infrared detection method.</p><p>  Infrared detection method, i.e. use infrared ray in different colors of physical surface with different reflection properties characteristics

30、. In the car driving process Continually to the ground to launch the infrared, when the infrared met white ground occurs when the reflected light, aimless and launch packed on the car of receiving tube receiving; if Frui

31、t is met black line is absorbed, and then the infrared cars receiving tube receiving less than signal.</p><p>  1. 2 signal comparative module design</p><p>  This part design USES a LM324 compa

32、rator, of sensor signal voltage received compare and amplified, and will compare the results after Feed to the microcontroller, used to detect sensor sensitivity, diagram shown in figure 5 shows. When two sensors simulta

33、neously detect light, straight forward. When the sensor can't detect light, in cut-off state, double LM324 operational amplifier output low level to microcontroller, by program processing, If left Not detected light,

34、 then left correct direction;</p><p>  1. 3 motor control and driving module design</p><p>  Because use is double drive cars, this part of the circuit must be able to output of two different vo

35、ltage values, respectively to controlling trolley right and left two motor drive, the two of the wheel speed and direction of the same or different, thus to control its advance and turning. In system design process, use

36、two L9110 chips to connect SCM and dc motor respectively. L9110 is for control and drive motor design two channels push-pull power amplifier application-specific integrated circui</p><p>  Follow tracing car

37、 system to common AT89C51, complementary with relatively simple components and circuit design, the smooth completion of follow under the premise of tracing function, and fully considered appearance, costs, so most of the

38、 circuit car by manual welding is complete. In the design, we never in a circuit increase redundant functions, but retained various hardware interface and software subroutines interface to facilitate the expansion and de

39、velopment after.</p><p>  2. System hardware design</p><p>  2. 1 motor driver module design</p><p>  In making intelligent car, after left, right wheel respectively with two speed

40、and Torque basic identical dc motor driven deceleration, bolt-on trunk-lid spoiler Department to install a direction wheel, then through the I/O mouth to control two dc slowing down Motor speed and steering can be achiev

41、ed on the car to the left, turn right and straight Line.</p><p>  Motor driver using a integrated electrical machine flooding dynamic core slice L 298N. L298N is ST the product of the company, the internal c

42、ontaining four channel logical drive circuit, it is a kind of two phase four phase motor drive, namely the special contains two H bridge of high voltage large current commander bridge type drive, acceptance criteria TTL

43、logic level signals, be driven 46V, 2A below the motor.</p><p>  2. 2 tracing module design</p><p>  Tracing module mainly composed by photoelectric sensor reflex. Photoconductive resistance of

44、the resistance of the light with the surrounding environment changes, when the LTT white lines above, light emission strongly; The LTT black line above, light emission are relatively weak. So when photoconductive resista

45、nce in white line and black line above the elements will occur significantly changes, the resistance changes value after comparator can output high level. But this way environmental influ</p><p>  RPR220 is

46、an integration of reflective photoelectric detector, the transmitter is a gaas infrared light emitting diode and the receiver is a high sensitivity silicon photoelectric triode flat. When the light emitting diode reflect

47、ed back, triode conduction and output low level.</p><p>  2. 3 obstacle avoidance module design</p><p>  Obstacle avoidance module mainly composed by infrared reflection sensor. Infrared reflect

48、ion sensor by one infrared tubes (launchers) and 1 photoelectric diode (receiver) constitute, infrared tubes out to meet the infrared object reflective sex strong after be turned back, by photoelectric diode receiving, c

49、ause photoelectric diode current increases, light born this change into voltage signal, it could be processor receives and processing.</p><p>  2. 4 remote control module design</p><p>  This mo

50、dule will launch end USES high sensitive H L - 5000 type universal television remote control, the receiver using receive frequency for 38kH z's receiving head 1838, this module and the single chip computer interface

51、is very convenient. In addition, for the red outside meet after harvest of plait code letter number, the department tasseled set when shipped with project of AT89C52 single chip microcomputer external interruption to rec

52、eive, signal the falling edge of trigger external interru</p><p>  2. 5 alarm module design</p><p>  Alarm module core chip 110 IC, can choose application in automobile, motorcycle, alarms, pers

53、onal riot device, door magnetic alarm device and etc.</p><p>  3. System software design</p><p>  This system software modular structure, the main program, initial anti-fuzzy procedures, interru

54、pt subroutines, delay subroutines, buttons pronunciation subroutines, buttons scanning subroutines constitutes.</p><p>  3. 1 tracing subroutines design</p><p>  Tracing module is designed by th

55、e left right photoelectric sensor output terminal receiving monolithic machine respectively, P 22 and P23 tube feet, then through the microcontroller programming, produce PWM control signal, through L 298 control motor s

56、peed, let the car to move forward, left turn, turn right and stop driving purpose.</p><p>  3. 2 avoid barrier of programming</p><p>  Obstacle avoidance module is designed by the infrared refle

57、ction sensor module around the output terminal receiving MCU respectively P20 and P21 tube feet, then through the microcontroller programming, produce PWM control signal, through L298 control motor speed, let the car to

58、move forward, left turn, turn right and stop driving purpose.</p><p>  3. 3 remote subroutines design</p><p>  Remote control module is designed by the infrared sensor 1838 an output terminal of

59、 the receiving MCU P32 tube feet, then use all-purpose remote control on the remote control, then let microcontroller decoding, produce PWM control signal, through L298 control motor speed, let the car to move forward, l

60、eft turn, turn right and stop driving purpose.</p><p>  4 Summary </p><p>  Adopts singlechip, using photoelectric sensor and infrared reflection sensor was designed as a detection system, can r

61、ealize automatic homing line to walk, automatic obstacle avoidance, alarm and remote control functions such as intelligent car. This design is the obvious advantages of simple circuit, reliability, low cost, and very eas

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論