Super fast ADC with Esp32

davidoneo
Posts: 3
Joined: Wed Feb 10, 2021 7:50 am

Super fast ADC with Esp32

Postby davidoneo » Wed Feb 10, 2021 8:03 am

Hi!

I am currently working on a project that needs super fast ADC to sample data from analogue sources.
I have currently made a pcb using the TI ADC128S102 and with that I can achive a samplingrate at almost 12Bit/200kHz reading 2 inputs.

But... that is not as fast as I would like it to be and the goal is to get 1MHz reading 4 inputs or higher.
So why you ask? And what will you do with all that data?
Well... I am measuring distance using fixed microphones and calculates the distance and angle of the sound origin. I will know within a couple of milliseconds where the sound is so I can do the analyzis only by collecting the data in an array for the milliseconds that I know will contain the sound. This is also the only thing this esp32 will do so I can have large arrays in memory ready to be used.

Now is there anyone here that know of an ADC I can use? Is there even one with a large enough buffer so that I can tell it to record and then send me the data thru SPI afterwards? I will have loads of time analyzing the data.

Every idea is welcome on how to achieve this!

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: Super fast ADC with Esp32

Postby ESP_Sprite » Wed Feb 10, 2021 9:08 am

...What microphone do you use that has a frequency response that goes up to 1MHz?

Aside from that, you might want to look into I2S. You have 2 I2S channels to which you can connect a stereo codec, for 4 microphones in total.

davidoneo
Posts: 3
Joined: Wed Feb 10, 2021 7:50 am

Re: Super fast ADC with Esp32

Postby davidoneo » Wed Feb 10, 2021 9:34 am

ESP_Sprite wrote:
Wed Feb 10, 2021 9:08 am
...What microphone do you use that has a frequency response that goes up to 1MHz?

Aside from that, you might want to look into I2S. You have 2 I2S channels to which you can connect a stereo codec, for 4 microphones in total.
Thank you, I will look into that if I2S might be better for my needs.

I might be wrong with the posibility of responce but basicly I am looking for a specific sound and the microphones is identical to each other. I am not really interested in the frequency of the signal just the phase-difference of them recording the same sound. That way I can figure out how many microseconds they are apart and by that the difference in distance to the source of the sound.
It is working actually now (not every time but most of the times) but I would like to have a higher accuracy. I can currently pinpoint the source within +-2mm theoretical but actual accuracy now is more like +-5mm within a distance of 300mm

ESP_Sprite
Posts: 9709
Joined: Thu Nov 26, 2015 4:08 am

Re: Super fast ADC with Esp32

Postby ESP_Sprite » Fri Feb 12, 2021 12:55 am

davidoneo wrote:
Wed Feb 10, 2021 9:34 am
I might be wrong with the posibility of responce but basicly I am looking for a specific sound and the microphones is identical to each other. I am not really interested in the frequency of the signal just the phase-difference of them recording the same sound. That way I can figure out how many microseconds they are apart and by that the difference in distance to the source of the sound.
It is working actually now (not every time but most of the times) but I would like to have a higher accuracy. I can currently pinpoint the source within +-2mm theoretical but actual accuracy now is more like +-5mm within a distance of 300mm
Sure, but if the microphone is bandwidth-limited (which they normally are), there's absolutely zero use in using a higher sample rate for your ADC as it gives you no extra information, and as such cannot give you any extra precision.

Scott.Bonomi
Posts: 73
Joined: Mon Mar 09, 2020 7:36 pm

Re: Super fast ADC with Esp32

Postby Scott.Bonomi » Mon Feb 22, 2021 8:43 pm

Sampling faster has the advantage of allowing you to filter the results and so get a higher number of effective bits from the ADC. But you also need to pay attention to what effect that has on the signal. At what point does switching nose (ADC Shifting from input 1 to input 2) become noticeable? There will also be a question of phase shift between measurements. at 200KHx that is about 5 uSec between measurements, but how much time between reading channel one and channel 2. For a number of years I used a AD73360 which has simultaneous sample and hold for 6 channels. But I recall a much faster part than I see advertised today.
I expect that you might want to look at your system requirements as to what frequency range you choose to deal with. As I recall most audio is under something like 4KHz, with some people being able to detect sounds up to about 20KHz. I have unpleasant memories of the 15750 Hz signal coming from everything resembling a TV CRT. Your current sampling rate should give you 10 points per cycle at 20KHz, which should let you do a decent job of estimating when the peak was. For sounds closer to hearable, you have something like 100 points in which case you might not need to do any curve fitting. That would leave a ~4 degree window on peak. Your reported accuracy is a bit better than that, so you are calculating something. I would expect that taking a closer look at your viable input range and curve fitting could give you better results than just increasing measurement speed.

davidoneo
Posts: 3
Joined: Wed Feb 10, 2021 7:50 am

Re: Super fast ADC with Esp32

Postby davidoneo » Fri Aug 27, 2021 1:39 pm

Scott.Bonomi wrote:
Mon Feb 22, 2021 8:43 pm
Sampling faster has the advantage of allowing you to filter the results and so get a higher number of effective bits from the ADC. But you also need to pay attention to what effect that has on the signal. At what point does switching nose (ADC Shifting from input 1 to input 2) become noticeable? There will also be a question of phase shift between measurements. at 200KHx that is about 5 uSec between measurements, but how much time between reading channel one and channel 2. For a number of years I used a AD73360 which has simultaneous sample and hold for 6 channels. But I recall a much faster part than I see advertised today.
I expect that you might want to look at your system requirements as to what frequency range you choose to deal with. As I recall most audio is under something like 4KHz, with some people being able to detect sounds up to about 20KHz. I have unpleasant memories of the 15750 Hz signal coming from everything resembling a TV CRT. Your current sampling rate should give you 10 points per cycle at 20KHz, which should let you do a decent job of estimating when the peak was. For sounds closer to hearable, you have something like 100 points in which case you might not need to do any curve fitting. That would leave a ~4 degree window on peak. Your reported accuracy is a bit better than that, so you are calculating something. I would expect that taking a closer look at your viable input range and curve fitting could give you better results than just increasing measurement speed.
Thank you for this. Missed the responce and found it now again when I am again starting to look at this project. The sound I am looking for is in the upper audible range. I have done some succesfull work with only the adc in the eps32 as source and ofcourse then a low accuracy on pinpointing the source but good enough for testing. I´m using cross correlation to find the faceshift.
The biggest issue now is that even if I use the same model of microphone I have trouble getting a comparable sound reading from them and they can differ completely in some cases. I plan on making a custom pcb that holds the entire rig with built in microphones just to get full control of the leads for each microphone and get a perfect placement and direction on them.

Just a side project but an interesting one.

Who is online

Users browsing this forum: MicroController and 83 guests