Wireless data acquisition and transmission terminal based on GPRS

Pick    To: This article gives an implementation plan of a wireless data collection and transmission terminal from the system, and discusses the technical difficulties in implementation in detail.

The application range of wireless data collection and transmission is very wide, involving industries such as power, water conservancy, public security, transportation, petroleum, security and finance. China Mobile officially opened the general packet radio service GPRS network in May 2002 . The GPRS network supports the TCP / IP protocol and has a wide coverage. Compared with the use of short message and ultra-short wave wireless data transmission stations for wireless data transmission, GPRS has great advantages in terms of cost, reliability, and implementability.

Terminal system composition

There are two sets of solutions for the design of wireless data acquisition and transmission terminals: The first set is "SCM + GPRS Modem". Although this solution has lower hardware cost, it has relatively limited functions, and it is difficult to develop and support the protocol; The second set of solutions is "embedded CPU + GPRS module". Although this solution has a slightly higher hardware cost and requires an embedded CPU chip to support the embedded operating system, it can implement a rich protocol interface, which is easy to transplant and upgrade to high-end system applications. It is more convenient for the realization of data collection and transmission.

Figure 1 shows the principle reference diagram of a wireless data acquisition and transmission terminal, using Motorola Semiconductor ( editor's note, now renamed: Freescale) embedded CPU MPC8xx plus GPRS module CMS91 second set of implementation solutions.

The working principle of the terminal is to receive user data through the RS232 / 485 port, and then pack the data into IP packets, access the GPRS network through the GPRS module , and then send the data to the data processing center through various gateways and routes.

Picture 1   Terminal composition principle reference diagram

The composition principles in Figure 1 are described in detail below:

The embedded CPU chip is the core of the entire data acquisition terminal and can support the embedded operating system well; considering the convenience and performance requirements of the embedded operating system, the current mature Motorola MPC8xx embedded CPU is adopted . Many operating system manufacturers have developed microcode and suite (BSP) for this type of CPU to facilitate user portability.

The GPRS module mainly completes the function of wireless Internet access. There are some mature products on the market, such as Sony / Ericsson 's GM47 ; Simens ' MC35, etc. Choose CMS91 of Cellon Company here . It is a dual-band GSM / GPRS level 10 module. The main advantages are: low power consumption, simple interface, perfect AT command function, support for GPRS CLASS 10 , development of multimedia applications, and low price. At the same time, it also provides SMS ( Short Message Service ) and voice functions. The GPRS module provides an RS232 interface, which can be used to control the module, such as dialing and switching modes. Once connected to the Internet through the module , the collected data can be sent to any host with a public network IP address using TCP / IP transmission , thereby achieving wireless transmission of the collected data.

Data collection generally uses standard RS232 or RS485 interface to collect pressure, temperature and other sensor data. The CPU is responsible for the calculation and processing of the collected data, and then handed over to the GPRS module to send it to the remote data center.

Watchdog is mainly used to prevent terminal system crashes. Write data to the WD hardware regularly through the software . Once the system crashes, the software does not work properly. The WD hardware generates a hardware interrupt because it cannot receive data, so the system automatically restarts.

ROM is mainly used to save the embedded operating system, application programs and related configuration parameters, and directly communicate with the CPU through the internal bus . Here, Intel 's 28F320-J3 is selected , 32M bytes. The file system can be completed on the ROM , but the file system processing module needs to be added to the operating system.

LCD is an optional module used to display status information. 10Base-T is also an optional module for easy debugging. You can also use NAT technology and 10Base-T ports to use the terminal as a gateway to the Internet .

Technical difficulties in implementation

CPU communication port configuration

MPC850 microprocessor is selected in this design , It is a multi-purpose general-purpose chip, which integrates a microprocessor and common peripheral components, and can be used in various control fields. It is a low-cost implementation of MPC860 used in communication systems, provides a higher cost performance, and has enhanced communications, such as universal serial bus (USB) support. The MPC850 integrates an embedded PowerPC core and a dedicated RISC communication processor module (CPM) for communication . The CPM of the MPC850 supports 6 serial channels: a serial communication controller (SCC) , a USB , two serial management controllers (SMS) , an I2C interface, and a serial peripheral interface circuit SPI . Usually one SCC and two SMS can be configured as a universal serial UART to control different modules and the rate is adjustable.

Implementation of file system on ROM

Ordinary ROM operation can only be operated by module, which is very inconvenient to maintain, and because there is no buffer operation during reading and writing, data is easy to lose and make mistakes. File system implemented on ROM Each block can be allocated and used reasonably, reducing block migration and block overuse. In this design, Intel J3 series (28F320J3) flash memory is used as the storage device, Realized TrueFFS . First configure the three-layer structure of TFFS in the system startup configuration file and modify the MTD . Initialize the file system and default path when the system starts. If successful, an operable file device symbol is generated. Since then, users can use the general file operations ( create, read, write, and delete ) . It should be noted that after reading and writing the file, the file should be closed to avoid data loss.

Implementation of Network Address Translation (NAT) when the device acts as a gateway

Using NAT to access the Internet changes the original way of using proxy software to access the Internet . Two NAT settings ( dynamic NAT and static NAT) can be used to achieve Internet access. Dynamic NAT enables all hosts to access the Internet . Because NAT has the function of hiding the internal topology of the network, external hosts cannot directly access internal websites or hosts. However, through the combined use of dynamic and static NAT , both internal and external access can be achieved, and the internal topology of the network can be hidden to ensure network security. In the specific implementation, we must dial the GPRS network through PPP to obtain the assigned address. If the network communication internal IP address assigned on the CPU communication port is obtained , then configure the NAT parameters, and configure the two port parameters as GPRS network address and internal communication address. The last good NAT NAT initialized with configuration parameters.

Use of GPRS module working mode

There are three main methods of data transmission using CMS91 :

1. SMS Messages -can be used to transmit characters or binary data. In general, the length of each SMS is 140 bytes. SMS is suitable for occasions where the amount of data is small and the real-time requirement is not high.

2. Data Calls —Transparent or non-transparent data transmission can be performed after the data link is established. It is mainly suitable for occasions where the amount of data is large and the number of transmissions is small.

3. GPRS data transmission-suitable for data transmission under all circumstances, is the future development trend.

The use of CMS91 GPRS module for Internet- based data communication SMS and Data Call applications are very different. Both SMS and Data Call are supported by corresponding AT commands, and the use is relatively simple, without the need to understand the actual operating process However, for GPRS data applications, the knowledge of network protocols involved is relatively large.

In this application, the CMS91 GPRS module is equivalent to an application system for wireless modem users. It needs to be connected to the operator's Internet access server through PPP (LCP / PAP / IPCP) before TCP / IP , UDP, or more The higher-level application layer programs http , FTP, etc. communicate. In the current GPRS application, if the application system is based on the operating system , because the system function is relatively strong, you can use the complete PPP protocol, but if the application system uses MCU , then generally use the simplified PPP protocol, some Information was rejected.

There are two structures for data transmission using GPRS , the main difference is the location of the server:

The server uses the host mode on the ordinary Internet , or the server directly connects to the intermediate mobile network CMNET through DDN ( or other high-speed connection methods such as ASDL) .

According to the design and implementation techniques introduced above, it is not difficult to write a complete Internet- based data communication process using GPRS modules .

Conclusion

This paper introduces an implementation method of a GPRS- based wireless data collection and transmission terminal from the system structure and implementation method, and particularly describes how to use GPRS for data communication. Generally, wireless data collection terminals are used in dedicated systems, such as power and water conservancy, etc., which are particularly suitable for small data volume and low speed data transmission requirements, and generally require higher working stability. Here are some ideas about cost and compatibility: 1. Embedded CPU chips are converted from MPC8xx to ARM chips. 2. The network supports upgrading from GPRS to CDMA , which can be achieved by replacing the wireless communication module.

Portable power supply humanized output port design: AC dual output port 220V output, to solve multi-channel power demand; DC 24V, 12V cigarette lighter, dual 5V USB output, more widely used. Can meet the needs of most electrical appliances, such as energy storage system for LED Light,energy storage system for outdoor, energy storage system for medical equipment,mobile phones, telephones, digital cameras, mobile hard drives, digital cameras, tablets, laptops, car starters, pumps, postal and telecommunications, environmental instruments Etc; can also be used in the following areas such as: finance, first aid, excavation, exploration, military, science, media, tourism, disaster relief, medical assistance, environmental protection and areas with widespread power shortages.

Outdoor Small Energy Storage System

Solar Storage Battery,Small Solar System,Energy Storage System For Computer,Energy Storage System For Power Tools,Portable Small Electric Station,Multifunctional Lithium Generator

Shenzhen Enershare Technology Co.,Ltd , https://www.enersharepower.com