Hello, I am trying to come up with a very simple passive sonar design that could be used to determine the direction of arrival of an ultrasonic sound pulse. I was planning on having 3 or 4 hydrophones each connected to a comparator circuit so that when the wavefront of the ultrasonic pulse reaches a particular hydrophone the output of that hydrophone's comparator goes high.
I was thinking that I could attach these comparator outputs to the digital pins of an arduino and use the arduino to calculate the time difference between each of the digital pins switching to a high input. I think I could figure out how to calculate the direction of arrival after that point, but I am unsure how to get the exact times at which the input pins go high. Because the speed of sound is very fast in water ~1500 m/s, I believe the timing would need to be accurate to approximately 30 microseconds or so. Does anyone have any ideas on how to measure the time at which digital pins go high very accurately?