【正文】
基于SIM300模塊的GSM遠程控制系統(tǒng)的設(shè)計基于TC35模塊的GSM遠程控制系統(tǒng)的設(shè)計 44 摘要隨著 GSM(Global System for Mobile munication)移動通信網(wǎng)絡(luò)的迅速普及和競爭的日益激烈,新技術(shù)和新業(yè)務(wù)的開發(fā)和應(yīng)用已經(jīng)提到一個十分重要的位置。短消息業(yè)務(wù)(SMS)作為 GSM 網(wǎng)絡(luò)的一種基本業(yè)務(wù),已得到越來越多的系統(tǒng)運營商和系統(tǒng)開發(fā)商的重視,基于這種業(yè)務(wù)的各種應(yīng)用也蓬勃發(fā)展起來。本文提出了一種基于 GSM 短消息的遠程控制系統(tǒng),在給出系統(tǒng)的總體設(shè)計的基礎(chǔ)上,設(shè)計了系統(tǒng)的硬件和軟件,并對其應(yīng)用領(lǐng)域作了一些探討和研究。系統(tǒng)以 GSM 網(wǎng)絡(luò)作為遠程信號的傳輸平臺。對 GSM 網(wǎng)絡(luò)體系結(jié)構(gòu)作了詳細的講解,并且著重講述了對于本課題相當(dāng)重要的短消息業(yè)務(wù)的通信原理。數(shù)據(jù)的傳輸方式主要是短消息方式,系統(tǒng)中采用 PDU 模式,對短消息的 PDU 編碼和解碼進行詳細的講述。短消息的接收和發(fā)送是通過 AT 指令來實現(xiàn)的,講述了常見的 AT 指令及其使用方法。系統(tǒng)的硬件設(shè)計中,對主要硬件 TC35 和 MSP430F149 單片機及其外圍電路進行了詳細的講述。系統(tǒng)分為兩個部分進行設(shè)計——控制中心站和遠程控制分站:控制中心站硬件包括一臺 PC 機,GSM 通信模塊 TC35,兩者通過 RS232 連接;遠程控制分站硬件包括 GSM 通信模塊 TC35,MSP430F149 單片機,顯示單元,各種傳感器和數(shù)據(jù)采集與處理單元。系統(tǒng)的軟件設(shè)計包括控制中心站軟件設(shè)計和遠程控制分站軟件設(shè)計。遠程控制分站軟件設(shè)計中運用 IAR 公司為 MSP430 系列單片機開發(fā)的 C430 集成開發(fā)環(huán)境和 C 語言調(diào)試器作為程序開發(fā)工具,其軟件包括單片機初始化、主程序、信號采集中斷程序、通過串口的短消息接收和發(fā)送程序。論文的最后部分以 GSM 短消息的遠程控制系統(tǒng)為基礎(chǔ),結(jié)合溫度檢測技術(shù)設(shè)計出一套基于 GSM 的遠程溫度控制系統(tǒng),并給出了此系統(tǒng)應(yīng)用領(lǐng)域的一些探討和研究。關(guān)鍵詞:MSP430,GSM,TC35,遠程控制,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è)計方案模塊 3 無線通信模塊 4 控制單元模塊的選擇 4 電源模塊的選擇 5 系統(tǒng)總體框架 5 2 系統(tǒng)硬件模塊設(shè)計 7 電源及復(fù)位電路的設(shè)計 7 MSP430電源模塊的設(shè)計 7 TC35的電源模塊 7 、復(fù)位電路 8 串口通信模塊設(shè)計 9 GSM模塊接口設(shè)計 10 、GSM模塊簡介 10 GSM模塊接口設(shè)計 10 指示燈電路 12 SIM卡電路 13 串行存儲器的設(shè)計 14 采集系統(tǒng)模塊設(shè)計 15 外部繼電器控制模塊設(shè)計 16 單片機模塊的設(shè)計 17 3系統(tǒng)軟件設(shè)計 21 22 22 23 存儲程序設(shè)計 25 25 27 29 AT命令介紹 29 短消息的設(shè)置 33 39 總結(jié) 41 致謝 42 參考文獻 43 附件 44 附件一:系統(tǒng)總電路圖 44 前言短消息業(yè)務(wù)(SMS)作為 GSM(GlobalSystem for Mobile munication)網(wǎng)絡(luò)的一種基本業(yè)務(wù),以其連接簡單、費用低廉、覆蓋范圍廣、實現(xiàn)方便等優(yōu)點得到越來越多的系統(tǒng)運營商和系統(tǒng)開發(fā)商的重視,基于短消息業(yè)務(wù)的各種應(yīng)用也蓬勃發(fā)展起來。短消息業(yè)務(wù)與語音及傳真是 GSM 網(wǎng)絡(luò)提供的主要電信業(yè)務(wù),它通過無線控制信道進行傳輸,經(jīng)短消息中心完成存儲和轉(zhuǎn)發(fā)功能,每條短消息的信息量為 140bit。在短消息的可靠傳遞基礎(chǔ)上,GSM 專業(yè)調(diào)制解調(diào)器的出現(xiàn)給 GSM 的發(fā)展注入了新的活力,它改變了傳統(tǒng)的以語音為主要的通信手段,使 GSM 網(wǎng)絡(luò)數(shù)據(jù)通信得到廣泛的應(yīng)用[13]。目前市場上提供的GSM 調(diào)制解調(diào)器和模塊提供了 RS232 標準數(shù)據(jù)接口,采用 AT 指令控制,符合 ETSI 標準 GSM0707 和 GSM0705?;谶@種技術(shù),以 GSM 網(wǎng)絡(luò)作為無線傳輸平臺可以開發(fā)出多種應(yīng)用領(lǐng)域。目前遠程控制主要有以下幾種方式:短距離長線控制;通過市話網(wǎng);通過 Internet 網(wǎng)絡(luò);通過自組網(wǎng)絡(luò)(CDPD 網(wǎng));通過數(shù)傳電臺方式。短距離長線控制和通過自組網(wǎng)絡(luò)(CDPD網(wǎng))首先要自行建設(shè)通信網(wǎng)絡(luò),建網(wǎng)初期投資巨大,運營期間自主維護耗費人力物力較大,信號質(zhì)量得以保證,效果好,相對運營費用高;通過市話網(wǎng)和 Internet 方式以現(xiàn)有的網(wǎng)絡(luò)為依托,無需自行建設(shè)通信網(wǎng)絡(luò),但是由于市話網(wǎng)和 Internet 難以達到工業(yè)現(xiàn)場覆蓋面,接入網(wǎng)絡(luò)受到限制,局限性很大,網(wǎng)絡(luò)運行效果取決于網(wǎng)絡(luò)運營商,線路安全不能得到保證,其通信效果好,信號量大,運營費用相對低廉;數(shù)傳電臺出現(xiàn)較早,應(yīng)用很廣泛,是一種不錯的無線數(shù)傳方式,但是建網(wǎng)初期投資巨大,數(shù)傳電臺的傳輸范圍有限,而且容易受到空間無線信號的干擾,信號不能得到保障,但是數(shù)傳電臺信號傳輸實時性好,運行費用低。遠程控制系統(tǒng)應(yīng)用廣泛,遍及國民經(jīng)濟的很多領(lǐng)域,而目前這些控制系統(tǒng)無論從成本、可靠性、穩(wěn)定性、使用方便性、還是維護的難易程度等方面都不能最大限度的使人滿意。因此本文把 GSM網(wǎng)絡(luò)引入到遠程控制系統(tǒng)中,提出了基于 GSM 短消息的遠程控制系統(tǒng)。GSM 網(wǎng)絡(luò)是目前基于時分多址技術(shù)的移動通信體制中最成熟完善、覆蓋面最廣、功能最強、用戶最多的移動通信網(wǎng)絡(luò),GSM 短消息業(yè)務(wù)不需要建立撥號連接,只需把待發(fā)的消息加上目的地址發(fā)送至短消息中心,再由短消息中心轉(zhuǎn)發(fā)到最終目標。運用 GSM 短消息實