Embodiment
With reference to Fig. 1, intelligent supersonic liquid level transmitter of the present utility model comprises 40KHz square wave power amplifier, ultrasonic emitting probe, the ultrasound wave receiving transducer of microprocessor MPU, ultrasound wave output circuit, 40KHz square wave power amplifier, low-pass filter, shaping and amplitude limiter circuit, ultrasonic transmission/reception control logic circuit, environment temperature detecting unit and RS485 sending and receiving controller and the RS485 communication interface of ultrasound wave receiving circuit.
The principle of work of transmitter of the present utility model is to produce 40KHz square-wave signal intermittently by microprocessor MPU, square-wave signal outputs to the ultrasonic emitting probe behind power amplifier, thereby produce the transmitted wave of same frequency, transmitted wave is transmitted to tested liquid level through reflecting to form echo, echo propagates into the ultrasound wave receiving transducer, signal through changing is through the power amplifier of receiving circuit, low-pass filter, be input to the ultrasonic transmission/reception control logic circuit after shaping and the amplitude limiter circuit, the ultrasonic transmission/reception control logic circuit produces the microprocessor MPU look-at-me, microprocessor MPU stops timing, and in interrupt service routine, read clocking value, finish one-shot measurement, microprocessor MPU records the self-starting transmitted wave to the time of receiving echoed signal, calculate the distance of liquid level by sound velocimeter to ultrasonic emitting probe and ultrasound wave receiving transducer, and then the height of calculating liquid level, its data are carried out information transmission by the communication interface and the external world.
In order to improve the measuring accuracy of this transmitter, microprocessor MPU is connected with temperature detecting unit, temperature detecting unit testing environment temperature, and microprocessor MPU carries out temperature compensation according to the temperature value of reading from temperature detecting unit to the level value of measuring.
Transmitter of the present utility model adopts the digital way of output, and the numeral output of transmitter is guaranteed by complete communication protocol, passes through RS485 interface and external smart devices communicating, exchange message by microprocessor MPU.
In conjunction with Fig. 1, Fig. 2 and Fig. 3, the physical circuit of the present utility model and the course of work thereof are as follows:
+ 9V power supply E0 links to each other with the positive pole of diode D4, the negative pole of diode D4 links to each other with the end of capacitor C 19 with transient voltage rejector ZD1, and be connected to 1 pin of ic chip 8, the other end ground connection of capacitor C 19 and transient voltage rejector ZD1,3 pin of ic chip 8 link to each other with 20 pin of microprocessor MPU, capacitor C 17, C18, the out-put supply E2 of ic chip 8 is the digital circuit power supply, the other end of capacitor C 17, C18 and 2 pin ground connection of ic chip 8; 1 pin of ic chip 2 links to each other with+9V power supply, and 3 pin of ic chip 2 link to each other with capacitor C 8, C9 one end respectively, and producing power supply E1 is the mimic channel power supply, 3 pin ground connection of the other end of capacitor C 8, C9 and ic chip 2.Because the power supply of mimic channel and digital circuit separately can reduce the interference of digital circuit to mimic channel.
The auxiliary circuit of microprocessor MPU has crystal oscillating circuit and reset controller and WatchDog Timer, crystal oscillating circuit is made up of crystal X1, capacitor C 15, C16, the end of resonator X1 links to each other with an end of 4 pin of microprocessor MPU and capacitor C 15, the other end of resonator X1 links to each other with 5 pin of microprocessor MPU and an end of capacitor C 16 respectively, 10 pin ground connection of capacitor C 15, C16 and microprocessor MPU, they provide work clock for microprocessor MPU.Reset controller and WatchDog Timer are ic chip 7 and the resistance R 27 of CSI1161 by model, R28, R29, R30 forms, 8 pin of+5V power supply E2 and ic chip 7 and resistance R 28, R29, the end of R30 links to each other, the other end of resistance R 28 respectively with 6 pin of ic chip 7,17 pin of microprocessor MPU link to each other, the other end of resistance R 29 respectively with 5 pin of ic chip 7,18 pin of microprocessor MPU link to each other, the other end of resistance R 30 respectively with 2 pin of ic chip 7,1 pin of microprocessor MPU links to each other, 7 pin of ic chip 7 link to each other with an end of resistance R 27,5 pin ground connection of the other end of resistance R 27 and ic chip 7.6,5,2 pin that resistance R 28, R29, R30 are respectively IC7 provide and draw, and wherein 5,6 pin are I
2The C bus interface is joined with 18,17 pin of microprocessor MPU respectively, and communicate by letter with microprocessor MPU by them, 2,7 pin of ic chip 7 are two output terminals of reset controller, wherein 2 pin are the low level output that resets, insert reset terminal 1 pin of microprocessor MPU, 7 pin need not, for making ic chip 7 operate as normal, R7 is its pull down resistor.
The ultrasonic transmission/reception control logic circuit is made up of ic chip 4, and 8,5,3,2 pin of ic chip 4 link to each other with 6,15,7,14 pin of microprocessor MPU respectively, 7 pin ground connection, and 14 pin meet power supply E1.Its principle of work and process are as follows: begin each measuring period, microprocessor MPU goes out 5 pin of a positive pulse signal to ic chip 4 by 15 human hair combing wastes, microprocessor MPU also is changed to low level with 14 pin, the transmitting-receiving control logic circuit resets, make it to work in the emission control state, start measuring period, start the Timer T0 timing of microprocessor MPU simultaneously and begin to produce square wave output, T0 works in GATE door mode.After the output of row square wave, microprocessor MPU stops square wave output, delays time about 2mS blind area time, and microprocessor MPU is changed to high level with 14 pin, and promptly ultrasonic transmission/reception control logic circuit entering signal accepting state waits for that ultrasonic echo arrives.When signal amplification, low-pass filtering, shaping and the amplitude limiter circuit of echoed signal by receiving circuit inputs to 6 pin of microprocessor MPU and 7 pin, trigger 6 pin INT0, stop the T0 timing, triggering INT1 interrupts, microprocessor MPU reads the value of T0 register in interrupt service routine, thereby obtain and the corresponding time value of liquid level, finish one-shot measurement.
The circuit of the square wave power amplifier of ultrasound wave output circuit is that 12 pin of microprocessor MPU link to each other with an end of resistance R 20 and capacitor C 14, another termination power E1 of resistance R 20, the other end of capacitor C 14 links to each other with resistance R 19, the other end of resistance R 19 links to each other with an end of resistance R 18 and the base stage of triode TR3, the emitter of the other end of resistance R 18 and triode TR3 meets power supply E1, the collector of triode TR3 links to each other with an end of resistance R 11, the other end of resistance R 11 links to each other with the base stage of triode TR2, the collector of triode TR2 links to each other with the end of the primary coil N1 of transformer T1, one end of the other end of primary coil N1 and resistance R 6, one end of capacitor C 4 links to each other, another termination power E0 of resistance R 6, the grounded emitter of the other end of capacitor C 4 and triode TR2, the end of the secondary coil N2 of transformer T1 links to each other secondary coil N2 with the end of an end of resistance R 1 and ultrasonic emitting probe S1, resistance R 1, the other end ground connection of ultrasonic emitting probe S1.
The ultrasound wave receiving circuit is that the end of ultrasound wave receiving transducer S2 links to each other with an end of resistance R 2, the other end ground connection of ultrasound wave receiving transducer S2, the other end of resistance R 2 links to each other with an end of capacitor C 1, the other end of capacitor C 1 respectively with the negative pole of diode D1, one end of the base stage of triode TR1 and resistance R 4 links to each other, the emitter of triode TR1 links to each other with an end of resistance R 5, the plus earth of the other end of resistance R 5 and diode D1, the other end of resistance R 4 respectively with collector and the resistance R 3 of triode TR1, one end of capacitor C 3 links to each other, the other end of resistance R 3 respectively with resistance R 12, one end of capacitor C 2 links to each other, the other end ground connection of capacitor C 2, the other end of resistance R 12 and operational amplifier IC1A meet power supply E1, the other end connecting resistance R7 of capacitor C 3, the other end of resistance R 7 is connecting resistance R10 and capacitor C 5 respectively, the end of C6, the other end of capacitor C 5 connects 1 pin of operational amplifier IC1A and an end of resistance R 13 and capacitor C 7 respectively, the other end of resistance R 13 connects 2 pin of operational amplifier IC1A and the other end of capacitor C 6 respectively, one termination E1 of resistance R 8, the other end of resistance R 8 is connecting resistance R9 respectively, 3 pin of operational amplifier IC1A and 5 pin of operational amplifier IC1B, resistance R 9, the 4 pin ground connection of the other end of resistance R 10 and operational amplifier IC1A, the end of the other end connecting resistance R14 of capacitor C 7, the other end of resistance R 14 is connecting resistance R15 and capacitor C 10 respectively, the end of C11, the other end of capacitor C 10 connects 7 pin of operational amplifier IC1B and an end of resistance R 16 and capacitor C 12 respectively, the other end of resistance R 16 connects 6 pin of operational amplifier IC1B and the other end of capacitor C 11 respectively, the other end of capacitor C 12 connects the positive pole of diode D2 and the negative pole of diode D3 respectively, the positive pole of diode D3 is connecting resistance R17 respectively, the base stage of capacitor C 13 and triode TR4, capacitor C 13, the other end ground connection of resistance R 15, the emitter of triode TR4 is connecting resistance R21 respectively, the end of R23, resistance R 21, the negative pole of R17 and diode D2 connects power supply, the end of the collector difference connecting resistance R22 of triode TR4 and 1 pin of ic chip 4, resistance R 22, the other end ground connection of R23.
The ultrasonic signal of transmitter is by being that the microprocessor MPU programming face of 89C2051 produces to its model, microprocessor MPU is exported the square wave of about 40KHz to power amplifier by its 12 pin, power amplifier is work like this: square-wave signal outputs to resistance R 19 by coupling capacitance C14, signal is by the base stage of resistance R 19 to triode TR3, triode TR3 is operated on off state, play driving action, resistance R 18, R19 play biasing and metering function respectively, and resistance R 20 is the pull-up resistor of 12 pin of microprocessor MPU.Drive triode TR2 work from the square-wave signal of triode TR3 collector output by resistance R 11, triode TR2 also is operated on off state, by transformer T1 square-wave signal is carried out power amplification, N1 is the primary coil of transformer T1, resistance R 6, R11 are current-limiting resistance, and capacitor C 4 strobes.The square-wave signal with power drive ability that obtains at the secondary coil N2 of transformer T1 drives ultrasonic emitting probe S1, produces the emission ultrasound wave, and resistance R 1 plays the power match effect.
Signal amplification, low-pass filtering, shaping and the amplitude limiter circuit of the ultrasound wave receiving circuit of transmitter is like this work: ultrasound wave receiving transducer S2 is converted to electric signal with ultrasonic signal and inputs to the base stage of triode TR1 through current-limiting resistance R2 and coupling capacitance C1, and the collector from triode TR1 after elementary amplification is exported.Resistance R 3, R4, R5 are biasing resistor, and diode D1 shields, and resistance R 12 and capacitor C 2 play the decoupling effect.Be input to the two-stage signal amp.in that constitutes by operational amplifier IC1A, IC1B through elementary amplifying signal through coupling capacitance C3 and resistance R 7, the capacitor C 6 of first order amplifier is a coupling capacitance, R13 is a feedback resistance, and the enlargement factor of amplifier is by resistance R 13 and resistance R 10 decisions.Resistance R 8, R9 form bleeder circuit, and its dividing potential drop inputs to the in-phase input end of two-stage amplifier.First order amplifier output signal inputs to second level amplifier input terminal through coupling capacitance C7 and current-limiting resistance R14, first order amplifier is identical with second level amplifier principle, the output signal of second level amplifier is input to the base stage of triode TR4 through coupling capacitance C12 and diode D3, diode D2 plays the amplitude limit effect, resistance R 12, R17, R22, R23 play bias, and filter capacitor C13 is to the further filtering of signal.Triode TR4 cushions ultrasound echo signal and further shaping, outputs to 1 pin of ic chip 4, the i.e. signal input part of ultrasonic transmission/reception control logic circuit from collector.
The temperature detecting unit circuit is that model is that 2 pin of digital temperature sensor IC3 of DS18B20 and an end of resistance R 25 link to each other with 8 pin of microprocessor MPU, 1 pin of digital temperature sensor IC3 and the other end of resistance R 25 link to each other with power supply E1, the 3 pin ground connection of digital temperature sensor IC3.Its principle of work is as follows with process: 8 pin of MPU microprocessor MPU link to each other with 2 pin of digital temperature sensor IC3, communicate to start the thermometric degree and read temperature value, and R25 is a pull-up resistor, and 1 pin of digital temperature sensor IC3 connects power supply E1,3 pin ground connection.
The RS485 transceiver controller of transmitter is work like this: 1 pin, 4 pin of 2 pin of microprocessor MPU, 3 pin and integrated RS485 transceiver controller IC6 join, 2,3 pin of 11 pin of microprocessor MPU and integrated RS485 transceiver controller IC6 join, control the receipts/duty of integrated RS485 transceiver controller IC6,6 pin of integrated RS485 transceiver controller IC6 and 7 pin then are A, the B signal end of RS485, lead to the RS485 interface, resistance R 6 is a RS485 bus driver resistance.
With reference to Fig. 1, Fig. 2, Fig. 3, the transmitter microprocessor MPU is work like this: microprocessor MPU carried out initialization after transmitter powered on, and started ambient temperature measurement unit thermometric, next entered the testing circulation.Measuring period is from producing ultrasonic emitting signal square wave, start Timer T0 timing simultaneously, and 14 pin by microprocessor MPU are changed to low level, 15 human hair combing wastes go out a positive pulse signal to the transmitting-receiving control logic circuit, make it to work in the emission control state, starting measuring period.After one row ultrasound wave sends, microprocessor MPU stops ultrasonic emitting, delay time about 2mS blind area after the time, microprocessor MPU is changed to high level with 14 pin, the ultrasonic transmission/reception control logic circuit is controlled to be the signal accepting state, the wait ultrasonic echo arrives, and enters measuring period to receive the ultrasonic echo signal phase.When signal amplification, low-pass filtering, shaping and the amplitude limiter circuit of echoed signal by receiving circuit inputs to 1 pin of ic chip 4, the ultrasonic transmission/reception control logic circuit triggers 6 pin and 7 pin of MPU, because Timer T0 works in the GATE mode, when INT0 is triggered, stop the T0 timing.INT1 is triggered to produce and interrupts.The value of microprocessor MPU T0 register in interrupt service routine reads, thus obtain and the corresponding time value of liquid level, preserve this measured value, provide the reception effective marker, from interrupting returning master routine, finish one-shot measurement then.It should be noted that, receiving the ultrasonic echo signal phase, microprocessor MPU is in the given time, by to receiving the inspection of effective marker, constantly judge to have or not echo to arrive, as in the given time, not receiving echo, promptly measure overtime, microprocessor MPU is then abandoned this and is measured, and starts new measuring period, can effectively prevent to cause because of interference the generation of system's " deadlock " situation like this.
According to communication protocol, under normal conditions, the microprocessor MPU of transmitter is operated in accepting state by 11 foot control system RS485 transceiver controllers, and the serial port of microprocessor works in interrupt mode.When external smart equipment sent communications command by the RS485 communication interface, the microprocessor MPU of transmitter entered interrupt service routine, and according to the connotation of ordering, data was sent to external smart equipment.This moment, the microprocessor MPU of transmitter was operated in transmit status by 11 foot control system RS485 sending and receiving controllers, and the external smart equipment work is in accepting state, and data are sent, after data distribute, microprocessor MPU is got back to accepting state by 11 foot control system RS485 sending and receiving controllers again, interrupt then returning, so repeatedly, finish up to a communication process.
With reference to Fig. 4, the circuit board 2 of above-described each circuit is installed in the housing 1, ultrasonic emitting probe 5, ultrasound wave receiving transducer 6 are installed on the end of housing 1 by fixed head 3, this transmitter is connected with external unit by four-core shielded cable 7, and trip bolt 8 and water joint 9 are arranged on housing 1.The utility model when the ultrasonic probe of the boundary dimensions of fluid to be measured container and transmitter to the ratio of the distance of liquid level greater than certain definite value, as greater than 2: 1 o'clock, housing 1 and other parts can directly apply to the measurement to liquid level.When fluid to be measured container boundary dimensions and ultrasonic probe to the ratio of the distance of liquid level during less than definite value, as 2: 1 o'clock, because liquid container inwall or edge cause the interference of the normal ultrasonic reflections signal that transmitter is received to hyperacoustic reflection, cause measuring error.For eliminating the interference of container inner wall to ultrasonic signal, improve measuring accuracy, on the ultrasound wave receiving transducer, be with pvc pipe 10, and this pvc pipe 10 extends to the liquid level direction, thereby shielded hyperacoustic undesired signal that container inner wall reflected, the level gauging precision of transmitter improves.Certainly, no matter how many ultrasonic probes of the boundary dimensions of fluid to be measured container and transmitter is to the ratio of the distance of liquid level, can on the ultrasound wave receiving transducer pvc pipe be installed.