Are you working with the indoor or the ruggedized Polaroid transducer? The indoor (the round black mesh-looking one) has a lot better gain, but doesn't like being splashed alot. The outdoor is elipsoid-shaped and has a more focused pattern. In any case, you have to be careful of: The ringing of the input signal after sending the sonar pulse (You must blank for x amount of time.) targets that will bounce back an even stronger signal. (sometimes) signals from other transducers firing in the same frequency. broadband sonar noise -- Try shooting white noise ala air brakes or an air hose nearby and watch a real strong echo. Both frequency and voltage on the output transducer are critical with rather narrow bands. I've got a patent in that field and had so solve a lot of stupid little problems to get the devices to work reliably. (PIC C57 which also powered the RS-485 network.) You can get more accurate than a foot -- Ours is running .6 inches reliably. I'd like to get more detailed with code, etc. but I'll bet our customer would get reasonably upset. Tom ---------- From: pic microcontroller discussion list on behalf of Frank B. Scalzo Sent: Friday, July 12, 1996 11:32 AM To: PICLIST@MITVMA.MIT.EDU Subject: ultrasonic ranging I am working on a project that needs to find the distance to objects. Currently I am using using a PIC16C84 as my controller. I'm using 40kHz transmit and recieve transducers from polaroid. I am driving the transmit transducers by attatching one of it's leads to RA1 and the other to RA2. In my code RA1 is always the opposite of RA2 and I switch them at 40kz 20 times, to make an outgoing train of pulses. My reciever transducer has one pin to ground and one to a 2 transister amp (2n2222's). I am having problems with range, I fear recier amp is not strong enough, but if I increase it's gain, I detect ghost (false) signal returns. Any suggestions to improve my design? I want a range of 2-15 feet accurate within only a foot. Also,does anyone know of a way to narrow by field of detection. My current design detect objects off to the side.