GPRS wireless communication module design

In recent years, the rapid development of communication and network technologies, especially wireless communication, has significantly enhanced the automation of power systems. With the emergence of the GSM network, engineers quickly integrated GSM modules into various devices such as multi-function energy meters, fault recorders, meter reading systems, and power load monitoring tools, enabling remote communication capabilities for these instruments. GPRS, or General Packet Radio Service, is a data transmission service built upon the existing GSM infrastructure. It supports the TCP/IP protocol and allows direct communication with packet-switched networks like the Internet. The GPRS wireless transmission system is widely used, covering most medium to low traffic, low-rate data transmissions, particularly for bursty small data packets. The GPRS wireless communication module designed in this paper incorporates the TCP/IP protocol and uses an industrial-grade GPRS module. It is suitable for single-chip data acquisition and transmission systems that lack a built-in TCP/IP stack but rely on serial communication. 1. GPRS Communication Principle and Application Characteristics 1.1 Introduction to GPRS GPRS stands for General Packet Radio Service, a technology between 2G and 3G, often referred to as 2.5G. It shares the same frequency band, bandwidth, burst structure, modulation standards, frequency hopping rules, and TDMA frame structure as GSM. Therefore, when building a GPRS system based on the GSM network, most components do not require hardware changes—only software upgrades are needed. With GPRS, users experience shorter call setup times and nearly "always-on" connectivity. Additionally, billing is based on data volume rather than connection time, making it more cost-effective for users. 1.2 Basic Working Principle GPRS introduces two new network nodes into the original circuit-switched (CSD) based GSM network: the GPRS Support Node (SGSN) and the Gateway Support Node (GGSN). The SGSN operates at the same level as the MSC, tracking a mobile station's location to implement security and access control, and connects to the base station system via frame relay. The GGSN enables interworking with external packet-switched networks and communicates with the SGSN through an IP-based GPRS backbone. Figure 1 shows the block diagram of the GPRS and Internet connection. The GPRS terminal receives data from the client system through an interface, and the processed packet data is sent to the GSM base station. Encapsulated by the SGSN, the packet data is then transmitted to the GGSN through the GPRS backbone network. The GGSN processes the data and sends it to the destination network, such as the Internet or X.25. If the data is intended for another GPRS terminal, it travels through the GPRS backbone to the SGSN and then to the terminal via the BSS. 2. Implementation of Embedded GPRS Communication System 2.1 GPRS Module Hardware Design The embedded GPRS wireless communication module consists of a single-chip microcontroller with built-in TCP/IP (MSC1210Y5), a GPRS module, a SIM card slot, external interfaces, and extended data memory. Figure 2 presents the hardware block diagram of the system. The MSC1210 controls the GPRS module to receive and transmit information, communicating through a standard RS232 serial port with an external controller. Software handles interrupts and manages data forwarding. 2.1.1 MCU Module The microcontroller uses the latest 8051 core-based Texas Instruments chip, the 80512Y5. It features a 33MHz clock speed, comparable to a 99MHz 8051 core. It includes 32KB Flash program memory, 256B internal RAM, 1024B on-chip SRAM, 2KB boot ROM, and supports in-system programming. Dual data pointers (DPTR0 and DPTR1) enhance data block movement efficiency. Main implementation steps include: 1. Initializing the GPRS module via AT commands, attaching to the GPRS network, obtaining a dynamic IP address, and establishing a connection. 2. Connecting the external controller (e.g., a data acquisition terminal) via serial port 0 using MAX232. 3. Using P1.2 and P1.3 for serial communication with the GPRS module, while other ports connect to remaining RS232 interfaces. MC35 initializes and controls data transmission. 2.1.2 Extended Data Memory Section The Flash memory of the MSC1210 can function as either program or data memory. Due to the presence of a real-time operating system and network protocols, all memory is used as program storage. An external 6264 RAM extends the data memory, providing sufficient space for normal operation. 2.1.3 GPRS Wireless Data Transmission Module As the wireless transceiver, the GPRS module processes packet data from the microcontroller and forwards it. The MC35 module from Siemens is used, consisting of an RF antenna, internal Flash, SRAM, a GSM baseband processor, matching power supply, and a 40-pin ZIF socket. The baseband processor acts as a protocol processor, handling AT commands from external systems. 2.2 MCU Communication Program Design All code is written in C and compiled using Keil, supporting in-system debugging. The C51 compiler integrates well with RTX multitasking OS. The program includes `#include rtx51.h` for real-time functions. Code is debugged and downloaded via TI Downloader. Most GPRS modules do not support TCP/IP natively, so the MCU must embed the protocol stack. This design uses IP+UDP to reduce system overhead, allowing efficient GPRS communication. 2.2.1 Embedding of TCP/IP Protocol This design leverages the IP and PPP protocols within the RTX51 real-time OS, enhancing scalability and product continuity. The TCP/IP protocol suite uses a layered model, where each layer adds headers before passing data to the next layer. When unpacking, corresponding headers are removed, and the rest is treated as the data body. Considering embedded system constraints, IP+UDP is used for low-overhead communication. UDP packets are sent via GPRS, parsed by the module, and transmitted to the user terminal at a set baud rate. 2.2.2 Data Processing IP packets are transmitted over the host and GPRS server farm, typically using PPP for secure transmission. PPP packets are sent to the gateway, and responses are returned to the GPRS module, enabling transparent data transmission. Since the GSM network does not have a static IP, the monitoring center must have a fixed IP to allow the terminal to locate it after logging in. This can be achieved through telecom services. After logging in, the GPRS module automatically connects to the data center, reports its IP, and maintains the link. In case of issues, it re-establishes the connection, allowing two-way communication via UDP/IP for reliable data transfer. 3. Design of the Upper Computer Monitoring Center The monitoring center receives and stores GPRS data. The design uses Microsoft Visual C++ for its flexibility and strong network and database support. Thanks to GPRS, the monitoring center can directly access the Internet without needing a GPRS module. It listens for UDP packets from the GPRS module and communicates via IP protocol. The received data is stored in an Access database, accessed through VC’s AD interface. Network communication is handled via the Socket API, with MFC’s CAsyncSocket class simplifying implementation. A connectionless UDP-based Socket is used for data transmission. 4. Conclusion This paper utilizes an embedded TCP/IP protocol to enable GPRS data transmission via a high-speed 8-bit microcontroller. It offers advantages such as minimal peripheral circuits, simple design, and low cost. Communication is achieved through a standard RS232 port and predefined protocols, ensuring versatility. The system software is written in C, making it portable across different controllers with minor modifications. Despite some limitations, such as GPRS network instability and potential data loss, the system remains highly advantageous. With careful design, these issues can be mitigated, reinforcing the benefits of GPRS-based solutions.

300 Kw Gas Generator

300 Kw Gas Generator,Gas Generator for Sale,High Efficiency Gas Generator

Jinan Guohua Green Power Equipment Co.,Ltd. , https://www.guohuagenerator.com

Posted on