Design of railway signal semi-automatic blocking optical cable transmitter based on STC12C

Publisher:自由探索Latest update time:2012-11-19 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Semi-automatic block railway lines exist in large numbers in my country, and the block information used to connect a train between two stations is completed by two types of information: positive and negative pulses. The transmission medium for transmitting block information is overhead open wires or optical cables. Railway transportation interruptions due to overhead wire or cable failures often occur, and once an overhead wire or cable fails, it is more complicated to recover. Usually, the recovery time is about 6 to 10 hours, which greatly reduces the transportation capacity of single-track railways with semi-automatic block sections. And with the advancement of technology and the widespread application of new technologies, the application of optical cables is becoming more and more common, and optical fiber transmission has been realized in the transmission channels between most railway stations.

The signal semi-automatic blocking optical cable transmitter is used for the section signal transmission of 64D single-line semi-automatic blocking. Its function is to replace the original cable or open line transmission, convert the original analog signal into a digital signal for transmission, and realize the redundant backup of the transmission channel. It can monitor the transmission channel in real time. If the main channel fails, it will switch to the backup channel and send out an alarm. It can also upload the working status of the equipment to the upper workstation such as microcomputer monitoring.

1 System Function Requirements and Structure

Due to the different distances between the two stations, the transmission voltage is also different, ranging from 40 to 120 V, and may be higher in some stations. The main function of the OCGB signal semi-automatic block optical cable transmitter is to collect the voltage at the transmitting end (station A), convert it into a corresponding digital signal, transmit it to the receiving end (station B) through the optical cable channel, and restore it to a voltage signal. According to the functional requirements and safety requirements, the optical cable transmitter is mainly composed of the following functional modules: input and output interface unit, power supply unit, control unit, and communication unit. Considering the safety and reliability of railway signals, the system needs to complete the following special functions:

1) Both the control module and the communication module adopt the "1+1" standby mode, and the control unit and the communication unit are configured in a cross standby manner;

2) The control unit uses dual CPUs for signal acquisition;

3) The transmission channel needs redundant backup;

4) The output adopts a safety AND gate circuit, which complies with the fault-oriented safety principle;

5) The working status and alarm information of this machine can be uploaded to the host computer for display.

According to the above functions, the system block diagram is shown in Figure 1. 2 System Hardware Design


In the hardware design of the system, the power supply part uses AC/DC module power supply to complete the DC12V and DC5V power supply required by the microcontroller and inverter circuit and the DC5V isolated power supply required for communication. The communication unit uses a dual RS232 serial port to E1 channel communication module produced by a Beijing company, but the 2 RS232 channels work in a switching mode. In the control unit, considering that dual serial ports are needed to achieve redundant backup of 2 transmission channels and inverter output drive power supply, the STC12C5A60S2 microcontroller is selected as the control chip of the main control unit.

2.1 Introduction to STCl2C5A60S2/AD/PWM series microcontrollers

STC12C5A60S2/AD/PWM series MCU is a single clock/machine cycle (1T) MCU produced by Hongjing Technology. It is a new generation of 8051 MCU with high speed/low power consumption/super strong anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8 to 12 times faster. It integrates MAX810 dedicated reset circuit, 2-way PWM, 8-way high-speed 10-bit A/D conversion (250 k/s), and is targeted at motor control and strong interference occasions.

The chip has the following features:

1) Enhanced 8051 CPU, 1T, single clock/machine cycle, instruction code is fully compatible with traditional 8051;

2) Operating voltage: STC12C5A60S2 series operating voltage: 5.5 ~ 3.3 V (5 V microcontroller) STC12LE5A60S2 series operating voltage: 3.6 ~ 2.2 V (3 V microcontroller);

3) Operating frequency range: 0 to 35 MHz, equivalent to 0 to 420 MHz of ordinary 8051;

4) User application space 8k/16k/20k/32k/40k/48k/52k/60k/62k bytes;

5) 1 280 bytes of RAM integrated on chip;

6) General I/O ports (36/40/44);

7) ISP (In-System Programmable)/IAP (In-Application Programmable), no special programmer or emulator is required. User programs can be directly downloaded through the serial port (P3.0/P3.1), and one chip can be completed in a few seconds.

8) With PWM (2-way)/PCA (Programmable Counter Array, 2-way) function, convenient for square wave output;

9) A total of 4 16-bit timers, two timers/counters compatible with traditional 8051, 16-bit timers T0 and T1, no timer 2, but an independent baud rate generator for serial communication. Adding a 2-way PCA module can realize 2 more 16-bit timers;

10) It has dual serial port function, which can meet the requirements of 2 communication channels in the system.

2.2 Circuit implementation of special functional requirements

2.2.1 Cross-backup redundant circuit

The main control chip STC12C5A60S2 has two serial ports, UART0 and UART1, and the communication unit has two RS232 input interfaces, S1 and S2, as shown in Figure 2; the channel 1 and channel 2 of the control unit 1 are connected to the serial port 1 of the communication unit 1 and the communication unit 2, respectively, and the channel 1 and channel 2 of the control unit 2 are connected to the serial port 2 of the communication unit 1 and the communication unit 2, respectively, so that the cross standby of the control unit and the communication unit is realized, that is, when there is only one control unit and one communication unit, the system can still work normally.


2.2.2 Safety and Gate Circuit

The output of the device is a DC24 V power supply, which drives the ZXJ or FXJ relay on site. In order to prevent erroneous output caused by electronic product failure, the output part adopts a safety AND gate circuit. For digital circuits, when a failure occurs, it generally shows a fixed high level 1 or a fixed low level 0. In order to improve the safety of the entire system, the normal square wave signal is used as the normal working signal. When the two CPUs work normally, they generate their own square wave signals respectively, and a DC voltage is generated through the safety AND gate to drive the relay. If there is a component failure in any square wave circuit and there is no square wave signal, no DC voltage will be generated. This ensures that the output DC voltage will not be an erroneous output. The circuit schematic is shown in Figure 3. 3 Software Design


The software design of this system uses the more intuitive C language, and the development platform uses the keil uvision4 integrated development environment. According to the system function requirements, the software design can be divided into several parts: acquisition, communication, and drive, which are introduced as follows:

1) Communications

The communication part mainly completes the data exchange between the two stations and the detection of the communication channel. The communication has two channels for redundant backup and communicates every 250 ms.

2) Collection

The acquisition part mainly completes the acquisition of positive and negative pulse voltage signals on site, and uses the external interrupt 0 (INT0) and external interrupt 1 (INT1) of the single-chip microcomputer as the input of the single-chip microcomputer. When the single-chip microcomputer has an interrupt input, the interrupt response program is started, and the digital signal representing the positive pulse or negative pulse is sent to the other station;

3) Driver

The driving part mainly converts the received digital signal into a pulse voltage and outputs pulses of different polarities according to different pulses. The flowchart of the driving part is shown in Figure 4. 4 Conclusion


The railway signal semi-automatic block optical cable transmitter based on the STC12C5A60S2 single-chip microcomputer has been repeatedly tested and tested, and it has stable operation and reliable communication, meets the principle of fault-oriented safety, and has passed the normal temperature, high and low temperature, constant humidity and heat, electromagnetic compatibility, software testing, expert evaluation and other tests organized by the Ministry of Railways, becoming a device for solving cable failures in semi-automatic block sections.

Reference address:Design of railway signal semi-automatic blocking optical cable transmitter based on STC12C

Previous article:Wired Network Convergence Solution Based on Digital RF Modulator
Next article:Analysis and Design of Position Servo System for CNC Machine Tool Worktable

Latest Security Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号