Help - Search - Members - Calendar
Full Version: Soundcards sampling accuracy
Hydrogenaudio Forums > Hydrogenaudio Forum > Scientific/R&D Discussion
Mark0
Hi!

Hope this is the right section / forum.

Let's say that, for a sort of DIY project, I was thinking about turning some kind of signal into an audible form, so that I can pick it up with a microfone, sample it and then do some time measurements in the resulting recorded samples stream.

My concerns is this: I keep hearing people saying that this can't be done, due to the intrinsic latencies and inaccuracy of the PC+sound card system.
As I see it, only issues may come from aliases due to eventual internal resampling done by the soundcards HW. But if I sample at the right freq (i.e., 48KHz for the typical resampling SB), I think I sould be OK.
That is: for example, if I determine a "samples distance" of 12000 samples @ 48KHz, can I certainly say that equal to 250msec?

Any more knowledgable opinions & insinghts are very welcome!
Thanks,
Bye!
pdq
Since sampling will be controlled by some kind of crystal oscillator, I would think that, given the quality of crystals these days, the accuracy will be a small fraction of one percent, but for sound card use they are not going to bother making it accurate to a few parts per million. Timing jitter, the variability in timing from sample to sample, will be somewhat worse but still plenty good enough for many applications. What sort of requirements do you have?
Mark0
QUOTE(pdq @ Oct 9 2007, 15:30) *

Since sampling will be controlled by some kind of crystal oscillator,

OK! So what, in the end, make the accuracy of the system is just that piece "at the start of the chain".

QUOTE
I would think that, given the quality of crystals these days, the accuracy will be a small fraction of one percent, but for sound card use they are not going to bother making it accurate to a few parts per million. Timing jitter, the variability in timing from sample to sample, will be somewhat worse but still plenty good enough for many applications. What sort of requirements do you have?

Basically, I was thinking about an "el cheapo" way to make some measurements on mechanical watches accuracy / drift. Record 30 seconds or some minutes of it, then process the samples stream & do some countings. I see that there's pro equipement that use 28.8KHz quartz for similar measurements, so I was thinking that it could be doable with a 44.1 or maybe even a 96KHz sampling soundcards.

Bye!

pdq
Hmm, that really would require measurement down to a few parts per million. You could calibrate your sound card against a known accurate source, such as a good watch, but you would probably need to do that just before/after the watch being tested because of drift in frequency. What I would do first is make repeated measurements of a good watch to see what the drift and repeatability are.

As far as resolution, assuming that you can detect the start of each "tick" to within a few samples (shouldn't be difficult) then to get ten parts per million resolution (~1 second per day) you would need several hundred thousand samples, call it one million. At 48 kHz that's a little over twenty seconds.
Mark0
Many thanks pdq!
Bye!
AndyH-ha
There is more than one factor involved. How accurate is the oscillator has been asked, but not resolved. There is also the fact that frequency is never stable over time; it varies with temperature. Laboratory devices have the crystal in a temperature controlled “oven” to keep it stable.
Mark0
Thanks for the info!

Bye!
Woodinville
Oh, you need highly calibrated clocks. Never mind. Sorry. (this post can be deleted)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.