cancel
Showing results for 
Search instead for 
Did you mean: 

How can I increase ADC measuring speed? and which part can cause a delay?

KKIM.6
Senior

I'm using the necleo-wb55 board.

I'm trying to increase ADC measuring speed but I found that the speed for 16-bit measurement and 12-bit measurement looks the same even though 16-bit uses 256 oversampling.

I checked how many measuring cycles happen using USB debug but both systems show about 300 times per second.

Because I have to use 32 channels for the mapping device, the 300 times per second is insufficient, (its frame rate becomes ~10 fps). I'm targeting 60 fps ~ 600 fps because I have to collect brain signals.

Could you explain what can cause such a delay?

or should I use a high-end microcontroller such as STM32H725AEI having 550 MHz clocks? In this case, I'm concerned about how to send data through wireless communication.

4 REPLIES 4
raptorhal2
Lead

The ADC runs at its own clock speed, in your case 64 MHz at the most. Multiple clocks are needed per signal sample.

The H725 has an ADC 16 bit 50 MHz clock option.

But to get a 300 hz answer and equal 12-bit and 16-bit times, there must be other things happening. Be more explicit about the code.

Cheers, Hal

Javier1
Principal

>Because I have to use 32 channels for the mapping device,

What is "the mapping device"?

How are you triggering the ADCs?

I think youre mixing two concepts:

  • ADC sampling frequency: how often is the ADC triggered? probably depends of an external timer youre using. This is what you need to change, it can go way faster than 300Hz

  • ADC clock time: the number of clock cycles it takes for the ADC to complete one sample. Usually irrelevant to you unless you want to improve signal/noise ratio or youre aiming for a very high ADC sampling frequency.
we dont need to firmware by ourselves, lets talk
KKIM.6
Senior

A mapping device means a device array like an image sensor.

My device has 32 rows and 16 columns, 16 columns are connected to ADC through 16 channel lines.

To collect one frame, I have to switch 32 rows. then I can collect a single frame of 32x16 pixels.

I found that "presenting ADC value using USART" causes huge delay.

So, I'm revising this.

I understand better now.

You have 16 ADCs that need to be fired with the least ammount of delay between them, and multiplex those channels 32 times to create a sharp image for a brain scan.

Ideas:

IF i were you i would (as you already did) increase the clock from the ADCs to the maximum (unless you start guetting some noise, then find a compromise between S/N)

From the Datasheet DS11929

0693W00000NpuItQAJ.pngYou could run the ADC clock up to 64Mhz

0693W00000NpuJrQAJ.pngThen set your ADC conversion time to the fastest possible 2,5cycles at (64Mhz) conversion time is 39nanoseconds.

0693W00000NpuKBQAZ.png 

Set scan mode for the ADC to scan all 16 channels as fast as possible

Set a timer to trigger the ADC+DMA+multiplexing logic.

I would use DMA to handle the ADC measurements and move them to RAM, at the end of every conversion flag the microprocessor to send the 32x16 image trough the data bus of your choice, USB is fine i guess but not perfect, BLE is not ideal for broadcasting high vlume of data.

32x16x39nanoseconds=20microseconds per picture

Thats a theoretical 50khz resolution for your images to be taken. The real bottleneck is not the adquisition, its the how are you going to transmit the data from the microcontroller to your PC.

we dont need to firmware by ourselves, lets talk