Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20688 Discussions

transfer Analog to Digital (count time between two pulses)

Altera_Forum
Honored Contributor II
1,526 Views

Hello guys, 

 

I hope everyone doing alright, i got a project that i am starting to work with and want to get your advice. 

 

I have laser pulses and i want the FPGA to count the time between two pulses .  

 

in my mind and correct me if i am please, i will have convert the analog signal to digital signal in order to count the time from laser pulses. 

 

i want to know if there is any guide or paper or sample code that my help me understanding and start doing my task  

 

 

i hope i can get you help  

 

have nice day
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
417 Views

 

--- Quote Start ---  

 

in my mind and correct me if i am please, i will have convert the analog signal to digital signal in order to count the time from laser pulses. 

 

--- Quote End ---  

 

Why bothering with an analog signal when you can implement a simple counter which gets latched then resets when a pulse is detected? 

FPGAs are digital devices and they feel more confortable when everything is digital ;-)
0 Kudos
Altera_Forum
Honored Contributor II
417 Views

what i have is an analog signal coming out of my laser. 

 

I am trying to make everything digital for my FPGA ;). 

 

so lets make my question simple; 

 

how to to convert from analog to digital mr.Cris72
0 Kudos
Altera_Forum
Honored Contributor II
417 Views

You definitely need an external ADC (Analog to Digital Converter). The FPGA itself (at least those supplied by Altera) can't manage analog signals. 

What type of laser are you working with? I'm concerned the pulse modulation signal is not available as a digital signal.
0 Kudos
Altera_Forum
Honored Contributor II
417 Views

Depends on the intended time resolution. Timing measurements down to about 1 ns can be implemented with pure digital methods, e.g. using SERDES blocks, possibly with mutiple phase shifted clocks.  

 

For high resolution timing mesurements, e.g. 10 ps or better resolution, there's no straightforward solution with FPGAs. You find TDC (time-to-digital converters) utilizing logic gate delay described in literature, also with Altera FPGA. See previous threads in the Altera forum. But these designs are fighting various problems like unpredictable and hard to control routing delay. 

 

Referring to state-of-the-art external TDC circuits might be the easier approach.
0 Kudos
Altera_Forum
Honored Contributor II
417 Views

 

--- Quote Start ---  

Hello guys, 

 

I hope everyone doing alright, i got a project that i am starting to work with and want to get your advice. 

 

I have laser pulses and i want the FPGA to count the time between two pulses .  

 

in my mind and correct me if i am please, i will have convert the analog signal to digital signal in order to count the time from laser pulses. 

 

i want to know if there is any guide or paper or sample code that my help me understanding and start doing my task  

 

 

i hope i can get you help  

 

have nice day 

--- Quote End ---  

 

 

1. You need to confirm if the analog pulses can feed to FPGA directly firstly; 

2. If item 1's answer is not, so you should shape your pulse before feeding to FPGA. You can refer CFD function. 

3. After shaping, the pulse feed into FPGA, and you can measure the pulse by using fpga-based TDC. You can refer my bloghttp://bbs.ednchina.com/blog_article_3009674.htm, but it's written by Chinese. 

 

Overall, your task is typically of time measurement.
0 Kudos
Altera_Forum
Honored Contributor II
417 Views

thanks you guys , 

 

i am using parallax laser range finder. and according to mr.FvM , i want to be really high timing resolution.  

 

if you could guide where i can find if the analog pulses can be feed to FPGA, in my understanding yes i can but i just wanna make sure. 

 

i am using DE2-115  

 

most of the answers about using TDC. 

 

thanks my friend for the blog but don't speak Chinese
0 Kudos
Reply