I am using a laser diode to launch light into optical fiber and at the other end of fiber there'll be a photodiode that senses the light signal.
I intend to measure the time between the launch and detection of optical signal. The laser diode is triggered ON from digital pin and photodiode sensed signal is fed into analog pin of arduino uno.
Is there any function which can be used to measure time between the launch of signal and its detection??
How long is the time you hope to measure (or what is the length of the optical fibre)? Arduinos aren't really suited to measuring very short times but if your optical fibre is several hundred km long you might have a chance.
and photodiode sensed signal is fed into analog pin
It takes 104 microseconds for analogRead() to read the input to the pin. Unless your fiber optic cable loops around the entire solar system, that time will distort any measurement you come up with for the speed of light.
Using a phototransistor, and an interrupt on a digital pin that the phototransistor would mean that you only needed to wrap the fiber optic cable around the earth a few times to get meaningful times for calculating the speed of light.
slipstick:
How long is the time you hope to measure (or what is the length of the optical fibre)? Arduinos aren't really suited to measuring very short times but if your optical fibre is several hundred km long you might have a chance.
Steve
I am currently using 3 km fiber. I can go upto 10 km long fiber.
If arduino is not that suitable, then what system should be looked upon or what can be the best possible solution for realizing the project??
I do not intend to use the speed-distance formula. I am asking is there any inbuilt watch function inside arduino uno that measures time difference between when digital pin is generating the trigger and analog pin is reading the received signal??
When the light is emitted, you start a timer counter, and as soon as the photodiode detects the arrival of light, you trigger an interrupt and stop your timer.
ard_newbie:
When the light is emitted, you start a timer counter, and as soon as the photodiode detects the arrival of light, you trigger an interrupt and stop your timer.
ard_newbie:
When the light is emitted, you start a timer counter, and as soon as the photodiode detects the arrival of light, you trigger an interrupt and stop your timer.
Thanks for the input. Any specific function for timer??