At 02:11 PM 11/11/97 -0500, Mike Keitz wrote: >On Tue, 11 Nov 1997 10:29:42 -0800 Rick Dickinson >writes: >>What sort of granularity would be needed, > >The speed of sound in air varies with pressure, temperature, and >humidity. Unless these factors are compensated for, granularity in the >measurement finer than the uncertainty of knowing the speed of sound is >not very useful. In most applications, an absolute result is desired. Very true. For this, and other, reasons, I don't think it make sense to try for more than 8 bits of resolution over whatever range is being measured. In fact, for most hobbyist robotics applications, exact distance values aren't nearly as useful as just being able to guage what fraction of the distance to something you've already moved, so you can estimate how much longer to keep moving. >> and what is a reasonable >>maximum >> range? > >The maximum range is whatever the transducers, transmitter, and receiver >allow. For the Polaroid system it's about 30 feet. This was well >matched for the original application of focusing a camera. The parts in >the Polaroid circuit are rather high-performance (200V pulse to >transducer, stepped gain amplifier). I don't know if the Murata >transducers could do better. > > I want to avoid having to do any sort of AGC, so the range >>would have >> to be known in advance to set the amp gain on the receiving >>transducer. > >This would really detract from the general-purpose utility of the device. > It shouldn't be hard to do AGC by using tri-state PIC pins to switch >resistors from various points in the receiver amplifier to ground. >Another way would be to vary the transmitter power. First try low power >assuming a short range, if no echo returns use high power and blank out >the spurious early returns. Good point. I wanted to keep the design as simple as possible for two reasons -- to keep costs down so that hobbyists could afford to build it, and to make it as simple to build and get "up and running" as possible. I am afraid that AGC circuitry would complicate the design and require some "tweaking" to make it work. >>>> - Baud rate/clocking (async 9600/4800/2400/1200? Autobaud? Sync?) > >I think async with a choice of 1200 or 9600 baud. 1200 could work better >if the device is at the end of long wires. 9600 would allow continuous >rapid measurements, or multiplexing the outputs of several units onto a >bus. I like just sending ASCII text, since it allows making a quick >start with dumb-terminal software (or an actual dumb terminal). True. I'm planning on making the communication interface a separate unit from the ranging unit. This will allow a choice in output formats without redesigning the whole thing. >If the unit does the conversion from time to distance, have a way to >input the local speed of sound. There could also be a mode which just >outputs the time. I was actually thinking that just outputting the time might be the best all around. Let the end user decide if it's worth the math overhead to do the conversion to distance units. - Rick --- You can help design a Serial Sonar Unit for model robots! Vist http://www.notesguy.com/notesguy for details, or send mail to Rick Dickinson at rtd@notesguy.com