Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Ultrasonic Range Finder. Is this idea feasible?

Status
Not open for further replies.

mvadu

New Member
Hi I am thinking about building an Ultrasonic Range Finder. I have studied several circuits using one T40 module as transmitter and a R40 as a receiver. In those schemas they use separate tank circuit to generate 40 KHz signal.

Now have a look at my concept and let me know whether it is feasible or not:

1. Using TMR0 delay routines generate 40 KHz bursts in one of the pins in a PIC. Say 100ms burst containing 4000 cycles. Apply this pulse to T40 module using a transistor.
2. Start a counter and wait for echo. Amplify the R40 output and some how convert it to a raising signal which will be applied to external interrupt pin of the PIC causing an interrupt.
3. When interrupt occurs stop the counter and calculate the range using speed of sound and counter value.

Main thing here would be I am eliminating separate circuit for transmitter. I will use PIC only. Is it achievable?
I need your suggestion for receiver and amplifiers to be used and converting the received 40 kHz burst into one single raising edge pulse.
 
I think 100ms is too long. Do you know how far sounds travels in 100ms? 34m, which is already beyond the practical range of 40kHz air sonar. One of the the ultrasonic sensors out there only puts out 8 cycles.
 
dknguyen said:
I think 100ms is too long. Do you know how far sounds travels in 100ms? 34m, which is already beyond the practical range of 40kHz air sonar. One of the the ultrasonic sensors out there only puts out 8 cycles.

Ooops.. I never thought in that way.. So sending only few cycles (10-20) is enough is it? Because most of the shematics on web have a seperate oscillator circuit for transmitter (triggerred by pic) and operate for few milliseconds.

What about the reciever circuit any ideas?
 
mvadu said:
Ooops.. I never thought in that way.. So sending only few cycles (10-20) is enough is it? Because most of the shematics on web have a seperate oscillator circuit for transmitter (triggerred by pic) and operate for few milliseconds.

You don't need a seperate oscillator, a PIC can easily, and simply, produce the ultrasonic directly, and an EXACT number of cycles as well.

What about the reciever circuit any ideas?

Opamp amplifiers and bandpass filters - as already suggested, if you google there are MANY such circuits on the net.
 
Nigel Goodwin said:
Opamp amplifiers and bandpass filters - as already suggested, if you google there are MANY such circuits on the net.

First of all I must thank god to fullfil my desire to have Nigel Goodwin's reply in my thread.:)

The receivers I have seen uses a two stage OP-Amp's with a gain of some where near 25-40 to get 2.5V oscillations... then use it for ADC ip etc.

What I need is a simple way of doing it... preferably R40 directly connected to PIC :) Or else a simple circuit which will switch from 0-5V on hearing 40 KHz.
So that I can use it as an interrupt.

The thing is last time I put my hands on an OP-Amp is some three years back when I was in graduation. Though I am good at getting my digital circuits to work... i doubt my ability in analog area... So a simple schematic will be of great help.
 
Last edited:
gramo said:
This device will measure from 0-255 inch's with great accuracy!

https://www.sparkfun.com/commerce/product_info.php?products_id=639

You simply interface with it via rs232 (read the datasheet)

I want to do a Ultrasonic range finder for myself.. I don't need a module for it.. Other wise i am aware that you will get every thing other than Mom-n-Dad for few $$:) But they will not give you the satisfaction fun of making some thing on your own and the learning’s..
 
mvadu said:
I want to do a Ultrasonic range finder for myself.. I don't need a module for it..

No probs, I didnt know what the application was, but you got to admit, its a fairly nice design :p 0 to 6.4 meters at ~2cm accuracy @20hz update speed, not too shabby.

The 40Khz signal can be easily generated with the PWM. With a 4Mhz Osc, the PIC is funtioning at 1uS / instruction and at 20Mhz, 200nS

a 40Khz signal has a period of 25uS, I'm sure this will get you think down the right track
 
Ya.. Even this site lists out lot of such little modules.. even with USB support
**broken link removed**

But some one please give me some nice little receiver schematic with very few components... Please....
 
gramo said:
Further down the page he quotes the max range is 18 inch's :( Is that far enough for what you need?

No..:( I am targeting for somewhere near to 3M (120-150 inches) or even more if circuit and hardware allows
 
U can generate 40Khz Sound without using any Timer... Just use a delay routine for it.... Delay routing can provide u much accuracy in such application i think.
 
Ok... Again back to receiver circuit..

I am planning to use PIC 16F88 with inbuilt ADC instead of 16F628A. No after transmitting 8 cycles of 40 KHz pulse, i will start TMR0 in counter mode. Then in a loop I will check for ADC output. Input to ADC will come from a simple transistor amplifier built around BC547. Once the ADC gives me a high value I will stop counter and go for range calculations.

Now gurus, is this feasible??
 
mvadu said:
Ok... Again back to receiver circuit..

I am planning to use PIC 16F88 with inbuilt ADC instead of 16F628A. No after transmitting 8 cycles of 40 KHz pulse, i will start TMR0 in counter mode. Then in a loop I will check for ADC output. Input to ADC will come from a simple transistor amplifier built around BC547. Once the ADC gives me a high value I will stop counter and go for range calculations.

Now gurus, is this feasible??

You need to rectify the output before you try and detect it, it's also more common to use an opamp - use a double one, one half as an opamp, the other as a comparator to generate a logic signal to the PIC if the level is a certain size. Some PIC's even have internal comparators!.
 
i have already made wat u r looking for! :)

it is my final year project :) i made the sonar with veryyyyyy less components and achieved 24feets in air.

now i am stuck at the microcontroller part where i need to calculate the distance....can anyone help? Give me ur email address so i can mail u the schematics :)
 
You say you already made it, and yet you haven't gotten to the point where you actually measure the distance yet?

Also, this is a public forum, people are here to help others, why don't you post the schematics to the thread so everyone can see them instead of privately emailing them to a single person?
 
There are two issues that relate to practical distance - transmit power and receiver amplification. Those minimal circuits fall down on both points.

On the transmit front, the more power, the stronger the echo. You might want to use a higher voltage than 5 to drive the transmitter. Easy enough to do with a single transistor. Check the ratings on your transmitter - I've got a couple that are rated for 35V though I only drove them at 12V. Got a good strong echo with that. Note that those devices are capacitive so you need to take that into account.

On the receiver side, you will want to amplify pretty well. I recall seeing projects designed for a gain of 70 but the noise of your system may limit the practical gain.

also, I've not tried this but for long range, I would think using a parabolic reflector could significantly increase transmitted and received power.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top