Ultrasonic range finding - components

This would be kHz, I guess.

That 'schematic' is useless.

Here is one schematic, but it doesn't look all that promising:

formatting link

Here is another one from EDN, who occasionally have useful stuff, but it isn't pic-centric:

formatting link

Here is one from TI:

formatting link

If you search for 'ultrasonic ranger' or 'ultrasonic distance measurement' you'll get several thousand hits.

--
Regards,
   Robert Monsen
 Click to see the full signature
Reply to
Robert Monsen
Loading thread data ...

transducers. I found a simple schematic here:

then start listening for the start of the reply. Can

understand it, I can detect the range from the time

input high. Somewhere else I read that I need to

There are several changes needed to make your range finder work something like you probably hope.

  1. The gain needs to be varied, from low to high, as echoes (or their absence) from greater ranges are collected. This is because signals become progressively weaker with range.
  2. There should be some kind of frequency selection in your receiver. Otherwise, its noise performance will be many times worse than it needs to be.
  3. You need some kind of detector, a circuit that converts the 40 MHz received wavelets into baseband bumplets.

You may want to look at the AD8331 by Analog Devices. It will handle the time varying gain if you are willing to provide a ramped voltage to it. Its gain is appropriate for sonar, if your detector can see a few hundred mV.

There are range-finding IC's available. By some measures, those will be simpler than anything you can do with a lot of separate parts.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
 Click to see the full signature
Reply to
Larry Brasfield

formatting link
If you search for 'ultrasonic ranger' or

timers and tone decoders, which I believe I don't need.

receiving the response is enough to calculate the

are geared for around the 40Khz range, so noise

Unless your tranducers are quite efficient, the noise that appears to exist at the amplifier input will not be limited to the bandwidth of the tranducer.

Good luck with your 1-bit DSP software.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
 Click to see the full signature
Reply to
Larry Brasfield

long as I can get the start of the signal, I can use

There are a couple important principles in detection that you overlook at the expense of performance. One is to match the receiver sensitivity spectrum to the expected signal spectrum. Another is to set the detection threshold above the noise but not so far above as to miss events. Without time-varying gain or threshold, you cannot effect the latter. Without some frequency selectivity, you cannot effect the former.

for 40Khz anyway. Rapid seem to have the NE567 as

sure I could get some from somewhere.?

Something as simple as an LC bandpass filter would be just about as good. The NE567 might not lock onto the returned echo fast enough to yield decent range resolution.

it that important?

If you operate your device in an otherwise quiet environment, and do not care about getting as much range as your preamp and transducer would allow, then, no, it is not important. My bet is that you will discover many acoustic noise sources that you do not yet deem significant.

I hope you have an oscilloscope for this project. If so, you may want to hook it up with some gain to your transducer and see what is floating around where you plan to do sonar.

and this way looks like it'll teach me a lot! :-)

Very likely, and more than you imagine just now.

I would ask, (rhetorically), what do you hope to learn? You appear to already understand the most basic idea of sonar range measurement. Do you hope to go beyond that? If so, you would do well to at least understand how the above two principles apply to the problem.

--
--Larry Brasfield
email: donotspam_larry_brasfield@hotmail.com
 Click to see the full signature
Reply to
Larry Brasfield

Hi all,

I want to build a simple ultrasonic range counter. I've got 400ST/400SR transducers. I found a simple schematic here:

formatting link

But I don't need the LCD. I just want to send 40Mhz pulses, wait a few ms, then start listening for the start of the reply. Can anyone suggest the components suitable for the amplifier shown here? As I understand it, I can detect the range from the time taken between my pulsing, and the echo, so all I need to do is drive a PIC input high. Somewhere else I read that I need to amplify the signal by around 1000 times to do this?

Ta!

--
Danny
Reply to
Danny T

I thought so too, but it looked simple compared to others ;)

I know, I found lots, but many seem to be very complex, such as having

555 timers and tone decoders, which I believe I don't need. The timing can be done by my chip, and as I understand it, the time delay in receiving the response is enough to calculate the distance, so the actual signal isn't important. I also believe my transducers are geared for around the 40Khz range, so noise hopefully won't be a problem...?
--
Danny
Reply to
Danny T

As I understand it, the signal isn't that important, just the time delay. As long as I can get the start of the signal, I can use the timing to calculate the distance, and ignore the waves of the signal?

I was looking at the NE567 tone decoder, but I think the transducers are heard for 40Khz anyway. Rapid seem to have the NE567 as "discontinued" with no replacements - if you think it'd be beneficial, I'm sure I could get some from somewhere.?

As long as the first sign of a signal is enough to be picked up by my PIC, is it that important?

I understand that, but I'm doing it to gain knowledge, not the end product, and this way looks like it'll teach me a lot! :-)

--
Danny
Reply to
Danny T

400ST/400SR

Not a schematic, more of a block diagram.

suggest

else

this?

I did this a little while back. It's more difficult than it first appears, but not as bad as some people here would have you believe. Usable results can be obtained without varying the gain on the receiver amplifier or bandpass filtering the received signal, but it would be better to have those things in an ideal world.

My device worked well at 8' - 10' which was plenty good enough for robot work. One interesting thing that I uncovered while working with these devices was that the transducers are very narrow banded. They are practically deaf at frequencies that stray very far from their center frequency (usually around 40KHz, but can be much higher in industry applications). This is like getting free bandpass filtering by the device itself. Look up Q factor as it pertains to tuned circuits for more information on this phenomena. They are not completely immune to noise (such as hand clapping near the transducer), but with careful processing of your data you can filter out the garbage. Normal ambient noise in a house caused virtually no problems.

I used a 741 op-amp as the first stage of amplification and then fed that straight into one side of a 393 comparator to square up the pulses and push them up to near 5V. The other input of the comparator had a voltage divider that set the pins voltage just a few (10-15) millivolts higher than the DC idling output of the 741. The output of the comparator was fed to the RB0 interrupt pin on a PIC so that the received pulses arrival could be timed accurately.

I would send about 5 or 6 cycles of 40KHz signal out the sending transducer (connected to two PIC pins for generating a 10V signal across the transducer) and then started a timer running in the PIC (actually just cleared it to 0). Wait a millisecond or so for the sending transducer to quit "ringing" and to blank out the directly received signal. I then turn on the interrupts and the ISR takes snapshots of the timer and sticks them in a circular queue. At main level I just crunch on the timer snapshot values at leisure. Granted this is not ideal if you are seeking extreme precision, but it's plenty good enough to help keep from running into things.

You really need to have an oscilloscope for playing with this stuff. This is fairly involved project and you may wish to do something a bit easier first, like adding sensors to your wheels so you can measure how far you've traveled and how fast you're going. It also makes it easier to travel in straight lines. Another thing, infrared sensors are good for a couple of feet and work fairly well for distance measurement close up AIUI. They would also be much easier to process.

Reply to
Anthony Fremont
[snip]

than

Yes.

stuff.

You can build kits, or follow someone else's _detailed_ plans; but you need to be very experienced or very lucky to successfully design AC circuits of this complexity without a 'scope.

Cheap 'scopes sell on e-Bay all the time. You don't know what you're missing.

Reply to
Andrew Holme

I understand, but I'd like to start simple. If I can build something that's confused by handclaps, I'll post back here and find out why ;-)

If I'm given a complex schematic to build, I won't understand the purpose of every component, but building simple and adding to it, I reckon I'll learn more :-)

Sounds good. I'm not too bothered by noise for now - if I can get something up and running, I've then got a "test" bed for plugging "noise reduction" in.

Sounds easy enough. The 741 I understand just amplifies, but I don't understand the 393. Does it just go high/low if one side is higher than the other?

I'd like the range to be a bit more accurate than yours, probably 5-20 inches. What would you suggest is better to increase this - bandpsas filtering (you sugggest this isn't all that important) or altering the gain? What's the best way to alter the gain? Any particular components (or at least, any specs I might need) for this? :)

I know, but they're not quite as cheap as a multimeter, so when I've decided electronics is for me, I'll think about getting one :-)

--
Danny
Reply to
Danny T

receiver

You don't need to, it's because handclapping contains a broad range of frequencies, some of them ultrasonic.

Yes, experimentation can teach you something in minutes that you may never understand by just reading about it.

robot

these

center

for

to

ambient

"noise

As with all but the simplest projects, you want to do things in managable stages. For example, I spent quite a few hours trying to understand op-amps. What I learned is that being an expert on op-amp behavior and usage is a whole career field in itself. :-o However, I was able to get my 741 to do what I wanted which was to amplify the output of the transducer. The circuitry involved is quite simple.

At these frequencies, the 741 was not the best choice for the job. It

*was* what I had available and the datasheet indicated that it would work at those frequencies, albeit with much reduced gain. Normally, I would have expected that I would have needed to follow the 741 with some kind of band-pass or high-pass audio filter to keep out the lower frequencies (and even some pre-741 passive filtering. But my scope showed that to be unnecessary since the transducers were doing a nice job of filtering out noise on their own.

pulses

a

millivolts

than

Yes. It operates very much like an op-amp with very high gain. I haven't done so yet, but I'd imagine that audio wouldn't sound too good coming out of it. ;-)

across

(actually

of

enough

20 inches is no problem, but the problem with 5 inches is the turn-around time for the signal is less than 1mS. It's workable, but you start running into the issue of the receiver hearing the directly transmitted signal first, and not a reflection. I would suggest using the Sharp IR sensors for the close in stuff and edge detection (so you won't roll off a table for example). Check these out:
formatting link

A scope is probably the best single instrument you can own for tinkering with this stuff. You can pick them up really cheap on e-bay. You don't need a 650Mhz tripple beam scope, but a dual trace with 20 - 50MHz bandwidth would be nice for your robotics/electronice/microcontroller tinkering. You can get them so cheap that you could sell it if you decide you don't like electronics and not really lose any money.

This looks pretty nice, heck I might bid on it ;-D

formatting link
I have a 20ish year old Hitachi 65MHz scope that I got used about 15 years ago. There are plenty of scopes out there for less than $100.00 that will work fine and go a long way towards saving your sanity while working with PIC chips. ;-)

Reply to
Anthony Fremont

;-)

I think here a mistake is made: to get high time accuracy, or in other words to get lots of information, you need the highest possible bandwidth !! So you need a Dirac puls (infinity bandwidth) and you can detect very accurate. The yields both for transmitting and reception. Why do you think they use high bandwitdhs in medical ultrasound (upto

100 MHz) or Radar (upto 10 GHz ?)

I've here a very old digitizer, you can put pictures on it, point with a special pen to positions on the foto, and the distances on the picture are measured ultrasone with an accuracy better then 0.1 mm !! AFAIK the receiver is just a 40 kHz transducer, electrical match to get the highest possible bandwidth (yes, you must both mechanical and electrical do impedance matching), and then great trick: the transmitter is a very small spark bridge, generating almost dirac pulses.

So the very narrow bandwidth only serves 1 goal: to detect if there's an echo or not, but not what time travelled the echo.

This is not completly true. In fact the amount of information available is time*bandwidth. So another (but quiet inpractical way) is to use a small bandwidth over a large time. But then you've to correlate the incoming signal with the transmitted signal over the total time. This used in radar (tsirp modulation).

An other problem with high Q-systems (or in fact the same problem), whatever sound you put in, you always get you cenntral frequency out ;-)

Stef Mientki

Reply to
Stef Mientki

Recently I did a project for an ultrasonic ranging device. Since the receiver is the more tricky part, I drew only the receiver for you (with a few comments on it's design). It probably has a greater sensitivity than you need, but you can reduce that). You can see it at

formatting link
Brian

Reply to
Brian

That looks simple enough for even me - thanks Brian. I'll give it a go when my breadboards aren't so full of other wires :-)

--
Danny
Reply to
Danny T

This isn't exactly an answer, but .... The following link points to a one-piece ultrasonic send/receive unit that outputs a voltage:

formatting link

.... the vendor had many left (on Jan 11) and the small sample I have (one) works.

Wade Hassler

Reply to
wade_h

That link is

formatting link

Reply to
Lord Garth

Well looky there, they stole my design. ;-) I opted for the differential input method on the op-amp though.

Reply to
Anthony Fremont

Post yours on alt.binaries.schematics.electronic ... The above link does not have the source code in the pdf with the schematic. In my opinion, it is incomplete without the code. A hex file would be nice too so that no compiler is needed.

Reply to
Lord Garth

"so cheap"? The one you linked to sold for nearly $300! :P

--
Danny
Reply to
Danny T

Excellent. I've printed it out, and when my clock isn't taking up my breadboards, I'll have a fiddle. I've got a couple of op-amps n things now, with some more stuff (hopefully!) arriving from Rapid tomorrow :-)

--
Danny
Reply to
Danny T

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.