A
Anthony Fremont
Guest
"Danny T" <danny@nospam.oops> wrote in message
news:41e6d593$0$41658$ed2619ec@ptn-nntp-reader03.plus.net...
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.
news:41e6d593$0$41658$ed2619ec@ptn-nntp-reader03.plus.net...
Not a schematic, more of a block diagram.Hi all,
I want to build a simple ultrasonic range counter. I've got
400ST/400SR
transducers. I found a simple schematic here:
http://fly.srk.fer.hr/~nix/Projects/Sonar/Sonar_Shematic.gif
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?
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.