free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  1 [2] 3
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
guitar
Sat Aug 30 2008, 09:00PM
 User Offline
Registered Member #10154
Joined: Wed Aug 27 2008, 04:15AM

Posts: 6
Thanked 1 time in 1 posts
ok thanks

Back to top


guitar
Wed Sep 03 2008, 08:01AM
 User Offline
Registered Member #10154
Joined: Wed Aug 27 2008, 04:15AM

Posts: 6
Thanked 1 time in 1 posts
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, 08:27AM ]
Back to top


pdi33
Wed Sep 03 2008, 11:35AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
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.


* inspired to develop,developing to inspire *
Back to top


Ajay
Wed Sep 03 2008, 11:44AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
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


www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top

ultrasonic transmitter and receiver   40Khz ultrasonic transmitter receiver circuits   


pdi33
Wed Sep 03 2008, 11:54AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
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, 12:01PM ]

* inspired to develop,developing to inspire *
Back to top


Ajay
Wed Sep 03 2008, 12:09PM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
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.

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


guitar
Thu Sep 04 2008, 07:13AM
 User Offline
Registered Member #10154
Joined: Wed Aug 27 2008, 04:15AM

Posts: 6
Thanked 1 time in 1 posts
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 ?


Back to top


pdi33
Thu Sep 04 2008, 09:27AM

 User Offline
Registered Member #1329
Joined: Mon Jun 04 2007, 09:28AM

Posts: 770
Thanked 185 times in 180 posts
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.


* inspired to develop,developing to inspire *
Back to top


guitar
Thu Sep 04 2008, 09:17PM
 User Offline
Registered Member #10154
Joined: Wed Aug 27 2008, 04:15AM

Posts: 6
Thanked 1 time in 1 posts
hi
but can i use ultrasonic sensor in place of led in below pasted diagram

Back to top


Ajay
Fri Sep 05 2008, 01:12AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4042
Thanked 753 times in 712 posts
check this application note for ultrasonic sensors.

they have suggested about 6 circuits for transmitter design.
ultrasonicsensor.pdf

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Go to page  1 [2] 3  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems