Wireless data acquisition and transmission terminal based on GPRS

Pick    To: This paper gives an implementation scheme of wireless data acquisition and transmission terminal from the system, and discusses the technical difficulties in implementation.

The application of wireless data collection and transmission is very wide, involving industries such as electricity, water conservancy, public security, transportation, petroleum, security and finance. China Mobile Corporation officially opened the GPRS network for general packet radio services in May 2002 . The GPRS network supports the TCP / IP protocol and has a wide coverage. Compared with the use of short messages 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

The design of the wireless data acquisition and transmission terminal can have two sets of schemes: the first one is “single-chip microcomputer + GPRS modem”. Although the hardware cost is low, the scheme is relatively limited, and it has certain difficulties in the development and support of the protocol; The second solution is “embedded CPU + GPRS module”. Although the hardware cost is slightly higher, this solution requires an embedded CPU chip to support the embedded operating system, but it can implement a rich protocol interface, which is easy to transplant and upgrade to high-end system applications. It is more convenient to implement data acquisition and transmission.

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

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

Figure 1   Terminal composition principle reference diagram

The composition principle in Figure 1 is described in detail below:

The embedded CPU chip is the core of the entire data acquisition terminal and can well support the embedded operating system. Taking into account the portability and performance requirements of the embedded operating system, the current mature Motorola MPC8xx embedded CPU is adopted . Many operating system vendors have developed microcode and suites (BSPs) for this type of CPU to facilitate 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 . Choose Cellon 's CMS91 here . It is a dual-band GSM/GPRS 10 -level module. Its 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 capabilities. The GPRS module provides an RS232 interface through which control of the module can be accomplished, 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 IP address by TCP/IP transmission , thereby achieving wireless transmission of collected data.

Data acquisition generally uses standard RS232 or RS485 interface to collect sensor data such as pressure and temperature. The CPU is responsible for computing and processing the collected data, and then handing it over to the GPRS module to send it to the remote data center.

Watchdog is mainly used to prevent the terminal system from crashing. The software writes data to the WD hardware periodically . Once the system crashes, the software does not work properly. The WD hardware generates a hardware interrupt because it cannot receive the data, and the system automatically restarts.

The ROM is mainly used to save the embedded operating system, application programs and related configuration parameters, and communicate directly with the CPU through the internal bus . Here I chose Intel 's 28F320-J3 , 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.

The LCD is an optional module for displaying status information and so on. 10Base-T is also an optional module for easy debugging. You can also use the NAT technology and the 10Base-T port to use the terminal as a gateway to the Internet .

Technical difficulties in implementation

CPU communication port configuration

In this design, the MPC850 microprocessor is selected . It is a versatile general-purpose chip that integrates a microprocessor and common peripheral components for use in a variety of control applications. It is a low-cost implementation of the MPC860 for communication systems, offering a higher price/performance ratio and enhanced communication, such as Universal Serial Bus (USB) support. The MPC850 integrates an embedded PowerPC core and a dedicated RISC Communications Processor Module (CPM) for communication . The MPC850 's CPM supports six serial channels: a serial communication controller (SCC) , a USB , two serial management controllers (SMS) , an I2C interface, and a serial peripheral interface circuit SPI . An SCC and two SMSs can usually be configured as a universal serial port UART to control different modules at an adjustable rate.

Implementation of file system on ROM

Ordinary ROM operations can only be operated by modules, which is inconvenient to maintain, and because there is no buffering operation during reading and writing, data is easily lost and errors. 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. Implemented TrueFFS . First configure the three-tier structure of TFFS in the system startup configuration file and modify the MTD . Initializes the file system and default path when the system starts. If successful, an actionable file device is generated. From then on, users can use the usual file operations ( generate, read, write, and delete ) . It should be noted that after reading and writing the file, the file should be closed to avoid data loss.

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

Internet access using NAT changes the way the original software using a proxy to access the Internet, the NAT can be two kinds of settings (dynamic and static NAT NAT) to achieve access to the Internet. Dynamic NAT enables all hosts to access the Internet . Because NAT has the ability to hide the internal topology of the network, external hosts cannot directly access internal websites or hosts. However, through the joint use of dynamic and static NAT , both internal and external mutual access can be realized, and the internal topology of the network can be hidden to ensure network security. In the specific implementation, the PPP is first dialed onto the GPRS network to obtain the assigned address. If you get the internal IP address of the network communication allocated on the CPU communication port , and then configure the NAT parameters, configure the two port parameters as the GPRS network address and the internal communication address. Finally, the NAT is initialized with the configured NAT parameters .

Use of GPRS module working mode

There are three main methods for data transmission using CMS91 :

1.SMS Messages - can be used to transfer character 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 requirements are not high.

2.Data Calls —Transparent or non-transparent data transfer 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.

Using the CMS91 GPRS module for Internet- based data communication SMS and Data Call applications are very different, whether SMS or Data Call is supported by the corresponding AT command, the use is relatively simple, no need to understand the actual operational process However, for GPRS data applications, there is relatively more knowledge about the network protocols involved.

In this application, the CMS91 GPRS module is equivalent to an application system of a wireless modem user. It needs to connect to the operator's Internet access server through PPP (LCP/PAP/IPCP) before applying TCP/IP , UDP or more. The higher layer 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, the complete PPP protocol can be adopted , but if the application system adopts the MCU , then the simplified PPP protocol is generally adopted , and some incompatible The 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 common 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 implementation technology described above, it is not difficult to write a complete data communication process based on the Internet using the GPRS module .

Conclusion

This paper introduces a GPRS- based wireless data acquisition and transmission terminal implementation method from the system structure and implementation , especially focusing on how to use GPRS for data communication. Generally, wireless data collection terminals are used in dedicated systems, such as power and water conservancy. They are especially suitable for small data volume and low speed data transmission requirements, and the requirements for work stability are generally high. Here are some assumptions about cost and compatibility: 1. The embedded CPU chip is converted from MPC8xx to ARM chip. 2. The network supports upgrading from GPRS to CDMA , which can be achieved by replacing the wireless communication module.

we are professional battery manufacturer in heated clothing industry over 10 years. we make all kinds of li ion battery packs for heated jacket, wlectric jacket, heated sweatshirt, heated motorcycle gear, heated boots, heated shirt, heated slippers, electric heated jacket, heated pants, battery heated jacket, heated glove liners, heated ski gloves, heated coat womens, heated vest womens, heated underwear,  electric clothing, heated motorcycle jacket, heated gloves and socks, heated hunting jacket, electrician pants, heated hat, battery operated gloves.

we offer the most extensive models for heating clothing industry, our heating clothing batteries range from 3.7v to 14.8v most popular models, capacity from 1800mah to 10000mah, with LED light and switches to display remaining power level and set output levels. OEM/ODM accepted and we are specilisted in design these batteries, providing industry design, pcb design, tooling design, moulding service, prototyping, and flexiable small quantity manufacturing. 

heatedclothingbattery

Heated Clothing Battery

Heated Clothing Battery,Heated Jacket Battery,Heated Gloves Battery,Heated Vest Battery

Asarke Industry Co., Limited , http://www.asarke-industry.com