Automobile collision preventing warning based on ultrasonic ranging
Technical field
The present invention relates to a kind of proximity-warning device of automobile, is a kind of automobile collision preventing warning based on ultrasonic ranging specifically.
Background technology
Along with improving constantly of living standard, people are increasing to the demand of automobile, and the automobile on the road is just more and more; This has just caused road, parking area to crowd; The reversing total degree constantly increases, and the automobile driver visual field is very limited, collides and the accident of pulling happens occasionally.Reverse Sensor is the main safe auxiliary device of automobile parking at present, can congratulate the person of sailing attention thereby remind, but its cost be higher with sound or display automobile peripheral obstacle situation directly perceived.The appearance of small-sized inexpensive microprocessor (micro controller system) is improved the function of ultrasonic ranging sensor, and microprocessor can improve range accuracy.The automobile collision preventing warning of utilizing micro controller system and super sonic characteristics to make can prevent effectively that automobile is wounded when reversing, scratch, and has improved the safety of driving.The realization of circuit system is simple, and cost is low, and is low in energy consumption, and volume is little.The present invention is to provide a kind of is the ultrasonic transduter automobile collision preventing warning of core with the AT89C2051 micro controller system, can satisfy the general closely requirement of range finding, and cost is lower, and cost performance is preferably arranged.
Summary of the invention
The objective of the invention is to the defective that exists to prior art, provide design a kind of lower-cost automobile collision preventing warning based on ultrasonic ranging, can remind chaufeur note and obstacle between distance, thereby avoid the generation of car accident.
In order to achieve the above object, design of the present invention is:
The real-time control and the data processing function of micro controller system are combined with ultrasonic measuring distance technology; Realized that preferably the obstacle of automobile in operational process is crashproof; And can pass through the charactron range of a signal; Obstacle distance is compared at the safety distance of different speed of a motor vehicle sections with automobile, can send audible and visible alarm.
According to the foregoing invention design, the present invention adopts following technical proposals:
A kind of automobile collision preventing warning based on ultrasonic ranging comprises an AT89C2051 control module, a ultrasonic distance measuring module, an alarm module, a display module and a power module.It is characterized in that: the mouth of said ultrasonic distance measuring module is connected with the input end of AT89C2051 control module; The mouth of AT89C2051 control module then is connected with the input end of alarm module, display module, and power module is that AT89C2051 control module, ultrasonic distance measuring module, alarm module, display module provide power supply; Said ultrasonic distance measuring module is converted into level signal with detected distance and is transferred to the AT89C2051 control module; The AT89C2051 control module is handled the signal that receives and is compared with the maximum range value of setting; If this distance is less than the maximum range value of setting; Then the AT89C2051 control module is sent instruction to alarm module; Alarm module is sounded reminds the driver, simultaneously distance value is shown through display module, the driver is grasped at any time and obstacle between distance.
Each forms module and function declaration is following:
1, AT89C2051 control module
The core component of AT89C2051 is single chip computer AT 89C2051, is used for handling the level signal of range finder module transmission, and control alarm module and display module.AT89C2051 is 8 micro controller systems of low voltage, high-performance CMOS that American ATMEL is produced; Sheet include 2k bytes can be erasable repeatedly read-only program memory PEROM and the random data memory RAM of 128bytes; Device adopts high density, the nonvolatile storage technologies production of atmel corp; Compatibility standard MCS-51 instruction repertoire, 8 central process units of sheet built-in general-purpose and Flash memory cell, the AT89C2051 micro controller system is widely used in electronic product.Shown in Figure 2 is the pin distribution graph of AT89C2051.Main pin function is following
Pin | Title |
Function | |
9 |
RST |
Reset pin the high level of 2 machine cycles occurs micro controller system will be resetted on the pin. |
10-17 |
The P3 mouth |
When 7 two-way I/O ports that have internal pull-up resistor, P3 mouth were done the input port use, because there is pull-up resistor inside, those pins that dragged down by outward sign can be exported an electric current |
18 |
XTAL2 |
The mouth of oscillating circuit in the sheet |
19 |
XTAL1 |
The input end of oscillating circuit in the sheet |
20 |
GND |
Ground |
1-8 |
The P1 mouth |
8 two-way I/O ports, wherein P1.2~P1.7 pin has internal pull-up resistor, and P1.0 and P1.1 require external pull-up resistor.P1.0 and P1.1 also import (AIN1) as the homophase input (AIN0) and the anti-phase of accurate analog comparator in the sheet respectively |
40 |
VCC |
The power supply input connects the 5V power supply |
21-28 |
The P2 mouth |
8 two-way I/O mouths that have internal pull-up resistor can drive 4 TTL logic gates, to the port one writing, move port to high level through internal pull-up resistor, can make input port and use |
32-39 |
The P0 mouth |
One group of two-way I/O mouth of 8 open-drain types, promptly address/data bus is multiplexing mouthful.As the delivery port time spent, every potential energy drives 8 TTL logic gates, can make the high resistance input end to the port one writing and use. |
29 |
PSEN |
Program stores and allows output |
30 |
ALE |
When visit external program memory or data memory, the output pulse is used for the least-significant byte byte of latch address |
31 |
EA/VPP |
External reference allows |
2, ultrasonic distance measuring module
Ultrasonic distance measuring module adopts super sonic to realize range finding, and changes into level signal, comprises the hypracoustic emission and receives.
The ultrasonic emitting principle of work: ultrasonic transmit circuit mainly is made up of ultrasonic transduter CX20106A and reverser 74ls04.40 kHz square-wave signals of AT89C2051 micro controller system P1.0 port output are delivered to an electrode of ultrasonic transducer behind the one-level reverser.Pull-up resistor R20, R21 can increase the damping of ultrasonic transducer on the one hand, export the power-handling capability of high level with the 74ls04 that shortens direction device; Can improve the power-handling capability of reverser 74ls04 output high level on the other hand.Shown in Figure 3 is the cut-away view of CX20106A
Shown in Figure 4 is the ultrasonic reception schematic circuit diagram; The pin one of ultrasonic transduter CX20106A connects an input end of annunciator and through connecting capacitor C 11 ground connection, and pin two connects resistance R 19 and capacitor C 14 ground connection then successively, and pin 3 connects capacitor C 12 ground connection then; Pin 4 direct ground connection; Pin 5 connects current-limiting resistance R20 power connection VCC then, and pin 6 connects capacitor C 13 ground connection then, and pin 7 connects current-limiting resistance R21 power connection VCC and connect the P3.2 mouth of AT89C then; Pin 8 direct power connection VCC, another input end grounding of annunciator.Super sonic receives principle of work: in the time of circuit working, transmission circuit is outwards launched super sonic, and acceptor circuit receives the super sonic that returns; Give micro controller system data delivery through the P3.2 mouth; Micro controller system is converted into distance after with this data handing, again with the distance versus of this distance with setting, if less than the distance of setting; Micro controller system will send instruction to warning circuit, warning circuit sounded remind the driver.
3, alarm module
Alarm module links to each other with the P2.0 mouth of micro controller system; Be illustrated in figure 5 as warning circuit figure, R6, R10 are current-limiting resistance, and aerotron is a positive-negative-positive transistor; Base stage B connects a current-limiting resistance R10 and links to each other with the P2.0 mouth of AT89C2051 then; Emitter E connects the negative voltage side of annunciator and LED, the direct ground connection of collecting electrode C, and the positive voltage terminal of LED links to each other with direct supply VCC through current-limiting resistance R6; When P2.0 mouth output high level, aerotron ends, and be high level owing to 2 this moment, and LED and loud speaker do not have electric current to flow through, and promptly LED does not work, and loud speaker does not ring; When P20 mouth output low level, the aerotron conducting, LED and loud speaker have electric current to flow through, and promptly LED is bright, and loud speaker sounds
4, display module
Display module is through the distance between Single-chip Controlling charactron display automobile and the obstacle.Shown in Figure 6 is the display circuit schematic diagram; Micro controller system pin P2.7~P2.4 output signal is controlled the position of charactron; The pin 40 of AT89C2051 micro controller system links to each other with the pin one of AD conversion chip; The input pin 2 ~ 9 of AD conversion chip connects the pin 32 ~ 39 of AT89C2051 micro controller system respectively; A ~ g the input port that connects charactron through AD conversion back delivery port P0.6, P0.7, P0.2, P0.1, P0.0, P0.5, P0.4, P0.3 respectively; The emitter of aerotron Q1, Q2, Q3, Q4 all directly meets direct supply VCC, and base stage B links to each other with the P2.7 ~ P2.4 mouth of AT89C2051 micro controller system through current-limiting resistance R12, R13, R14, R15 respectively, and collecting electrode C then connects control end S1, S2, S3, the S4 of charactron respectively; P27~when the P24 mouth was high level, aerotron ended, and S1~S4 is a low level, charactron position gating; P27~when the P24 mouth is low level, the aerotron conducting, S1~S4 is a high level, P27~P24 poll tax on children is given high potential or active potential can select the charactron of coordination not bright.
5, power module
Power module circuitry utilizes the LM7805 chip not only to generate constant voltage power suspply, and the parallel connection current-limiting resistance and a light-emitting diode, when electric current flows through, lumination of light emitting diode; During no current, diode goes out.Can realize the detection to power supply, the convenient power supply of in time finding is supplied with problem, and its schematic diagram is as shown in Figure 7.
The present invention has following conspicuous substantive distinguishing features and advantage compared with prior art: the present invention is core with AT89C2051, with the control to automobile collision preventing of the real-time control of micro controller system and data processing function and ultrasonic measuring distance technology, sensor technology realization combining; Realize simple; Cost is low, and is low in energy consumption, and volume is little; Can satisfy the general closely requirement of range finding; And cost is lower, and cost performance is preferably arranged, and can be widely used in small distance range finding, robot detection, the vehicle backing radar.
Description of drawings
Fig. 1 is system global structure figure
Fig. 2 is the AT89C2051 pinouts
Fig. 3 is a ultrasonic transduter CX20106A pinouts
Fig. 4 is a super sonic acceptor circuit schematic diagram
Fig. 5 is warning circuit figure
Fig. 6 is the display circuit schematic diagram
Fig. 7 is power circuit principle figure
Fig. 8 is the system implementation diagram of circuit.
The specific embodiment
The preferred embodiments of the present invention combine accompanying drawing to comment as follows:
Embodiment one:
Referring to Fig. 1, this comprises an AT89C2051 control module, a ultrasonic distance measuring module, an alarm module, a display module and a power module based on the automobile collision preventing warning of ultrasonic ranging.It is characterized in that: the mouth of said ultrasonic distance measuring module is connected with the input end of AT89C2051 control module; The mouth of AT89C2051 control module then is connected with the input end of alarm module, display module, and power module is that AT89C2051 control module, ultrasonic distance measuring module, alarm module, display module provide power supply; Said ultrasonic distance measuring module is converted into level signal with detected distance and is transferred to the AT89C2051 control module; The AT89C2051 control module is handled the signal that receives and is compared with the maximum range value of setting; If this distance is less than the maximum range value of setting; Then the AT89C2051 control module is sent instruction to alarm module; Alarm module is sounded reminds the driver, simultaneously distance value is shown through display module, the driver is grasped at any time and obstacle between distance.
Embodiment two:
Referring to Fig. 2, Fig. 3, Fig. 4, Fig. 5, Fig. 6, Fig. 7; Present embodiment is identical with embodiment one; Special wound part is following: said AT89C2051 control module is 8 AT89C2051 micro controller systems of low voltage, high-performance CMOS that American ATMEL is produced; Sheet include 2k bytes can be erasable repeatedly read-only program memory PEROM and the random data memory RAM of 128bytes, device adopts high density, the nonvolatile storage technologies production of atmel corp, compatibility standard MCS-51 instruction repertoire; 8 central process units of sheet built-in general-purpose and Flash memory cell, the AT89C2051 micro controller system is widely used in electronic product.
Said ultrasonic distance measuring module adopts ultrasonic transduter CX20106A and phase inverter 74LS04; CX20106A is that the super sonic of Sony receives special IC, in various ultrasonic remote control system, is widely used; 74LS04 is the not gate of 74 series, is used for the shaping of some signal or the signal damping of different interference the/key signal.
Said alarm module links to each other with the P2.0 mouth of AT89C2051 micro controller system, and this alarm module is the control circuit that an aerotron and LED constitute; Aerotron is a positive-negative-positive transistor; Base stage B connects a current-limiting resistance R10 and links to each other with the P2.0 mouth of AT89C2051 then; Emitter E connects the negative voltage side of annunciator and LED, the direct ground connection of collecting electrode C, and the positive voltage terminal of LED links to each other with direct supply VCC through current-limiting resistance R6; When P2.0 mouth output high level, aerotron ends, and this moment, loud speaker did not ring because P2.0 is a high level, and LED and loud speaker do not have electric current to flow through, and promptly LED does not work; When P2.0 mouth output low level, the aerotron conducting, LED and loud speaker have electric current to flow through, and promptly LED is bright, and loud speaker sounds.
Said display module and AT89C2051 micro controller system pin 27~24 output signals are controlled the position of charactron; The pin 40 of AT89C2051 micro controller system links to each other with the pin one of AD conversion chip; The input pin 2 ~ 9 of AD conversion chip connects the pin 32 ~ 39 of AT89C2051 micro controller system respectively; A ~ g the input port that connects charactron through AD conversion back delivery port P0.6, P0.7, P0.2, P0.1, P0.0, P0.5, P0.4, P0.3 respectively; The emitter of aerotron Q1, Q2, Q3, Q4 all directly meets direct supply VCC; Base stage B links to each other with the P2.7 ~ P2.4 mouth of AT89C2051 micro controller system through current-limiting resistance R12, R13, R14, R15 respectively, and collecting electrode C then connects control end S1, S2, S3, the S4 of charactron respectively; When 27~24 mouthfuls of delivery ports were high level, aerotron ended, and S1~S4 is a low level, charactron position gating; P27~when the P24 mouth is low level, the aerotron conducting, S1~S4 is a high level, P27~P24 poll tax on children is given high potential or active potential can select the charactron of coordination not bright.
Said power module adopts circuit of three-terminal voltage-stabilizing integrated LM7805; It is few to form the required peripheral cell of constant voltage power suspply with LM7805 series circuit of three-terminal voltage-stabilizing integrated, and inside circuit also has the protective circuit of overcurrent, overheated and adjustment pipe, use reliable, convenient, and low price.
Embodiment three:
Referring to Fig. 1, Fig. 8; Native system combines the real-time control and the data processing function of micro controller system with ultrasonic measuring distance technology, sensor technology; Realized that preferably the obstacle of automobile in operational process is crashproof; And can pass through the charactron range of a signal, and obstacle distance is compared at the safety distance of different speed of a motor vehicle sections with automobile, can send audible and visible alarm.Implementing procedure figure is as shown in Figure 8
Concrete working process: start the anticollision device line parameter initialization of going forward side by side, ultrasonic distance measuring module emission super sonic runs into obstacle and can return, and judges whether to receive echo; And, judge whether less than the minor increment of setting, if less than minor increment through micro controller system processing computed range; Micro controller system sends instruction and gives annunciator; Produce sound and light alarm, and through the display module range of a signal, if not less than minor increment; Then, remind chaufeur to note constantly keeping the distance with obstacle directly through the display module range of a signal.