Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Trying to synchronize two separate data recording devices

Status
Not open for further replies.

Naveen93

Bioengineer
May 11, 2015
7
Apologies if this is the wrong place for this question or if I'm too ignorant in this area. I am a bioengineer (admittedly, I recently graduated but I am now working in industry) looking to help my team in a project that requires some electrical engineering help. I'm out of my element here, but I'm still looking to find a solution because I feel like our task doesn't seem too complex, at least conceptually.

I have two devices that are each recording distinct data. The hardware and software are both completely unrelated and unable to communicate with each other. Both devices output an analog voltage that varies between +/- 10 V into the computer, which is then calibrated by each respective software to calculate the desired parameter. But while I am recording these two separate parameters with their own devices, the data is related and ideally I would want to synchronize the time domain of each data set so I can try to find any correlations. I want to be able to easily and accurately start and stop data collection at the same time.

I've had a few ideas of how to go about doing this. The first one seems crude, but it is at least something that makes sense to me conceptually. When Device 1 starts recording Data Set 1, it automatically creates a data file in a specified folder. The way Device 2 records Data Set 2 can be controlled in MATLAB. So I was thinking to write a MATLAB script where it scans the folder from Device 1. The instant it recognizes that a new file has been added (marking the start of data recording from Device 1), the script will tell Device 2 to start recording Data Set 2. Again, this seems crude and I'm not sure how precise this strategy would be in matching up the times.

The other idea I've had is definitely out of my element. It seems like it would be more effective, but I'm not sure how to go about implementing it. A colleague was discussing something about a separate product they were using that uses a TTL signal to synchronize data from different programs. The way the described it was that both programs begin data recording manually at different times, but the data recording devices actually aren't outputting any voltage until you hit a switch on an external trigger. So while technically data is recording asynchronously, essentially both data sets are "paused" at T=0 until you hit a switch. This concept seems ideal to me, but again, I have no idea what kind of equipment or connections I would need to carry it out.

Thank you for any help, and I apologize if this post is not well-suited for this forum.
 
Replies continue below

Recommended for you

Is there any reason to retain the respective analog to digital conversion boards? There are lots of boards on the market that can be timetagged. Your PC idea is open to problems with latency within the PC, so unless your synchronicity requirements are very loose, that would not be an ideal case. Your latter approach leaves uncertain what the actual timing of the samples are with respect to each other, i.e., how well synchronized are the sampling times; are they even sampling at the same rate?

TTFN
faq731-376
7ofakss

Need help writing a question or understanding a reply? forum1529


Of course I can. I can do anything. I can do absolutely anything. I'm an expert!
There is a homework forum hosted by engineering.com:
 
Can you tell us what you're measuring and what the rate(s) is(are)? A lot of EEs here have extensive and broad experience and would have good intuition on what would work and ideas about how to accomplish it. For instance I've had to do controllers for derivatizers that work with high performance liquid chromatigraphs, and also for pipe line leak detection via time-of-flight measurements between remote locations that had severe synchronization requirements over large geographic distances.



Keith Cress
kcress -
 
Based on Paragraph 3, it sounds like a fairly lose requirement and slow sampling. This is an assumption. If true, then...

One might simply increase the sample rate so that samples from each channel are within a few milliseconds of each other.

The time tagging approach suggested by IRstuff is better in the general case.

 
Your software sync could typically be accurate to about 10 ms. Unless something else is writing to the hard drive, then it could be a several second delay. Or Windows decides to check the internet for updates, and then it could be 30 seconds+. On a tightly controlled PC you can do it; if other applications are running it gets much trickier. PCs aren't real-time.

We often correlate logs with data taken at 5 second intervals.

Z
 
If you have two independent data sets (which really seems unnecessary with cheap date acquisition available today), you should record a time stamp with every data point. Then you can correlate the data using Excel, if nothing else.
 
I'm mechanical, so I would just cheat. Have one kill switch for both inputs, flip it on/off as desired, use the blank data in between as a placeholder.
 
It's not uncommon on older systems to overlay a timing pulse right over the data. You might have seen pictures of old fashioned chart recorders where there are regular blips that interrupt the data.

 
Thanks for the help everyone. For the time being, my simplistic MATLAB solution works well enough.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor