cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H723ZG ADC Accuracy

sreyas40
Associate II

I'm currently using single 16-bit ADC, my requirement is to have ADC conversion error less than 1mV.

I'm using the ADC with DMA. I'm a beginner, currently getting 1-2mV error and it is not constant too. 

 
#define SCALE (3300.0f/65535.0f)

uint16_t adc_val = 0;

uint16_t ADC_ARR[5];



void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc){

adc_val = ADC_ARR[0]*SCALE;

}

HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);

HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC_ARR,1);

 

Also the ADC clock is derived from HSI  

27 REPLIES 27

@sreyas40 wrote:

sreyas40_0-1758539610092.png

yes i need exact peak voltage.

There is no fixed difference between peaks.

I don't think a comparator will be useful?

No, not a comparator but peak detector with reset circuits. If pulses arrive not very often, than you don't need fast adc

peak detector with reset circuits - reset circuits?

pulses arrive in intervals of near 400ns - assumption

When i tried to find some solutions, like using external reference, increased sampling time it didn't help. I also saw someone talking about peripherals like ethernet causing noises, i haven't enabled that on the IDE, is that valid for me? 

What about using a buffer op-amp for input?

LCE
Principal II

pulses arrive in intervals of near 400ns - assumption

That is no easy task... any colleagues available with high-speed analog / ADC experience?


@sreyas40 wrote:

peak detector with reset circuits - reset circuits?

pulses arrive in intervals of near 400ns - assumption

Bad luck, 400 nsec = 2.5 MSPS. Complexity of the peak detector at such high rate Is over using external fast adc.

 I also saw someone talking about peripherals like ethernet causing noises, i haven't enabled that on the IDE, is that valid for me? 

Very likely.


What about using a buffer op-amp for input?

It's not an option, buffering adc inputs with op-amp is must.

Unfortunately no, I was thinking of using AD7960 external ADC, 

link 

It's not an option, buffering adc inputs with op-amp is must - what are the parameters i should look out for when selecting a buffer op-amp.

sreyas40_1-1759475806168.png

 

Is there any case/situation when buffering of adc input is not needed

 

 


@sreyas40 wrote:

It's not an option, buffering adc inputs with op-amp is must - what are the parameters i should look out for when selecting a buffer op-amp.


  This thread mentions ad7960, ad7983/ 84 - get data sheet and study drivers. Analog (ADI Corp.) also has evaluation boards for this adc, worse to look into. 

In general, high speed, wide bandwidth and low distortion, most of this op amp intended for video application. Front page of the data sheet such op amp explicitly says "application: Precision SAR ADC drivers, or just ADC drivers".

In STM particular case, I'd recommend to use lmh6612.

3.3V limits pretty tough requirements in this domain, ada4899 and a lot others op amp are not good due +5-+12 V power range.

 


@sreyas40 wrote:

Is there any case/situation when buffering of adc input is not needed


Only if output impedance of the signal source is low and constant, like resistive bridges,  inductive sensors (dynamic mics etc), resistive current shunts or current transformers. 

Photodetectors are high output impedance category devices and demand TIA at least.

> Photodetectors are high output impedance category devices ...

Which implies high noise and EMI sensitivity.
Besides of a buffer amplifier, filtering is highly recommended.