Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

High frequency precision counter/timer

Status
Not open for further replies.

Bluesbird

New Member
A project I am working on requires timing a delay which ranges from approximately 30-1000 nano seconds. Ideally, resolution of 1ns would be great.

By my calculations, if I do this using the microprocessor, I would need one running at 1 Ghz :shock:

Does anybody have any suggestions on how I can time such short delays accurately?
 
Exactly. I'll be using a microprocessor anyway, so the easiest way would be using that, but I assume the speed will be limited by the mpu frequency, even if triggered from a faster external clock?
 
Bluesbird said:
Exactly. I'll be using a microprocessor anyway, so the easiest way would be using that, but I assume the speed will be limited by the mpu frequency, even if triggered from a faster external clock?

To get 1nS resolution you require a 1000MHz clock (1GHz), use the pulsed signal to gate the oscillator ON, just for the duration of the pulse. Feed the output of the gate into a chain of counters, and increment them with the 1GHz oscillator - after the pulse has finished the counters will contain the width of the pulse in nS.

The problem is the speed involved, standard TTL is usually 50MHz maximum, so you're probably looking at fairly exotic devices (if you can find any?). I seem to remember ECL chips used to work at pretty high frequencies? - bear in mind it's only the first ones that need to be fast, if using decade counters the third one is already down to 10MHz.

What actually are you trying to measure?, perhaps there may be a simpler way of doing it?.
 
Use the pulse that you are trying to measure to generate a linear ramp. The voltage at the end of the pulse can be held long enuf to feed an A/D. The voltage is a measure of the pulse width. This is the idea:

I don't know why the picture doesn't show, it previews OK.
 

Attachments

  • ramp_ckt.jpg
    ramp_ckt.jpg
    197.6 KB · Views: 1,028
Thanks for the ideas. I'm wanting to measure the time-of-flight of a radio signal over ranges of up to 100 metres.

Russlk, that idea is similar to what I had in mind, but I wasn't too sure if I could obtain the accuracy I require.
 
Nope, it is similar to what GPS does though. I'm wanting to send a message. then time how long it takes to receive a reply, so I don't need to synchronise the clocks.

Russlk, I've been thinking a bit more about your suggestion, and presumebly I would want to control the discharge time from a microcontroller? Won't the resolution then be limited by the microcontroller frequency?
 
No, the micro is measuring the voltage to determine the time delay. You will have a sample and hold circuit to hold the voltage as long as the measurement takes. Of course, when dealing with nanosecond times you have to know all the delays in the system that are not part of the measured time.
 
I read somewhere that a CPLD can be used to implement a high-frequency counter - does this make sense to anybody?
 
Perhaps I'm aiming a little high. If want accuracy of +/- 1m, a 300Mhz counter would be sufficient. Lattice have a CPLD which operates at up to 400Mhz, while Xilinx claims 'upwards of 200Mhz'.
 
Nigel Goodwin said:
To get 1nS resolution you require a 1000MHz clock (1GHz), use the pulsed signal to gate the oscillator ON, just for the duration of the pulse. Feed the output of the gate into a chain of counters, and increment them with the 1GHz oscillator - after the pulse has finished the counters will contain the width of the pulse in nS.
I've been considering this very method, but hit a snag. The timing will be controlled by a microprocessor (running at 20Mhz for example) to start and stop the counter. If I use an external ECL counter running at a much higher speed, the net effect would be the same as using the mcu counter, multiplied difference in clock speeds eg x50 for a 1Ghz counter. The only effect that the external high-speed counter would have is effectively incrementing the counter by 20 instead of 1. The resolution will still be limited by the mcu in other words :? The same would be true of the linear ramp suggestion from Russlk, would it not?
 
Bluesbird said:
Nigel Goodwin said:
To get 1nS resolution you require a 1000MHz clock (1GHz), use the pulsed signal to gate the oscillator ON, just for the duration of the pulse. Feed the output of the gate into a chain of counters, and increment them with the 1GHz oscillator - after the pulse has finished the counters will contain the width of the pulse in nS.
I've been considering this very method, but hit a snag. The timing will be controlled by a microprocessor (running at 20Mhz for example) to start and stop the counter. If I use an external ECL counter running at a much higher speed, the net effect would be the same as using the mcu counter, multiplied difference in clock speeds eg x50 for a 1Ghz counter. The only effect that the external high-speed counter would have is effectively incrementing the counter by 20 instead of 1. The resolution will still be limited by the mcu in other words :? The same would be true of the linear ramp suggestion from Russlk, would it not?

You don't use a micro to control the counter, you use the actual PULSE to do so, you can use a micro to provide overall control though - enable the counter circuit to let it do a single count sequence, then read the data from the counters. Then enable it again for the next reading.

So the speed of the micro has no bearing on the speed reading.

But, to be honest, the entire project seems EXTREMELY difficult :cry:
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top