7 years, 4 months ago.

Sample simultaneously using external ADC

I'm new to using and programming mbeds. I read somewhere that it is possible to sample two simultaneously using the mbed and an external ADC but i haven't seen anything online on how to do so. Please can anyone help?

How simultaneously should it happen? What is the maximum difference in sample time?

posted by Erik - 29 Nov 2016

I want to get the time difference between the signals received in different elements of a microphone array, so sampling needs to happen exactly simultaneously in order to be accurate

posted by Muyiwa Obichebendu 29 Nov 2016

1 Answer

7 years, 4 months ago.

It is never exactly at the same time, so you will need to determine how much the maximum time difference is. It might also be easier to just compensate for the delay in your digital signal processing.

One option is if both your MCU and the ADC have an external trigger input, to use that to start the conversion. Alternatively just use two external ADCs if they both have an external trigger input, or can both be started at the same time using a different method. But this will depend on the used ADC.

The time delay I'll be measuring will be in milliseconds. How exactly do I go about compensating for the delay?

posted by Muyiwa Obichebendu 30 Nov 2016

You probably use some kind of algorithm to determine the phase difference between the microphones of your array. A delay will simply give an additional phase difference (depending on the frequency of the sound).

But if you are measuring milliseconds delay, take into account a properly used built-in ADC of most mbeds should add a few microseconds max.

posted by Erik - 01 Dec 2016