Eddie has an interesting writeup about his experience playing around with echo location. He uses a cheap computer speaker and microphone for all of the measurements. The program he wrote generates a sweeping chirp from 5-20kHz in the space of 4.5 milliseconds. Eddie knows what a perfect echo would look like so he can compare the measured values to the theoretical to determine the distance. For his final test he moved the box while it took 150 measurements. This data generated a parabola showing where the object was in the room. Have a look at his site for more details and his code if you are interested.