I am a mechanical engineering student in the beginning stages of my capstone project. For this project my group and I are building an electronic target system. We will be using time difference of arrival (TDOA) and multilateration to determine the location of the bullet's impact on a target.
Currently, I have an audio detector which ouputs a logic high when a loud enough sound occurs. The idea is that the pressure wave from the bullet will trigger the audio sensor to output a logic high and TDOA will be used to determine the bullets location. For this project we set a goal of sub 1 mm accuracy when it comes to locating the target hit location. Using the dimensions of our target and an accuracy of < 1mm I determined that the minimum time difference of arrival between two sensor will be about 5 microseconds.
Now, as for why I'm posting on the forum. I would like to use a hardware timer on the Teensy 4.1 to timestamp the arrival of a rising edge signal. There will be at least three rising edge signals arriving at three different pads on the Teensy. The more accurate the timestamp the better, ideally under 0.5 microseconds. Additionally, latency isn't necessarily a big concern when it comes to timestamping the rising edge as long as the latency is the same every time. I only care about the difference in arrival time.
I have done a lot of research looking for code which I could adapt to my use. I've pieced together different code snippets with some very minor success. However, I don't believe my implementation is very well done and I think I will struggle to scale the code to work with multiple sensors ( I only have one audio detector at the moment). I think I have a good understanding of how to handle my timestamps after they have been recorded.
So, in conclusion, I would really appreciate some help in writing code which will timestamp the rising edge signal with a high degree of accuracy, less that 0.5 microseconds if possible.
Currently, I have an audio detector which ouputs a logic high when a loud enough sound occurs. The idea is that the pressure wave from the bullet will trigger the audio sensor to output a logic high and TDOA will be used to determine the bullets location. For this project we set a goal of sub 1 mm accuracy when it comes to locating the target hit location. Using the dimensions of our target and an accuracy of < 1mm I determined that the minimum time difference of arrival between two sensor will be about 5 microseconds.
Now, as for why I'm posting on the forum. I would like to use a hardware timer on the Teensy 4.1 to timestamp the arrival of a rising edge signal. There will be at least three rising edge signals arriving at three different pads on the Teensy. The more accurate the timestamp the better, ideally under 0.5 microseconds. Additionally, latency isn't necessarily a big concern when it comes to timestamping the rising edge as long as the latency is the same every time. I only care about the difference in arrival time.
I have done a lot of research looking for code which I could adapt to my use. I've pieced together different code snippets with some very minor success. However, I don't believe my implementation is very well done and I think I will struggle to scale the code to work with multiple sensors ( I only have one audio detector at the moment). I think I have a good understanding of how to handle my timestamps after they have been recorded.
So, in conclusion, I would really appreciate some help in writing code which will timestamp the rising edge signal with a high degree of accuracy, less that 0.5 microseconds if possible.