Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accurate time stamping?

Status
Not open for further replies.

gangmei

Electrical
Mar 7, 2003
8
0
0
US
I need to design a data acquisition system with time stamping capability and the accuracy should be at least uS level. But the RTC chips I found can only count to seconds.
Any good suggestion?

Thanks.
 
Replies continue below

Recommended for you

Do you want to measure the time relative to the local time
or relative to some timing signal ? 300 m ( about 1000 Ft )
difference in location will cause 1uS difference !!
Solar or sidereal time ?

Is this a school project ?


<nbucska@pcperipherals.com>
 
Maybe I exaggerated it. I think 100uS or 1ms is OK too. But I can not even find any sub-second RTC.

It is not school project, it is for my work.
 
Maybe I should explain my application in more details, my mistake.
We are trying to build a high-speed wireless sensor which can transmit real-time sensor data to receiver at 100KSPS (12-bits per samples). We also want it to have a time stamping capability with precision at least to 1 millisecond.
Right now I am thinking use the ADuc812 from Analog Device for the DAQ part. And use a SPI-compatible RTC connected to ADuc812 for time-stamping. However, it seems to me all RTC IC can only counts to second, not millisecond. Which is my biggest headche right now.
Since we want to have a small sensor, then GPS-based time stamping maybe not suitable.
 
Have you thought of using a microcontroller? If you arrange for its internal timer to increment successive registers, you can get a clock with a resolution of better than a millisecond and five registers will give you over 24hours. It will show relative or elapsed time - not true time.

This assumes the hardware/software you use for the time stamping is flexible enough to accomodate 5 registers being read serially.
 
Precision and accuracy relative to what?

If you're doing a standalone RTC and you don't want to use a GPS receiver, then you have to live with the consequences and simply take a stabilized crystal time base and free-run the clock.

Your RTC chip is only going to be good for about 1 second a month at best, which means it'll have an error of 30 ms a day, minimum.

I don't understand why you are having this difficulty with the RTC. You must have a controller. Every controller has some sort of timer capability, particularly single-chip embedded processors. These timers usually have resolutions better than 10 uS. TTFN
 
Suggestion: Visit
for features of ADuC812:
8-Channel, 5µs, Self-Calibrating, 12-Bit ADC
Two 12-Bit Rail-to-Rail Voltage-Output DACs
Industry Standard 8052 Microcontroller
///8052 Microcontroller have a timer\\\
8K-Byte In-Circuit Re-Programmable Flash Program Memory
640-Byte Read/Write Accessible Non-Volatile Flash Data Memory
Temperature Monitor
Voltage Reference, Serial Interface Ports, Watchdog Timer,
///Here is a timer\\ Power Supply Monitor, etc
Embedded Download/Debug & Emulation Features

Furthermore, visit
for:
256 bytes of Internal RAM (compared to 128 in the standard 8051).
A third 16-bit timer, capable of a number of new operation modes and 16-bit reloads.
///Here is a timer\\\
Additional SFRs to support the functionality offered by the third timer.
 
Use a common clock for the data sampling and for a long counter. Capture the count of the counter when you make a sample but do not stop the clock or counter at least until you have checked it to a time standard. When you wish to extract the exact time relative to some standard, capture the count again syncronous with the time standard. The difference between the counts is the number of clocks that have passed since the sample until the known time from the time reference. The maximum error of the clock for this duration can be obtained from a detailed analysis of your clock specs. As noted in a previous response, there is an error based on distance from a time standard. This too can be corrected by testing the round trip communication delay between the standard and your system and removing the part of communication delay from the standard. If you can use the sampling system to sample a known pulse from a time standard, then the calculation of exactly when a sampled event occured is relatively easy and even analog delays are mostly compensated for as well. At the speed of light, this is about 1 nsec per foot but slower through wire or fiber.
Good luck.

 
Actually, some cables do better than fiber in that department. The speed of light in the typical fiber is about 70% of that in a vacuum. The velocity is related to the index of refraction n = c/v where c is the speed of light in a vacuum and v is the speed in the fiber. n for typical fiber is about 1.47
The index of refraction being high in fiber is what keeps the light in the fiber.
 
Small, but annoying point.

Please!! mS and ms are not the same thing!

mS is milliSiemens, a unit of conductivity (Siemens formerly called mhos).

ms is milliseconds, a unit of time.
 
Status
Not open for further replies.
Back
Top