Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

Publisher:悠然自在Latest update time:2016-11-10 Source: ofweekKeywords:AT89C2051 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  The reversing anti-collision alarm system designed in this scheme adopts a combination of software and hardware, and has the characteristics of modularization and versatility. The design introduces the development and basic principles of ultrasonic detection, and explains the principles and characteristics of ultrasonic sensors. Some main parameters of the system are discussed, and on the basis of introducing the functions of the ultrasonic ranging system, the overall composition of the system design is proposed. The proposal of this scheme will have an impact on the active anti-collision and even automatic driving of the car, and provide the driver with a reversing operation instruction.

  1 Introduction

  As we all know, to detect whether there is an obstacle between the two ends, the general approach is to send a signal at one end and determine whether the signal is received at the receiving end. If the signal is received, it means there is no obstacle in the middle; if not, it means there is an obstacle. However, in the design of the car reversing anti-collision alarm system, since the car is a moving object, it is impossible to install the receiving or transmitting device at a specific location. This determines that the system's transmitting and receiving devices must be installed together. Therefore, how to design an object detection device that installs the transmitting and receiving devices together is our research direction.

  2. Introduction of Ultrasonic Distance Measurement System

  In principle, ultrasonic ranging can be divided into two types: resonance type and pulse reflection type. Due to the application requirements, the pulse reflection type is used here, which uses the reflection characteristics of ultrasonic waves.

  The principle of ultrasonic ranging is to transmit ultrasonic waves in a certain direction through an ultrasonic transmitting sensor, and start timing at the same time as the transmission. The ultrasonic wave propagates in the air, and returns immediately when it encounters an obstacle on the way. The ultrasonic receiver stops timing when it receives the reflected wave. At normal temperature, the propagation speed of ultrasonic waves in the air is C=340m/s. According to the time t recorded by the timer, the distance (S) from the transmitting point to the obstacle can be calculated, that is:

  S=C*t/2 (1-1)

  It can be seen that its main parts are: (1) a pulse generator (transmitting circuit) that supplies electrical energy; (2) a switch part that isolates reception and transmission; (3) a transmitting sensor that converts electrical energy into acoustic energy and transmits the acoustic energy into the medium; (4) a receiving sensor that receives reflected acoustic energy (echo) and converts the acoustic energy into an electrical signal; (5) a receiving amplifier that can amplify weak echoes to a certain amplitude and cause the echoes to stimulate a recording device; (6) a recording/control device that usually controls the electrical energy transmitted to the sensor, controls the time for recording echoes, stores the required data, and converts time intervals into distances.

Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

  3. Overall system design

  The system mainly uses electromagnetic output and input oscillation circuits. The input signal is amplified and sent directly to the single-chip microcomputer AT89C2051 for processing. It can be automatically controlled through programming. The specific principle block diagram of the system is shown in Figure 3.1:

  The system is mainly composed of the following three functional blocks: ultrasonic sensor T/R40-16, ultrasonic transmission and reception consisting of transceiver system; central control processor AT89C2051 composed of the host system; control alarm output system.

  The main system circuits include: power supply circuit, ultrasonic transmitting circuit, ultrasonic receiving circuit, signal amplification circuit, DC control circuit, display circuit, detection distance selection circuit, alarm circuit, single-chip microcomputer control circuit, etc.
 

  4. Selection of main components

  4.1 Selection of Ultrasonic Sensors

  This system uses ultrasonic sensor T/R40-16, which is a paired transmitter and receiver sensor with excellent performance.

  The basic characteristics of ultrasonic sensors are frequency characteristics and directional characteristics.

  (1) Frequency characteristics

Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

  Figure 4.1 is the frequency characteristic curve of the ultrasonic emission sensor. Among them, f=40kHz is the center frequency of the ultrasonic emission sensor. Here, the ultrasonic mechanical wave generated by the ultrasonic emission sensor is the strongest, that is, the ultrasonic sound pressure energy level generated is the highest. On both sides, the sound pressure energy level decays rapidly. Therefore, the ultrasonic emission sensor must be excited by an AC voltage very close to the center frequency.

  (2) Directional characteristics

  The piezoelectric chip in the actual ultrasonic sensor is a small disc, which can treat each point on the surface as an oscillation source, radiating a hemispherical surface wave (sub-wave), which has no directivity. However, the sound pressure at a certain point in the space away from the ultrasonic sensor is the result of the superposition of these sub-waves (diffraction), which has directivity.

  4.2 Selection of Central Controller

  This system uses AT89C2051 microcontroller as the central controller.

  AT89C2051 is the world's newest high-performance eight-bit microcontroller produced by Atmel Corporation of the United States.

  The chip adopts FLASH storage technology , has 2kB bytes of internal flash memory, and adopts DIP packaging. It is currently the most popular microcontroller in small and medium-sized systems.

  5. Software language selection

  This system is based on a single-chip microcomputer. It is programmed in assembly language. Assembly language refers to a software language that uses mnemonics, symbolic addresses, labels and other symbols to write programs. It is an important tool for computer software design. It has an irreplaceable position in the fields of system software development, real-time control and real-time processing. Programming in assembly language can give full play to the functions of computer hardware and carry out high-quality design. The developed software has the characteristics of low memory overhead and fast computing speed. Moreover, it is not independent of the specific machine. It is a very general low-level programming language. Using assembly language programming, users can directly operate the working registers and on-chip RAM units inside the single-chip microcomputer, and the process of processing data is very specific.

  6. System hardware design

  The hardware design of this system adopts modular design method. According to the functions realized, it can be divided into the following parts.

  6.1 Clock Circuit Design

  All MCS-51 microcontrollers have an on-chip oscillator as the clock source for the CPU. However, the so-called on-chip oscillator is not actually an oscillator itself, but a high-gain inverting amplifier suitable for forming a feedback oscillator. To form a feedback oscillator, a reference frequency must be provided on its XTAL1 and XTAL 2 pins.

  XTAL1 is the input of the inverting amplifier; XTAL2 is its output and also serves as the input of the internal clock generator. The reference frequency can be provided by a crystal, an inductor or an external clock source. The usual practice is:

Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

  A quartz crystal or ceramic resonator and two capacitors with one end grounded are connected across XTAL1 and XTAL2.

  The quartz crystal here is an inductive element, which forms a parallel resonant circuit with the capacitor connected to it, providing positive feedback and the phase shift conditions necessary for oscillation for the on-chip oscillator, thereby forming a self-excited oscillator.

  6.2 Design of reset circuit

  The RST pin of AT89C2051 is the input pin of the external reset signal. Inside the MCS-51 device, RST is connected to the input of a Schmitt trigger. As we all know, the Schmitt trigger must have a certain input level to trigger, so it can filter out some noise interference signals.

Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

  Figure 6.2 shows the design of the reset circuit. The RST pin is connected to Vcc through a 10uF capacitor and grounded through a 10KΩ resistor to achieve automatic reset at power-on. It should be noted that for CHMOS devices, a 10KΩ resistor is not required, but the reset can be completed by keeping the reset pin high for more than 11ms after power-on, so it is okay to use a larger resistor.

  6.3 Overall Circuit Design

 Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

(Click for larger image)

  7.PCB design

 Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

  8. Ultrasonic emission program flow

  void send()

  {

  csb_in=1;

  for(i=0;i<1;i++)

  {

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  }

  csb_in=0;

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  _nop_();

  }

  9. Conclusion

  The reversing anti-collision alarm system designed in this scheme is a new exploration of the automobile anti-collision alarm system from passive anti-collision to active anti-collision. It is designed to target the insensitivity of some drivers to orientation and their lack of proficiency in reversing operations. Some main parameters of the system design are discussed, and on the basis of introducing the functions of the ultrasonic ranging system, the overall composition of the system design is proposed. This scheme will have an impact on the active anti-collision and even automatic driving of the automobile, and provide the driver with a reversing operation instruction.

Keywords:AT89C2051 Reference address:Design of reverse collision avoidance system based on AT89C2051 single chip microcomputer

Previous article:Design of wireless monitoring system for lithium-ion battery pack
Next article:Dormitory intelligent fire and theft alarm system designed with 51 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号