To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 1746
1745  |  1747
Subject: 
Some answers on Re: Sonar and the handyboard
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 22 Mar 1997 11:25:14 GMT
Original-From: 
Chuck McManis <cmcmanis@netcom%spamless%.com>
Reply-To: 
cmcmanis@netcomSPAMLESS.com
Viewed: 
1744 times
  
Adam and Tom have been exchanging quite a bit of mail on the topic
of Ultrasonics and the Handyboard. A lot of good information has
come to light as well as some misinformation. I've spent some time
figuring out just what is what, and this is the results of that
investigation.

The ultrasonic transducer board, when operating in 'single echo'
mode, is controlled by setting 'INIT' high and then waiting
for 'ECHO' to go high. There is a note that the ECHO output may
need a pull up resistor (standard equipment on the Handyboard).

Because the same transducer is used to produce the output pulse
and to detect the input pulse, some physical constraints enter
into the system design. In particular, after you send a pulse
the transducer continues to vibrate for a period of time after
the pulse has been sent. If you were to immediatly monitor the
transducer for an echo, you would mistake this ringing for an
echo and 'detect' an obstacle immediately.

To avoid this problem the circuit has an internal 'blanking'
circuit that ignores the state of the transducer when it is
active. The operation of this circuit is controlled by the
BINH pin.

If BINH (Blanking Inhibit) is held (or left) low, then the
transducer uses an internal blank interval of 2.38 mS. That
means that objects that are closer than (2.38/2 * speed of sound
in fps) will not be detected. Using 1075 for the speed of sound
means that objects that are closer than 16" will not be seen
because the receiver will be blanked when the echo returns.

You can change this behaviour by controlling the BINH pin. If
the BINH pin is brought high in < 2.38 mS it immediately terminates
the internal blanking interval. If you bring it high too soon you
will cause the ringing of the transducer to be detected as an
echo.

Kent decided to decrease the minimum distance by bringing BINH
high after a few clocks in his loop. The capacitor and resistor,
depending on their connection, could act as a RC time delay but
as BINH is no a schmidt trigger I don't think that is what was
intended.

If you have the sonar transducer connected, you should be able
to connect an oscilloscope to INIT and BINH. When a 'ping' is
done, INIT should go high, then about 1mS later, BINH should go
high. This latter step will turn on the receiver (take it out of
blanked mode). If BINH goes high too quickly, an immediate ECHO
will be detected (ringing in the transducer) and Kent's routine
will return 8" because that is the minimum distance it can return.
Similarly if INIT and BINH get somehow connected together the
transducer won't work at all because bringing up INIT will also
bring up BINH and the receiver will always see the ringing of the
transducer rather than an echo.

So for debugging, if you've connected your transducer and all you
get is 8", then first try disconnecting BINH. Now you should get
valid readings that are farther than 16" away (1.3' depending on
your altitude) If that works then your module is good and you need
to look at one of two problems:
BINH is going high too soon. That can occur because of a
solder bridge between BINH and INIT.

The transducer is ringing a lot, if you you can try packing
gauze around its back.

ARGH! That reminds me, you *MUST* cover the BACK of the transducer,
because if it isn't covered it sends a pulse out the back as well
as out the front. Then if you get an echo return on the back of the
transducer the board will see that as it's nearest point. I had this
problem where the transducer was in a frame, once I covered the back
with tissue paper it went away.

Anyway the last bit of information from the datasheet is that if
you assert 'blank' for at least .44 mS you can reset echo and wait
for another echo to arrive. It is tougher to program but gives you
more data.

--Chuck
P.S. The IC is a TI SN28827 sonar ranging module chip.

--
--Chuck McManis       http://www.professionals.com/~cmcmanis/index.html
All opinions in this message are those of the author. No warranty as to
the suitability or accuracy is stated or implied. Use at your own risk.
cmcmanis@netcom.com                                     +1.408.524.4805



Message is in Reply To:
  Re: Sonar and the handyboard
 
Tom, I put the cap in too - never noticed much defference. It must just be for some minimal filtering of noise. I don't know how well you know Ben, but it sounds as though you will probably be fixing this one solo, eh? Do you have manuals? I'll look (...) (28 years ago, 21-Mar-97, to lugnet.robotics.handyboard)

15 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR