多功能空氣溫濕度計外文翻譯方案_第1頁
多功能空氣溫濕度計外文翻譯方案_第2頁
多功能空氣溫濕度計外文翻譯方案_第3頁
多功能空氣溫濕度計外文翻譯方案_第4頁
多功能空氣溫濕度計外文翻譯方案_第5頁
已閱讀5頁,還剩5頁未讀, 繼續免費閱讀

下載本文檔

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

文檔簡介

1、本科畢業設計(論文)外文翻譯浙江師范大學本科畢業設計(論文)外文翻譯譯文:基于DSl8B20的多點溫度測量系統設計摘要:介紹一種基于數字溫度傳感器芯片DSl8B20的高精度、多點溫度測量系統設計方案;闡述單總線數字溫度傳感器DSl8B20的基本工作原理和使用方法;主要分析由多個DSl8B20組成的溫度傳感器網絡的自動搜索算法,井給出系統設計實例。關鍵詞:溫度測量 數字溫度傳感器 單線總線 搜索算法 引 言 在傳統的溫度測量系統設計中,往往采用模擬技術進行設計,這樣就不可避免地遇到諸如引線誤差補償、多點測量中的切換誤差和信號調理電路的誤差等問題;而其中某一環節處理不當,就可能造成整個系統性能的下

2、降。隨著現代科學技術的飛速發展,特別是大規模集成電路設計技術的發展,微型化、集成化、數字化正成為傳感器發展的一個重要方向。美國Dallas半導體公司推出的數字溫度傳感器DSl8820,具有獨特的單總線接口,僅需要占用一個通用I/O端口即可完成與微處理器的通信;在一10+85溫度范圍內具有O5精度;用戶可編程設定912位的分辨率。以上特性使得DSl8820非常適用于構建高精度、多點溫度測量系統。1 DSl8B20簡介11 DSl8B20的特點 DSl8B20是美國Dallas半導體公司繼DSl820之后最新推出的一種改進型智能數字溫度傳感器。與傳統的熱敏電阻相比,它能夠直接讀出被測溫度,并且可根

3、據實際要求通過編程實現912位的數字值讀數方式;可以分別在9375ms和75O ms內完成9位和12位的數字量;從DSl8B20讀出信息或寫入DSl8B20信息僅需要1根口線(單線接口);溫度變換功率來源于數據總線,總線本身也可以向所掛接的DSl8B20供電,而無需額外電源。使用DSl8B20可使系統結構更趨簡單,可靠性更高。DSl8B20在測溫精度、轉換時間、傳輸距離、分辨率等方面較DSl820有了很大的改進。12 DSl8B20內部結構及工作原理 DSl8B20的內部結構如圖1所示,主要包括寄生電源電路、64位只讀存儲器(ROM)和單線接口、存儲器和控制邏輯、存放中間數據的高速暫存存儲器、

4、溫度傳感器、報警上限寄存器TH、報警下限寄存器TL、配置寄存器和8位CRC(循環冗余校驗碼)發生器。DSl8B20的核心是其數字溫度傳感器,精度可以通過用戶編程配置為9、10、ll和12位,其分別對應于05、O,25、O125和0062 5,可以滿足各種不同的分辨率要求。開始一次溫度轉換時,微處理器需要向DSl8820發出Convert T指令。轉換完成之后,該溫度數據存放在高速暫存存儲器的溫度寄存器中,占用2字節,并且DSl8820返回到空閑狀態。當DSl8820采用外部供電方式時,主機可以在發送溫度轉換指令后發起一次讀時隙。若此時該DSl8820已經完成溫度轉換,它將會返回“1”,否則返回

5、“0”。2 溫度測量系統設計 由DS18B20和美國Microchip公司推出的PIC單片機PICl8F8620以及相關外圍電路組成的高精度、多點溫度測量系統的結構框圖如圖2所示。系統采用6片DSl8B20構成小型溫度傳感器網絡,通過單線連接方式連接至微處理器的通用IO端口RB0。其中DSl8B20的分辨率為11位模式,即O125。微處理器通過單線協泌與溫度傳感器網絡實現通信。微處理器獲得溫度信息后,通過特定的算法,將處理后的溫度信息通過USB口或RS485接口傳送至上位機。2.1 DSl8B20的自動搜索算法 由于系統中使用了多片DS18B20構成溫度傳感器網絡,因此,如何準確、有效地對每一

6、溫度傳感器進行尋址成為該系統設計的一個核心問題。結合DS18B20的實際特點和系統的需求,提出如下解決方案:首先利用DS18B20的內部報警上限寄存器(如圖1所示,以下簡稱“TH寄存器”)存放溫度傳感器的編號,并將其編號貼在溫度傳感器表面。由于TH寄存器具有掉電不丟失數據功能,因此,便把每片DSl8B20的唯一64位注冊碼及其編號一一對應起來。這一過程需要對DSl8B20進行單獨編程。然后,將確定好編號的溫度傳感器接入單線網絡,利用DSl8B20特有的單線網絡自動搜索功能,即可搜尋到每片DSl8B20的注冊碼,再利用該注冊碼和相應的ROM操作指令,即可從每片DSl8820的TH寄存器中讀出相應

7、的設定編號,實現每片DS18B20的尋址功能。下面重點介紹一下該自動搜索功能。 每片DS18B20有唯一的64位注冊碼,存儲在只讀存儲器(ROM)中,其結構如下: 其中低8位是產品的工廠代碼(DSl8B20(1為28H),接著是每個器件的唯一序號,共48位,最高8位是前56位的循環冗余校驗碼。這就準許總線主機對總線上特定的DS18B20進行尋址。只有與64位注冊碼嚴格相符的DSl8B20,才能對后續的操作作出反應。所有與64位注冊碼不符的DSl8B20將等待復位脈沖。 搜索算法首先通過復位和在線應答脈沖時隙將單線總線上的所有DS18B20復位。成功地執行該操作后發送1字節的搜索命令,使所有連接

8、到單總線的DSl8B20準備就緒,開始進行搜索操作。搜索命令發出之后,開始實際的搜索過程。 首先,總線上的所有DSl8B20同時發送注冊碼中的第1位(最低有效位,參見上述DS18B20內部64位注冊碼結構)。按照單總線的特性,當所有DS18B20同時應答主機時,結果相當于全部被發送數據位的邏輯“與”。DSl8B20發送其注冊碼的第1位后,主機啟動下一位操作,接著DS18B20發送第l位數據的補碼。從兩次讀到的數據位可以對注冊碼的第1位作出幾種判斷,如表1所列。然后,主機向總線上的所有器件發回一個指定位。如果DSl8B20巾注冊碼的當前位的值與該數據位匹配,則繼續參與搜索過程;若DS18B20的

9、當前位與之不匹配,則該器件轉換到等待狀態并保持等待狀態,直到下一個復位信號到來。其余63位注冊碼的搜索依然按照這種讀2位寫1位的模式進行重復操作。按照這種搜索算法進行下去,最終除了唯一一個DSl8B20外,所有DS18B20將進入等待狀態,經過最后一輪檢測就可得到最后保留未進入等待狀態的DSl8B20的注冊碼。在后續搜索過程中選用不同的路徑或分支來查找其他器件的注冊碼,即可完成所有器件注冊碼的識別。22 軟件系統設計 系統軟件采用C語言編寫。在中斷服務程序中,實現用戶輸入以及和上位機的接口功能;在主程序中,實現溫度傳感器網絡的自動搜索、編號排序、獲取溫度信息,并根據預先設定的溫度上下限,實現相

10、應的報警功能。該系統中,根據不同的分辨率要求,DSl8B20的分辨率可通過編程設定,最高分辨率為12位,即00625,可滿足高精度設計要求。同時,由于設計中使用傳感器網絡的自動搜索算法,因此,當對網絡中的溫度傳感器作出調整(如更換、添加、刪除等操作)時,系統具有很強的自適應能力。系統軟件流程如圖3所示。圖3系統軟件流程框圖3 結論 在傳統的溫度測量系統中,往往采用模擬的溫度傳感器進行設計,必須經過A/D轉換后才可以被微處理器識別和處理。這樣的設計方法不僅對前端模擬信號處理電路提出了更高的要求,而且不具有數字通信和網絡功能。本文結合DSl8B20的新特性和現代溫度測量系統提出的新要求,提出了基于

11、智能數字溫度傳感器DSl8B20的高精度、多點溫度測量系統設計方案。該方案具有安裝方便、數字化程度高、精度高、適應性強等特點,在多種溫度檢測中具有廣闊的應用前景。原文:DSl8B20-based multi-point temperature measurement system designJiang Hong-yu Wang Yong Zhi YongSichuan University Microcontroller and Embedded SystemsAbstract: A digital temperature sensor chips based on high-precisi

12、on DSl8B20, multi-point temperature measurement system design; the single-bus digital temperature sensor DSl8B20 the basic working principle and use; principal component analysis by a number of temperature sensors DSl8B20 Automatic network search algorithm, well give examples of system design. Key w

13、ords: temperature measurement single-bus digital temperature sensor search algorithmIntroduction Temperature measurement in the traditional system design, simulation techniques are often used to design, so that, inevitably, encountered error compensation, such as lead, multi-point measurement error

14、in the switching and signal conditioning circuits, such as the problem of error; one of the aspect of a deal misconduct, it may cause a decline in the overall system performance. Modern science and technology with the rapid development, especially large-scale integrated circuit design technology, mi

15、niaturized, integrated, digital sensors are becoming an important direction of development. Dallas Semiconductor has introduced the United States the number of temperature sensors DSl8B20, has a unique single-bus interface, only need to occupy a common I / O port to complete the communication with t

16、he microprocessor; one at 10 +85 temperature range with O. 5 accuracy; 9 user programmable settings to 12 bit resolution. The above characteristics make DSl8B20 very applicable to building a high-precision, multi-point temperature measurement system.1 DSl88B20 brief introduction 1.1 Characteristics

17、of DSl8B20 Dallas Semiconductor DSl8B20 companies are following the United States after DSl820 a new improved version of intelligent digital temperature sensor. And compared to the traditional thermistor, which can directly read the measured temperature, and can be programmed according to the actual

18、 requirements of implementation of the 9-figure value of 12 readings of the way; 93.75ms, respectively, and 75O ms to complete 9 and figure the amount of 12; DSl8B20 read from or write information DSl8B20 only information I need one line (one-way interface); temperature transform power from the data

19、 bus, the bus itself can also be mounted to the power supply DSl8B20 without the need for additional power. DSl8B20 system architecture allows the use of more simple, more reliable. DSl8B20 in the temperature measurement accuracy, conversion time, transmission distance, resolution and so much more D

20、Sl820 improvements.1.2 DSl8B20 internal structure and working principle DSl8B20 internal structure as shown in Figure 1, including parasitic power circuit, a 64-bit read-only memory (ROM) and one-way interface, memory and control logic, storage of data between high-speed temporary storage, temperatu

21、re sensors, alarm ceiling registers TH, lower limit alarm registers TL, configuration registers and 8-bit CRC (cyclic redundancy check code) generator. FIG. 1 DSl8820 diagram of the internal structureDSl8B20 is the core of its digital temperature sensors, precision can be programmed through the user

22、 configuration for 9,10, ll and 12, respectively, corresponding to 0.5 , O, 25 , O. 125 , and 0.062 5 , to meet the requirements of a variety of resolutions. Start a temperature conversion, the microprocessor DSl8B20 required to issue a Convert T command. Conversion is complete, the temperature data

23、 stored in the temperature of high-speed temporary storage register, the occupier of 2 bytes, and return to DSl8B20 free status. When DSl8B20 external power supply, the host can send the temperature conversion command to initiate a read time slot. If at this time the temperature DSl8B20 conversion h

24、as been completed, it will return 1, otherwise return 0.2 temperature measurement system design DS18B20 and the United States by the introduction of Microchips PIC single-chip companies and related peripheral circuits PICl8F8620 composed of high-precision, multi-point temperature measurement system

25、block diagram shown in Figure 2. 6 DSl8B20 system constitute a small temperature sensor network through a single cable connected to the microprocessors general-purpose I / O port RB0. DSl8B20 a resolution of one of the 11 model, that is, O. 125 . Secretion through the one-way Association microproces

26、sor and temperature sensor network implementation of communication. Temperature of the microprocessor to obtain information through a specific algorithm, to deal with the temperature of information after the mouth or through the USB interface RS485-bit machine to send first. FIG.2 Block diagram of t

27、emperature measurement system2.1 DSl8B20 automatic search algorithm System because of the use of multi-chip temperature sensor network DS18B20 constitute, therefore, how to accurately and effectively addressing each of the temperature sensors in the system design to become a core issue. DS18B20 comb

28、ining the actual features and system requirements, the following solution: First, the internal alarm DS18B20 ceiling register (as shown in Figure 1, hereinafter referred to as TH register) kept the number of temperature sensors and ID attached to the temperature sensor surface. TH register because o

29、f missing data does not have a power-down function, so each DSl8B20 then the only 64-bit code and the number-one correspondence with. This process required a separate program to DSl8B20. And, will determine the number of good one-way network access temperature sensors, the use of specific DSl8B20 si

30、ngle network auto search function, you can search the key DSl8B20 each, and then make use of the ROM code and the corresponding operating instructions, can be from DSl8B20 each of the TH register set to read out the corresponding number of implementation each addressing DS18B20. Highlight the follow

31、ing about the automatic search function.DS18B20 each have only 64-bit code stored in read-only memory (ROM) in one of the low 8-bit products are Factory code (DSl8B20(1 to 28H), Its structure is as follows: followed by the Unique Serial Number for each device, A total of 48, the maximum is eight of

32、56 before the cyclic redundancy check code. This is permitted on the bus on the host bus specific to addressing DS18B20. 64 License only and strictly in line with the DSl8B20, can follow-up to respond to the operation. all with 64-bit code will not wait for the reset pulse DSl8B20.First of all searc

33、h algorithms and online responses through the reset pulse on time slot will be all one-way bus reset DS18B20. Successful implementation of this operation to send one byte after the base drive and making the base voltage slightly negative (within VBE(max). The saturation voltage search order, so that

34、 all connect to a single bus DSl8B20 ready to start the search operation. Search order after the actual start of the search process.First of all, the bus simultaneously sent to all key DSl8B20 the first one (least significant bit, see the above-mentioned 64-bit code DS18B20 internal structure). In a

35、ccordance with the characteristics of single-bus, when all the host response DS18B20 simultaneously, the results were equivalent to the logic of sending data bit and. License DSl88B20 sent its first one, the host to start the next operation, then the first l Send DS18B20-bit data of complement. Read

36、 the data from the two-bit code can be the first one to make some judgments, such as listed in Table 1. Table 1 The number of data bits to determineAnd, host to all the devices on the bus back to a designated place. If the current DSl8B20 towel-bit key value and the data bits match, then continue to

37、 be involved in the search process; if the current position with the DS18B20 does not match, the device transition to Wait for Wait for status and maintain status until the arrival of a reset signal . The remaining 63 search code is still read 2 According to this Writing a duplicate operation mode.

38、According to this search algorithm to continue, eventually the only one apart from DSl8820, all DS18B20 will enter a wait state, after the last round of testing can not enter the final to retain the status DSl8B20 Wait for the key. At follow-up search or choose a different path to find other branche

39、s of the key components to complete the identification code for all devices.2.2 Software System Design System software using C language. In the interrupt service routine, the user input as well as the implementation and interface functions of the PC; in the main program, the temperature sensor network implementation of the automatic search, sort code, to obtain the temperature information, and in accordance with pre-set upper and lower limits of temperature, the corresponding implementation

溫馨提示

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

評論

0/150

提交評論