1 Introduction
With the overall speed increase of trains and the continuous increase in passenger and freight transportation volume of the railway department, the load of railway lines has continued to increase, and railway safety issues have become increasingly prominent. At present, the railway inspection department mainly uses track inspection vehicles to inspect the quality of rails. However, due to the high price of track inspection vehicles and the limited number of equipment in each locomotive depot, it cannot meet the requirements of the railway inspection department for continuous inspection and accumulation of track quality data. Therefore, the railway inspection department urgently needs a small intelligent system with high reliability and strong real-time performance as a supplement to the track inspection vehicle. In response to this situation, this paper designs a new type of remote real-time monitoring system for railway line quality. This system comprehensively utilizes technologies such as mobile communications and embedded system design to realize the real-time collection, analysis, transmission, automatic evaluation and alarm of rail data.
ARM technology is the mainstream technology in embedded systems. Currently, the speed of ARM chips on the market can reach several hundred megabytes. Using this as the main control chip can realize a high-speed, high-precision data acquisition, processing and communication system with certain processing capabilities in hardware. This system uses Samsung's S3C2410 processor, combined with the Windows CE operating system to realize its functions. The S3C2410 processor is a low-cost, low-power, high-performance 16/32-bit system microprocessor that has a good performance in the field of embedded applications. The S3C2410 has rich interface resources and can meet the design requirements of this system. The Windows CE operating system is specially designed for palm
The computer environment designed by the computer is a combination of portable technology and existing Windows technology, and provides rich driver resources. The system uses CMDA module and USB interface in the design. The original data can be taken out through the USB interface for further post-processing. The system connects to the wireless network through the CDMA module and sends the processed data to the client in real time to realize specific information query and alarm functions.
2 System Working Principle
The system consists of five parts: ARM processor module, coprocessor FPGA module, A/D module, sensor module and external communication module. The basic structure is shown in Figure 1. The ARM processor and field programmable gate array (FPGA) together constitute the core processing unit of the monitoring system. The analog signal collected by the sensor module is quantized by the A/D module and stored in the FIFO generated by the FPGA; the ARM processor reads the data in the FIFO through the interrupt signal generated by the FPGA; after the data is processed, the ARM processor controls the CDMA module through the FGPA to establish a TCP/IP connection. Once the connection is established, the data is transmitted back to the client through the wireless network.
Figure 1 System structure diagram
2.1 Coprocessor FPGA Module
The coprocessor of this system uses Xilinx's FPGA, model SPARTANIIE XC2S100E. The chip has 2700 logic units, 100,000 logic gates, and 40 KB of on-chip block RAM. The internal structure of the coprocessor is shown in Figure 2. It implements the following functions:
- A/D module read/write timing control;
- Generate 3 FIFOs, whose main function is to store A/D encoded data;
- Provides ARM processor control signals.
The FPGA chip is divided into 4 parts to achieve the above functions:
(1) Internal control signal generator
FPGA divides the 50 MHz clock to generate the A/D chip sampling clock Sampleclk and the ARM processor external clock Sysclk; Sysclk generates the clock signal required for the ARM processor to work after passing through the phase-locked loop circuit (PLL).
(2) ARM controller
Provides various control signals necessary for the normal operation of the ARM processor; realizes the access of the ARM processor address bus, data bus and external interrupt signal.
(3) A/D controller
Control the data conversion of the A/D module. Generate the A/D conversion start signal (/HOLD), detect the data conversion completion signal (/EOC), generate the FIFO write signal, and realize the data conversion channel selection.
(4) FIFO memory
Generate three 16-bit FIFOs with a data depth of 511 to complete the storage of A/D converted data.
2.2 ARM Processor Module
The ARM processor module is constructed by FLASH, SDRAM and S3C2410. This system uses Samsung's K9F1208U0A to build an 8-bit FLASH memory system. The single-chip capacity of K9F1208U0A is 64 MB; two HY57V561620CT chips with a single-chip capacity of 32 MB and a data width of 16 bits are selected to build a 32-bit SDRAM memory system in parallel. The total 64 MB of SDRAM space can meet the operating requirements of embedded operating systems and various complex algorithms. The control of each module by the ARM processor is achieved by generating various control signals through the underlying driver control coprocessor FPGA.
Figure 2 Coprocessor internal structure diagram
2.3 A/D Module
The A/D conversion chip uses TI's ADS8364 chip, which has the following performance:
- 6 independent data output channels;
- Analog signal differential input;
- 6 independent 16-bit ADCs;
- The sampling frequency is up to 250 MHz;
- The sampling accuracy is up to the last two digits and the noise immunity is good.
The sampling frequency of the A/D module is controlled by the sampling clock signal generated in the FPGA. The FPGA outputs a low-level pulse with a width of one clock cycle to the /HOLD_X pin, and the A/D conversion begins. After 16.5 clock cycles, the A/D conversion is completed. The A/D module selects the corresponding FIFO to store data based on the read signal and channel selection signal generated in the FPGA.
[page]
2.4 Sensor Module
The sensor module can be selected according to the data to be collected. This system is mainly used for measuring the vibration of train locomotive bodies, so three acceleration measurement modules made of ADXL105 high-precision single-axis acceleration sensor chips are used. The measurement modules are placed in the vertical and horizontal directions at the bottom of the body to measure the acceleration of the body in the X, Y, and Z directions. The measurement data is input into the precision amplifier in the form of a differential signal, and is directly sent to the A/D module after comparison and amplification.
2.5 External communication module
The external communication module consists of two parts: 485 communication module and CDMA module.
The 485 communication interface uses the MAX1490 chip from MAXIM. This is a completely isolated 485 data interface chip that works in simplex mode and has a maximum transmission baud rate of 2.5 Mbps. Its output pin is directly connected to the serial port 2 (UART2) of the ARM processor; the ARM processor reads the broadcast information of relevant data such as time and coordinates through serial port 2. The serial port 0 (UART0) of the ARM processor is connected to the AnyData DTGS800 CDMA module; the monitoring data is sent to the ground server through the CDMA module after preprocessing.
3 Software Design
Software design mainly uses Embedded Visual C++ and VHDL. VHDL is used to write FPGA programs, while C is used to debug ARM processors.
After the system starts working, the FIFO in the ARM processor and FPGA coprocessor begins to initialize. The data after A/D conversion is stored in the FIFO corresponding to the three data output channels. When the data capacity in the FIFO reaches a certain limit, an interrupt is generated, and the main program in the ARM processor generates an interrupt waiting thread; once an interrupt is generated, the interrupt service program is entered to read the data. The data is pre-processed by the detection program and sent out through the CDMA module. Figure 3 is a system workflow diagram.
Figure 3 System workflow diagram
3.1 System Synchronization
Because the A/D module and FPGA coprocessor start working as soon as they are powered on and the ARM processor completes system loading, it takes about 10 seconds for the port to be initialized. During this process, the data stored in the FIFO has been filled. If the ARM processor directly uses this part of the data after the program is loaded, the problem of mismatch between the detection result and the broadcast information will occur. In order to prevent the system from having data detection errors due to the confusion of the working timing of each module. After the ARM completes the Windows CE system loading and enters the main detection program, a clear signal is generated to clear the data in the three FIFOs. The system works synchronously.
3.2 Interrupt Generation and Processing
In this system, if the A/D conversion data is read in real time, the ARM processor will inevitably have a low working efficiency, so the interrupt method is used in the circuit design. The output data of the A/D module is written into three FIFOs in a cyclic manner. Once the available data capacity in the FIFO is reduced to a certain limit, an interrupt is generated, and the ARM processor enters the interrupt service routine and reads the data in the FIFO.
3.3 Reading train broadcast information
The train locomotive broadcast information is continuously sent through the monitoring equipment. Information transmission is carried out using the standard RS485 transmission protocol, and the communication baud rate is 9600
bps, using 10-bit asynchronous communication mode: 1 start bit + 8 data bits + 1 stop bit. Each data packet consists of 17 bytes of data, including month, day, hour, minute, second, speed, kilometer mark, route number and train number. The data format is: start bit + data bit + stop bit + BCC check. Among them: the start bit is 1 byte, fixed to 0x02; the data bit is 14 bytes; the stop bit is 1 byte, fixed to 0x03; the BBC check is 1 byte, which is the "exclusive OR" check of the previous 15 bytes.
Software implementation: The implementation of the program for receiving broadcast information mainly utilizes the Windows message mechanism. First, initialize the UART2 port of the S3C2410 chip, including setting the baud rate to 9600 bps, configuring the port, and binding the port to the event. Then start the thread to continuously listen to the port. If there is data input, a read event will be generated. At this time, the thread reads a byte of data and sends the data to the main thread through the serial port. Finally, the main thread receives data through the corresponding function, and performs length detection and XOR verification on the data after the data is received. If the test passes, the data is transferred to the secondary cache (the primary cache continues to store data), and the upper module is notified to read the data; then the secondary cache is cleared and waits for the next data to enter. The interface of the broadcast information reading program is shown in Figure 4.
3.4 Acceleration data acquisition
Data collection is accomplished through the interaction between the application and the driver. There are many ways to achieve interaction, such as using a callback function or passing the data processing function pointer in the function application to the driver, and using SETEVENT. Considering the software upgrade, this system uses the SETEVENT method. There is a big difference between the Windows CE system and the system on the PC. Once some modules of the system are changed, the Windows CE system must be recompiled and the FLASH must be burned, which is a lot of work. The SETEVENT method can be used to debug the application without changing the driver, thus avoiding repeated burning of the FLASH.
[page]
Software design idea: After the data acquisition software is started, the data in the FIFO must be reset. Because it takes 15 seconds from the start of the Windows CE system to the start of the data acquisition software, but the A/D module and FIFO module start working after the system is powered on, so if this part of the data is used, it will cause the data to not match the train broadcast information. After responding to the interrupt, the driver notifies the application through the SETEVENT mechanism. At this time, the control of data reading is completely handed over to the top-level user. The user can control the reading and processing of data according to his own needs. The interface of the data acquisition program is shown in Figure 5.
4 Conclusion
The system developed in this paper makes comprehensive use of technologies such as mobile communication and embedded system design. Compared with traditional detection equipment, it greatly improves the real-time and systematic nature of line monitoring. At the same time, the system focuses on the research of monitoring data processing and detection methods, and applies them in practical systems.
The flexibility and versatility of the circuit are fully considered in the design of this system. The corresponding VHDL language program can be written according to different functional requirements. The Windows CE operating system used by the system can be arbitrarily tailored, which is very helpful for the conversion of functions. The system has been developed and is now in the field experiment stage.
Previous article:Research on smart home control system based on power line carrier
Next article:Design of dynamic power management module for blood flow detector
- 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
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- 【GE32E231_DIY】FreeRTOS+DAP_RTT+Multi-function button+USART_DMA and add FREEMODBUS
- 【Industrial Temperature Transmitter Design】Material Unpacking-ADICUP360
- Showing off my products + the Analog Discovery 2 I just got today
- ABB 1756-L81E
- ST introduces an analog microphone IMP23ABSU that can measure ultrasonic waves
- The difference between different versions of TI's ZigBee protocol stack and how to choose the right protocol stack for product development
- [GD32E231 Review] 2. Development insights and chip introduction
- Combining the new 6-axis IMU with DSP to achieve high-performance motion tracking accuracy
- 0 ohm resistor or ferrite bead to isolate digital ground and analog ground?
- Sampling Issues with LTC2325-16