# Measuring time with arduino

Hi,

The system is like this.
Arduino 1
using the start button the arduino 1 will transmit signal and also a timer will start.

Arduino 2
the arduino 2 will receive the transmitted signal by arduino 1 once the arduino 2 received the signal it will transmit another signal back to the arduino 1.

Arduino 1
the arduino 1 will received that signal then stop the timer. Then the arduino 1 will determine the time.
then using formula we can get the distance.

I have used arduino uno for this. But i coud not do because it was unable to measure nano seconds.
My range is around 500 meter.
By which microcontroller i can do this.

pAbel:
then using formula we can get the distance.

Everything was going fine until you got to that point.

Think about how far radio waves or light goes in 62.5 nano seconds. Then think that an Arduino cannot send, receive and re-send a signal in anything like a single clock cycle. You could measure how long it takes an Arduino to do stuff. But there is no prospect of measuring distance between two of them.

Maybe you could have a GPS receiver on both Arduinos.

...R

Think about how far radio waves or light goes in 62.5 nano seconds.

That is an assumption not based on fact. OP did NOT say how the signal was getting from one Arduino to the Arduino.

Not that the assumption isn't realistic, unlike OPs expectations...

The time resolution of a radio channel is related to the modulation bandwidth, not the carrier frequency,
so for a 25kHz channel that's approximately 2km per radian of phase difference, which isn't great.

Clearly to measure time delay well you need a highly accurate phase measurement, typically
by using correlation techniques, and a high bandwidth to start with. GPS can use this to get close
enough to be able to count carrier transitions too for extra precision (I'm glossing over the
details because I don't really know them!)

Radar techniques use very wide bandwidth signals (10's to 100's of MHz) to get good time resolution
by using a short pulse (or it can be a chirp).

The Arduino Leonardo/Micro processor (32U4) has a timer with a 64 MHz clock. Still not nanoseconds (1000 MHz) but closer than 16 MHz.

Hi,

I thought to use external timer. I found an timer IC for this. MAX35103 time to digital converter. It can measure in nanosecond range. Here the datasheet link is attached. I am unable to decide that it can measure or not. Please help me.

https://datasheets.maximintegrated.com/en/ds/MAX35103.pdf

That device is designed for ultrasonic flow meters. You might be able to use it for radio time of flight but the minimum time is 8 microseconds. The speed of light is about 300 million meters per second. That's 300 meters per microsecond. You won't be able to measure anything closer than about 2.4 kilometers.

The accuracy is 20 pS so if you can work around the 8 uS minimum you should be able to get 6mm accuracy in your distance measurements (0.3 mm per picosecond).

Hi

I want to use TDC7200 as an external timer. will this be perfect for this application?

pAbel:
Hi

I want to use TDC7200 as an external timer. will this be perfect for this application?

Depends on the medium the 'transmitter' and 'receiver' are operating.

There seems to be an assumption that your using radio frequency transmitters and receivers but you have not actually said this.

Now if you were measuring the time it takes sound to travel 500M in air, you might have a chance with an Arduino.

pAbel:
I want to use TDC7200 as an external timer. will this be perfect for this application?