Sonar project

Hi,

I have a project that include measuring distance underwater.

Let me explain, my high-school has an ultrasonic dispositve that you can plug into an oscilloscope to measure time-differences between the signal that is sent to a piezo-transducer and then there is another sensor that received the signal once it has bounced on the surface. This sensor sent another signal that is shown on the oscilloscope.

I would like to use an Arduino UNO R3 to determine the time difference between the signal that is sent and the received one. Furthermore I would like to store this time difference on a SD card. Then in a third time, I would like to use a motor servo to move the sensors to scan the environment under water in 3D.

To measure the time difference I have two ideas and I would like to know which is the easiest. Either, I sample the two signals with the arduino and I store them on the SD card, processing them after on Python. (I don't know if I can sample two signals at the same time, maybe sampling the received signal is enough). But I would rather measure directly the time difference between the two signals with the Arduino but I don't know how to do it since I am new on the Arduino platform.

I have bought a RTC/SD card module and an Arduino UNO R3. I don't know if the Arduino can handle that much tasks at the same time but I hope so. The most important thing would be to measure the time difference between the two signals (the sent one and the received one) the easiest way possible, if it is duable.

I hope that you will have answers to my questions.

Thank you for your time

How does the scope output look like? Does it look like a broad profile?

A sonar pulse can be reflected multiple times, from multiple locations (ground, fish, submarine...), so that you do not normally get a single received pulse. If you want to analyse the received signal, show it on your scope.

I don't know if I can sample two signals at the same time, maybe sampling the received signal is enough

The Arduino does one "thing" at a time.

You need to start at the beginning, and learn Arduino basics. Study the examples that come with Arduino: learn to read a switch, for example, and time how long it is pressed using a state machine. Example tutorial

Ok, thank you for your answers. I will look to protocols online to become familiar to arduino language. I do know Python but Arduino is new and more difficult. I'll let you know about the progress on my project. Again thank you.