Design and research of SPCE061A single chip microcomputer in automobile reverse collision alarm

Publisher:科技驿站Latest update time:2014-02-08 Source: dqjswKeywords:SPCE061A Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The system uses SPCE061A single-chip microcomputer as the control core. When working, the data collected by the ultrasonic sensor is used by the control core to quickly calculate the distance between the rear of the car and the obstacle, and the reminder information is displayed through the LED. The system mainly uses the real-time control and data processing functions of the single-chip microcomputer to complete the control of the system. Finally, the hardware circuit principle and software design of the alarm are explained.

  1. Introduction

  With the rapid development of the automobile industry, more and more people own private cars, and there will be more and more traffic problems. Among them, safe reversing is one of the most worrying issues for drivers who have just obtained a driver's license or have a short driving history. If you are not careful, you will not only cause losses to yourself or others, but also cause unnecessary quarrels. In response to the above problems, we have designed a reversing anti-collision alarm, which can inform the driver of the surrounding obstacles with sound or more intuitive display, eliminating the trouble caused by the driver looking around when parking and starting the vehicle, and helping the driver to eliminate the defects of blind spots and blurred vision, thereby improving safety.

  2. Overall structural design

  The system is mainly composed of three parts: SPCE061A single chip microcomputer, ultrasonic sensor and distance warning module. The overall structure of the system is shown in Figure 1.

Figure 1 System overall structure diagram

Figure 1 System overall structure diagram

  2.1 Control core unit

  SPCE061A is a high-performance, low-power 16-bit microcontroller developed and produced by Taiwan Lingyang Technology Co., Ltd. It has up to fourteen interrupt sources and is a very cost-effective 16-bit single-chip microcomputer. The instruction system of SPCE061A adopts a streamlined instruction set, with a short execution time, and can quickly process complex digital signals. At the same time, SPCE061A has 8 channels of 10-bit precision ADC, one of which is an audio conversion channel, and has a built-in automatic gain circuit; two channels of 10-precision DAC, only need an external amplifier circuit to complete the voice playback, which provides convenient hardware conditions for realizing voice reminders.

  2.2 Sensor Module

  The module consists of two parts: ultrasonic transmitter and ultrasonic receiver. It mainly completes the transmission and reception of ultrasonic waves, and amplifies and compares the collected electrical signals, so that the SPCE061A microcontroller can obtain more accurate data.

  2.2.1 Ultrasonic generator

  The ultrasonic generator uses a piezoelectric ultrasonic generator. The piezoelectric ultrasonic generator works by using the resonance of a piezoelectric crystal. It has two piezoelectric chips and a resonance plate. When a pulse signal is applied to its two poles, 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, thus generating ultrasonic waves. The internal structure of the generator is shown in Figure 2. The ultrasonic generator is connected to the pin IOA1 of SPCE061A, and the occurrence is controlled by software.

Figure 2 Internal structure of ultrasonic generator

Figure 2 Internal structure of ultrasonic generator
 

  2.2.2 Ultrasonic Receiver

  The ultrasonic receiver consists of two parts: an ultrasonic receiving probe and a signal amplifier. The ultrasonic receiving probe must correspond to the model of the transmitting probe, mainly the frequency must be consistent, otherwise the reception effect will be affected due to the failure to generate resonance, or even no reception.

  Since the electrical signal converted by the probe is very weak, it must be amplified by an amplifier circuit. The signal received by the ultrasonic receiver can be directly input into the microcontroller through the IOA2 pin of the SPCE061A microcontroller for processing, thereby simplifying the hardware circuit of the system. [page]

  2.3 Distance Warning Module

  This module mainly includes: voice, LED dot matrix and reminder indicator light. When the driver turns the car to reverse gear, the system starts to trigger the start condition. The LED dot matrix displays the distance between the rear of the car and the obstacle. When the distance to the obstacle is less than the preset range (1m, 0.5m, 0.25m), different "BI, BI" alarm sounds (normal, fast, rapid) are issued respectively, and the corresponding reminder indicator light starts flashing at the same time. The flashing degree corresponds to the alarm sound to achieve the effect of enhancing the reminder.

  3. Software Design

  3.1 Main Program

  The main program mainly completes the system initialization, controls the transmission and reception of the trigger pulse signal, calculates the distance between the rear of the vehicle and the obstacle, and determines whether the measured distance is within the corresponding range to drive the display circuit and the sound circuit. The main program flow is shown in Figure 3.

Figure 3 Main program flow chart

Figure 3 Main program flow chart.

  3.2 Ultrasonic ranging

  Algorithm Since the speed of the car is slow when reversing, it can be considered as stationary compared to the speed of sound, so the influence of the Doppler effect can be ignored in the system. Ultrasonic distance measurement uses its reflection characteristics. The ultrasonic transmitter continuously emits ultrasonic waves of a certain frequency, which are reflected after encountering obstacles. When the ultrasonic receiver receives the reflected signal, it converts it into an electrical signal, measures the time between the transmitted wave and the reflected wave (T), and the distance (S) can be obtained according to S=C×T/2. Where C is the ultrasonic wave speed, which is 344m/s at room temperature.

  4. Conclusion

  The system utilizes the powerful real-time control and data processing capabilities of SPCE061A, significantly improving reliability and accuracy. In addition, the single-chip microcomputer has the characteristics of simple structure, reliable operation, and small measurement error. The system can intuitively display the distance between the rear of the car and the obstacle through the LED dot matrix, which provides convenience for the driver. When the obstacle distance is less than the alarm distance set by the system, the system lights up the reminder indicator and issues a synchronous voice prompt to remind the driver to brake in time to prevent the car from colliding or scratching, making the system very practical.

Baidu Button BEGIN
Keywords:SPCE061A Reference address:Design and research of SPCE061A single chip microcomputer in automobile reverse collision alarm

Previous article:Implementation of lane line recognition and detection based on OMAP3530 platform
Next article:Design of vehicle virtual instrument data acquisition system based on CAN bus technology

Latest Microcontroller Articles
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号