Design of rear-view camera system based on single-chip microcomputer

Publisher:陈书记Latest update time:2011-12-21 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

With the rapid growth of China's economy and the continuous decline in car prices, more and more families own their own cars. However, while enjoying the convenience brought by cars, people find it unbearable to reverse due to the blind spots or blurred vision of the driver when reversing. Therefore, people are in urgent need of a reversing rearview device to assist the driver to reverse quickly and accurately. At present, the reversing rearview system mainly uses ultrasonic ranging or rearview camera technology. The advantage of ultrasonic ranging is that it can measure the accurate distance, but the disadvantage is that it cannot sense the potholes, cliffs, and certain protruding obstacles behind the car; the camera technology can obtain intuitive images of these obstacles, but cannot measure the accurate distance. Combining the characteristics of these two technologies, this paper designs a rearview system that can simultaneously display the image of the obstacle and the accurate distance.
1 System hardware design
In order to simultaneously display the image of the obstacle and the safety distance information on the system display terminal, the image and distance signals must be synchronized. The system uses medium-scale integrated circuits to achieve signal synchronization, which can greatly improve the flexibility and stability of the system. According to the system functional requirements, the entire rear-view car reversing system can be divided into functional sub-modules such as ultrasonic ranging, image acquisition, synchronization signal separation, character and video signal superposition, system control, and display terminal. The system hardware block diagram and the connection between each module are shown in Figure 1.

The control center of the rearview system uses the Winbond W78E58 microcontroller; the ultrasonic distance measurement module consists of ultrasonic transmission and ultrasonic receiving circuits; the image acquisition is composed of a camera; the synchronization signal separation is composed of the line field synchronization separation module LM1881 and the video input circuit; the character and video signal superposition is realized by the character and video signal superposition module UPD6450; the display terminal is composed of a car TV. Among them, the ultrasonic distance measurement module is realized by small-scale integrated circuits and discrete components, and other modules are designed based on large-scale integrated circuits.
1.1 Ultrasonic distance measurement module design
1.1.1 Ultrasonic transmission circuit design
The ultrasonic distance measurement module includes ultrasonic transmission and receiving circuits, and its transmission circuit is shown in Figure 2.

In the figure, the ultrasonic probe uses CSB40T, and the 40kHz ultrasonic wave is generated by the NE555 oscillation circuit. According to the oscillation circuit frequency formula:

Determine the values ​​of each parameter in the circuit. R2 uses an adjustable resistor. Adjusting its resistance value can make the oscillation frequency consistent with the 40kHz natural frequency of the ultrasonic probe. To ensure that the 555 timer has sufficient driving ability, a +12V power supply is used, and the reset terminal (the fourth foot of NE555) is connected to the ultrasonic transmission control signal TXD sent by the single-chip microcomputer. When TXD is high, the circuit transmits ultrasonic waves. Conversely, when it is low, the circuit stops transmitting ultrasonic waves.
1.1.2 Ultrasonic receiving circuit design
The ultrasonic receiving circuit consists of an ultrasonic receiving probe, a signal amplification circuit, a detection circuit, and a comparison circuit. The ultrasonic receiving probe uses CSB40R corresponding to the transmitting probe. However, the sinusoidal wave signal after the probe conversion is very weak, and the signal must be amplified by an amplifier circuit. However, the single-chip microcomputer cannot directly receive the sinusoidal wave signal, so the analog signal must be converted into a digital signal. The receiving circuit design is shown in Figure 3.

In the figure, the signal output by the ultrasonic receiving probe is first amplified by UA and UB, then detected by D1 and enters the filter circuit composed of C5 and R10, bypassing the transient noise of the environment and the 40kHz ultrasonic baseband signal in the ultrasonic region, so only the positive level part of the reflected signal is taken out. The generated positive level is input to the positive input end of the comparator inverter composed of UC, and compared with the reference level of the inverting input end to generate a pulse signal that can be received by the microcontroller, and finally input to the RXD port of the microcontroller, and then the microcontroller decodes the received ultrasonic signal and performs corresponding control operations.
1.2 Overall design of system hardware
The system needs to realize the simultaneous display of obstacle images and distance information, that is, superimposing the character signal indicating the distance on the video signal collected by the camera. Video superposition means that the characters to be displayed are overwritten on the original image at the specified position on the screen. The superposition process needs to solve two problems: (1) accurately locate the pixel point and determine its row and column position; (2) modify the video signal after positioning, and superimpose the pixels of the characters to be displayed on the original image signal. The video signal contains the line synchronization signal and the field synchronization signal. The line synchronization signal determines the beginning of a line, and the field synchronization signal determines the beginning of a field. Extracting the line and field synchronization signals from the video signal can accurately locate the pixel. The overall circuit of the system is shown in Figure 4. First, the collected video signal is input into LM1881 and UPD6450 (a special character and video overlay chip produced by NEC, which stores the font information of digital characters) through two channels. LM1881 obtains the line and field synchronization signals of the video signal, and the synchronization signal is then input into UPD6450. The single-chip computer W78E58 reads the obstacle distance value measured by ultrasound in serial mode from the P3 port. When the BUSY of UPD6450 is at a low level, the single-chip computer sends the distance value in serial mode from the P1 port to the Data terminal of UPD6450, and sends the data from high to low, and writes the 8-bit serial data into its internal register at the rising edge of STB; then UPD6450 completes the superposition of the character signal and the video signal, and the superposition position and the display of the image can be controlled by the software of UPD6450; finally, the superimposed composite video signal is output to the display terminal for display.

2 System software design
The system software adopts modular design and consists of sub-programs such as main program, ultrasonic transmission, ultrasonic reception, delay, and video signal superposition. The flow chart of the system main program is shown in Figure 5.

The system first initializes the environment and clears the P3 port. When the car is in reverse gear, the system starts, and the P3 port of the single-chip microcomputer sends a 0.2ms wide pulse to the NE555 timer. Then the oscillation circuit generates 10 continuous 40kHz pulses and sends them to the ultrasonic sensor to emit 40kHz ultrasonic waves. After the transmission, wait for 20ms to determine whether the echo signal is received. If it is received, the distance detection data returned by the ultrasonic wave of the single-chip microcomputer P3 port will be read and the distance value will be calculated. Then the distance data will be written into the UPD6450 character storage area, and then the characters and video signals will be superimposed through UPD6453. Finally, the superimposed composite video signal will be output to the display terminal for display.
This system uses a single-chip microcomputer as the control center. The obstacle image collected by the camera and the obstacle distance value measured by the ultrasonic ranging module are superimposed into a composite video signal through the video superposition method, and then the accurate information of the obstacle is displayed through the display terminal. The system reminds the car driver to better complete the reversing action in an intuitive and accurate way, thereby reducing the difficulty of reversing caused by visual problems. The system can also be expanded with multiple functions as needed, such as remote control, sound and light alarm, etc.

Reference address:Design of rear-view camera system based on single-chip microcomputer

Previous article:Networked paging car anti-theft device controlled by single chip microcomputer
Next article:Design of automobile starting protection controller based on P89LPC901 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号