A wireless data acquisition controller is designed by using 4G wireless network communication and embedded technology. The data acquisition controller uses S3C2440 as the main controller. The hardware and software structure of the system are elaborated. The hardware design introduces the structure and function of the hardware. The software design includes the development and debugging of Linux embedded system driver, the development and debugging of application software, etc. Data acquisition system is more and more widely used and has more and more complete functions. It needs an efficient, concise and cost-effective wireless transmission mode. With the rapid development of wireless communication network technology, the communication bandwidth, communication rate and communication quality of wireless communication network are gradually increasing, which makes data transmission through wireless network become efficient, real-time and low error rate. At present, among the kinds of wireless network communication we use in our life, the widest and most widely used is 4G communication. This paper designs a wireless data acquisition and transmission system composed of embedded and 4G wireless communication modules, which can meet the needs of most environments. A wireless data acquisition controller is designed based on 4G wireless network communication and embedded technology. The wireless data acquisition controller uses the S3C2440 chip of ARM9 architecture as CPU, the USR-G401t 4-G wireless mobile communication network module to realize 4-G wireless communication, the SP485 chip to realize RS485 communication, the switching input and output signals are isolated by the photocoupler chip, the SD card as temporary storage of data, the operating system chooses embedded Linux, and the device is hard.
The implementation of software and software is studied and analyzed in detail. The following figure shows the structure of a 4G wireless data acquisition controller. As shown in Figure 1, the 4G wireless data acquisition controller includes 16 relay output module, 16 switch signal input module, 1 4G wireless communication module, 2 RS-485 communication module (485 communication of various protocols can be achieved through application software, communication with various instruments and PLC can be realized), and 1 SD card.
Module (for small amounts of data storage). SDRAM storage capacity is 512MB core board, which can be used for different motherboards. Memory and Flash storage should be able to meet the minimum requirement of stable operation of the system, and at the same time require better heat dissipation performance. In the field, all external power supply and switching signals of the equipment are DC 24V.
Considering the output capability and stability of the relay, the output of the relay is also designed as a 24V power supply driver and dry contact output. TLP521 optical coupler is used to isolate the output signal circuit in order to avoid burning the core components by injecting high or reverse voltage from the outside. According to the manual, the resistance of the input signal terminal of the optical coupler, which is about 15011, can be selected as the current limiting device, as shown in Figure 2. Because of the instability of the 4G network, some data can not be transmitted to the control center in real time. SD card is considered in the design to store some important data. The design of SD card is shown in Figure 3. DATO, DAT1, DAT3 and CMD signal lines are all pulled up to 3.3V by 10K resistance. The purpose is to enhance the driving ability of the circuit. The nCD signal is used to detect whether the SD card is inserted.
When the card is not inserted into the socket, the pin is high. When the card is fully inserted into the socket, the nCD is pulled down to low level. WP signal foot is used to detect whether SD card has write protection or not. The principle is the same as card insertion detection. Therefore, R49 pull-down resistance is used to ground.
The field needs to collect data. If the data is collected by 4? 20mA analog signal, the collector has to design a lot of analog signal acquisition channels.
Therefore, we consider the use of communication in the design of data acquisition, which can reduce the field wiring and later maintenance work, and can ensure the reliability of data.
When designing communication, we use two-wire RS485 serial communication and MODBUSRTU communication protocol to communicate. The circuit schematic diagram is shown in Figure 4. The wireless network card uses the existing modular circuit, and the power supply is supplied by the main board, which can provide the stable 3.8V power supply for the sub-board. The 4G wireless network card uses USR-G40U and uses USB interface mode to communicate. The circuit of 4 G wireless module USIM card is shown in Fig. 5. The interface speed of USIM card is about 3.25MHz, so the layout of USIM card seat should take the nearest position of USR-G401T to avoid too long line. It is better to envelope each signal line with ground line. CLK, IO and RESET signals need 47pF capacitance to filter the interference of antenna signals. CLK, IO, RESET and VCC signals need anti-static protection measures. ESD (Electro-Static Dischang) protection of USIM card interface. As shown in the figure above, Transient Voltage Suppression Diode (TVS) is used as electrostatic protection of board.
TVS should be placed as close as possible to SIM card when PCB board is wiring. The controller adopts embedded design. When choosing embedded operating system, we choose open source Linux operating system. The kernel version is Linux-2.6.30.4. Embedded devices are basically fully customized according to the needs of development, so we can not find a complete driver support system, which requires us to carry out driver development, driver development software we can find a lot of software on the network to establish the development environment, this time we use Eclipse software to develop. Our driver. After development, we need to add driver support to the kernel system, then configure the kernel, compile successfully and burn it to the device before it can run.
The development process of device driver is shown in Figure 6. The implementation of the application program is based on the operating system and driver. The application program is developed by using Eclipse development environment through the interface of operating system and device driver. Operating system provides most of the functional interface functions needed, and in order to obtain data from external devices, it is necessary to use driver interface to exchange data with external devices. Equipment design is unattended, so no matter what incentives lead to equipment failure or crash in the design, we should try to ensure the application reset, data recovery, in the worst case, to ensure that the device can automatically restart. Reset, initialize all peripherals, drivers, applications, and start to continue to work, if necessary, to be able to re-import the running state before the failure into the driver and application, continue to run the work before the failure. When designing software, watchdog should be fully used to realize the self-reset function of the equipment and realize the “self-repair” and “fault-free” working state of the equipment. After the system realizes each sub-function and business process, the equipment can not run according to the needs of the project, the equipment can not run, only realizes the functions of each part, but also needs a management application program, which unifies the functions and business designed before, and integrates the business of each sub-function. Together and in combination to achieve project requirements, this is the device data acquisition application to be developed. In fact, all the above applications are subprograms of the data acquisition application program. The data acquisition application program coordinates the work of each peripheral and processes the data of each peripheral. The business flow chart of the data acquisition system application program is shown in Figure 7. The equipment is totally different in the field operation and in the experimental stage. The power supply and signal used in the experimental stage are quite stable, and there is no big fluctuation. There are no effects of lightning strike, overvoltage, undervoltage, thermostatic element overcurrent, undercurrent, static electricity, collision, electromagnetic interference, temperature, humidity, cold dew, ice, rodents and insects, so the equipment is all stable. It can run normally, but in the process of on-site quotation, it often appears that the performance of the equipment is far more than the above situation. Therefore, in the test of hardware performance, the power supply, signal input/output, communication interface of the equipment should be tested to ensure that the equipment can operate stably and reliably under certain external interference environment. Software will be affected by the addition, deletion, alteration and malfunction of hardware, the operation of users, and the operation of software itself. It will also be affected by data loss, data overflow and data damage in the process of data copy. In practice, it will often encounter many other factors. Cause software crash. Therefore, in testing software performance, we should test and evaluate the state of software operation under various circumstances, and evaluate the software testing under various complex circumstances, so as to ensure the stable and reliable operation of the equipment software in a certain range. In this paper, a data acquisition controller based on 4G wireless network communication is designed. The data acquisition controller can effectively collect data in different applications, and can be applied to various fields of production and life, such as agriculture, industry, medical treatment and so on. The system has good applicability and portability, and has certain theoretical and application value.