find an old Polaroid autofocus camera and use the "sonar" module from it. i once worked for a company that made automated test equipment, and one of the things we built while i was there was an automated tester for the sonar modules... it had a "start" input which came from the shutter switch, and a control output that went to the lens motor. it started the motor when the shutter switch was pressed, and at the same instant it sent out a ping. when the ping returned, it stopped the motor. the motor turned at a constant speed, so the dwell time was equivalent to the distance the ping traveled, and the lens would be in focus for that distance. there were a lot of those modules on the hobby market years ago after film cameras went by the wayside, but i don't know if there are still any around. in any case, the motor output would be "on" from the time of the ping to the first strong return, and that amount of time would be easily measured with a frequency counter in "time" mode. or the gate time could be measured by a microcontroller and spit out the actual distance.