Abstract: The height and horizontal distance of many targets in life need to be measured. At present, the main measurement method is still based on the traditional tape measure, which is not efficient and sometimes inconvenient. There is no mature digital height and distance measurement product. Based on the basic mathematical method, the remote control car is used as the carrier, the angle sensor is used to measure the angle, the Hall sensor is used to measure the horizontal distance, etc., and the single-chip microcomputer LM3S615 is used for data calculation, so as to realize the fast, accurate and digital measurement of the height, horizontal distance and other data of the target object to be measured. The height measurement accuracy can reach 99.06%, and the horizontal measurement accuracy can reach 98.06%.
Keywords: height measurement; distance measurement; LM3S615; angle sensor; Hall sensor; LCD liquid crystal display
At present, the research on height measurement and distance measurement at home and abroad is mainly focused on the processing of satellite, radar and other signals, and its application scope is mainly concentrated in the measurement and survey of military, marine or geological data. There are few studies on the application of solving daily life problems, such as measuring the height and horizontal distance of a target that is difficult to measure by traditional methods. Even if there is research, it mainly adopts mechanical methods or improves or repairs traditional methods. The current advanced electronic information science and technology has provided new ideas and solutions for the height and distance measurement in daily life. This design will use the remote control car as a measuring tool, and use sensors such as angle sensors and Hall sensors to obtain the measured physical data and process and calculate the data through the single chip microcomputer, so as to achieve fast, accurate and digital measurement of the height, horizontal distance and other data of the target object to be measured.
1 Theoretical analysis and calculation
1.1 Design principle analysis and calculation
The process and related parameters of the automatic height and distance measurement of the car are shown in Figure 1. When the car is parked at point A, the remote control car device adjusts the angle so that the measuring light spot is fixed to point C, and the angle α at this time is measured and stored; then, the remote control controls the car to move forward, so that the car moves in a straight line to point B, and adjusts the measuring device again so that the measuring light spot is fixed to point C again, and the angle β at this time is measured and recorded. The travel distance L from A to B is measured and recorded. Using the above data, the height H of the target to be measured and the distance S between the car and the target to be measured can be calculated, and the calculation formula is shown in the following formula (1).
1.2 System Design Idea
From the measurement process, the data that need to be measured are angle α, angle β and the travel distance L of the car. Through repeated comparison of devices, in this design, the laser light source installed on the servo is used as the device for fixing point C; the angle sensor is used to measure the angle; the Hall sensor is used as the sensor for distance measurement; the single-chip microcomputer is used as the main control unit to control the straight-line travel of the car, the fixed-point rotation of the servo, the acquisition and calculation of angle and distance data, and the LCD display of measurement data.
2 System Design
1) Overall Design Scheme Through the above analysis, the system can be divided into 5 parts: angle detection module, horizontal distance detection module and remote control module, LCD display module, signal processing and control module. The system block diagram is shown in Figure 2.
The overall design scheme is that the LM3S615 processor collects and stores the first angle sensor measurement signal through the angle sensor, remotely controls the car and adjusts the angle to pass a certain distance, collects the second angle sensor measurement signal, and uses the Hall sensor to measure the distance traveled by the car between the two measurements. Finally, the specific height is obtained through the algorithm formula of the LM3S615 processor and sent to the LCD12864 liquid crystal display module for display.
2) Design of angle signal detection scheme This design uses a giant magnetoresistance angle sensor, which is an angle measurement sensor developed using the characteristic that the resistance value of giant magnetoresistance decreases sharply under a certain magnetic field. It has a series of advantages such as good linearity, wide linear range, small size, high sensitivity (resolution can reach 12 bits, accuracy can reach 10 bits, and the minimum resolution is 0.01 degrees), and high response frequency. The disadvantage is that the cost is high.
3) Design of horizontal distance detection scheme This design uses the Hall sensor counting method to measure the horizontal distance. It has the advantages of small size and high sensitivity. In addition, when the integrated Hall sensor senses the change of the magnetic field, there will be a digital high and low level jump characteristic, which can be used to achieve the purpose of counting.
4) Controller module design LM3S615ARM is used as the controller. The Luminary Micro StellarisTM series of microcontrollers is the first controller based on ARMCortexTM-M3. It introduces high-performance 32-bit computing into price-sensitive embedded microcontroller applications. Considering many factors such as accuracy and low operating speed requirements, it is decided to use LM3S168ARM as the processor module of this design.
3 System implementation
This system includes 6 main modules: power supply, angle data signal acquisition, distance data signal acquisition, remote control, data signal control, and data signal display. The specific introduction is as follows.
1) Control part circuit design The control part must complete the infrared control part software decoding function, motor operation control function, servo control function, Hall sensor counting function, laser control, angle sensor data acquisition function and LCD control. The control part circuit is shown in Figure 3 below.
2) Driving circuit This car uses the original dual DC reduction motor, which can work well with 74V. The motor drive uses a dedicated driver chip L298N, which independently controls the start, stop and steering of the two motors to ensure the symmetry of the parameters of the two circuits, which is conducive to maintaining the stability and accuracy of the car's driving and reduces the difficulty of circuit design. The motor drive circuit is shown in Figure 4.
4 System software design
This system uses LM3S615ARM as the control chip, controls the car to move horizontally through infrared remote control, adjusts the angle sensor to collect data, and stores the angle data and horizontal driving distance each time a set of data is measured and waits for the next operation. The program flow chart is shown in Figure 5.
5 System debugging and testing
5.1 System debugging
1) Servo debugging Install the servo, angle sensor and laser. When installing the servo, it must be ensured that the servo can rotate clockwise for more than 90°, the laser is level with the car, and the output voltage of the angle sensor is less than 2 V.
2) Car speed control In order to make the car go in a straight line, the system uses two PWM ports to control the speed of the left and right wheels of the car, set their PWM duty cycle to the same, and then test and modify the duty cycle until the car can go in a straight line.
3) Infrared software decoding Infrared encoding uses pulse position modulation (PPM), using the time interval between pulses to distinguish "0" and "1". During debugging, the time corresponding to the code word is changed until the correct data can be received.
5.2 Test results and result analysis
5.2.1 Test results
1) The horizontal distance from the measured point is 9.26 m, and the difference is L=1 m. The height of the same point is measured and recorded as shown in Table 1.
2) The horizontal distance from the measured point is 9.26 m. Keep moving forward with a difference of L=2 m and measure the height of the same point and record it as shown in Table 2.
3) The horizontal distance from the measured point is 9.26 m. Keep moving forward with a difference of L=3 m and measure the height of the same point and record it as shown in Table 3 below.
5.2.2 Result Analysis
From the measurement results in the above 3 tables, the overall measurement average is H=(3.96+4.11+4.22)/≈4.10 m, the absolute error is about 16 cm, and the measurement accuracy is 96.24%. At the same time, it can be seen from the 3 tables that the error gradually decreases with the increase of the horizontal spacing. Therefore, the larger the difference between angles α and β, the more accurate the measurement. The highest accuracy of height measurement can reach 99.06%, and the highest accuracy of horizontal distance can reach 98.06%.
6 Conclusion
This product basically meets the accuracy required by the design. When the appropriate step parameters are selected, the height measurement accuracy can reach 99.06%, and the horizontal distance accuracy can reach 98.06%. It is simpler and more intuitive than the traditional measurement method; it can be applied to real life with some modifications, which can reduce the measurement time of the height and horizontal distance of the target object and improve the measurement accuracy, and has high economic value.
Previous article:Transplantation of Microwindows in Embedded Systems Based on Single Chip Microcomputer
Next article:Photovoltaic sine wave inverter based on 68HC908MR16 single chip microcomputer
- Popular Resources
- Popular amplifiers
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- The Definitive Guide to Arduino Robotics
- Arrow&TI live broadcast review: TI FPD-Link III automotive chipset, ideal solution for automotive video transmission
- Leakage current test
- Are those who have seen this almost 40 years old?
- IPC-6013E-EN_2021 Qualification and Performance Specification or FlexibleRigi...
- TI DSP FFT library functions
- See you in April丨The 2021 Munich Shanghai Electronics Show is about to start, and pre-registration is in full swing!
- Live Review: June 28th Datang NXP Semiconductors | Battery Management Chip Solution Design and Precautions
- Dear students, Qorvo 2021 campus recruitment is here, take action now.
- Video tutorial on developing RT-Thread with Bluexun AB32VG1