Railway signal semi-automatic blocking optical cable transmitter based on STC single chip microcomputer

Publisher:码字狂徒Latest update time:2012-06-26 Source: 现代电子技术 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 China, 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 open wire or cable failures often occur, and once an open 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 achieved in most transmission channels between railway stations.
The signal semi-automatic block optical cable transmitter is used for the interval signal transmission of 64D single-line semi-automatic block. Its function is to replace the original cable or open wire transmission, convert the original analog signal into a digital signal for transmission, realize the redundant backup of the transmission channel, and monitor the transmission channel in real time. If the main channel fails, switch to the backup channel, and issue an alarm. The working status of the equipment can also be uploaded 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 blocking optical cable transmitter is to collect the voltage at the transmitting end (station A), convert it into the 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. Based on 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" backup mode, and the control unit and the communication unit are configured in a cross-backup manner;
2) The control unit uses dual CPUs for signal acquisition;
3) The transmission channel needs redundant backup;
4) The output uses a safe AND gate circuit, which complies with the fault-oriented safety principle;
5) The working status and alarm information of this unit can be uploaded to the host computer for display.
According to the above functions, the system composition block diagram is shown in Figure 1.

a.JPG



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 Beijing Company, but the 2 RS232 channels are switched. In the control unit, considering that dual serial ports are used 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. [page]

2.1 Introduction to STC12C5A60S2/AD/PWM series MCU
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~35 MHz, equivalent to 0~420 MHz of ordinary 8051;
4) User application space 8k/16k/20k/32k/40k/48k/52k/60k/62k bytes;
5) On-chip integrated 1 280 bytes of RAM;
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 seconds;
8) It has PWM (2-way)/PCA (Programmable Counter Array, 2-way) function, which is convenient for square wave output;
9) There are 4 16-bit timers in total, 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 standby 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; connect channel 1 and channel 2 of control unit 1 to serial port 1 of communication unit 1 and communication unit 2 respectively, and connect channel 1 and channel 2 of control unit 2 to serial port 2 of communication unit 1 and communication unit 2 respectively, so that cross standby of control unit and communication unit is realized, that is, when there is only one control unit and one communication unit, the system can still work normally.

b.JPG


2.2.2 Safety AND gate circuit
The output of this device is a DC24 V power supply, which drives the ZXJ or FXJ relay on site. In order to prevent the error output caused by the failure of electronic products, 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 error output. The circuit schematic is shown in Figure 3.

c.JPG

[page]

3 Software Design
The software design of this system uses the more intuitive C language for programming, 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. They are introduced as follows:
1) Communication
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 once every 250 ms;
2) Acquisition
The acquisition part mainly completes the acquisition of the positive and negative pulse voltage signals on site, and uses the external interrupt 0 (INT0) and external interrupt 1 (INT1) of the microcontroller as the input of the microcontroller. When the microcontroller 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) Drive
The drive part mainly restores the received digital signal to a pulse voltage, and outputs pulses of different polarities according to different pulses. The program flowchart of the drive part is shown in Figure 4.

d.JPG



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

Reference address:Railway signal semi-automatic blocking optical cable transmitter based on STC single chip microcomputer

Previous article:Design of LED outline display controller based on single chip microcomputer
Next article:Introduction to the solution of single chip microcomputer controlling DC motor

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号