Abstract: This paper briefly introduces the configuration of the DC600V power supply board (PSB) in the locomotive, describes in detail the performance characteristics of the TMS320F2812 chip, and focuses on the hardware circuit design and software implementation method of the PSB data acquisition system. Key Words: TMS320F2812, PSB, data acquisition 1 Introduction With the development of the national economy and the continuous improvement of people's living standards, passengers have increasingly higher requirements for train speed and comfort. The railway speed increase that began on April 18, 2004, is a major event in the history of China's railway development. Long - term, high-speed operation has placed high standards and strict requirements on locomotive and rolling stock equipment. The safety and stability of the power supply system play a particularly important role in the safe operation and normal service of passenger trains. In accordance with the Ministry of Railways' spirit of "promoting energy conservation and emission reduction in railways and improving transportation efficiency," CRRC established the "1018" project team to independently develop a 200 km/h passenger electric locomotive, based on the assimilation and absorption of the HXD2 electric locomotive technology. The DC600V power supply system, as the main power source, plays an indispensable role in the safe and reliable operation of the locomotive. The DC600V train power supply system directly supplies power to passenger trains, which not only effectively reduces costs but also reduces noise, improves equipment reliability, and provides passengers with a comfortable travel environment. The DC600V power supply system refers to the 600V DC power supplied from the locomotive to the vehicles, which is then converted by each vehicle to AC380V for use by air conditioning, ventilation, heating, and other systems. It mainly converts the rated input voltage of 860V AC power into two rated output voltages of 600V, rated current of 670A, and rated power of 400KW DC power through rectification, filtering, and voltage regulation. In the power supply cabinet, the data acquisition system is the core component. The task of the data acquisition system is to collect the analog signals output by the sensors and convert them into digital signals that the computer can recognize, and send them to the computer so as to realize the monitoring of certain physical quantities [4]. The performance of the data acquisition system depends mainly on its accuracy and speed. Under the condition of ensuring accuracy, the sampling speed should be as high as possible to meet the speed requirements of real-time acquisition, real-time processing and real-time control. Considering the shortcomings of the previous data acquisition systems, such as low sampling accuracy, slow conversion rate, few A/D ports, and unfavorable system expansion, the data acquisition system designed in this paper adopts the TMS320F2812DSP controller, which has a 16-channel 12-bit A/D conversion module and 56 general-purpose I/O ports, which maximizes the data sampling accuracy and processing capability. 2. Composition of the DC600V Power Supply Cabinet The DC600V power supply cabinet includes two identical control systems, which are redundant. Each control system controls two power supply devices. When both control systems are functioning normally, one control system undertakes the control tasks of the entire power supply cabinet, while the other is in cold standby mode. If one control system malfunctions, it can directly switch to the other, ensuring that each 400kW power supply of the locomotive has independent A/B control systems. Each control system includes two power supply boards, two digital input/output boards, two signal conditioning boards, two power supply control boards, one control conversion board, and one reserved board. Its structure diagram is shown in Figure 1. [align=center] Figure 1 Structural frame of PSB[/align] The power supply control board is the core of the entire control device. The main control logic of the system is implemented through the power supply control board. To ensure faster and more stable operation of the control algorithm and to leave room for future functional expansion, the TMS320F2812 is used as the main chip of the power supply control board. 3. Introduction to the TMS320F2812 Chip The TMS320F2812 DSP is a new generation DSP processor designed by Texas Instruments (TI) specifically for industrial applications. It is particularly suitable for measurement and control applications involving large-volume data processing, such as data acquisition, industrial automation control, and servo motor control systems. It can process acquired data in real time and simultaneously transmit large amounts of acquired data at high speed and reliably to the main control computer or microprocessor for further analysis and processing. This chip uses static CMOS technology, offering high performance and low power consumption. It operates with a 1.8V core voltage and a 3.3V external interface voltage, making it a cost-effective 32-bit fixed-point DSP chip with a maximum operating frequency of 150MHz (clock cycle up to 6.67ns). It has a 32-bit data bus, 18K×16-bit SRAM and 128K×16-bit on-chip FLASH memory, 2 16-bit timers/counters, 3 independent 32-bit CPU timers, 56 independently programmable GPIO pins, expandable 1MB external memory, and multiple communication interfaces: SPI, SCI, ECAN, MCBSP, and 16-channel ADC module, etc. The TMS320F2812 has an 8-stage pipeline, 6 dedicated read and write buses, adopts Harvard bus structure, has a password protection mechanism, can run single-cycle 32×32-bit or dual 16×16 MAC operations, and can take into account both control and fast operation functions [1]. 4 Hardware Design The hardware part of the data acquisition system mainly consists of DSP chip, power supply module, AD conversion module, storage module and communication module. The whole system uses 5V power supply, and the power conversion chip TPS70351 provides the required working voltage of 3.3V and 1.8V, and the power-on sequence is determined by the pin SEQ. The TMS320F2812's AD conversion module is a 12-bit resolution, pipelined analog-to-digital converter [2]. Its front end consists of two 8-to-1 multiplexers and two simultaneous sample-and-hold circuits, forming 16 analog input channels. The switching of analog channels is automatically controlled by hardware, and the conversion results of each analog channel are sequentially stored in 16 result registers. The signals to be acquired include voltage sensor signals, current sensor signals, and synchronous transformer signals. Since the sensor signals are generally 0-5V or 4-20mA, which are relatively weak, they need to be filtered by RC and amplified by operation to transform the analog input signal range into the signal range that the back-end A/D can accept. Its analog signal conditioning circuit is shown in Figure 2. [align=center] Figure 2 Analog signal conditioning circuit Fig.2 Processing circuit of analog signals[/align] The minimum system part of the TMS320F2812 includes a clock circuit, a reset circuit, and a JTAG test port. In addition, in order to meet the temporary storage of large-capacity real-time data, a 64K×16bit FALSH M29W102BB and a 64K×16bit Static RAM CY7C1021[2] were added. The main program downloaded to the TMS320F2812 FLASH can directly process the data temporarily stored in the RAM by calling the corresponding functions, or send the data temporarily stored in the RAM to the PC through the serial port for further processing on the PC. The serial communication interface SCI is an asynchronous serial communication interface with bidirectional communication, which is commonly referred to as the UART port. The SCI module adopts the standard non-return-to-zero data format. After being converted by the MAX232 level, it can perform digital communication with the CPU or other asynchronous peripherals compatible with the communication data format, and perform interrupt detection, polarity, over-limit and error detection on the received data. Different SCI communication rates can be configured by programming the 16-bit baud rate control register. The TMS320F2812 supports automatic baud rate detection logic, and can use interrupt and polling methods for sending and receiving. To achieve remote data exchange and resource sharing, this paper uses a PCA82C250 transceiver to expand the eCAN communication module and adds related isolation circuits, ensuring high reliability and strong anti-interference capability, guaranteeing fast and accurate data transmission. The overall system schematic is shown in Figure 3. [align=center] Figure 3 System Schematic [/align] 5 Software Design The software part of the data acquisition system mainly includes the main program, interrupt program, and communication program between the system and the host computer. The main program completes the initialization of various variables and the serial port, including interrupt initialization, external strobe signal initialization, and setting the system default number of sampling points/sampling frequency, etc. The interrupt program is mainly used for reading and processing A/D data. The communication program mainly sends the processed data to the host computer. Data transmission uses a polling method, and data reception uses an interrupt method. When the serial port generates an interrupt, it first requests an interrupt from the DSP. After the DSP responds, it temporarily suspends its own program, only needs the corresponding serial port interrupt service routine, and then returns to the main program after execution, so that information can be processed in a timely manner. After system power-on reset, the TMS320F2812 itself is initialized first, including configuring RAM, setting I/O mode, timer mode, and PIE interrupt vector table. The F2812's external interface, XINTF, is a non-multiplexed asynchronous bus that allows external memory expansion, such as the CY7C1041CV33 (256K×16-bit static RAM, maximum read/write time 8ns). The external interface is divided into five memory mapping areas. Each area has a selection signal pin; when an area is selected, this pin goes low. Areas 0 and 1 share a pin, and areas 6 and 7 share another pin. External decoding logic can distinguish between the two shared areas; otherwise, the same memory can be connected to different areas. The main program flowchart is shown in Figure 4. The program then enters a loop, waiting for an interrupt. The F2812 CPU supports one non-maskable interrupt and 16 maskable interrupts (INT1~INT14, RTOSINT, and DLOGINT). Once an interrupt event occurs in a peripheral device, the interrupt flag IF bit in the corresponding position of the peripheral device's interrupt flag register is set to 1. If the corresponding interrupt enable bit is set to 1, the peripheral interrupt request signal INTx.y can be sent to the PIT controller to determine the interrupt request from different interrupt sources. After entering the interrupt, data acquisition begins. All ADC operations are performed through the ADC registers. The ADC registers are mapped to the address space of peripheral frame 1, with an address range of 0x0000~7100 to 0x0000~711F. They consist of the ADC control register ADCTRLx, the ADC channel selection and sorting control register ADCCHSELSEQx, the ADC conversion result register ADCRESULTx, the ADC status register ADCST, the ADC maximum conversion channel number register ADCMAXCONV, and the ADC auto-sorting status register ADCASESR, all of which are 16-bit registers. After data acquisition is complete, the interrupt ends, and the device waits for the next interrupt. The software designed in this paper has been debugged and run, and can complete the required functions well in real time. The interrupt service routine flowchart is shown in Figure 5. [align=center]Fig.4 Flow chart of main procedure[/align] [align=center]Fig.5 Flow chart of interrupting procedure[/align] 6 Conclusion This paper discusses a power supply cabinet data acquisition system based on the 32-bit fixed-point chip TMS320F2812. Utilizing its fast conversion rate, the system transmits the acquired data to the host computer in real time. Debugging and operation have proven that the system has high acquisition accuracy, fast speed, and reliable performance. It can simultaneously acquire multiple signals, meeting the relevant technical specifications of electric locomotive power supply cabinets, and has been successfully applied in the Shaoshan series of electric locomotives. Furthermore, this data acquisition and processing system can not only be used in electric locomotives but also in projects related to the national development of subways, high-speed trains, etc., demonstrating good practical value. References [1] Su Kuifeng, Lü Qiang, Geng Qingfeng, et al. TMS320F2812 Principles and Development [M]. Beijing: Electronic Industry Press, 2005. [2] Zhang Weining. CPU and Peripherals of TMS320C28X Series DSP [M]. Beijing: Tsinghua University Press, 2004. [3] Zhang Xiongwei, Cao Tietong. Principles and Development Applications of DSP Chips (2nd Edition) [M]. Beijing: Electronic Industry Press, 2000. [4] Zhan Qingcai, Wu Mingli, Cao Dufeng, et al. TMS320F2812 Data Acquisition System with GPS Timing [J]. Microcontroller & Embedded System Application, 2007, 16: 25-28. [5] Yan Junjie, Yang Wei, Wang Cong, et al. Design of Real-Time Data Acquisition System Based on TMS320F2812 [J]. Electronic Measurement Technology, 2007, 18: 36-40.