CN205027899U - Distancer based on ultrasonic signal - Google Patents

Distancer based on ultrasonic signal Download PDF

Info

Publication number
CN205027899U
CN205027899U CN201520776458.6U CN201520776458U CN205027899U CN 205027899 U CN205027899 U CN 205027899U CN 201520776458 U CN201520776458 U CN 201520776458U CN 205027899 U CN205027899 U CN 205027899U
Authority
CN
China
Prior art keywords
pin
resistance
electric capacity
chip
ultrasonic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201520776458.6U
Other languages
Chinese (zh)
Inventor
席嘉文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201520776458.6U priority Critical patent/CN205027899U/en
Application granted granted Critical
Publication of CN205027899U publication Critical patent/CN205027899U/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The utility model discloses a distancer based on ultrasonic signal, its characterized in that: including single -chip module, voice broadcast module, display module, ultrasonic sensor module, temperature detection module. Wherein, ultrasonic sensor module integration ultrasonic emission circuit and ultrasonic wave receiving circuit, ultrasonic emission circuit and ultrasonic wave receiving circuit all are connected to single -chip module. The utility model discloses a mode of two -way range finding, response speed is fast, control is simple, low cost, and retrencies the instruction and make it carry out efficiency very to improve, the measuring range of this ultrasonic signal distancer reaches 2cm to 400cm to can satisfy measurement accuracy standard required when backing a car the range finding, the propagation velocity of ultrasonic signal in the air receives temperature great, in the local time that the required precision is higher, this patent related to the DS18B20 temperature sensor method that can adopt temperature compensating improve the measurement accuracy and the stability of this distancer.

Description

A kind of stadimeter based on ultrasonic signal
Technical field
The utility model relates to a kind of stadimeter based on ultrasonic signal.
Background technology
The features such as ultrasonic ranging is a kind of potential method, and in close range, supersonic sounding has it not affect by light, structure is simple, cost is low.Another outstanding advantages of ultrasonic measurement is: surrounding medium can be air, liquid or solid, applied widely.The more important thing is that ultrasound examination reduces labour intensity, avoid workman's (intense radiation, has poison gas, liquid environment etc. for high and low temperature, high and low pressure) under harsh environments to come to harm, also substantially increase measuring accuracy, reliability is high; In addition, ultrasonic ranging can also be applied in other function system, the ranging system of such as robot obstacle-avoiding system, Mobile Robot Obstacle Avoidance, intelligent robot house keeper and simple intelligent electric motor car automatic obstacle-avoiding system, onboard system, automated parking system, autobrake system and reverse radar system.
Current ultrasonic ranging is used widely, and domestic general use special IC is according to the various distance mearuring equipment of ultrasonic ranging principle design, but the cost of special IC is higher, function singleness.And be that the distance mearuring equipment of core can realize the several functions such as preset, multiport detection, display, warning with one-chip computer module, and cost is low, precision is high, simple to operate, working stability, reliable.
Domestic ultrasonic technology now reaches its maturity, and degree of stability is also quite high, is applicable to a lot of field.Comprise: range finding, curved surface emulate, keep away barrier, robot localization etc.Even so, but also there are some problems anxious to be captured, such as: the rank of measuring accuracy has much room for improvement; Measuring distance is far away not, mostly only has within 10 meters; The circuit of some high precision or at a distance product is complicated, and cost is higher; What still there is certain distance educates blind area etc.; These problems limit hyperacoustic application.
For above-mentioned Problems existing, the tackling key problem that related personnel both domestic and external makes great efforts.Research mainly concentrates on the following aspects: ultrasonic echo process, the research and development of novel transducer, transponder pulse chooses etc., and propose temperature compensation for the Common Factors Influencing of supersonic sounding instrument, receiving loop seals in automatic gain control link etc. improves the measure of precision of ultrasonic ranging.Current achievement in research at home mainly contains: the minimum mean square self-adaption Time Delay Estimation Algorithms of ultrasonic echo process aspect; Integration transducer; Special pulse generator; Adopt power drive chip in conjunction with step-up transformer etc.Also analyze ultrasonic ranging error Producing reason by ultrasonic range finder special IC, improve Measuring Time difference to Microsecond grade; And after the compensation carrying out acoustic wave propagation velocity with temperature sensor, its high-precision ultrasonic stadimeter also can reach millimetre-sized measuring accuracy.These new technology all substantially increase precision and the distance of ultrasonic ranging.
Utility model content
The purpose of this utility model is to overcome above shortcomings in prior art, provides a kind of reasonable in design, and reaction velocity is fast, the stadimeter based on ultrasonic signal that precision is high.
The technical scheme in the invention for solving the above technical problem is: a kind of stadimeter based on ultrasonic signal, is characterized in that: comprise one-chip computer module, voice broadcast module, display module, ultrasonic sensor modules, temperature detecting module.One-chip computer module connects voice broadcast module, display module, ultrasonic sensor modules and temperature detecting module.Wherein, ultrasonic sensor mould is integrated with ultrasonic transmit circuit and ultrasound wave receiving circuit, and ultrasonic transmit circuit and ultrasound wave receiving circuit are all connected to one-chip computer module.
Ultrasonic sensor modules is the core devices of native system, is integrated with ultrasonic transmit circuit and ultrasound wave receiving circuit.Utilize one-chip computer module to control hyperacoustic transmitting and receiving and calculate the time come and gone.The output terminal of ultrasound wave receiving circuit connects the exterior interrupt input port of one-chip computer module, timing launches ultrasound wave, the timer of one-chip computer module inside is started, the time utilizing the tally function record ultrasound wave of timer to launch and the time receiving reflection wave while starting radiating circuit.When receiving hyperacoustic reflection wave, ultrasound wave receiving circuit output terminal produces a negative saltus step, an interrupt request singal is produced in the exterior interrupt input port of one-chip computer module, one-chip computer module response external interrupt request performs external interrupt service subprogram, read the mistiming, calculate distance, result exports to display module display.Compared to general supersonic range finder, the utility model adopts the mode of bidirectional ranging, and response speed is faster, control is easier.
Described in being constructed as follows of ultrasonic transmit circuit: the Part I charge pump circuit of chip MAX232 is made up of 1,2,3,4,5,6 pin and 4 electric capacity, function produces+12v and-12v two power supplys, for RS-232 serial ports is supplied to level.Part II is data ALT-CH alternate channels, two data channel are formed by 7,8,9,10,11,12,13,14 pin, wherein 13 pin (R1IN), 12 pin (R1OUT), 11 pin (T1IN), 14 pin (T1OUT) are the first data channel, and 8 pin (R2IN), 9 pin (R2OUT), 10 pin (T2IN), 7 pin (T2OUT) are the second data channel.Part III is power supply, is made up of 15 pin GND, 16 pin VCC (+5v).The pin 14 of MAX232 and pin 7 are connected to sensor emission probe T40-16, the pin 4 of chip MAX232 and pin 5 are connected to the two ends of electric capacity C5 respectively, the pin 1 of chip MAX232 and pin 3 are connected to the two ends of electric capacity C4 respectively, the pin 16 of chip MAX232 accesses the emitter of triode PNP, the collector access feeder ear of triode PNP, one end of the base stage access resistance R5 of triode PNP, the other end of resistance R5 clamp-ons the pin 12 of chip EM78P153, the pin 13 of the pin 10 of chip MAX232 and pin 11 difference access chip EM78P153 and pin 14, the pin 2 of chip MAX232 and pin 6 are respectively by electric capacity C8, electric capacity C11 ground connection, the pin 1 of chip EM78P153, pin 2 accesses one end of resistance R2 respectively, one end of resistance R3, one end of resistance R2, the equal access interface J1 in one end of resistance R3, the other end of resistance R2, the other end of resistance R3 all accesses feeder ear, the pin 4 of chip EM78P153 accesses one end of electric capacity C6, the other end ground connection of electric capacity C6, the pin 4 of chip EM78P153 and pin 7 access the two ends of crystal oscillator Y2 respectively, the two ends of crystal oscillator Y2 connect one end of electric capacity C7 and one end of electric capacity C8 respectively, one end of electric capacity C7 and the equal access interface J1 in one end of electric capacity C8 ground connection.
Described in being constructed as follows of ultrasound wave receiving circuit: 1,2,3 pin of operational amplifier TL074 are output terminal, inverting input, the in-phase input end of passage 1,5,6,7 pin are in-phase input end, inverting input, output terminals of passage 2,8,9,10 pin are output terminal, inverting input, in-phase input ends of passage 3,12,13,14 pin are in-phase input end, inverting input, output terminals of passage 4,4 pin are positive supplies, and 11 pin are negative supplies.The pin 1 of operational amplifier TL074 accesses the base stage of triode NPN, the emitter of triode NPN accesses power end via resistance R7, the grounded collector of triode NPN, the pin 2 of operational amplifier TL074 is successively via the pin 9 of resistance R4 and resistance R6 access chip EM78P153, the pin 3 of operational amplifier TL074 accesses one end of resistance R9, the pin 10 of the other end access chip EM78P153 of resistance R9 also accesses resistance R7, the pin 6 of operational amplifier TL074 and pin 7 access one end of resistance R12 and the other end of resistance R12 respectively, one end of resistance R9 is accessed in one end of resistance R12 via resistance R10, the pin 8 of operational amplifier TL074 accesses one end of resistance R20 and one end of resistance R13, the other end of resistance R13 accesses one end of resistance R12 via electric capacity C9, the pin 9 of operational amplifier TL074 accesses the other end of resistance R20, the other end of resistance R20 accesses resistance R19 end via electric capacity C10, the pin 10 of operational amplifier TL074 accesses resistance R19 one end via resistance R15, the pin 13 of operational amplifier TL074 accesses one end of electric capacity C15, one end of the other end access resistance R17 of electric capacity C15, the receiving transducer of the other end access R40-16 sensor of resistance R17, the other end of 14, pin access resistance R19 of operational amplifier TL074 and one end of resistance R18, the other end of resistance R18 clamp-ons one end of electric capacity C15, the base stage of triode NPN is via resistance R8 ground connection.
Further, as preferably, described one-chip computer module selects STC89C52 single-chip microcomputer, and this module also comprises electric capacity C2, electric capacity C3, resistance R14 and crystal oscillator Y1.Pin 19 and the pin 20 of STC89C52 are connected the two ends of crystal oscillator Y1 respectively, one end of crystal oscillator Y1 connects one end of electric capacity C2, the other end of crystal oscillator Y1 connects one end of electric capacity C3, the other end of electric capacity C2 and the other end of electric capacity C3 are all connected to one end of resistance R14, and the other end of resistance R14 is connected to feeder ear via electric capacity C1.
Further, as preferably, voice broadcast module adopts WT588D speech chip, and this chipset single-chip microcomputer and sound circuit, in one, are broken away from complicated loaded down with trivial details compilation thinking in the past, had and control feature flexibly.Further increase simultaneously and can play MIDI chord function, performance is better.
Further, as preferably, display module adopts four LED charactrons.
Further, temperature detecting module adopts DS18B20 temperature sensor.
The utility model adopts the mode of bidirectional ranging, and response speed is fast, it is simple, with low cost to control, and reduced instruction makes its execution efficiency greatly improve; The measurement range of this ultrasonic signal stadimeter reaches 2cm to 400cm, and measuring accuracy standard required when can meet vehicle back distance-measurement; The aerial velocity of propagation temperature influence of ultrasonic signal is comparatively large, and in the local time that accuracy requirement is higher, the DS18B20 temperature sensor involved by this patent can adopt the method for temperature compensation to improve measuring accuracy and the stability of this stadimeter.
Accompanying drawing explanation
Fig. 1 is the range measurement principle figure of the utility model embodiment.
Fig. 2 is the pinouts of the utility model embodiment STC89C52 single-chip microcomputer.
Fig. 3 is the structural representation of the utility model embodiment single-chip minimum system.
Fig. 4 is the electrical block diagram of the utility model embodiment voice broadcast module.
Fig. 5 is the electrical block diagram of the utility model embodiment display module.
Fig. 6 is the structural representation of the utility model embodiment ultrasonic transmit circuit.
Fig. 7 is the structural representation of the utility model embodiment ultrasound wave receiving circuit.
Fig. 8 is the schematic diagram of the utility model embodiment ultrasound wave sequential.
Fig. 9 is the utility model embodiment main program flow chart.
Figure 10 is the process flow diagram of the utility model embodiment Interruption service subprogram.
Figure 11 is the process flow diagram of the utility model embodiment external interrupt service subprogram.
Figure 12 is the utility model embodiment principle schematic.
Figure 13 is the initialized program flow diagram of the utility model embodiment work.
Figure 14 is the PCB design figure of the utility model embodiment based on the stadimeter of ultrasonic signal.
Figure 15 is the overall design schematic diagram of the utility model embodiment based on ultrasonic signal.
Embodiment
Below in conjunction with accompanying drawing, also by embodiment, the utility model is described in further detail, and following examples are that the utility model is not limited to following examples to explanation of the present utility model.
The method of ultrasonic ranging has multiple, as phase-detection method, magnitudes of acoustic waves detection method and transit time detection method etc.Although phase-detection method precision is high, sensing range is limited, and magnitudes of acoustic waves detection method is subject to the impact of reflection wave.
The present embodiment adopts ultrasonic time of flight detection method.Its principle is: detect the ultrasonic signal launched from emission sensor propagates into receiving sensor time t through gas medium, this time is exactly the transit time, then obtains distance 1.If 1 is measuring distance, t is that two-way time is poor, and hyperacoustic velocity of propagation is c, then have 1=ct/2.Ultrasonic receiver receives reflection wave and just stops timing immediately.Calculate distance by unit again, deliver to numeral method measurement result.The algorithm design of ultrasonic signal range finding: ultrasound wave in atmosphere velocity of propagation is p.s. 340 meters (when 15 DEG C).T2 receives the ultrasound wave moment, and t1 is ultrasonic acoustic wave x time, and the absolute value of what t2-t1 drew is mistiming, assuming that t2-t1=0.03S, then has 340m × 0.03S=10.2m.If Fig. 1 is range measurement principle figure.Because θ/2 angle is less, negligible, so L ≈ S.Ultrasound wave is issued to that to run into the distance that barrier returns as follows: because ultrasound wave is a kind of sound wave, its velocity of sound c is relevant with air themperature, and in general, temperature often raises 1 degree Celsius, and the velocity of sound increases by 0.6 meter per second.In use, if temperature variation is little, then can think that velocity of sound c is substantially constant, getting c during calculating is 340m/s.Therefore in order to improve measuring accuracy, the present embodiment also uses temperature sensor, thus is corrected range finding by sensing temperature.
The structure of the stadimeter based on ultrasonic signal of the present embodiment is as described below: the stadimeter based on ultrasonic signal comprises one-chip computer module, voice broadcast module, display module, ultrasonic sensor modules, temperature detecting module.One-chip computer module connects voice broadcast module, display module, ultrasonic sensor modules and temperature detecting module.Wherein, ultrasonic sensor mould is integrated with ultrasonic transmit circuit and ultrasound wave receiving circuit, and ultrasonic transmit circuit and ultrasound wave receiving circuit are all connected to one-chip computer module.
1) one-chip computer module comprises chip STC89C52 single-chip microcomputer, electric capacity C2, electric capacity C3, resistance R14 and crystal oscillator Y1.Pin 19 and the pin 20 of STC89C52 are connected the two ends of crystal oscillator Y1 respectively, one end of crystal oscillator Y1 connects one end of electric capacity C2, the other end of crystal oscillator Y1 connects one end of electric capacity C3, the other end of electric capacity C2 and the other end of electric capacity C3 are all connected to one end of resistance R14, and the other end of resistance R14 is connected to feeder ear via electric capacity C1.STC89C52 single-chip microcomputer manufacturing cost is lower, and its software, hardware and MCS-51 are completely compatible, has 4k byte online can the fast erasable program storage of overprogram in sheet, full quiescent operation, working range: 0Hz ~ 24MHz.And three grades of program storage encryptions, 128 × 8 internal RAM, 32 two directions' inputing output lines, two sixteen bit timer/counters, five interrupt sources, two-stage interrupt priority level, the asynchronous serial port of a full duplex, interval and power down two kinds of working methods.It adopts high density nonvolatile memory manufacturing technology to manufacture, and multi-functional 8 bit CPUs and flash memory is combined in one single chip.This single-chip microcomputer has very wide working power voltage, can be 2.7 ~ 6V, and when being operated in 3V, electric current is equivalent to during 6V work 1/4.When STC89C52RC works in 12Hz, dynamic current is 5.5mA, and Idle state is 1mA, and power-down state is only 20nA.Power consumption little is like this well suited for battery powered size control system.I/O mouth line: P0, P1, P2, P3 be totally four eight mouths.P0 mouth is tri-state bidirectional interface, common name data bus mouth, because only have this mouthful can be directly used in read/write operation to external memory storage.P0 mouth is also in order to export Fig. 1 location, least-significant byte ground of external memory storage.Owing to being timesharing output, therefore should at outside latch by this address latches data, address latch, signal ALE.P1 mouth is specially for the I/O mouth of user, is accurate bidirectional interface.P2 mouth is from being used as most-significant byte address wire during system extension.When not expanding external memory storage, P2 mouth also can use as user I/O mouth line, and P2 mouth is also accurate bidirectional interface.P3 mouth is difunctional mouth, and each of this mouthful all can be defined as an I/O function or the 2nd I/O function independently.When using as the first function, operation is with P1 mouth.The pinouts of STC89C52 single-chip microcomputer as shown in Figure 2.The size of the polar capacitor C1 of 52 single-chip minimum system reset circuits directly affects the reset time of single-chip microcomputer, generally adopts 10 ~ 30 μ F, and the reset time of the larger needs of 51 single-chip minimum system capacitance is shorter.Crystal oscillator Y1 also can adopt 12MHz, and can adopt the crystal oscillator of higher frequency when normal work, the oscillation frequency of 51 single-chip minimum system crystal oscillators directly affects the processing speed of single-chip microcomputer, and the larger processing speed of frequency is faster.52 single-chip minimum system starting of oscillation electric capacity C2, C3 generally adopt 15 ~ 33pF, and electric capacity from crystal oscillator more close to better, crystal oscillator from single-chip microcomputer more close to better, P0 mouth for open Lou export, need add pull-up resistor as during delivery outlet, resistance is generally 10k.When being set to Timer modes, adding 1 counter is to inner machine cycle counting (1 machine cycle equals 12 oscillation period, and namely count frequency is 1/12 of crystal oscillator frequency).It is exactly timing t that count value N is multiplied by machine cycle Tcy.When being set to counter mode, external event count pulse is input to counter by T0 or T1 pin.To sample during the S5P2 of each machine cycle T0, T1 pin level.When certain periodic sampling inputs to a high level, and when next cycle samples a low level, then counter adds 1, and the count value of renewal loads counter during the S3P1 of next machine cycle.Due to detect one from 1 to 0 negative edge need 2 machine cycles, therefore require that the level be sampled at least will maintain a machine cycle.When crystal oscillator frequency is 12MHz, the highest count frequency is no more than 1/12MHz, and namely the cycle of count pulse is greater than 2ms.The utility model single-chip minimum system as shown in Figure 3.
2) voice broadcast model choice is WT588D speech chip, and it is a speech chip edited integrating single-chip microcomputer and sound circuit, breaks away from complicated loaded down with trivial details compilation thinking in the past.This chip performance is stablized, and compensate for the defect that various types of voice chip application field is narrow and small in the past.It has MP3 control model, button control model, key combination control model, parallel port control pattern, a line serial ports control model, three line serial ports control models and three line serial ports and controls control port expansion output mode, is applicable to the application of multiple place.Embedded DSP high speed audio processor, the fast and built-in 13Bit/DA converter of processing speed, and 12Bit/PWM exports, tonequality is good, and PWM exports directly can promote 0.5W/8 Ω loudspeaker, and push-pull current is abundant.It supports DAC/PWM two kinds of way of outputs, WAV audio format, 6K ~ 22KHz sampling rate audio frequency.This chip reset time is 5ms, operating voltage DC2.8V ~ 5.5V, and static quiescent current is less than 10uA.Fig. 4 is the circuit diagram of voice broadcast module.
3) taking I/O port when considering static drive more, as driven 5 charactron static state display then to need 5 × 8=40 root I/O port to drive, adding the complicacy of hardware circuit.So display module of the present utility model adopts Dynamic Announce to drive.What the design adopted is four LED numeral method, is connected together by the Same Name of Ends of 8 of all charactrons displays stroke " a, b; c, d, e; f, g, dp ", be the public pole COM increase position gate control circuit of each charactron in addition, position gating is by respective independently I/O line traffic control, and when single-chip microcomputer output word shape code, all charactrons all receive identical graphemic code, but be which charactron can demonstrate font actually, depend on the control of single-chip microcomputer contraposition gating COM terminal circuit.As long as so will the gating of the charactron of display be needed to control to open, this position just demonstrates font, and the charactron be not strobed would not be bright.By the COM end of each charactron of timesharing wheel current control, the controlled display in turn of each charactron can be made, dynamic driving that Here it is.In procedure for displaying in turn, the lighting time of bits per inch code pipe is 1 ~ 2ms, due to the visual persistence phenomenon of people and the afterglow effect of light emitting diode, although in fact every charactron non-concurrent are lighted, if but the speed ratio of scanning is very fast, still can leave a kind of impression of stable display data to people, and not have flickering.In fact the effect of Dynamic Announce is the same with static state display, and Dynamic Announce can save a large amount of I/O ports, and power consumption is lower.Fig. 5 is the circuit diagram of display module.
4) temperature sensor adopts the DS18B20 temperature sensor that cost performance is higher, and this sensor adopts the method for temperature compensation to improve measuring accuracy and the stability of this stadimeter.
5) as shown in Figure 6, described in being constructed as follows of ultrasonic transmit circuit: the Part I charge pump circuit of chip MAX232 is made up of 1,2,3,4,5,6 pin and 4 electric capacity, function produces+12v and-12v two power supplys, for RS-232 serial ports is supplied to level.Part II is data ALT-CH alternate channels, two data channel are formed by 7,8,9,10,11,12,13,14 pin, wherein 13 pin (R1IN), 12 pin (R1OUT), 11 pin (T1IN), 14 pin (T1OUT) are the first data channel, and 8 pin (R2IN), 9 pin (R2OUT), 10 pin (T2IN), 7 pin (T2OUT) are the second data channel.Part III is power supply, is made up of 15 pin GND, 16 pin VCC (+5v).The pin 14 of MAX232 and pin 7 are connected to sensor emission probe T40-16, the pin 4 of chip MAX232 and pin 5 are connected to the two ends of electric capacity C5 respectively, the pin 1 of chip MAX232 and pin 3 are connected to the two ends of electric capacity C4 respectively, the pin 16 of chip MAX232 accesses the emitter of triode PNP, the collector access feeder ear of triode PNP, one end of the base stage access resistance R5 of triode PNP, the other end of resistance R5 clamp-ons the pin 12 of chip EM78P153, the pin 13 of the pin 10 of chip MAX232 and pin 11 difference access chip EM78P153 and pin 14, the pin 2 of chip MAX232 and pin 6 are respectively by electric capacity C8, electric capacity C11 ground connection, the pin 1 of chip EM78P153, pin 2 accesses one end of resistance R2 respectively, one end of resistance R3, one end of resistance R2, the equal access interface J1 in one end of resistance R3, the other end of resistance R2, the other end of resistance R3 all accesses feeder ear, the pin 4 of chip EM78P153 accesses one end of electric capacity C6, the other end ground connection of electric capacity C6, the pin 4 of chip EM78P153 and pin 7 access the two ends of crystal oscillator Y2 respectively, the two ends of crystal oscillator Y2 connect one end of electric capacity C7 and one end of electric capacity C8 respectively, one end of electric capacity C7 and the equal access interface J1 in one end of electric capacity C8 ground connection.Described in being constructed as follows of ultrasound wave receiving circuit: 1,2,3 pin of operational amplifier TL074 are output terminal, inverting input, the in-phase input end of passage 1,5,6,7 pin are in-phase input end, inverting input, output terminals of passage 2,8,9,10 pin are output terminal, inverting input, in-phase input ends of passage 3,12,13,14 pin are in-phase input end, inverting input, output terminals of passage 4,4 pin are positive supplies, and 11 pin are negative supplies.The pin 1 of operational amplifier TL074 accesses the base stage of triode NPN, the emitter of triode NPN accesses power end via resistance R7, the grounded collector of triode NPN, the pin 2 of operational amplifier TL074 is successively via the pin 9 of resistance R4 and resistance R6 access chip EM78P153, the pin 3 of operational amplifier TL074 accesses one end of resistance R9, the pin 10 of the other end access chip EM78P153 of resistance R9 also accesses resistance R7, the pin 6 of operational amplifier TL074 and pin 7 access one end of resistance R12 and the other end of resistance R12 respectively, one end of resistance R9 is accessed in one end of resistance R12 via resistance R10, the pin 8 of operational amplifier TL074 accesses one end of resistance R20 and one end of resistance R13, the other end of resistance R13 accesses one end of resistance R12 via electric capacity C9, the pin 9 of operational amplifier TL074 accesses the other end of resistance R20, the other end of resistance R20 accesses resistance R19 end via electric capacity C10, the pin 10 of operational amplifier TL074 accesses resistance R19 one end via resistance R15, the pin 13 of operational amplifier TL074 accesses one end of electric capacity C15, one end of the other end access resistance R17 of electric capacity C15, the receiving transducer of the other end access R40-16 sensor of resistance R17, the other end of 14, pin access resistance R19 of operational amplifier TL074 and one end of resistance R18, the other end of resistance R18 clamp-ons one end of electric capacity C15, the base stage of triode NPN is via resistance R8 ground connection.Ultrasonic sensor modules stability is higher, measure distance is accurate.Single-chip microcomputer is once detect that output is just opened timer and started timing.Just stop timing when this mouthful becomes low level and read the value of timer, this value is just the time that this is found range, then can calculate the distance of barrier according to velocity of propagation.The basic functional principle of above-mentioned ultrasonic sensor modules is:
1. adopt I/O port TRIG to trigger range finding, give the high level signal of at least 10 μ s;
2. module sends the square wave of 8 40kHz automatically, and whether automatic detection has signal to return;
3. have signal to return, export a high level by I/O port ECHO, high level lasting time is exactly that ultrasound wave is from being transmitted into the time returned.
Ultrasound wave sequential as shown in Figure 8.Above sequential chart shows only to need to provide an above pulse signal of 10 μ s, and this inside modules will send 8 40kHz cycle level and detection of echoes.Once echoed signal detected, export response signal.The pulse width of response signal is directly proportional to the distance of measurement.Distance can be calculated thus: the distance=high level time * velocity of sound (340m/s)/2 by transmitting signals to the response signal time interval received.For preventing the impact transmitted on response signal, measuring period generally wants more than 60ms.
The corresponding software design proposal of the above-mentioned stadimeter based on ultrasonic signal is as follows:
The Software for Design of ultrasonic range finder mainly contains master routine, ultrasound wave generating program, ultrasound wave receive interruption program and display subroutine composition.C programmer is conducive to realizing more complicated algorithm, assembly language program(me) then has higher efficiency and the time of easily Exact calculation program operation, and the program of ultrasonic range finder needs more complicated calculating (when calculating distance), so control program of the present utility model adopts C language programming.
1, main program flow chart
Software is made up of master routine (flow process as shown in Figure 9) and Interruption service subprogram (flow process as shown in Figure 10) and external interrupt service subprogram (flow process as shown in figure 11), master routine completes the control of initial work, each road ultrasound wave transmitting and receiving order, Interruption service subprogram completes the hyperacoustic transmitting of one direction, the work such as reading, the distance of the main deadline value of external interrupt service subprogram calculate, the output of result.
First master routine is to system environment initialization, and arranging timer T0 mode of operation is 16 bit timing counter mode.The total interrupt enable bit EA of set also gives display port P0 and P1 clear 0.Then call ultrasound wave generation subroutine and send a ultrasonic pulse, the direct wave triggering that receiver causes directly is sent in order to avoid ultrasound wave from transmitter, need time delay be about 0.1ms (this namely ultrasonic range finder have a most I range finding from reason) after, just open outer interruption 1 and receive the ultrasonic signal returned.
Be the crystal oscillator of 12MHz due to what adopt, a number often counted by counter is exactly 1 μ s, and velocity of sound when getting 20 DEG C during design is 344m/s.After master routine detects to receive successful zone bit, the number in counter T0 is represented the time that ultrasound wave is used back and forth, and the distance between testee and stadimeter can be calculated as follows:
d=(c×t)÷2=172×T0/10000cm
Wherein, T0 is the calculated value of counter.
Measure and will pass to LED digital-scroll technique apart from rear result and be about 5ms, measuring distance is given voice module and is reported simultaneously, and then sends ultrasonic pulse duplicate measurements process.
2, ultrasound wave Interruption service subprogram
The effect of ultrasound wave generation subroutine sends about 2 ultrasonic pulse signals (frequency is about the square wave of 40kHz) by P1.1 port, and pulse width is 20 μ about s, counter T0 opened simultaneously and carry out timing.Ultrasound wave generation subroutine is comparatively simple, requires that program is run accurately.
3, ultrasound wave external interrupt service subprogram
Ultrasonic range finder master routine utilizes outer interruption 1 to detect and returns ultrasonic signal, returns ultrasonic signal (namely low level appears in INT1 pin), enter interrupt routine immediately once receive.Have no progeny in entering and just close timer T0 stopping timing immediately, and by ranging success banner word assignment 1.If also ultrasonic return signal do not detected when timer overflows, then timer T0 overflows and interrupts outer interruption 1 to close, and by ranging success banner word assignment 2 to represent that this time range finding is unsuccessful.
The software developing technology of the utility model patent adopts Keil software, this software provides the complete development plan comprising C compiler, Macro assembler, connector, library management and a powerful simulation debugger etc., by an Integrated Development Environment (uVision), these parts are combined.It facilitates easy-to-use the integration environment, powerful software emulation debugging acid makes the research and development of this patent get twice the result with half the effort.
In order to the above-mentioned principle of work of understanding clearly, provide the course of work as follows:
1. ultrasound wave receiving course.First single-chip microcomputer initialization, the inner ECHO interface of ultrasonic sensor modules is connected with the pin of single-chip microcomputer P1.1, and emission interface TRIG connects with the P1.2 pin of single-chip microcomputer.After opens interrupters, single-chip microcomputer P1.1 is about the high level of 20 μ s to one, " Trig " interface, and in ultrasonic sensor modules, EM78P153 sends the signal of 8 continuous print 40kHz pulse, through MAX232 level conversion, improves emissive power.Electric impulse signal is converted to ultrasound wave and launches by transducer, exported by ultrasonic transmitter after amplifying, ultrasonic transmitter launches ultrasound wave to a direction, timing is started while transmitting, ultrasound wave is propagated in atmosphere, encounter barrier in way just to return immediately, received circuit module receives.The ultrasonic signal received amplifies through amplifier by ultrasonic receiver, after carrying out detection process with phase-locked loop circuit, start singlechip interruption program, STC89C52 single-chip microcomputer counts sonic transmissions time t used, through temperature compensation temperature, carried out differentiating, calculating according to related data by ISD1730A again, draw correct testing distance.Draw distance number and send LED to show, if from when being less than setpoint distance, being reported to the police by voice unit system.Ultrasonic ranging system principle schematic as shown in figure 12.When the trigger pip to 20 μ s of single-chip microcomputer, TRIG is high level by low transition, TRIG=1, timing when single-chip microcomputer leaves, opens interrupters, and writing time be T1, receiving transducer wait-receiving mode echo, the time that ECHO is continuously high level is launch time.Ultrasound wave is converted to electric signal by receive MUT echo, delivers to single-chip microcomputer, and writing time is T2.The time that ultrasound wave is launched is: T2-T1, calculates transmitting range to be: L=(T2-T1) × C/2, if when waiting for that the echo time is more than 65ms, then cannot receive echo, single-chip microcomputer initialization, again launch and accept echo next time.
2. receive data handling procedure.Before starting to accept, first carry out initialization to single-chip microcomputer, Figure 13 is initialized program flow diagram.Receiving course: first carry out initialization after energising, mainly initialization is carried out to each variable and timer 0, then single-chip microcomputer holds a high level being about 20 μ s to ' Trig ', after this wait high level is held at ' Echo ', once high level be detected, then open timer immediately, start timing.As long as the value after this in timer 0 is no more than the timing upper limit being about 65ms (65.5536ms), then think and be still in effective range, do not enter blind area, then wait for low level generation at ' Echo ', once low level be detected, read TH0 and TL0 now immediately, and timeing closing device 0.Then ultrasound wave from being transmitted into the time used altogether that returns is: time=TH0*256+TL0 (μ s), again according to (27 DEG C) aerial velocity of propagation under ultrasound wave normal temperature, (being about 344m/s) calculates the distance of barrier, in real-time display of the enterprising Mobile state of charactron.
Above content described in this instructions is only to the explanation of the utility model example.The utility model person of ordinary skill in the field can make various amendment or supplements or adopt similar mode to substitute to described specific embodiment; only otherwise depart from the content of the utility model instructions or surmount this scope as defined in the claims, protection domain of the present utility model all should be belonged to.

Claims (5)

1. based on a stadimeter for ultrasonic signal, it is characterized in that: comprise one-chip computer module, voice broadcast module, display module, ultrasonic sensor modules, temperature detecting module.One-chip computer module connects voice broadcast module, display module, ultrasonic sensor modules and temperature detecting module.Wherein, ultrasonic sensor mould is integrated with ultrasonic transmit circuit and ultrasound wave receiving circuit, ultrasonic transmit circuit and ultrasound wave receiving circuit are all connected to one-chip computer module, described in being constructed as follows of ultrasonic transmit circuit: the pin 14 of chip MAX232 and pin 7 are connected to sensor emission probe T40-16, the pin 4 of chip MAX232 and pin 5 are connected to the two ends of electric capacity C5 respectively, the pin 1 of chip MAX232 and pin 3 are connected to the two ends of electric capacity C4 respectively, the pin 16 of chip MAX232 accesses the emitter of triode PNP, the collector access feeder ear of triode PNP, one end of the base stage access resistance R5 of triode PNP, the other end of resistance R5 clamp-ons the pin 12 of chip EM78P153, the pin 13 of the pin 10 of chip MAX232 and pin 11 difference access chip EM78P153 and pin 14, the pin 2 of chip MAX232 and pin 6 are respectively by electric capacity C8, electric capacity C11 ground connection, the pin 1 of chip EM78P153, pin 2 accesses one end of resistance R2 respectively, one end of resistance R3, one end of resistance R2, the equal access interface J1 in one end of resistance R3, the other end of resistance R2, the other end of resistance R3 all accesses feeder ear, the pin 4 of chip EM78P153 accesses one end of electric capacity C6, the other end ground connection of electric capacity C6, the pin 4 of chip EM78P153 and pin 7 access the two ends of crystal oscillator Y2 respectively, the two ends of crystal oscillator Y2 connect one end of electric capacity C7 and one end of electric capacity C8 respectively, one end of electric capacity C7 and the equal access interface J1 in one end of electric capacity C8 ground connection, described in being constructed as follows of ultrasound wave receiving circuit: the pin 1 of operational amplifier TL074 accesses the base stage of triode NPN, the emitter of triode NPN accesses power end via resistance R7, the grounded collector of triode NPN, the pin 2 of operational amplifier TL074 is successively via the pin 9 of resistance R4 and resistance R6 access chip EM78P153, the pin 3 of operational amplifier TL074 accesses one end of resistance R9, the pin 10 of the other end access chip EM78P153 of resistance R9 also accesses resistance R7, the pin 6 of operational amplifier TL074 and pin 7 access one end of resistance R12 and the other end of resistance R12 respectively, one end of resistance R9 is accessed in one end of resistance R12 via resistance R10, the pin 8 of operational amplifier TL074 accesses one end of resistance R20 and one end of resistance R13, the other end of resistance R13 accesses one end of resistance R12 via electric capacity C9, the pin 9 of operational amplifier TL074 accesses the other end of resistance R20, the other end of resistance R20 accesses resistance R19 end via electric capacity C10, the pin 10 of operational amplifier TL074 accesses resistance R19 one end via resistance R15, the pin 13 of operational amplifier TL074 accesses one end of electric capacity C15, one end of the other end access resistance R17 of electric capacity C15, the receiving transducer of the other end access R40-16 sensor of resistance R17, the other end of 14, pin access resistance R19 of operational amplifier TL074 and one end of resistance R18, the other end of resistance R18 clamp-ons one end of electric capacity C15, the base stage of triode NPN is via resistance R8 ground connection.
2. the stadimeter based on ultrasonic signal according to claim 1, is characterized in that: described one-chip computer module comprises chip STC89C52, electric capacity C2, electric capacity C3, resistance R14 and crystal oscillator Y1.Pin 19 and the pin 20 of STC89C52 are connected the two ends of crystal oscillator Y1 respectively, one end of crystal oscillator Y1 connects one end of electric capacity C2, the other end of crystal oscillator Y1 connects one end of electric capacity C3, the other end of electric capacity C2 and the other end of electric capacity C3 are all connected to one end of resistance R14, the other end of resistance R14 is connected to feeder ear via electric capacity C1, and ultrasonic sensor modules is integrated with ultrasonic transmit circuit and ultrasound wave receiving circuit.
3. the stadimeter based on ultrasonic signal according to claim 1, is characterized in that: temperature detecting module adopts DS18B20 temperature sensor.
4. the stadimeter based on ultrasonic signal according to claim 1, is characterized in that: voice broadcast module adopts WT588D speech chip.
5. the stadimeter based on ultrasonic signal according to claim 1, is characterized in that: display module adopts four LED charactrons.
CN201520776458.6U 2015-10-09 2015-10-09 Distancer based on ultrasonic signal Expired - Fee Related CN205027899U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201520776458.6U CN205027899U (en) 2015-10-09 2015-10-09 Distancer based on ultrasonic signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201520776458.6U CN205027899U (en) 2015-10-09 2015-10-09 Distancer based on ultrasonic signal

Publications (1)

Publication Number Publication Date
CN205027899U true CN205027899U (en) 2016-02-10

Family

ID=55260421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201520776458.6U Expired - Fee Related CN205027899U (en) 2015-10-09 2015-10-09 Distancer based on ultrasonic signal

Country Status (1)

Country Link
CN (1) CN205027899U (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105761453A (en) * 2016-03-14 2016-07-13 汕头市奥斯卡网络科技有限公司 Electronic device avoiding watching television at close range
CN105807766A (en) * 2016-03-06 2016-07-27 任荣源 Intelligent tour inspection terminal for substation
CN106646486A (en) * 2016-12-26 2017-05-10 智能佳(北京)机器人有限公司 Humanoid robot with ultrasonic wave eyes
CN110930840A (en) * 2019-12-19 2020-03-27 北京中诚博睿教育科技有限公司 Electronic ultrasonic range finder teaching aid for children intelligence development
CN111855814A (en) * 2020-02-22 2020-10-30 惠州学院 Nondestructive ultrasonic detection system for agilawood edgeworthia chrysantha based on single chip microcomputer control
CN113850985A (en) * 2021-09-18 2021-12-28 国网山东省电力公司东营市河口区供电公司 Automatic drainage control and early warning device for cable trench of transformer substation
CN115077639A (en) * 2022-08-22 2022-09-20 水发航宇星物联科技(辽宁)有限公司 Measuring method for ultrasonic flowmeter

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105807766A (en) * 2016-03-06 2016-07-27 任荣源 Intelligent tour inspection terminal for substation
CN105761453A (en) * 2016-03-14 2016-07-13 汕头市奥斯卡网络科技有限公司 Electronic device avoiding watching television at close range
CN106646486A (en) * 2016-12-26 2017-05-10 智能佳(北京)机器人有限公司 Humanoid robot with ultrasonic wave eyes
CN110930840A (en) * 2019-12-19 2020-03-27 北京中诚博睿教育科技有限公司 Electronic ultrasonic range finder teaching aid for children intelligence development
CN111855814A (en) * 2020-02-22 2020-10-30 惠州学院 Nondestructive ultrasonic detection system for agilawood edgeworthia chrysantha based on single chip microcomputer control
CN113850985A (en) * 2021-09-18 2021-12-28 国网山东省电力公司东营市河口区供电公司 Automatic drainage control and early warning device for cable trench of transformer substation
CN115077639A (en) * 2022-08-22 2022-09-20 水发航宇星物联科技(辽宁)有限公司 Measuring method for ultrasonic flowmeter

Similar Documents

Publication Publication Date Title
CN205027899U (en) Distancer based on ultrasonic signal
CN207440288U (en) SCM Based intelligent Ultrasonic Distance-measuring System
CN201298077Y (en) An error compensation type ultrasonic ranging apparatus
CN103869321B (en) A kind of ultrasonic ranging system and the method controlling its range finding
CN106324606A (en) Pen, distance measurement method and terminal system
CN106404222B (en) The deep section detection system of ocean temperature based on combined type high precision measuring temperature cable
CN104459705A (en) Ultrasonic ranging system with temperature compensation function
CN103364786A (en) Portable type intelligent distance measurement instrument with voice function
CN104076364A (en) Automobile obstacle detection system based on ultrasonic positioning technology
CN2591642Y (en) Ultrasound range finder
CN106706050A (en) Method for measuring gas flow through ultrasonic flowmeter
CN2618151Y (en) Intelligent supersonic level sensor
CN201463855U (en) Ultrasonic diameter gauge
CN204637522U (en) A kind of ultrasonic wave swimming multi-parameter display
CN201247150Y (en) Portable test device for governor of hydraulic turbine
CN106404085B (en) A kind of ultrasonic flowmeter
CN204255419U (en) Dual-frequency ultrasonic wave flow tester
CN205353363U (en) Ultrasonic ranging module of imparting knowledge to students
CN202362457U (en) Automobile distance detector based on single-chip microcomputer
CN203364922U (en) Automatic liquid-level distance measuring system
CN203502586U (en) Home safety system based on ultrasonic range finding module
CN207066547U (en) A kind of ultrasonic test liquid level device
CN204902953U (en) Explosion -proof intelligent ultrasonic wave level gauge in little blind area of WIFI networking
CN103076396A (en) Electric power steel member ultrasonic detection apparatus
CN203422472U (en) Portable intelligent distance meter provided with voice function

Legal Events

Date Code Title Description
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160210

Termination date: 20161009

CF01 Termination of patent right due to non-payment of annual fee