【正文】
基于SIM300模塊的GSM遠(yuǎn)程控制系統(tǒng)的設(shè)計(jì)基于TC35模塊的GSM遠(yuǎn)程控制系統(tǒng)的設(shè)計(jì) 44 摘要隨著 GSM(Global System for Mobile munication)移動(dòng)通信網(wǎng)絡(luò)的迅速普及和競(jìng)爭(zhēng)的日益激烈,新技術(shù)和新業(yè)務(wù)的開(kāi)發(fā)和應(yīng)用已經(jīng)提到一個(gè)十分重要的位置。短消息業(yè)務(wù)(SMS)作為 GSM 網(wǎng)絡(luò)的一種基本業(yè)務(wù),已得到越來(lái)越多的系統(tǒng)運(yùn)營(yíng)商和系統(tǒng)開(kāi)發(fā)商的重視,基于這種業(yè)務(wù)的各種應(yīng)用也蓬勃發(fā)展起來(lái)。本文提出了一種基于 GSM 短消息的遠(yuǎn)程控制系統(tǒng),在給出系統(tǒng)的總體設(shè)計(jì)的基礎(chǔ)上,設(shè)計(jì)了系統(tǒng)的硬件和軟件,并對(duì)其應(yīng)用領(lǐng)域作了一些探討和研究。系統(tǒng)以 GSM 網(wǎng)絡(luò)作為遠(yuǎn)程信號(hào)的傳輸平臺(tái)。對(duì) GSM 網(wǎng)絡(luò)體系結(jié)構(gòu)作了詳細(xì)的講解,并且著重講述了對(duì)于本課題相當(dāng)重要的短消息業(yè)務(wù)的通信原理。數(shù)據(jù)的傳輸方式主要是短消息方式,系統(tǒng)中采用 PDU 模式,對(duì)短消息的 PDU 編碼和解碼進(jìn)行詳細(xì)的講述。短消息的接收和發(fā)送是通過(guò) AT 指令來(lái)實(shí)現(xiàn)的,講述了常見(jiàn)的 AT 指令及其使用方法。系統(tǒng)的硬件設(shè)計(jì)中,對(duì)主要硬件 TC35 和 MSP430F149 單片機(jī)及其外圍電路進(jìn)行了詳細(xì)的講述。系統(tǒng)分為兩個(gè)部分進(jìn)行設(shè)計(jì)——控制中心站和遠(yuǎn)程控制分站:控制中心站硬件包括一臺(tái) PC 機(jī),GSM 通信模塊 TC35,兩者通過(guò) RS232 連接;遠(yuǎn)程控制分站硬件包括 GSM 通信模塊 TC35,MSP430F149 單片機(jī),顯示單元,各種傳感器和數(shù)據(jù)采集與處理單元。系統(tǒng)的軟件設(shè)計(jì)包括控制中心站軟件設(shè)計(jì)和遠(yuǎn)程控制分站軟件設(shè)計(jì)。遠(yuǎn)程控制分站軟件設(shè)計(jì)中運(yùn)用 IAR 公司為 MSP430 系列單片機(jī)開(kāi)發(fā)的 C430 集成開(kāi)發(fā)環(huán)境和 C 語(yǔ)言調(diào)試器作為程序開(kāi)發(fā)工具,其軟件包括單片機(jī)初始化、主程序、信號(hào)采集中斷程序、通過(guò)串口的短消息接收和發(fā)送程序。論文的最后部分以 GSM 短消息的遠(yuǎn)程控制系統(tǒng)為基礎(chǔ),結(jié)合溫度檢測(cè)技術(shù)設(shè)計(jì)出一套基于 GSM 的遠(yuǎn)程溫度控制系統(tǒng),并給出了此系統(tǒng)應(yīng)用領(lǐng)域的一些探討和研究。關(guān)鍵詞:MSP430,GSM,TC35,遠(yuǎn)程控制,AT指令A(yù)bstractAlong with rapid popularization and furious petition of GSM net work ,research and application of new technology and new operation have been mentioned to a quite important position. SMS as a basic service of GSM network has been attented by more and more system operator and developer ,and kinds of applications based on this service have been rapid developed .This paper present a remote monitoring system based on GSMSMS, this paper first presents the system design as a whole, then presents the hard ware and software design of system, at last presents some discussions and investigation in applying field.In this system GSM network is a medium for transmitting the remote signal, it presents detailed explanation of GSM network‘s system structure and emphasizes the munication principle that is important for the task. The mode of transmitting data is most SMS. PDU mode is used during transmitting SMS. It presents en cording and decoding of SMS PDU mode. Transmitting and receiving SMS is realized by using AT mand. It presents the familiar AT mand and using method.It presents TC35 and microchip MSP430F149 MCU and peripheral circuit during design of system hardware. Hardware of system includes two parts: the monitoring center and the remote monitoring station. It consists of a puter and a TC35 munication module of GSM in the monitoring center .Computer and TC35 are joined by RS232. It includes a TC35 munication module of GSM, a MSP430F149 MCU, a display part and a gathering data part.It includes the monitoring center software and the remote monitoring station software in design of system software. The remote monitoring station software is designed with C430 integration developing environment that IAR designed forMSP430 single chip and Clanguage debugger. It includes single chip initialization and main program and interrupt of gathering signal and SMS receiving and transmitting program through the serial port .In the end of the paper, it presents a remote temperature monitoring system based on GSM, using the designed system of remote monitoring system based on GSMSMS and technique of measuring temperature. And then presents any discussions and investigation in applying field.Keywords: GSM。 SMS。 remote monitoring。 PDU mode。 AT mand。MSP430目 錄摘要 IAbstract II目 錄 IV前言 1 1 總體方案與論證 3 設(shè)計(jì)方案模塊 3 無(wú)線通信模塊 4 控制單元模塊的選擇 4 電源模塊的選擇 5 系統(tǒng)總體框架 5 2 系統(tǒng)硬件模塊設(shè)計(jì) 7 電源及復(fù)位電路的設(shè)計(jì) 7 MSP430電源模塊的設(shè)計(jì) 7 TC35的電源模塊 7 、復(fù)位電路 8 串口通信模塊設(shè)計(jì) 9 GSM模塊接口設(shè)計(jì) 10 、GSM模塊簡(jiǎn)介 10 GSM模塊接口設(shè)計(jì) 10 指示燈電路 12 SIM卡電路 13 串行存儲(chǔ)器的設(shè)計(jì) 14 采集系統(tǒng)模塊設(shè)計(jì) 15 外部繼電器控制模塊設(shè)計(jì) 16 單片機(jī)模塊的設(shè)計(jì) 17 3系統(tǒng)軟件設(shè)計(jì) 21 22 22 23 存儲(chǔ)程序設(shè)計(jì) 25 25 27 29 AT命令介紹 29 短消息的設(shè)置 33 39 總結(jié) 41 致謝 42 參考文獻(xiàn) 43 附件 44 附件一:系統(tǒng)總電路圖 44 前言短消息業(yè)務(wù)(SMS)作為 GSM(GlobalSystem for Mobile munication)網(wǎng)絡(luò)的一種基本業(yè)務(wù),以其連接簡(jiǎn)單、費(fèi)用低廉、覆蓋范圍廣、實(shí)現(xiàn)方便等優(yōu)點(diǎn)得到越來(lái)越多的系統(tǒng)運(yùn)營(yíng)商和系統(tǒng)開(kāi)發(fā)商的重視,基于短消息業(yè)務(wù)的各種應(yīng)用也蓬勃發(fā)展起來(lái)。短消息業(yè)務(wù)與語(yǔ)音及傳真是 GSM 網(wǎng)絡(luò)提供的主要電信業(yè)務(wù),它通過(guò)無(wú)線控制信道進(jìn)行傳輸,經(jīng)短消息中心完成存儲(chǔ)和轉(zhuǎn)發(fā)功能,每條短消息的信息量為 140bit。在短消息的可靠傳遞基礎(chǔ)上,GSM 專業(yè)調(diào)制解調(diào)器的出現(xiàn)給 GSM 的發(fā)展注入了新的活力,它改變了傳統(tǒng)的以語(yǔ)音為主要的通信手段,使 GSM 網(wǎng)絡(luò)數(shù)據(jù)通信得到廣泛的應(yīng)用[13]。目前市場(chǎng)上提供的GSM 調(diào)制解調(diào)器和模塊提供了 RS232 標(biāo)準(zhǔn)數(shù)據(jù)接口,采用 AT 指令控制,符合 ETSI 標(biāo)準(zhǔn) GSM0707 和 GSM0705?;谶@種技術(shù),以 GSM 網(wǎng)絡(luò)作為無(wú)線傳輸平臺(tái)可以開(kāi)發(fā)出多種應(yīng)用領(lǐng)域。目前遠(yuǎn)程控制主要有以下幾種方式:短距離長(zhǎng)線控制;通過(guò)市話網(wǎng);通過(guò) Internet 網(wǎng)絡(luò);通過(guò)自組網(wǎng)絡(luò)(CDPD 網(wǎng));通過(guò)數(shù)傳電臺(tái)方式。短距離長(zhǎng)線控制和通過(guò)自組網(wǎng)絡(luò)(CDPD網(wǎng))首先要自行建設(shè)通信網(wǎng)絡(luò),建網(wǎng)初期投資巨大,運(yùn)營(yíng)期間自主維護(hù)耗費(fèi)人力物力較大,信號(hào)質(zhì)量得以保證,效果好,相對(duì)運(yùn)營(yíng)費(fèi)用高;通過(guò)市話網(wǎng)和 Internet 方式以現(xiàn)有的網(wǎng)絡(luò)為依托,無(wú)需自行建設(shè)通信網(wǎng)絡(luò),但是由于市話網(wǎng)和 Internet 難以達(dá)到工業(yè)現(xiàn)場(chǎng)覆蓋面,接入網(wǎng)絡(luò)受到限制,局限性很大,網(wǎng)絡(luò)運(yùn)行效果取決于網(wǎng)絡(luò)運(yùn)營(yíng)商,線路安全不能得到保證,其通信效果好,信號(hào)量大,運(yùn)營(yíng)費(fèi)用相對(duì)低廉;數(shù)傳電臺(tái)出現(xiàn)較早,應(yīng)用很廣泛,是一種不錯(cuò)的無(wú)線數(shù)傳方式,但是建網(wǎng)初期投資巨大,數(shù)傳電臺(tái)的傳輸范圍有限,而且容易受到空間無(wú)線信號(hào)的干擾,信號(hào)不能得到保障,但是數(shù)傳電臺(tái)信號(hào)傳輸實(shí)時(shí)性好,運(yùn)行費(fèi)用低。遠(yuǎn)程控制系統(tǒng)應(yīng)用廣泛,遍及國(guó)民經(jīng)濟(jì)的很多領(lǐng)域,而目前這些控制系統(tǒng)無(wú)論從成本、可靠性、穩(wěn)定性、使用方便性、還是維護(hù)的難易程度等方面都不能最大限度的使人滿意。因此本文把 GSM網(wǎng)絡(luò)引入到遠(yuǎn)程控制系統(tǒng)中,提出了基于 GSM 短消息的遠(yuǎn)程控制系統(tǒng)。GSM 網(wǎng)絡(luò)是目前基于時(shí)分多址技術(shù)的移動(dòng)通信體制中最成熟完善、覆蓋面最廣、功能最強(qiáng)、用戶最多的移動(dòng)通信網(wǎng)絡(luò),GSM 短消息業(yè)務(wù)不需要建立撥號(hào)連接,只需把待發(fā)的消息加上目的地址發(fā)送至短消息中心,再由短消息中心轉(zhuǎn)發(fā)到最終目標(biāo)。運(yùn)用 GSM 短