Discussion in "General help Guidance and Discussion" started by    guitar    Aug 27, 2008.
Sun Aug 31 2008, 09:30 am
ok thanks
Wed Sep 03 2008, 08:31 pm
i bought a pair module of ultrasonic sensors.
it works on 40khz frequency
each module has two pins.
can u tell me functioning of these pins.and how cud i generate a source of 40khz for it

[ Edited Wed Sep 03 2008, 08:57 pm ]
Thu Sep 04 2008, 12:05 am
hi guitar,
u can generate a square wave of 40khz at any port pin using the AVR internal timer (use the PWM principle with a fixed 50% duty cycle.). Now, amplify the voltage level of the square wave according to the data sheet before feeding it to the transmitter.( if i remember correctly, the sensor can operate at more than 30V DC). this is neccesary because the range of the sound wave is dependent on the energy u transfer to it which is directly proportional to the operating voltage . u can achieve it using a simple NPN power transistor.
now the principle as i explained earlier is that u have to generate a limited train of pulses at that frequency (10~20 pulses is sufficient).simultaneously, start a internal timer inside the AVR. the next step would be to stop the timer as soon as u receive the first pulse from the receiver.the timer value would be directly proportional to the total distance travelled by the wave.
Thu Sep 04 2008, 12:14 am
Circuit Description:

Ultrasonic Transmitter is based on a 4011 quad 2-input NAND gate. Two of the gates, IC1a and IC1b, are used as a conventional CMOS Astable circuit whose oscillation frequency is set by capacitor C1, resistors R6 and R7, plus preset VR2, which adjusts the frequency. Gates IC1c and IC1d buffer the outputs from IC1a and IC1b and drive the ultrasonic transmitter transducer, X1, in push-pull mode.

In the Receiver circuit, ultrasonic echo signal is received by transducer X2. It is first amplified by the 2-stage amplifier based on transistors TR1 and TR2. The output from TR2 is rectified by diode D1 and smoothed by capacitor C4. The result is a voltage level at inverting terminal of IC2 which varies between 1·4V and 2·7V when X2 is not receiving ultrasound echoes, but falls to 1·2V when a strong enough echo from an object is detected. The rectified signal goes to op amp comparator IC2's inverting input, pin 2. The signal is compared with a reference voltage set by preset VR3, and applied to IC2's non-inverting input, pin 3. The output at IC2 pin 6 is low when there is no echo, but swings high when an obstacle ahead of the system is detected.

Tags ultrasonic transmitter and receiver40Khz ultrasonic transmitter receiver circuits
Thu Sep 04 2008, 12:24 am
here is a flowchart to explain the concept better:
note that in the receiver section, a clamping circuit is required to translate the signal level to +5V and to remove any distortions in the square pulse received .

@ ajay,
nice ckt, if used could take a load off the uC.
@ guitar
the only thing required in the ckt provided by ajay would be to give the output to the internal ADC of the AVR and monitor the voltage level for a valid reflection.

[ Edited Thu Sep 04 2008, 12:31 am ]
Thu Sep 04 2008, 12:39 am
you can also use a 555 timer IC to generate 40Khz wave in transmitter side, In the above circuit an RC circuit is used.

The circuit provided above is for obstacle detection not distance measurement. Guitar was asking how to use them, so i gave an idea.

for distance measurement, you need not to use the opamp IC, instead you can give the o/p of C4 to ADC, to measure the voltage level from 1.4 to 2.7V to measure how far the obstacle is.. for calibration you might need to work out a little.
Thu Sep 04 2008, 07:43 pm
actually i want distance measuring sensor concept.then want it to display distance on lcd
i found a circuit for 40khz frequency source but it is for infrared led so can i attach my sensor in place of that led ?

Thu Sep 04 2008, 09:57 pm
well, u can use anyof the above methods but the trick is that u have to send only a limited no. of pulses and not a continuous train. so, the transmission of pulses should be controlled by the uC. with a continuous emission of pulses, u cannot differentiate between which pulse was received from the transmitted pulses.
hope u understood the concept.
Fri Sep 05 2008, 09:47 am
but can i use ultrasonic sensor in place of led in below pasted diagram

 seenivasan like this.
Fri Sep 05 2008, 01:42 pm
check this application note for ultrasonic sensors.

they have suggested about 6 circuits for transmitter design.

Get Social


Powered by e107 Forum System



Sun Jun 16 2024, 09:44 pm
Sun Jun 16 2024, 03:05 pm
Sun Jun 16 2024, 04:23 am
Sat Jun 15 2024, 09:17 pm
Sat Jun 15 2024, 02:18 pm
Fri Jun 14 2024, 03:16 pm
Fri Jun 14 2024, 11:56 am
Thu Jun 13 2024, 06:00 pm