Let's Make Robots!

Nanosecond timing-too fine for the hobbyist?

I recently got involved with an idea that requires timing down to nanoseconds registered across serial Rx. That's a little smaller resolution than an Arduino pumping at 16Mhz can provide. The thing is, I'm having trouble turning up any resources on line that would let me design and build a peripheral device short of a caesium fountain-maybe a little beyond what I could rig on the bench, but maybe I'm just not searching right. In any case, I throw it out to my wiser brethren in the fold-is there an off the shelf module compatible with Arduino or ARM cortex serial lines that will trigger off of a high signal and give accurate (if occasional, obviously) nanosecond interval readings, or is there an accessible method of building a circuit to produce that fine of a timer on a pcb you could attach to a gerbil* without killing it?

*This is just an example of size and weight. I have no intention of working with stinky rodentia.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Just curious. Also, he might have been onto something and it's always nice to be able to said I heard of this back then...

Just in case he revolutionizes physics or something.

It's all going to be down to what the oscilloscope can see at this point. Incidentally, doing a little further research into this I found out that your standard 3.4ghz Intel i5 is still really only running at 200mhz, but since it has seventeen parallel processors pumping off the same clock they call it 3.4ghz. In other words the clock signal still never gets faster than 5ns periods. I remember Steve Jobs always talked about the "megahertz myth" when comparing Intel to Motorola, but I think he was talking about DDR memory at the time.
I've never trusted the advertising numbers for processors. There are too many ways to justify higher numbers if one wants to.

All right, I know this is an old thread, but does anybody know how fast it takes for a single instruction to be executed?

I'm using these compute times for reference.

It would take some knowledge of assembly, but couldn't you just make a simple loop for a single instruction that you knew the computation length of time of, told it to continue looping until some input linked to whatever action you were performing (laser beam hits a sensor, sensor sends the "interrupt" signal to processor) stops it, then used the number of completed loops times the length of time needed to perform that calculation to give us length of time?

You'd be off by about 3/4 a nanosecond if the signal interrupted a loop in the middle, but it'd get pretty close, wouldn't it?  Just a thought.

To build a counter that runs at 1 GHz frequency you need to build a few flip-flops using high frequency transistors. Try to search a schematic of a TTL flip-flop and build a prototype with as short as possible connections - keep in mind that the electrons travel like 30 cm in a nanosecond.

After the first flip-flop you will have 500 MHz, the second 250, next one 125, next one 62.5 and next one 31.25MHz then you can put a fast TTL counter.

You also need a latch built on a similar way to load the value of the counter for you to be able to read both counters at the "same" time.

So, you need per channel 5 flip-flops and a 5 bits latch build with high frequency transistors and one fast TTL counter and a latch.

You also need a high frequency light detector.

Maybe some kind of interferometer will be best suited for that project.

That I don't think we will need.  The way I understand it, he's not interested in triggering anything with the light beam(s.)  The idea is that there should be a difference between two simultaneously started clocks by putting one in the vicinity of the light tunnel-in other words that he can effect "Frame Dragging" with the circulating beam of light.

A few flip-flops, some gates, binary counters and a FAST oscillator is all it takes to build a device that will allow you to measure nS pulses.

Unfortunately to measure down to 1nS will require a 1Ghz clock, and some fast logic chips. Working with GHz signals on a breadboard requires some extra care. (if at all possible)

Now, when you have something that works, I would really like to see how you did. I hacking on some Arduino LSA (Logic State Analyzer) code where I could use some sort of reference clock to tune the timings against...! (otherwise I will have to spend some weekends at the electronics workshop located down stairs my office, I bet a six-pack or two can do wonders there)


Oh well, my patience ran out. I have just ordered a Rigol DS1052E DSO. I should be precise enough for my needs. (but most likely way too slow for Maxhirez's friend's project)

At the 1GHz level I think you would be wasting your time with breadboards. Capacitive and inductive reactance are prportional to frequency.

If Max has any hope of accurately measuring such events then a well designed PCB is a must with the tracks being no longer than absolutely necessary. It may also need some RF sheilding to prevent legal complications.