EmbDev.net

Forum: µC & Digital Electronics nsec-resolution time measurement with MSP430 or alternatives ?


Author: Juan Solano (Company: JSM) (jsln)
Posted on:

Rate this post
0 useful
not useful
Hello,

I am trying to measure the time between two pulses with a resolution of 
<10nsecs, using a cheap microcontroller.

I know some MSP430 parts (MSP430F51x1) include the Timer D which allows 
a resolution of 4ns, but I do not know of any development kit available.

Anybody has experience with this processor or knows of some other uC 
that allows this kind of time measurement?

Thanks,
Juan.

Author: gpsdo (Guest)
Posted on:

Rate this post
0 useful
not useful
You do not write about the application:
perhaps something like that?
http://www.febo.com/pipermail/time-nuts/2014-Febru...

Author: Juan Solano (Company: JSM) (jsln)
Posted on:

Rate this post
0 useful
not useful
gpsdo wrote:
> You do not write about the application:
> perhaps something like that?
> http://www.febo.com/pipermail/time-nuts/2014-Febru...

thanks for the link, it seems interesting,

however I would like just to use a development kit without added 
electronics, connecting PPS signals to GPIO inputs.

I want to measure time between a number of PPS pulses coming from a GPS 
device as well as some computer synchronized with PTP.

Regards,
Juan.

Author: Uwe Bonnes (Guest)
Posted on:

Rate this post
0 useful
not useful
While the STM32F334 has a timer with 217 ps resolution, it is a pity 
that this resolution is only for output, not for capture, as the poster 
asked.

The Infineon Cortex Parts also have sub-nanosecond timers, but I don't 
know if this resolution can be used for capture. And datasheet download 
still requires a NDA!

You can get about 5 ns resolution with the STM32F405 and bigger parts, 
running the timer at 168/180 MHz or LPC43xx at 204 MHz.

Author: Georg (Guest)
Posted on:

Rate this post
0 useful
not useful
Juan Solano wrote:
> I know some MSP430 parts (MSP430F51x1) include the Timer D which allows
> a resolution of 4ns

You need of course a high clock frequency, but this condition is 
"necessary but not sufficient". Also all other elements must be fast 
enough, e.g. the input to control the capture. I dont believe that this 
is possible, since not all parts of such a processor are GHz fast.

Georg

Author: 6A66 (Guest)
Posted on:

Rate this post
0 useful
not useful
Juan Solano wrote:
> I am trying to measure the time between two pulses with a resolution of
> <10nsecs, using a cheap microcontroller.

Hi Juan,

as to my knowledge all uC using a high relsolution timer do so for the 
OUTPUT of the timer. The TI C2000 series even goes down below 1ns but 
there is no way to do a single measurement with this resolution. Using 
repeated signals one could think about soltions like tuning the timer 
output and comparing the signals.

Another option would be to feed a delayline with e.g. 1ns taps and to 
latch the taps into a register to do the measurement.

rgds

Author: Juan Solano (Company: JSM) (jsln)
Posted on:

Rate this post
0 useful
not useful
Thanks all for your suggestions,

I am now looking into these alternatives which on paper seem to be able 
to cope with high resolution capture timer (less than 10nsec):

- STM32F405 as suggested above

- MSP430F5172

http://www.ti.com/product/MSP430F5172/datasheet/sp...

Regards,
Juan.

Author: ChrisSo (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi Juan,

I have the same problem and just wanted to ask if you have already found 
a suitable solution. I would appreciate an answer.

best reguards Chris

Author: Juan Solano (Company: JSM) (jsln)
Posted on:

Rate this post
0 useful
not useful
Chris,

I have had success with a MSP430F5172 in a Schmartboard:

http://www.schmartboard.com/index.asp?page=product...

I need to do more testing to precisely measure resolution/jitter and add 
a serial port output, but my initial tests seem to work OK, you can have 
a look at the code here:

https://github.com/jsln/msp430-time

regards,
Juan.

Author: Arc Net (arc)
Posted on:

Rate this post
0 useful
not useful
If external ICs are an option than you could take a look at the TDCs 
from ACAM or Maxim:
http://www.acam.de/products/time-to-digital-converters/
or
http://www.maximintegrated.com/en/products/industr...

Author: W.S. (Guest)
Posted on:

Rate this post
0 useful
not useful
Juan Solano wrote:
> I want to measure time between a number of PPS pulses coming from a GPS

In this case I would suggest, to divide the problem into two separate 
problems:
1. measure the raw time span by counting with the available timer of 
your system
2. make a small time analog measurement from the starting edge of your 
signal to be measured to the counting edge of your raw measurement 
clock.

This is rather easy, if you have a small CPLD or a high speed TTL: after 
a reset a open collector shortcuts a resistor+inductivity (in series) to 
ground. This is a simple constant current source.. When the starting 
edge comes, the open collector is released, this rises the voltage on it 
and fron this node a fast diode goes to a capacitor, which is loaded by 
the constant current. When the edhe of your reference clock comes, it 
resets the open collector to ground again the current source. After that 
you have some time to measure the voltage on the capacitor with the 
builtin ADC and then zero out the capacitor to ground , now ready for 
the next measurement.

This is applicable for a small amount of digits, let me say for a time 
span of 20..50 ns with a useable resolution of approx. 5 bits, which 
makes ca. 1 ns resolution in time.

Obviousely, it needs to be calibrated.

W.S.

Author: gg (Guest)
Posted on:

Rate this post
0 useful
not useful
Try the LAUNCHXL-F28027 C2000 Piccolo LaunchPad from ti.
the processor contains a HRCAP module . 300ps reolution on capture.
Search "HRCAP" and youll get more info.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.