【正文】
write_date(TempData[2]。 lcd_pos(0,3)。 write_date(TempData[1]/10+0x30)。附錄二:程序/*主程序*/includeincludeincludeincludeincludeunsigned char TempData[8]。四、結論本文主要用于C8051 F060單片機控制SHT75數(shù)字式溫濕度傳感器采集倉庫室內溫濕度,然后CAN總線將數(shù)據(jù)傳輸?shù)絇C機實時監(jiān)控。圖2 接收數(shù)據(jù)接口將單片機的硬件系統(tǒng)和控制電路、溫濕度傳感器信號用于整體測試,然后確保溫濕度數(shù)據(jù)采集系統(tǒng)已完成檢測。C 1,C 2和C 3的值,C3是C1和C2輸出濕度數(shù)據(jù)的中間數(shù)表1 濕度變換系數(shù)當測量溫度與25℃相差較大時,為了補償濕度測量的影響,利用式(2)校正溫度輸出值: RHtrue=(T25)(TL+ T2* SORH)+ RH1(2) 其中:RHtrue為RH1補償溫度影響的濕度值,T1和T2的值和輸出數(shù)據(jù)的數(shù)字濕度有關,如表2所示:表2 溫度補償系統(tǒng)三、測試和結果本文已經(jīng)對系統(tǒng)進行了調試,并分別對靜態(tài)和動態(tài)電路進行測試,收集得到的實驗數(shù)據(jù)。因為SHT75采集的溫濕度數(shù)據(jù)必須非線性補償,以獲得實際的環(huán)境溫度和濕度。當傳感器復位后,程序將進入指令周期。然后當 OAT A線是低電平時,I1C再次重啟SCI,然后發(fā)送兩個測量數(shù)據(jù)字節(jié)。當 OAT A線是高電平時,觸發(fā)SCK9次以上(含9次) ,然后發(fā)送一個“傳輸啟動”命令來激活SHT75 ,芯片是招魂。圖1 系統(tǒng)框圖,從而直接與SHT75數(shù)字溫濕度傳感器連接,并進行控制。溫濕度數(shù)據(jù)采集系統(tǒng)是由以下幾部分組成:1)溫濕度傳感器SHT75 。電源隔離芯片B0505S具有恒壓輸入,單輸出電壓隔離效率高的電源模塊,體積小,價格低,可靠性高,耐沖擊,隔離特性,溫度范圍寬等等。 V,為CS051F060單片機和SHT75數(shù)字溫濕度傳感器提供電源。TJAI050 CAN總線發(fā)送功能提供差分,可以提供差分接收器的功能,并完全符合“ ISO l1S9S ”的標準,高速率,低電磁輻射,差分接收器的輸入范圍寬,可以對抗電磁干擾,沒有電總線節(jié)點不會造成干擾,自動發(fā)送數(shù)據(jù)( TXD )控制的附加功能,自動保護總線引腳, V設備兼容,以及電源和土地的過熱保護,以防止短路的作用。其中, CS051F060實現(xiàn)CAN總線的應用層功能, TJAI050實現(xiàn)CAN總線的物理層和數(shù)據(jù)鏈路層的功能。二、基于單片機溫濕度數(shù)據(jù)采集通過CS051F060單片機控制SHT75數(shù)字溫濕度傳感器來測量倉庫室內溫度和濕度,并將通過總線接口cs051f060單片機系統(tǒng)發(fā)送數(shù)據(jù),單片機簡單快速的處理后通過CAN總線接口傳送給上位機監(jiān)控。數(shù)據(jù)采集系統(tǒng)采用更先進的模塊式結構,可根據(jù)不同的應用需求,通過簡單的增加和改變模塊,并與系統(tǒng)編程相結合,可以擴大或修改系統(tǒng),迅速組成一個新的系統(tǒng)。關鍵詞:溫濕度傳感器, C8051F060 ,數(shù)據(jù)采集,CAN總線一、引言由于集成電路制造技術的不斷提高,高性能、高可靠性的單片機DAS數(shù)據(jù)采集系統(tǒng)出現(xiàn)了。SHT75數(shù)字溫濕度傳感器采集的溫度和濕度的測量數(shù)據(jù)倉庫空間,通過總線interface,C8051F060單片機使用CAN總線接口與電腦進行實時的簡單快速的數(shù)據(jù)處理,并發(fā)送數(shù)據(jù)到C8051F060單片機系統(tǒng)監(jiān)控。由于CAN總線可以提高抗干擾能力、可靠性高、糾正能力強等,因此,使用CAN總線接口傳輸數(shù)據(jù)的上位機監(jiān)控。s instructions, sensor, and measurement process will start of temperature or humidity realtime data acquisition and storage, waiting for PC take several orders.Because of the temperature and humidity of the SHT75 collected data must nonlinear pensation to get the actual environment temperature and humidity. To pensate for the nonlinear humidity sensors to gain accurate data, use the following type (1) correction output value: RH1 = C1 + C2 * SORH + C3S0RH2 (1)Among them: for RH1 pensated for SORH humidity value, SHT75 output of 8 bits or 12 bits humidity sensor value。C), etc. In order to ensure efficient and reliable operation of the module can be rated load, and the output of 5% —100% load between, should avoid longterm work in noload condition. C.Temperature and humidity data acquisition and processing Temperature and humidity data acquisition system is made up of the following parts, 1) and humidity sensor SHT75。jamming ability and reliability of the data, corrective ability etc. Therefore, use the CAN bus interface to transfer data then monitored by the upper machine. This article introduced data acquisition system design posed of temperature and humidity sensor, the SCM system, puter, the can bus. After SHT75 digital temperature and humidity sensors collect the temperature and humidity measurement data in warehouse room, to send data to C8051F060 SCM system through the bus SCM do simple rapid processing of data through the CAN bus interface to the puter for realtime monitoring. Through testing, the system can realize data acquisition, processing and munication. Keywordstemperature and humidity sensor, C8051F060, data acquisition, CAN bus)I. INTRODUCTIONBecause of IC manufacturing technology unceasing enhancement, The emergence of a high performance, high reliability singlechip DAS data acquisition system. Data collection technology has bee a specialized technical, in the industrial fields have been extensively applied, data acquisition system USES more advanced module type structure, according to the different application requirements through simple increase and changed module, and bining with the system programming, can expand or modifY system, quickly posed a new system . Temperature and humidity data acquisition system is always relevant scientific research units and the pany mitted to developing project, its early system in monolithic puter 8031 core, using thermistors and wet sensitive capacitance as temperature sensor and humidity sensors, the whole system, while low cost, but the large size and low accuracy, munication distance restricted, poor universality, To overe the shortings, this paper studies based on singlechip processor of temperature and humidity data acquisition system, realize to warehouse room scene of temperature and humidity monitoring, has the good realtime, high precision, simple and convenient, signal transceiver easy maintenance and use of advantages .II. BASED ON SINGLECHIP MICROCOMPUTERTEMPERATURE AND HUMIDITY DATA ACQUISITIONThrough CS051F060 singlechip microputer control SHT75 digital temperature and humidity sensors measuring storehouse room temperature and humidity, and will send data through bus interface CS051F060 SCM system, after microcontroller simple rapid processing in through a CAN bus interface teleport to PC monitor.A. The CAN transmit driver modules The CAN transmit driver module by microcontroller hardware CS051 F060, highspeed light TLP 113 and isolation TJA I 050 highspeed The CAN transceiver devices such as position. Among them, CS051F060 realize The CAN bus of application layer function, TJAI050 realize The CAN bus physical layer and the data link layer function. This module mainly used to upward place machine to send temperature and humidity data and accept control mand. TJAI050 CAN provide differential for bus sending function, CAN provide differential accept controller function, and fully ply with ISO l1S9S standard, high rate, low electromagnetic radiation, wide range of differential receiver input, CAN fight electromagnetic interference, not on electricity for bus nodes are not caused by interference, sending data (TXD) control overtime function, in transient automatically to bus pins for protection, the input stage an