2025-09-18 11:25 PM - edited 2025-09-19 2:06 AM
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
2025-09-30 10:08 AM
@sreyas40 wrote:
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
2025-10-01 9:12 PM - edited 2025-10-01 9:21 PM
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?
2025-10-01 11:33 PM
> pulses arrive in intervals of near 400ns - assumption
That is no easy task... any colleagues available with high-speed analog / ADC experience?
2025-10-02 1:01 AM
@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.
2025-10-02 8:24 PM
Unfortunately no, I was thinking of using AD7960 external ADC,
2025-10-03 12:17 AM - edited 2025-10-03 4:28 AM
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.
Is there any case/situation when buffering of adc input is not needed
2025-10-03 7:53 AM - edited 2025-10-03 7:57 AM
@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.
2025-10-05 10:23 PM
> Photodetectors are high output impedance category devices ...
Which implies high noise and EMI sensitivity.
Besides of a buffer amplifier, filtering is highly recommended.