紅外數字式轉速表外文翻譯_第1頁
紅外數字式轉速表外文翻譯_第2頁
紅外數字式轉速表外文翻譯_第3頁
紅外數字式轉速表外文翻譯_第4頁
紅外數字式轉速表外文翻譯_第5頁
已閱讀5頁,還剩11頁未讀, 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、本科畢業設計(論文)外文翻譯浙江師范大學本科畢業設計(論文)外文翻譯譯文:基于微控制器的速度表暨里程表ARUN KUMAR VADLA文章來源:electronics for you,2008:6064.通常,數字式車速表僅能在豪華汽車和高端摩托車中找到。 即使您的摩托車有一個機械車轉速表,當它受到損壞時您將做什么? 首先,您需要替換機械蝸輪,然后替換纜繩。 無論如何,我們這里描述得是如何給您的摩托車設計一個數字式車速表。該電路使用一個微型控制器、液晶顯示和一些常用的組件。這是一個更好的替代機械速度計,甚至以最低技術水平的初學者也可以組裝的物品。數字速度表暨里程表的特點是: 1數字讀出2顯示的

2、速度為公里/小時3顯示行駛的移動距離4讀數(EEPROM)固定在存儲器中保存的5由于使用微控制器就比較可靠6無機械磨損和撕裂7在家中可以自己制速度變換裝置或傳感器8在完成99,999.9 km后會自已重新設置到零9容易修造和固定在自行車上 計算你首先需要知道的自行車前輪的半徑。這里的計算是基于對英雄本田的輝煌典范。前輪半徑為30厘米(這可能隨品牌或模型變化)。wheel=2r的圓周(其中r為厘米),周長= 2 3.14 30 =188.4厘米或一點八八四米。速度。讓我們假設他在1秒鐘完成一次轉動。換言之,在一秒鐘內,自行車前進了1.88米。所以在km/hour的速度: N1.883600/10

3、00= N6.784或N6.8 N是每秒轉過的轉數。6 .8是一個常數,并且僅N變化,例如,如果N是5,速度等于5x6.8 = 34公里/小時。距離。里程表每隔100米更新一次,包括100米,車輪必須作出約53次轉動(100/1.88)。微控制器采用的計算革命,速度計算,結果轉換和顯示任務。電路說明圖.1基于微型控制器的數字式車速表附帶測路器的電路在圖.1顯示。電路中使用的各種組件的功能如下所述。微型控制器。 由于它的與基于CISC的8051家庭的低數字計算、支付能力和兼容性從Atmel的一個20引腳的AT89C2051微型控制器使用這里。所有的微控制器引腳可利用的項目。這個微型控制器具有2

4、KB的閃存,128個字節RAM, 15條輸入-輸出(輸入/輸出)線、兩個16位定時器或者計數器、一個5向量兩級中斷結構,、一個全雙工串行口、一個高精確度模擬比較器、一片上振蕩器和時鐘電路。液晶顯示模塊。要顯示移動的速度和距離,我們使用一塊基于HD44780的16x2字母數字液晶控制器。LCD的背光功能,使數據即使在夜晚都依然可見。LCD的引腳配置和液晶顯示功能。早前已經被發表在液晶顯示器有EFY的幾個問題中。串行EEPROM。距離行駛的讀數都保存在一個外部串行EEPROM中。在這里使用的是24C02飛利浦協議的串行EEPROM??偩€協議。該總線由兩個活動連接線和一條地線。主動線,串行數據線(S

5、DA)和串行時鐘線(SCL)是雙向的。掛接到總線的每個設備都有自己唯一的地址,不管它是一個MCU,LCD驅動器,內存或ASIC。根據功能,這些芯片都可以作為一個接收器和/或發射機。顯然,LCD驅動器只是一個接收器,而記憶體或I/O芯片可以同時發射器和接收器。該總線是一種多主總線。這意味著,超過一個IC發起數據傳輸能力可以連接到它。該協議規范規定的IC,它被認為是上啟動主機總線的數據傳輸。總線主機通常是微控制器。因此,所有其他IC被視為在這一瞬間的總線。假設在MCU要發送數據到它的總線之一。首先,微控制器將發出一個起始條件。作為一個注意信號所連接的所有設備,這行為。總線上的所有IC將聽取傳入的數

6、據總線。則MCU發送的設備,它希望訪問地址,以及標明是否有訪問是一個讀或寫操作。收到的地址,所有IC將比較它自己的地址。如果不匹配,他們只是等待,直到總線由停止條件釋放。如果地址匹配,芯片將產生一個響應所謂的承認信號。我們已經用寫在這個項目的運作。一旦接收到應答信號微控制器,它可以開始發送或接收數據。在我們的例子中,MCU將發送數據。當一切都過去了,微控制器會發出停止條件。這預示著,巴士已被釋放,而連接的ICS可能期待著另一個傳輸到任何時候啟動。我們有幾個國家在總線上:啟動,地址,承認,數據和停止。這些總線上的所有獨特的條件。在我們的項目中,微控制器是主串行EEPROM是奴隸。定期的讀數存儲在

7、EEPROM和以前的閱讀是從EEPROM中檢索每個自行車啟動時。轉速傳感器。對于這個項目,我們利用一種簡單的自制速度傳感器的使用。車輪的旋轉是由一個干簧管的聯合行動,并固定在車輪磁鐵感應。每一次當車輪轉動時,該傳感器發出一個脈沖給微控制器。光耦。光電耦合器是用來對付反彈的時候,干簧管觸點閉合的影響。電源供應器。使用三端電壓后,對于各部分電路的電源從汽車的12V的電池后減少到5V。軟件軟件的Init_EEPROM和Speedo這一項目的程序源代碼是用匯編語言。這是編譯使用打開來源ASEM-51匯編器生成Init_EEPROM.hex和Speedo.hex文件。十六進制文件被燒入微控制器芯片。兩個

8、單片機的內部定時器被配置為8位計數器來計算轉速傳感器產生的脈沖數。一個定時器用于測量距離和速度的計算等。一個軟件延時一秒后產生的高速計數器被觸發。速度計數值是從逆記數器得到。為了加快進程,查找數據表存儲在ROM,幫助微控制器轉換成相應的速度值的脈沖數。該方案流程圖如圖.2所示。在距離計數器加每隔100米。該輪已使53個轉動實現這一目標。距離柜臺裝有一個203的初始值(255-53 +1),并在每個轉動時遞增。經過53次計數,定時器溢出并產生一個中斷來通知微控制器。在中斷服務程序,微控制器更新相應的DS1的距離變量。而是在每個周期的節能距離變量,當車輛在停止時(速度00.0公里/小時)微控制器會

9、保存這些讀數。換句話說,當車輛停在交通信號或之前關閉點火鍵S,最后讀數保存到EEPROM中。同樣再次檢索閱讀時從自行車是開啟未來的閱讀時間,為每個更新EEPROM中。圖.2制造建設中的簧片開關和磁鐵需要在電機的自行車(英雄本田的輝煌)前輪固定。一個小的圓形磁鐵(直徑約2厘米),通常在使用揚聲器的小玩具中是都可以用到的。磁鐵固定在鼓的中部連接到下方的輻條輪鼓。磁鐵固定使用熱膠水或環氧樹脂。固定磁簧開關,PVC管的機械需要,需要使磁鐵和干簧管正確對齊,如圖.3所示。將3.2厘米直徑、長15.2厘米PVC管測量垂直剪下,分為兩半。只用一個一半的PVC管。坐騎和安全保障的的干簧管和電纜用領帶固定在熟料

10、手柄上(通常用于緊急照明設備)。一旦烘干,焊兩條線的另一端當兩個簧片開關的引線。塑料手柄上用螺釘固定。現在,請將前面避震前叉,使得磁簧開關管正對磁體的開關。圖.3連接萬用表,將它設置在連續性模式下,兩條電線來字磁簧開關。慢慢轉動方向盤,當磁鐵橫跨它通過時,看看簧片開關是否關閉。如果是這樣的話,萬用表會提供連續性的響聲。當磁鐵移開遠離磁簧開關后,蜂鳴聲將停止,這表明該簧片開關處于打開狀態。做一些試驗,以找到安裝和固定的PVC管,讓磁簧開關順暢工作的最佳位置。馬克前面減震器叉的位置?,F在您可以修復的PVC管玩意兒的減震器前叉采用熱膠,如圖所示.5。使用一定的熱膠,以確保管道的自由。仔細檢查自行車的

11、車把上的兩條電線之間的關系,以確保能順利使用電纜線,這就完成了傳感器安裝的一部分。主電路和液晶顯示模塊可安裝在合適的塑料外殼中,可隨時在電子商店中買到。這些外殼應具有易于安裝的液晶面板預切槽。如果這樣的框不可用,您可以使用適當取消對某些部分的液晶面板的電子電抗器的塑料盒。電源可采取直接從自行車的12V的電池或挖掘控制臺的大燈開關和指示燈。為此,您需要拆卸交換機控制臺并積極用萬用表識別正面導線和接地導線。在進行這一步時,記住要關閉點火。釬具60厘米兩芯線連接到交換機控制臺內的正負極。必須采取從交換機控制臺提供,它的優點是點火鑰匙的控制,而主要單位是無需單獨的通斷開關電源。一個實際的尺寸,單面印刷

12、電路板的基于微控制器的速度表暨里程表布局如圖所示。在圖.7和元件布局圖.8。測試當所有的部件測試被焊在PCB上,方案與Init_EEPROM.hex文件放置在一個微控制器和20引腳微控制器芯片和相應的開關電路。在LCD的第一行,INIT_EEPROM出現。五秒鐘后,00000 .0顯示在第二行。這個過程將刪除任何以前的數據并且將EEPROM中的初始讀數調整為零。現在關掉電源和speedo.hex的主要文件中的微控制器。編程后,單片機電路和開關電源回到先前的狀態。 LCD會顯示公里:00000.0在第一行,速度 千米/小時:00.0在第二行?,F在,先準備你要測試的車子。連接兩條電線從干簧管和電源

13、線來的主要單位。裝載在自行車的車把中心的u的夾子用于固定手柄的機箱頂部單位。您可以使用電纜來做到這一點。安裝布置的位置如圖.6?,F在來做個測試,啟動自行車,如果連接是正確的,速度和距離將在液晶顯示屏上顯示出來。像聚乙烯防護罩可用于雨天的主機使用。EFY注意。本文的源代碼已被列入thismonth的EFY CD中。圖.4圖.5圖.6圖.8 圖.7原文: Microcontroller-based Speedometer-Cum-Odometern ARUN KUMAR VADLAThe article source:electronics for you,2008:6064.Normally,

14、digital speedometers are found only in luxury cars and high-end motorbikes. Even if your motorbike has a mechanical speedometer, what will you do when it gets damaged? First, you need to replace the mechanical worm gear and then the cable. Anyway, we describe here how to build a digital speedometer-

15、cumodometer for your motorbike. The circuit uses a microcontroller, an LCD display and some commonly available components. It is a better alternative to the mechanical speedometer and even a beginner with minimal skill level can assemble it.The features of the digital speedo-meter-cum-odometer are:1

16、. Digital readout2. Speed displayed in km/hour3. Distance traveled displayed in kilometers4. Readings saved in non-volatile memory (EEPROM)5. Reliability due to use of the microcontroller6. No mechanical wear and tear7. Home-brewed speed transducer/sensor8. Self reset to zero after completion of 99,

17、999.9 km 9. Easy to build and fix onto the bikeCalculations You first need to know the radius of the bikes front wheel. The calculations here are based on Hero Hondas Splendor model. The radius of the front wheel is 30 cm. (This can vary with thebrand or model.) Circumference of the wheel= 2r(where

18、r is in cm)= 23.1430= 188.4 cm or 1.884 metres.Speed. Lets assume that in 1 second he wheel completes one revolution. In other words, in one second, the bike has covered 1.88 metres. Therefore the speed in km/hour:N1.883600/1000= N6.784 or N6.8 where N is the number of revolutions per second. 6.8 is

19、 a constant and only N varies; for example, if N is 5, the speed equals 5x6.8= 34 km/hour.Distance. The odometer is updated every 100 metres. To cover 100 metres, the wheel is required to make approximately 53 revolutions (100/1.88).The microcontroller takes care of the tasks of revolutions counting

20、, speed calculation, conversion and display of results.Circuit descriptionThe circuit of the microcontroller-based digital speedometer-cum-odometer is shown in Fig. 1. The functions of various components used in the circuit are described below. Microcontroller. A 20-pin AT89C2051 microcontroller fro

21、m Atmel is used here because of its low pin count, affordability Fig. 1.and compatibility with CISC-based 8051 family. All the available pins of the microcontroller are utilised in the project. This microcontroller features 2 kB of Flash, 128 bytes of RAM, 15 input/output (I/O) lines, two 16-bit tim

22、ers/counters, a five-vector two level interrupt architecture, a full-duplex serial port, a precision analogue comparator, on-chip oscillator and clock circuitry. LCD module. To display the speed and distance traveled, we have used a 16x2 alphanumeric LCD based on HD44780 controller. The backlight fe

23、ature of the LCD allows data to be visible even at night. The pin configuration and features of this LCD have earlier been published in several issues of EFY.Serial EEPROM. The readings of the distance traveled are saved in an external serial EEPROM. Here, a 24C02 serial EEPROM based on Philips I2C

24、protocol is used.I2C bus protocol. The I2C bus consists of two active wires and a ground connection. The active wires, serial data line (SDA) and serial clock line (SCL) are bidirectional. Every device hooked up to the bus has its own unique address, no matter whether it is an MCU, LCD driver, memor

25、y or ASIC. Each of these chips can act as a receiver and/or transmitter, depending on the functionality. Obviously, an LCD driver is only a receiver, while a memory or I/O chip can be both transmitter and receiver. The I2C bus is a multi-master bus. This means that more than one IC capable of initia

26、ting a data transfer can be connected to it. The I2C protocol specification states that the IC that initiates a data transfer on the bus is considered the bus master. Bus masters are generally microcontrollers. Consequently, all the other ICs are regarded as bus slaves at that instant.Lets assume th

27、at the MCU wants to send data to one of its slaves. First, the MCU will issue a START condition. This acts as an attention signal to all of the connected devices. All ICs on the bus will listen to the bus for incoming data. Then the MCU sends the address of the device it wants to access, along with

28、an indication whether the access is a read or write operation. Having received the address, all ICs will compare it with their own address. If it doesnt match, they simply wait until the bus is released by the stop condition. If the address matches, the chip will produce a response called acknowledg

29、e signal. We have used write operation in this project.Once the MCU receives the acknowledge signal, it can start transmitting or receiving data. In our case, the MCU will transmit data. When all is done, the MCU will issue the stop condition. This signals that the bus has been released and that the

30、 connected ICs may expect another transmission to start any moment.We have several states on the bus: start, address, acknowledge, data and stop. These are all unique conditions on the bus. In our project, the microcontroller is the master and the serial EEPROM is the slave.The readings are periodic

31、ally stored in the EEPROM and the previous reading is retrieved from the EEPROM each time the bike is started.Speed sensor. For this project, we make use of a simple home-made speed transducer. The rotation of the wheel is sensed by the combined action of a reed switch and a magnet fixed on the whee

32、l. The sensor sends a pulse to the microcontroller each time a revolution is made.Optocoupler. An optocoupler is used to counter the effects of bouncing when the contact of reed switch is closed.Power supply. The power supply for various parts of the circuit is drawn from the vehicles 12V battery af

33、ter reducing it to 5V using a three-terminal voltage.SoftwareThe Init_EEPROM and Speedo source codes of this project are written in Assembly language. These are compiled using an open-source ASEM-51 assembler to generate the Init_EEPROM.hex and Speedo.hex files. The hex files are burnt into the micr

34、ocontroller chip. Two internal timers of the microcontroller are configured as 8-bit counters to count the number of pulses generated by the speed sensor. One timer is used to measure the distance and the other for speed calculation.A software delay of one second is generated after the speed counter

35、 is triggered. The speed count value is obtained from the counter registers. To speed up the process, a look-up data table is stored in the ROM that helps the microcontroller to convert the number of pulses into the corresponding speed values. The program flow-chart is shown in Fig. 2.The distance c

36、ounter is incremented every 100 metres. The wheel has to make 53 revolutions to achieve this. The distance counter is loaded with an initial value of 203 (255-53+1) and is incremented on each revolution. After 53 counts, the timer overflows and generates an interrupt to notify the microcontroller th

37、at 100 metres are covered.In the interrupt service routine, the microcontroller updates the corresponding DS1 distance variable. Instead of saving distance variables after each cycle, the microcontroller saves these readings when the vehicle is at halt (speed is 00.0 km/hour). In other words, when t

38、he vehicle is stopped at traffic signals or before the ignition key s turned off, the last reading is saved to the EEPROM. The same reading is again retrieved from the EEPROM when the bike is turned on next time and the readings are updated for each trip.Fig. 2.ConstructionThe reed switch and a magn

39、et need to be fixed on the front wheel of the motor bike (Hero Hondas Splendor). A small circular magnet (about 2 cm in diametre), normally used in speakers of small toys, can be used. Fix the magnet to the central drum of the wheel just below the spokes connected to the drum. Secure the magnet usin

40、g hot glue or Araldite.For fixing the reed switch, a PVC pipe contraption needs to be made so that the magnet and reed switch are aligned as shown in Fig. 3. The materials required to build the contraption are shown in Fig. 4. Cut a 3.2cm diameter PVC pipe measuring 15.2 cm in length perpendicularly

41、 into two halves. Use only one half of the PVC pipe. Mount and secure the reed switch using Araldite and cable ties on the plastic handle (normally used in emergency lights). Once it dries up, solder two wires to the two opposite end leads of the reed switch. Fix the plastic handle on the half cut P

42、VC pipe using screws. Now, place the pipe on the front shock-absorber fork such that reed switch faces towards the magnet. Connect a multimeter, set in continuity mode, to the two wires coming from the reed switch. Rotate theFig. 3.Fig. 4.wheel slowly and see whether the reed switch closes when the

43、magnet passes across it. If it does, the multimeter will give a continuity beep. When the magnet moves away from the reed switch, the beep will stop, indicating that the reed switch is open. Make a few trials to find the optimal position for mounting and fixing the PVC pipe such that the reed switch

44、 works smoothly. Mark the location on the front shock-absorber fork.Now you can fix the PVC pipe contraption to the shock-absorber fork using hot glue as shown in Fig. 5. Use liberal amount of hot glue to secure it to the pipe. Carefully route the two wires up to the bikes handle bar using cable tie

45、s to secure the wire. This completes the sensor mounting part.Fig. 5.The main circuit and the LCD module can be housed in suitable plastic enclosures, which are readily available in electronic projects shops. These enclosures should have precut slot for easy mounting of the LCD panel. If such boxes

46、are not available, you can use the plastic boxes of electronic chokes by suitably removingSome portions for the LCD panel. Power supply can be taken either directly from the bikes 12V battery or tapped from the console which houses horn, headlight and indicator light switches. For this, you need to

47、remove the switch console and identify positive wire and ground wire using a multimeter. When carrying out this step, remember to turn the ignition key toon position. Solder a 60cm two-core wire to the positive and negative terminals inside the switch console. The advantage of taking supply from the switch console is that

溫馨提示

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

評論

0/150

提交評論