Discussion in "General help Guidance and Discussion" started by    guitar    Aug 27, 2008.
Sun Aug 31 2008, 04:00 AM
#11
ok thanks
Wed Sep 03 2008, 03:01 PM
#12
hi
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, 03:27 PM ]
Wed Sep 03 2008, 06:35 PM
#13
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.
Wed Sep 03 2008, 06:44 PM
#14
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.



Circuit
Tags ultrasonic transmitter and receiver40Khz ultrasonic transmitter receiver circuits
Wed Sep 03 2008, 06:54 PM
#15
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 Wed Sep 03 2008, 07:01 PM ]
Wed Sep 03 2008, 07:09 PM
#16
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, 02:13 PM
#17
hi
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, 04:27 PM
#18
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, 04:17 AM
#19
hi
but can i use ultrasonic sensor in place of led in below pasted diagram

 seenivasan like this.
Fri Sep 05 2008, 08:12 AM
#20
check this application note for ultrasonic sensors.

they have suggested about 6 circuits for transmitter design.

Get Social

Information

Powered by e107 Forum System

Conversation

Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 108, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123