The locomotive speed detection system plays a crucial role in ensuring the reliable control and safe operation of trains, directly impacting the punctuality and safety of train services. Currently, speed signals for various systems such as transition devices, monitoring units, anti-skid systems, and wheel bearing detection on mainline locomotives are provided by axle-mounted photoelectric speed sensors. These sensors supply signals to the speedometer, the train operation monitoring and recording device, the locomotive control cabinet, and the diesel engine excitation system. However, during maintenance or when a locomotive is returned to the depot for repairs, the speed is often low or non-existent, leading to no output signal or insufficient signal strength. This makes it challenging to test and maintain systems that rely on speed signals. To address this issue, the development of a portable photoelectric speed sensor analog signal generator has become essential. This device enables the simulation of speed signals even when the locomotive is stationary, significantly aiding in the testing and maintenance process.
1. Overall Plan
1.1 System Design Principle
The analog signal generator is designed to be compatible with the output signals from speed sensors used on domestic locomotives such as DF4D, DF8, DF11, SS7, SS8, and SS9. Since different locomotives have varying wheel diameters, the device must allow for wheel diameter adjustment to generate corresponding frequency pulses. The generator should meet the following requirements: 1) Output a square wave signal with a 50% duty cycle and a high level of 12V; 2) Support an output frequency range of 2 to 9,999 Hz; 3) Maximum DC current of 10 mA; 4) Signal accuracy of 1%; 5) LCD display showing locomotive speed; 6) Compatibility with various types of photoelectric speed sensors, including the DF-16 model.
1.2 Main System Block Diagram
The main system block diagram is illustrated in Figure 1.
[Image: Development of portable locomotive signal generator based on ATmega16]
2. System Design
2.1 Hardware Circuit Design
2.1.1 MCU-based Pulse Signal Generation Circuit
The microcontroller (MCU) operates at up to 12 MHz, which is sufficient to generate accurate speed signals. With a maximum locomotive speed of 300 km/h, the highest frequency required is 4.23 kHz. The MCU ensures a signal accuracy of less than 0.05%, offering a simple interface and user-friendly operation.
[Image: Schematic of pulse generation circuit]
2.1.2 Power Supply System
The power system supplies power to all components. To ensure the safety of both the signal generator and the locomotive’s circuitry, optocoupler isolation is used for all power inputs. The device requires 5V and 3.3V power supplies, which are provided through a modular DC-DC switching power supply with a wide input range.
2.1.3 Human-Computer Interaction Interface
A 3.5-inch color TFT LCD screen is used for display, featuring full hardware implementation for stability and reliability. It does not crash and provides clear, real-time feedback.
[Image: LCD interface design]
2.1.4 Speed Signal Output and Acquisition Circuit
To prevent interference between the locomotive and the generator, optocouplers are used for both input and output signals, ensuring independent operation of both systems.
[Image: Signal output and acquisition circuit]
2.2 Software Design
ATmega16 supports both C and assembly languages, making it ideal for embedded applications. C language is widely used due to its readability, ease of maintenance, and efficiency. The software is written in C, ensuring portability and flexibility. The program flowchart is shown in Figure 5.
[Image: Program flowchart]
2.2.1 Pulse Generation Software Design
The core function of the signal generator is to produce accurate speed pulses. The pulse frequency is determined by the locomotive's speed and wheel diameter, being proportional to speed and inversely proportional to wheel diameter. The software allows users to input the actual wheel diameter and simulate a desired speed, then calculates and outputs the corresponding signal. The algorithm involves calculating the wheel speed, determining the required signal cycle, and adjusting it using specific parameters to achieve the desired frequency. Finally, the timer is configured to generate the appropriate pulse at the I/O port.
[Images: Code snippets and algorithm details]
3. Conclusion
The portable locomotive signal generator based on the ATmega16 microcontroller offers low power consumption, a simple structure, and high cost-effectiveness. It reduces the need for peripheral interfaces and enhances system reliability. In practical use, it can simultaneously test the speed signals of multiple locomotives. It is simple, reliable, easy to maintain, and user-friendly. It also provides intuitive test results, displaying issues such as power supply errors, disconnections, and speed detection accuracy. This makes it an invaluable tool for locomotive maintenance and testing.
Drawer Slides,heavy duty drawer slides,drawer runners,soft close drawer slides,cabinet drawer slides
Foshan Nanhai Ranming Lijiali Hardware Co., Ltd , https://www.lijialihardware.com