timing interval between two ttl positive pulses

Thread Starter

davidjohnhills

Joined Oct 8, 2017
69
I need to know the time interval between two 5v ttl positive pulses (@approx. 1/10 second apart)
I was considering charging a capacitor then measuring voltage with the a to d on the microcontroller.
then use the mc to work out how long it took to charge it.

is there a better/simpler way?

thanks

David
 

Reloadron

Joined Jan 15, 2015
7,857
A scope or time interval counter is the common way. The problem with using your suggested method is I doubt you will get any accuracy. Lacking a scope or time interval measurement counter there are some inexpensive micro-controllers which with some minor programming would measure the interval between two pulse where the first pulse event is noted as a time and the second as a time and subtracting T1 from T2 yields the time interval.

Ron
 

AlbertHall

Joined Jun 4, 2014
12,619
A scope or time interval counter is the common way. The problem with using your suggested method is I doubt you will get any accuracy. Lacking a scope or time interval measurement counter there are some inexpensive micro-controllers which with some minor programming would measure the interval between two pulse where the first pulse event is noted as a time and the second as a time and subtracting T1 from T2 yields the time interval.
Seconded, especially as TS is already intending to use a uC for the ADC.
 

Thread Starter

davidjohnhills

Joined Oct 8, 2017
69
If I want to give the capacitor charging method a try, are there any IC's that would do the donkey work of switching the charging on and off with little leakage? and then discharging the cap for the next pair of inputs.
 

dl324

Joined Mar 30, 2015
18,220
If I want to give the capacitor charging method a try, are there any IC's that would do the donkey work of switching the charging on and off with little leakage? and then discharging the cap for the next pair of inputs.
Google sample and hold or peak detector.
 

nsaspook

Joined Aug 27, 2009
16,251
If I want to give the capacitor charging method a try, are there any IC's that would do the donkey work of switching the charging on and off with little leakage? and then discharging the cap for the next pair of inputs.
Sure, a PIC with the CTMU module.
http://ww1.microchip.com/downloads/en/DeviceDoc/61167B.pdf


It's capable of sub-nanosecond timing of A -> B time internals.
Example: https://forum.allaboutcircuits.com/threads/light-link-system-tester.114228/
 
Top