Due to the increasing demand for digital information, data collection and its application technologies have received more and more attention and application. With the development of technology, the data acquisition system is developing in the direction of high precision, high speed, stability, reliability and integration. At present, most data collection and monitoring systems are independent systems, which can only collect or store data on-site, which can no longer meet the needs of applications and urgently require access to the network for remote monitoring. The development of modern data acquisition technology is based on the improved performance of the new acquisition system hardware and software platform. The 32-bit microcontroller with powerful functions has been widely used in some high-end instruments and meters, and the GPRS wireless transmission module is embedded in it, and the collected data is wirelessly connected to the Internet to realize remote monitoring, which is very suitable for work Used by personnel in harsh environments or when multiple parameters need to be collected. The application of high-performance microprocessors has also greatly improved the accuracy and speed of data collection.
1 Overall system solution
The entire remote multi-channel data acquisition system is shown in Figure 1. After the wireless terminal is successfully connected to the Internet, the collection terminal sends the data collected by the sensor to the ARM microcontroller after amplification and filtering. After A / D conversion and related processing, the data is sent to the GPRS wireless terminal through the RS232 port. The wireless terminal packs these data into individual IP packets, connects to the wireless network through the GPRS air interface, and is transferred to the Internet by the mobile communication service provider, and finally reaches the unified remote data processing center through various gateways and routes. The center receives the data and performs subsequent processing on the data.
The remote data center can also send data information (various commands and diagnostic information) to the wireless data collection module, and output it to the ARM microcontroller through the RS232 interface on the GPRS terminal. After receiving the information from the remote data center, the collection terminal performs Decode and perform corresponding operations to achieve control of the collection site.
GPRS wireless terminal is embedded with TCP / IP protocol and UDP protocol (user selectable). This system uses TCP / IP protocol. In fact, the protocol stack implemented on GPRSDTU is TCP / IPOverPPP.
Figure 1 GRPS wireless data collection terminal
2 Hardware composition
2.1 Sensors and amplifiers
In theory, the system can collect 16 channels of data at the same time, but in actual debugging, only 2 channels are selected for simulation.
One way is to use a temperature sensor, surface / liquid thermocouple NR281530 to obtain real-time on-site temperature, and the other way is to use a pressure sensor, PPM241BY oil well-specific pressure sensor. This system has good application in oil field oil wells.
In the front-end signal processing unit, due to the different output parameters of various sensors, the output signal is not only low in level and high in internal resistance, but also has the effect of common mode voltage and harsh environment on site. Therefore, the above factors should be considered when selecting the amplifier chip . Select the commonly used MCP6S2X programmable gain amplifier to amplify the original signal, OP07CP as the subsequent filter chip.
2.2 Microprocessor
The microprocessor is the core of the system, and its performance directly determines the performance of the data acquisition system. Based on the requirements of the acquisition system for real-time data and accuracy, as well as ease of operation, the 32-bit ARM7 series processor was selected, which has the following characteristics:
· Small size, low power consumption, low cost, high performance;
· Support Thumb (16-bit) / ARM (32-bit) dual instructions, which can be well compatible with 8-bit / 16-bit devices;
· A large number of registers are used, and the instruction execution speed is fast;
· The instruction length is fixed;
· Flexible and simple addressing mode, high efficiency
This system uses the single-chip 32-bit microcontroller LPC2134 of PHILIPS Company, which is based on a 16 / 32-bit ARM7TDMI2STMCPU that supports real-time simulation and tracking, contains 128KB of FLASH, and the memory is used for code and data storage.
LPC2134 has two asynchronous serial ports UART0 and UART1. In this system, UART0 is connected to GPRS terminal to realize data transmission. It uses a 16-byte transceiver FIFO, a built-in baud rate generator, and includes a mechanism to enable software control.
The hardware SPI interface is a synchronous, full-duplex serial interface with a maximum data bit rate of 1/8 of the clock rate and can be configured as a master or slave. In this system, the SPI interface is used as a master to control multiple slaves according to different interrupts, including the programmable gain amplifier MCP6S2X, use the SPI bus to access the SD card, and control the digital tube display on the development board.
The A / D converter is two 8-channel 10-bit approximation analog-to-digital converters with a measurement range of 0 to 313V, 10-bit conversion time greater than or equal to 2144μS, and one or more Burst conversion modes.
2.3 GPRS terminal
The GPRS terminal uses AYG285C of Nanjing Aoyi Electronics Co., Ltd. It is specially designed for industrial integration using GPRS module, and it is specially designed in terms of temperature range, vibration, electromagnetic compatibility and interface diversity, ensuring a harsh environment Under the working stability, the data transmission based on GPRS public network has the characteristics of wide communication range, stable and reliable transmission. The module parameters can be set or network data communication can be performed by pressing the key. The serial port baud rate is adjustable from 300 to 115200bps, and the check digit is optional: no check, odd check, even check. Support client functions of protocols PPP, IP, TCP, UDP, DNS, PING. In addition, the power and working status are indicated by LEDs, which is convenient for on-site viewing of the operation of MODEM.
3 System software implementation
3.1 μC / OS2Ⅱ embedded operating system
When multi-tasking and scheduling are required, an embedded real-time operating system is essential. For this purpose, the μC / OS2Ⅱ operating system disclosed in the source code is used in the system. It has the characteristics of high execution efficiency, small occupied space, excellent real-time performance and strong scalability. The minimum kernel can be compiled to 2K bytes.
The transplantation of μC / OS2Ⅱ needs to meet the following requirements:
· The processor's C compiler can generate reentrant code;
· You can use C to call the code for entering and exiting the critical section;
· The processor must support hardware interrupts, and need a regular interrupt source;
The processor needs a hardware stack that can hold certain data;
The processor needs instructions that can exchange data in the CPU registers with the core and stack.
The LPC2134ARM7 processor used in this system meets all the above conditions, so it can be transplanted. According to the requirements of μC / OS2Ⅱ, transplanting μC / OS2Ⅱ to an LPC2134ARM7 architecture needs to provide 2 or 3 files: OSCPU.
H (C language header file), OS-CPU-CC (C program source file) and OS-CPU-A.ASM (assembler source file).
In the data acquisition task, C language is used for programming, but for system initialization, assembly is still used to make the startup code. It can implement vector table definition, stack initialization, system variable initialization, interrupt system initialization, I / O initialization, peripherals Operations such as initialization and address mapping.
After the chip is reset, the system initialization process is shown in Figure 2.
Figure 2 System initialization flow chart
shipboard wire 0.6/1kv 90℃, CBYJ, CBYJR
The shipboard power cables are intended for power, lighting and control system of shipboard and off-shore building, and it also can be used by metallurgical industry, chemical works, power plant and mine etc.
standards applied: IEC60092-350
IEC60092-353
IEC60092-360
IEC60228
IEC60332-1-22
IEC60332-3-22
IEC61034
IEC60754
IEC60684-2
Product making: factory name, type, rated voltage.
Core making: color marking or printed numbers.
Marine Wire,Marine Wiring Cables,Stranded Copper Wire,Electric Wires Cables
Jiangsu Jiangyang Special Cable Co,.Ltd. , https://www.jymarinecable.com