1 Introduction
Ultrasonic waves have strong directivity, slow energy consumption, and can propagate over long distances in a medium, so they are used for distance measurement. Ultrasonic detection is often quick, convenient, simple to calculate, easy to control in real time, and the measurement accuracy can meet industrial practical requirements, so it is widely used in the development of mobile robots. Mobile robots must have automatic navigation and obstacle avoidance functions to operate in unknown and uncertain environments. Ultrasonic sensors are widely used as ranging sensors for mobile robots due to their simple information processing, fast speed, and low price, to achieve functions such as obstacle avoidance, positioning, environmental modeling, and navigation.
2 Overall system design
2.1 Principle of Ultrasonic Distance Measurement
2.1.1 Ultrasonic generator
Ultrasonic waves propagate in a straight line, with high frequency and strong reflection ability. Its propagation speed in the air is 340 m/s, which is easy to control and less affected by the environment. Therefore, ultrasonic sensors are used as the "eyes" of distance detection. The ultrasonic frequency that can be used in the field of distance measurement is in the frequency range of 20 to 400 kHz, and 40 kHz is commonly used in the air medium.
2.1.2 Principle of piezoelectric ultrasonic generator
Piezoelectric ultrasonic generators actually work by using the resonance of piezoelectric crystals. The internal structure of the ultrasonic generator consists of two piezoelectric chips and a resonance plate. When a pulse signal is applied to its two electrodes, and its frequency is equal to the natural oscillation frequency of the piezoelectric chip, the piezoelectric chip will resonate and drive the resonance plate to vibrate, generating ultrasonic waves. On the contrary, if no voltage is applied between the two electrodes, when the resonance plate receives ultrasonic waves, it will compress the piezoelectric chip to vibrate, converting mechanical energy into electrical signals, and then it becomes an ultrasonic receiver.
2.1.3 Principle of Ultrasonic Distance Measurement
The ultrasonic transmitter emits ultrasonic waves in a certain direction and starts timing at the same time. The ultrasonic waves propagate in the air and return immediately when they hit an obstacle. The ultrasonic receiver stops timing immediately after receiving the reflected wave. The propagation speed of ultrasonic waves in the air is 340 m/s. In the system, ultrasonic ranging uses the method of detecting the round-trip time of ultrasonic waves. Since the length of time is proportional to the distance the sound passes, when the ultrasonic transmitter emits a short pulse wave, the timing starts; when the ultrasonic receiver receives the first return wave pulse, the timing stops immediately. According to the time t recorded by the timer, the distance (s) from the emission point to the obstacle can be calculated, that is: s=340t/2. This is the so-called time difference ranging method.
2.2 Overall system design
The system uses μC/OS-1I operating system, and the system divides the software into four functional modules: echo A/D acquisition module, LED display and key processing module, LCD display module, alarm, storage and serial port processing module. Among them, the echo A/D acquisition module is used for sampling and saving real-time data; the LED display and key processing module is used to process the sampled data and convert it into meaningful parameters; the LCD display module displays various parameters on the LED; and the alarm, storage and serial port processing module mainly processes the corresponding data in real time. Figure 1 is the overall block diagram of the system design.
3 System Hardware Design
3.1 Introduction to LPC2138 Microcontroller
LPC2138 has built-in 512 KB high-speed Flash memory and 32 KB RAM, and has rich peripheral resources: 2 32-bit timers (with capture and comparison channels), 2 10-bit 8-channel A/D converters, 1 10-bit D/A converter, PWM channels, 47 GPIOs, 9 edge- or level-triggered external interrupts, RTC with independent power supply and clock, and multiple serial interfaces (UART, I2C, SPI, SSP). It contains a vector interrupt controller with configurable interrupt priority and vector address. The on-chip Boot loader can realize in-system application programming (ISP/IAP), and the on-chip PLL can achieve a CPU operating frequency of 60 MHz. It has two low-power modes: idle and power-down, and can be awakened by external interrupts. Figure 2 is the overall structure of LPC2138.
3.2 Ultrasonic Transmitter Circuit
The ultrasonic transmitting circuit is composed of the ultrasonic transmitter T and the 40 kHz frequency signal generated by PWM, the driving (or excitation) circuit, etc. The system design uses the PWM module in ARM to generate a high-precision 40 kHz frequency signal, and then passes through the driving circuit composed of 74HC00, etc., and finally sends the transmitting signal to the ultrasonic transmitter T. For the radiation probe T, a type with a transmitting frequency of 40kHz is selected. This type is now widely used and the circuit is simple. Only a 40 kHz pulse is given to the transmitting end, and the transmitting probe will continuously send ultrasonic waves. The specific hardware circuit is shown in Figure 3.
The ultrasonic transmitter and receiver use φ15 ultrasonic transducers TCT40-10F1 (T transmitter) and TCT40-10S1 (R receiver), with a center frequency of 40 kHz. When installing, the center axes of the two transducers should be kept parallel and 4 to 8 cm apart.
If the ultrasonic receiving circuit is shielded with a metal shell, the anti-interference ability can be improved. According to different measurement range requirements, the filter capacitor C4 connected in parallel with the receiving transducer can be appropriately adjusted to obtain appropriate receiving sensitivity and anti-interference ability.
3.3 Ultrasonic receiving circuit
The ultrasonic receiving circuit is composed of a three-stage filter amplifier circuit with MC3403 as the core and a diode voltage doubler and current stabilization circuit. The processed echo signal is sent to the ARM A/D conversion module for A/D sampling, thereby triggering the return time. The specific pin configuration of Texas Instruments' MC3403 is shown in Figure 4. The ultrasonic receiving circuit is shown in Figure 5.
5 Measurement results
After repeated debugging, the system was tested and the measurement range was 0.1~4.5m, the measurement accuracy was 1cm, and the measurement error was kept below 4cm, so the system performance was relatively good. The test data is shown in Table 1.
6 Conclusion
The ultrasonic distance measurement system based on ARM and μC/OS-II uses LCD display, has simple circuit, friendly display interface, strong communication capability, good scalability, and good practical application value. The system can be used for robot intelligent walking and navigation, and also has certain application areas in the automotive electronics industry. It can be used with other modules to achieve multi-functional measurement, and the touch screen function can be expanded in display input.
Previous article:Principle and method of realizing high-speed and low-power ADC with new pipeline
Next article:A brief discussion on the lighting design of indoor badminton courts
- Popular Resources
- Popular amplifiers
- USB Type-C® and USB Power Delivery: Designed for extended power range and battery-powered systems
- ROHM develops the second generation of MUS-IC™ series audio DAC chips suitable for high-resolution audio playback
- ADALM2000 Experiment: Transformer-Coupled Amplifier
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- USB Type-C® and USB Power Delivery: Designed for extended power range and battery-powered systems
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- GigaDevice's full range of automotive-grade SPI NOR Flash GD25/55 wins ISO 26262 ASIL D functional safety certification
- GigaDevice's full range of automotive-grade SPI NOR Flash GD25/55 wins ISO 26262 ASIL D functional safety certification
- New IsoVu™ Isolated Current Probes: Bringing a New Dimension to Current Measurements
- New IsoVu™ Isolated Current Probes: Bringing a New Dimension to Current Measurements
- Infineon Technologies Launches ModusToolbox™ Motor Kit to Simplify Motor Control Development
- Infineon Technologies Launches ModusToolbox™ Motor Kit to Simplify Motor Control Development
- STMicroelectronics IO-Link Actuator Board Brings Turnkey Reference Design to Industrial Monitoring and Equipment Manufacturers
- SignalTap II integrated assign statement problem
- Basic knowledge of 5G standards
- [Live Review] ROHM DCDC Converter Design Seminar
- Overview of air conditioning automatic control
- GD32E230 data, code, evaluation board schematics and related files
- [NXP Rapid IoT Review] FreeRTOS debugging method (task execution status output)
- Waveform Generator Implemented on SoPC
- The system integration and development market is highly competitive
- MicroPython adds PowerPC architecture
- Reasons for winning the top ten brand cases