I need to be able to measure distance underwater between two points. So I'm thinking something as simple as a sonar should work. One sends a ping the other one receives it and replies back. Is this approach feasible? Can anybody recommend sonars I can use?

This is going to depend a lot on what range you need. We're looking at these modules for our ROV: http://www.ebay.com/itm/Waterproof-Ultrasonic-Sensor-Distance-Measuring-Module-/280721354139?pt=LH_DefaultDomain_0&hash=item415c4bed9b, but they only have a range of 30cm to 3.5m.

Posts have been sugesting single ended range finding equipment.The original question was about measuring the distance between two intelligent co-operating devices.

Sound travels well in water so 150ft should not be an issue.What you need is a device that transmits a sound and another device that detects it.The sounds should probably be at frequencies that travel well but don't occur in the background, and both devices should use different frequencies (to avoid a sender receiving a reflection or echo of its own signal).

Device A transmits a sound and starts a timer. Device B detects the signal from A and transmits a sound in reply. Device A detects the reply from B and stops the timer. Device A then subtracts a figure from the time to allow for processing, divides by two and, using the speed of sound in water calculates, the distance.

Most of the time I think this would work quite accurately. In special circumstances where A and B are at different depths the sound might be blocked by a boundry in the water. Boundries between hot and cold water (thermoclines) and salty and fresh water (haloclines) can be sharp and visible so I would be surprised if they do not affect sound and perhaps trap it within a layer.

You're right on the money as far as your conceptual model. This is how UUVs guide themselves, as well as how we track tow fish for surveying. A common commercial system is listed below. Unfortunately sonar circuits are well beyond my level of electronics, so I have never done anything with arduinos, but would love to see it done!

You biggest problem may be finding an ultrasonic transducer that is designed for underwater use, which is not the same as being waterproof. Water is very stiff compared to air, so it needs a completely different type of transducer, otherwise you get very poor coupling between the transducer and the water. Google for "underwater ultrasonic transducer" and in the UK you find two suppliers offering the Prowave 200LM450.

Once you have a suitable transducer, you will need to assemble some electronics to send a pulse to the transducer and amplify and receive the returned signal. The Prowave operates at 200KHz, so you can't use ordinary low-frequency op amps to do the amplification.

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.