Share this

Coupler Height Measurement System Based on Ultrasonic Sensor

2026-04-06 06:57:08 · · #1
Abstract : This measurement system mainly uses ATMEGA16L microcontroller and Banner Engineering Q45ULIU64ACR ultrasonic sensor. This paper introduces the working principle, hardware and software design, software flow of the measurement system, and analyzes the experimental results. Keywords : coupler; distance measurement; ultrasonic sensor; microcontroller 1. Introduction When freight cars and passenger cars are repaired, repaired in sections and repaired in the factory, the vertical distance between the coupler and the rail must be detected. In order to facilitate coupling and ensure driving safety, the coupler height (the vertical distance from the center line of the coupler to the upper surface of the rail) must be specified within a certain range [1] (passenger cars: 880mm, with an allowable error of +10mm and -5mm; freight cars: 880mm, with an error of ±10mm). When the vehicle is repaired in sections, the bogie and coupler must be measured. If the measurement is inaccurate, it will seriously affect the driving safety of the train. Currently, all railway depots in China use relatively primitive manual measurement methods, which have large errors, low efficiency, and are time-consuming and labor-intensive, failing to meet the development requirements of high-speed and heavy-load railway trains. [sup][2][/sup] To address the above problems, this paper describes the functional principle and hardware and software design of the ultrasonic coupler height measurement system. 2. Working Principle The measurement system uses an ultrasonic sensor to emit ultrasonic waves vertically downward from the center line of the coupler, which are reflected back by a thin plate placed on the rail surface. The sensor receives the echo, and since the speed of light in the air is constant, the height of the coupler can be calculated by the time measured by the timer. Figure 1 is a schematic diagram of the distance measurement principle. [align=center] Figure 1 Schematic diagram of distance measurement principle[/align] The entire system consists of a single-chip microcomputer for measuring distance and a mechanical part for system installation and positioning. In addition to the main height testing function, the system adopts an intelligent and user-friendly design and has the following features: (1) It is equipped with a keypad and an LCD screen. The keypad is used to control the testing and other functions, and the LCD screen displays the measurement results for easy viewing. (2) The microcontroller control system expands a memory that can store no less than 1000 test data. Each measurement data is labeled with a serial number and related information for easy user query. (3) It has a power information acquisition circuit and displays the power information on the LCD screen to help users understand the power usage and remind users to replace the battery in time. (4) The system is designed with emergency handling procedures for certain special situations to ensure the reliability of the test and the security of the data to the greatest extent. (5) It adopts the I2C bus, which can be easily connected to a microcomputer for data transmission. 3. Hardware Design The hardware system includes: microcontroller control system, ultrasonic sensor, keyboard and display circuit, and DC power supply. Its composition structure is shown in Figure 2. [align=center] Figure 2 Hardware System Structure[/align] The microcontroller is an ATmega16L-8pu AVR microcontroller; the sensor is a Banner Q45ULIU64ACR ultrasonic sensor; the display is a Tianzhengda TS12864 graphic LCD screen; and the power supply is a 9V battery. The Q45ULIU64ACR ultrasonic sensor converts the measured distance value into an analog output (voltage or current). It has a detection range of 100mm to 3.0m, a resolution of 0.1% of the distance (minimum 0.25mm), a linearity of 1% of full scale, and temperature compensation. Since the nominal height of most train couplers is around 880mm, the allowable detection error is ±0.2%, thus this sensor meets the system requirements. The wiring diagram for the Q45U sensor is shown in Figure 3. The brown, blue, and black wires represent the sensor's positive, negative, and voltage output terminals, respectively. The analog output of 0-10V linearly corresponds to a certain range of distance values. Its output is connected to the microcontroller's A/D converter via a voltage divider circuit (reducing 0-10V to 0-5V to meet the input requirements of the microcontroller's A/D converter). The voltage value is sampled by the A/D converter and processed by the program to obtain the height value. [align=center]Figure 3 Sensor Wiring Diagram[/align] The keyboard is equipped with function keys such as system start key, test key, save key, query key, page up key, and delete key for user convenience. The graphic LCD can display Chinese, English, and numbers, and is used to display the welcome screen, operation prompts, test results, and power information. The power level indicator function can be monitored by A/D converter sampling of the power supply voltage. When it is necessary to export data to the microcomputer, communication can be achieved through I2C bus connection. 4. Software Design The system is required to implement the functions of ranging, saving data, and querying historical data. These functions are designed accordingly in the software. The flowchart of the main program is shown in Figure 4. [align=center]Figure 4 Main Program Flowchart[/align] After pressing the power button to start the system, the system will initialize each component and wait for keyboard input. If the distance measurement button is pressed, the system will control the ultrasonic sensor to emit ultrasonic waves, receive the echoes, process the data, obtain the measurement value, and display it on the screen for the user to save or otherwise process. If the save button is pressed, the system will automatically save the measured data for the user to query later. If the query button is pressed, historical measurement data can be queried and accessed. The keyboard also has up and down page keys for easy retrieval. Based on the above, the distance measurement subroutine shown in Figure 5 can be designed. [align=center] Figure 5 Distance Measurement Subroutine Flowchart[/align] 5. Experimental Results Analysis Table 1 shows the experimental data at room temperature within a measurement range of 880±15mm. After a large number of tests, it was found that within the measurement range (100mm~1.4m in this system), the system measurement error is less than ±3mm, and the measurement is stable, with high repeatability and minimal environmental influence. Therefore, as long as the operation is correct and errors caused by improper human use are eliminated, the system's test results are very ideal. [align=center] Table 1 Experimental Data[/align] 6. Conclusion This system uses a modern ultrasonic ranging sensor, adopts single-chip microcomputer control technology to sample, filter and process data in real time, and displays it on an LCD screen to complete the intelligent detection of the vertical distance between the coupler and the track. This device has the characteristics of small size, high precision, low power consumption and high degree of automation, and can be used as an ideal portable tool for on-site inspection personnel. References [1] Edited by Dalian Locomotive and Rolling Stock Plant of the Ministry of Railways. Dongfeng 4 type diesel locomotive [M], Dalian University of Technology Press, 1993. [2] Su Zhigang. Development of coupler height inspection ruler [J]. Railway Technical Supervision, 2002, 03). Full text download of coupler height measurement system based on ultrasonic sensor
Read next

CATDOLL Oksana Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22