Wireless data collection and transmission has a wide range of applications, including electricity, water conservancy, public security, transportation, petroleum, security and finance. China Mobile officially launched the General Packet Radio Service (GPRS) network in May 2002. The GPRS network supports 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 feasibility.
Terminal system components
There are two schemes for the design of wireless data acquisition and transmission terminals: the first is "single-chip microcomputer + GPRS modem". Although this scheme has lower hardware cost, its functions are relatively limited, and it has certain difficulties in protocol development and support; the second scheme is "embedded CPU + GPRS module". Although this scheme has slightly higher hardware cost and requires embedded CPU chip to support embedded operating system, it can realize rich protocol interface, facilitate transplantation and upgrading to high-end system applications, and make data acquisition and transmission more convenient.
FIG1 shows a schematic diagram of a wireless data acquisition and transmission terminal, which uses the second implementation scheme of the embedded CPU MPC8xx and the GPRS module CMS91 of Motorola Semiconductor (Editor's note: now renamed Freescale).
Figure 1 Terminal composition principle reference diagram
The working principle of the terminal is to receive user data through the RS232/485 port, 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 routers.
The following is a detailed description of the composition principle in Figure 1:
The embedded CPU chip is the core of the entire data acquisition terminal and can well support the embedded operating system. Considering the portability and performance requirements of the embedded operating system, the current mature Motorola MPC8xx embedded CPU is used. Many operating system manufacturers have developed microcodes and kits (BSP) for this type of CPU to facilitate user porting.
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. Here we choose Cellon's CMS91. It is a dual-band GSM/GPRS Class 10 module. Its main advantages are: low power consumption, simple interface, complete AT command function, support for GPRS CLASS 10, development of multimedia applications, low price, etc. 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 the module is connected to the Internet, the collected data can be sent to any host with a public IP address using TCP/IP transmission, thereby realizing wireless transmission of collected data.
Data acquisition generally uses standard RS232 or RS485 interfaces to collect sensor data such as pressure and temperature. The CPU is responsible for calculating and processing the collected data, and then sends it to the GPRS module to send it to the remote data center.
Watchdog is mainly used to prevent the terminal system from freezing. The software writes data to the WD hardware at regular intervals. Once the system freezes, the software does not work properly, and the WD hardware generates a hardware interrupt due to the failure to receive data, so the system automatically restarts.
ROM is mainly used to store embedded operating systems, applications and related configuration parameters, and communicates directly with the CPU through the internal bus. Here, Intel's 28F320-J3, 32M bytes, is selected. 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, etc. 10Base-T is also an optional module, which is convenient for debugging. You can also use NAT technology and 10Base-T port to make the terminal a gateway to the Internet.
Technical difficulties in implementation
CPU communication port configuration
The MPC850 microprocessor is selected in this design. It is a multi-purpose general-purpose chip that integrates a microprocessor and common peripheral components and can be used in various control fields. It is a low-cost implementation of the MPC860 applied to communication systems, providing a higher cost-performance ratio and enhanced communication, such as support for the Universal Serial Bus (USB). 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 port UART to control different modules with adjustable speed.
Implementation of the file system on ROM
Ordinary ROM operations can only be operated in modules, which is inconvenient to maintain. In addition, since there is no buffering operation when reading and writing, data is easily lost and errors occur. The file system implemented on ROM can reasonably allocate and use each block, reducing block migration and block overuse. This design uses Intel J3 series (28F320J3) flash memory as a storage device to implement TrueFFS. First, configure the three-layer structure of TFFS in the system startup configuration file and modify MTD. Initialize the file system when the system starts
and the default path. If successful, an operable file device symbol is generated. From then on, users can use general file operations (create, read, write and delete). It should be noted that after reading and writing files, the file should be closed explicitly to avoid data loss.
Network Address Translation (NAT) when the device is used as a gateway Using
NAT to access the Internet has changed 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 joint use of dynamic and static NAT, both internal and external visits can be achieved, and the internal topology of the network can be hidden to ensure network security. In the specific implementation, first, PPP dial-up is used to access the GPRS network to obtain the assigned address. If the internal IP address of the network communication assigned to the CPU communication port is obtained, then the NAT parameters are configured, and the two port parameters are configured as the GPRS network address and the internal communication address. Finally, the NAT is initialized with the configured NAT parameters. There are three main methods for data transmission using CMS91:
1. SMS Messages - can be used to transmit characters or binary data. Generally, the byte length of each SMS is 140 bytes. SMS is suitable for occasions with small data volume and low real-time requirements. 2. Data Calls - transparent or non-transparent data transmission can be carried out after the data link is established. It is mainly suitable for occasions with large data volume and small transmission times. 3. GPRS data transmission - suitable for data transmission in all situations, which is the future development trend. Using 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. They are relatively simple to use and do not require understanding of the actual operation process. However, for GPRS data applications, the knowledge of network protocols involved is relatively more. 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) first, and then use TCP/IP, UDP or higher-level application layer programs such as http and FTP for communication. In current GPRS applications, if the application system is based on the operating system, the complete PPP protocol can be used because the system function is relatively strong. However, if the application system uses MCU, a simplified PPP protocol is generally used to reject some incompatible information. There are two structures for data transmission using GPRS, and the main difference lies in 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 technology introduced above, it is not difficult to write a complete data communication process based on the Internet using the GPRS module. Conclusion This article introduces the implementation method of a wireless data acquisition and transmission terminal based on GPRS from the perspective of system structure and implementation method, especially focusing on how to use GPRS for data communication. Generally, wireless data acquisition terminals are used in special systems, such as electricity, water conservancy, etc. They are particularly suitable for small data volume and low-speed data transmission requirements, and generally have high requirements for working stability. Here are some ideas on cost and compatibility: 1. The embedded CPU chip is converted from MPC8xx to ARM chip. 2. The network support is upgraded from GPRS to CDMA, which can be achieved by replacing the wireless communication module.
参考文献:
[1]. GPRS datasheet http://www.dzsc.com/datasheet/GPRS_1594650.html.
[2]. RS232 datasheet http://www.dzsc.com/datasheet/RS232_585128.html.
[3]. RS485 datasheet http://www.dzsc.com/datasheet/RS485_585289.html.
[4]. ROM datasheet http://www.dzsc.com/datasheet/ROM_1188413.html.
[5]. MPC850 datasheet http://www.dzsc.com/datasheet/MPC850_1032421.html.
[6]. MPC860 datasheet http://www.dzsc.com/datasheet/MPC860_949318.html.
[7]. RISC datasheet http://www.dzsc.com/datasheet/RISC_1189725.html.
Previous article:CAN bus data acquisition system based on dsPIC3F3013
Next article:Design of a communication power supply monitoring system networking solution
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- Apple faces class action lawsuit from 40 million UK iCloud users, faces $27.6 billion in claims
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- The US asked TSMC to restrict the export of high-end chips, and the Ministry of Commerce responded
- ASML predicts that its revenue in 2030 will exceed 457 billion yuan! Gross profit margin 56-60%
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- What is the effective communication rate of STM32 USB CDC HOST DEVICE?
- 11. [Learning LPC1768 library functions] Systick experiment
- Ask God
- [ST NUCLEO-H743ZI Review] + 5. CAN communication transceiver test
- Request resume
- MicroPython Hands-on (30) - Blynk for the Internet of Things
- Schematic resource help
- EEWORLD University ---- DC / DC switching regulator packaging innovation
- What are some of the principles of mechanical, galvanometer, and laser scanners?
- 7nm lithography machine was used to pay off debts, hundreds of employees were laid off, and the 100 billion chip project came to an end!!!