The hardware circuit principle of intelligent car anti-collision alarm based on AT89C2051

Publisher:琴弦悠扬Latest update time:2011-05-04 Source: 中电网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The anti-collision alarm uses ultrasonic waves and integrated Hall elements to measure the distance and speed of the car, and uses the real-time control and data processing functions of the single-chip microcomputer to complete the control of the system. The article gives the hardware circuit principle and software design of the car anti-collision alarm.

With the acceleration of the pace of modern life, the frequency of traffic accidents is also increasing. In order to improve the safety of car operation, this article introduces a car anti-collision alarm system controlled by a single-chip microcomputer. The device combines the real-time control and data processing functions of the single-chip microcomputer with the ultrasonic ranging technology and sensor technology. It can detect the distance between the rear obstacle and the car and the speed of the car during the operation of the car, display the distance through the digital display device, and the sound circuit issues a warning sound according to the distance.

1 Principle of ultrasonic ranging

The principle of ultrasonic ranging is to continuously detect the echo reflected by the obstacle after the ultrasonic wave is emitted, so as to measure the time difference T between the emission of the ultrasonic wave and the reception of the echo, and then calculate the distance S=C×T/2, where C is the ultrasonic wave speed, which is 344m/s at room temperature. After the sound speed is determined, the distance can be calculated as long as the round-trip time of the ultrasonic wave is measured.

2 Speed ​​measurement principle

The speed of a car is measured by a Hall integrated sensor. That is, the input shaft of a turntable equipped with a permanent magnet is connected to the rotating shaft of the wheel. When the wheel rotates, the turntable rotates accordingly. At this time, the permanent magnet on the turntable will pass through the Hall integrated sensor, thereby obtaining a magnetic signal at the input end of the Hall integrated sensor. If the turntable keeps rotating, the Hall integrated sensor will output a speed signal. It can be said that the measurement of the speed of a car is essentially the measurement of the frequency of the speed signal.

3 Functions and features of the controller AT89C2051

AT89C2051 is a low-power, high-performance CMOS 8-bit microprocessor, compatible with the MCS-51 series instruction set and pins, with the following features: 128 bytes of internal RAM, 2Kbytes EPROM, 15 I/O lines, 2 16-bit timers/counters, 5 two-level interrupt sources, 1 full-duplex serial port, an on-chip precision analog comparator and on-chip oscillator, low-power idle and power-down modes. The operating voltage range is 4.25V to 5.5V, and the operating frequency is 12MHz.

The two 16-bit timer/counter registers T0 and T1 in AT89C2051 can count machine cycles when used as timers, and the counting frequency is 1/12 of the oscillation frequency; when used as counters, they can increase by 1 when the external input pins P3.4/T0 and P3.5/T1 change from 1 to 0, and the counting frequency is 1/24 of the oscillation frequency.

4 Hardware System Design

The alarm is composed of a control system, an ultrasonic transmitting circuit, a receiving circuit, a speed measuring circuit, an alarm circuit, and an LED display circuit. The circuit principle block diagram is shown in Figure 1.


The ultrasonic transmitting circuit is composed of the CC7555 time base circuit and the ultrasonic transmitting probe. The P1.7 pin of the single-chip microcomputer AT89C2051 controls the CC7555 time base circuit to generate a 40kHz frequency signal to the ultrasonic generator, and the ultrasonic wave emitted by the ultrasonic probe is directed to the obstacle. The ultrasonic ranging has the following characteristics: high measurement sensitivity, strong penetration, fast measurement speed, large measurement angle, and can detect objects within a large range.

The ultrasonic receiving circuit is composed of an ultrasonic receiving probe, an amplifier and a shaper. The ultrasonic wave reflected by the obstacle is converted into an electrical pulse signal by the receiving probe, and then amplified and shaped by the amplifier and shaper and sent to the P3.2 pin of the single-chip microcomputer AT89C2051. The amplifier should be a broadband amplifier with sufficient gain and low noise to keep the pulse signal, especially the leading edge, from being distorted, so as to improve the accuracy of ranging.

Reference address:The hardware circuit principle of intelligent car anti-collision alarm based on AT89C2051

Previous article:Automobile anti-collision system based on nRF24E1 and TMC2023
Next article:Design of vehicle multi-way switch detection interface circuit based on MC33993

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号