Embedded laser ranging system based on μC/OS-II

Publisher:psi33Latest update time:2016-11-08 Source: ofweekKeywords:μC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  This paper introduces the hardware principle design and software design of a laser ranging system based on ARM9. With the ARM9 processor as the control core, the phase method laser ranging technology is adopted. First, the emission laser of the semiconductor laser is modulated with a sinusoidal signal, and then the laser reflected by the object to be measured is converted into an electrical signal by a photoelectric detector. The phase measurement technology is used to measure the phase difference between the emission signal and the reception signal, so as to calculate the distance to the object to be measured. Finally, the real-time operating system μC/OS-II is used as the system control core to ensure the measurement accuracy.

  0 Preface

  The most basic principle of the laser ranging system is to measure the time interval of the laser pulse propagating in space, so as to obtain the measured distance. This paper studies the basic principle and implementation method of phase-based laser ranging. It combines the advantages of embedded, frequency-difference phase measurement and real-time operating system μC/OS-II. The hardware structure is reasonable and the software implementation method is flexible, which meets the requirements of networked real-time high-speed information extraction and transmission.

  It avoids the problems of high labor intensity, slow data collection, long data processing time, low calculation accuracy and data cannot be directly output to other systems in traditional distance measurement systems. This system is relatively simple to implement and has the advantages of high measurement accuracy, good stability and fast speed. It has a large application space in production plants, scientific research schools, metrology institutes, etc. and has high practical value.

  1 Basic principles of the system

  1.1 Phase laser ranging principle

  For continuous wave laser ranging, phase ranging is generally used, which mainly refers to irradiating the object to be measured with a continuously modulated laser beam, and calculating the distance D between the laser sensor and the target object to be measured from the phase change relationship generated by the round trip of the measuring beam.

Embedded laser ranging system based on μC/OS-II

  Formula (1) is a phase-based ranging formula, where C is the propagation speed of light waves in the air, φ is the phase difference caused by the adjustment of the laser signal after reflection, and f is the modulation frequency of the signal. It can obtain ranging accuracy that is better than the pulse-based time-of-flight measurement method, but the ranging speed is slow, the structure is more complex, and there is a Doppler effect for high-speed moving objects.

  Figure 1 is a schematic diagram of the phase laser ranging principle, where Δφ is the part of the phase delay less than 2π during the round trip of the signal, where φ= 2Nπ + Δφ, and N is the number of wavelengths contained in the round trip of the laser. Therefore, under a given modulation frequency, the distance measurement becomes the measurement of the integer number of wavelengths contained in the round trip of the laser and the measurement of the phase less than one wavelength. With the development of modern radio phase measurement technology, phase measurement can achieve very high accuracy, so phase laser ranging can also achieve very high accuracy.

Embedded laser ranging system based on μC/OS-II

  1.2 Principle of difference frequency phase measurement

  The principle of the difference frequency method for phase measurement is to obtain the superposition of two new frequency signal components by multiplying and mixing the master oscillation frequency and the local oscillation frequency, and then convert them into medium and low frequency signals after passing through a low-pass filter. Since the difference frequency signal still maintains the corresponding phase relationship of the original high frequency signal, measuring the phase of the medium and low frequency signal is equivalent to measuring the phase delay of the master oscillation signal after the round-trip distance. This can reduce the circuit complexity and improve the ranging accuracy.

Embedded laser ranging system based on μC/OS-II

  After multiplying and mixing these two signals with the external signal U3 = I3 cos (ω1 t + φ3), we can get:

Embedded laser ranging system based on μC/OS-II

  The two newly obtained signals 1 W and 2 W are then passed through low-pass filters to filter out their high-frequency components, obtaining low-frequency signals containing (ω -ω1) spectral components, and the corresponding phase information φ1 and φ2 are still retained in the filtered signals without causing the loss of phase information. The two signals are then AD sampled, and the microprocessor uses a digital signal processing algorithm to derive the phase difference Δφ, which can then calculate the distance between the emitted laser and the object to be measured.
 

  2. Hardware structure and working principle of the system

  The hardware composition of the system is shown in Figure 2, including ARM9 (S3C2440A) processor module, laser modulation drive circuit, local oscillator signal generator, laser emission circuit, laser receiving circuit, mixing filter circuit, LCD display module, keyboard input module and other parts. S3C2440A is an ARM 9 microcontroller launched by SAM SUNG. Its core is 32 bit ARM920T. Its system clock is a 400MHz CPU core operating frequency generated by the internal PLL. It also has 64 MB Flash and 64 MB SDRAM external memory. It has an internal integrated SDRAM and FLASH controller and rich functional interfaces. It is a high-speed, low-power, high-performance new processor that can be widely used in the development of communication, automobile, industrial control , PDA, medical and other systems. In this system, the ARM9 core board is used as the data acquisition control core, which generates various control signals of the A/D converter and basic data processing.

Embedded laser ranging system based on μC/OS-II

  The hardware working principle of the system is as follows: The system is mainly composed of a local oscillator signal generator, a laser transmitting circuit and a receiving circuit, a mixing and filtering circuit, a processor and a display circuit. The local oscillator signal generator can generate two sinusoidal signals with a frequency difference of 1KHz, modulate the power of the transmitting laser through the laser transmitting circuit, and then convert the transmitting laser and the receiving laser into corresponding electrical signals respectively, and then transfer the phase difference information to two low-frequency signals through the mixing and filtering amplifier circuit. Finally, the ARM 9 processor collects these two low-frequency signals, calculates the phase difference and converts it into distance, and finally displays it on the display module. The system peripheral circuits include system clock, analog-to-digital conversion ADC, external interrupt, timing system, signal capture module (Capture), pulse width modulation output (PWM), etc.

  3 System Software Design

  Since the software functions of this system are relatively complex, including input and output modules, measurement operations and data processing, the speed and real-time requirements are relatively high. Therefore, this paper adopts the μC/OS-II real-time operating system. μC/OS-II is a simple, efficient, and open source real-time embedded operating system. The basic functions provided by μC/OS-II include task creation, operation, deletion, task priority setting, task switching, etc., and it provides four mechanisms for communication between tasks and protection of shared resources: event flags, semaphores, mutex semaphores, and mailboxes. This paper adopts the μC/OS-II real-time system, which fully reflects its simplicity and efficiency. The software design is mainly the porting of μC/OS-II and the writing of tasks. The operating system is ported to the ARM9 processor, and the task scheduling of the μC/OS-II kernel can solve the problems of complex programming, poor maintainability, and lack of real-time guarantee of the system in traditional embedded software design. The system software includes ARM programming, based on μC/OS-II operating system, using Keil uVision3 integrated development environment, and all program codes are written in C language, which has strong portability and readability.

  As shown in Figure 3, the system software consists of modules such as data acquisition, processing, and display. These modules are uniformly scheduled and run by the μC/OS-II real-time operating system. In this way, the software part becomes the writing of programs for each task module. Data acquisition is completed by the AD acquisition module, and data processing is completed by the ARM communication and data processing module, DA conversion module, etc. The display is mainly the display and driver module of the LCD. The bottom-level driver includes the initialization of the system hardware, the bottom-level code for sending and receiving data on the UART interface, and the LCD driver module includes the implementation code for displaying the dots, lines, Chinese characters, etc. on the LCD screen.

Embedded laser ranging system based on μC/OS-II

  4 Conclusion

  This paper describes the principle of phase laser ranging, gives a detailed design of the system, and uses the ARM9 processor and introduces the embedded real-time operating system μC/OS-II. On the one hand, the real-time operating system has efficient multi-task priority management, a scalable kernel structure, strong scalability and portability, and microsecond interrupt management, which are more conducive to improving efficiency, effectively reducing the difficulty of application development, and helping to improve software development efficiency and shorten the development cycle. On the other hand, the application of embedded technology and the performance of the ARM9 processor itself provide the system with excellent hardware conditions, which improves the real-time, stability, and anti-interference of the ranging system as a whole, and has certain practical value.

Keywords:μC Reference address:Embedded laser ranging system based on μC/OS-II

Previous article:Application of S3C2410 and MBF200 in Fingerprint Collection System
Next article:Design of digital voltage-stabilized power supply for test system based on S3C2440

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号