Research and design of automatic height and distance measuring vehicle based on ARM single chip microcomputer

Publisher:keiss2018Latest update time:2011-03-23 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.JPG

2.JPG


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.

3.JPG


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.

4.JPG
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.

5.JPG



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.

6.JPG



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.

7.JPG


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.

8.JPG


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.

9.JPG


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.

Reference address:Research and design of automatic height and distance measuring vehicle based on ARM single chip microcomputer

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

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号