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.
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.
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.
[page]
3 Software DesignThe 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.
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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Domestic MCU
- STM32F767 ADC self-calibration problem
- EEWORLD University ---- Digi-Key: Accelerated Application of Graph Algorithms in Deep Learning
- FPGA Timing Constraints Practice: Sorting Out the Clock Tree
- A constant and adjustable output power electronic cigarette power supply solution based on TPS61022
- Sales of new energy vehicles have skyrocketed, how should we deal with used batteries?
- E-ON China Online Cloud Sharing Laboratory——"Microcomputer Principles and Applications"
- Improving Power Supply Network Efficiency Using Fixed Ratio Converters
- Large amplitude sine wave signal frequency acquisition circuit
- 【Share】Output adjustable