cancel
Showing results for 
Search instead for 
Did you mean: 

Multichannel ADC accuracy problem.

S??z?
Associate

I am Samet, an electrical and electronics engineering first-year student. I and my team are designing a hydrogen car and taking part in the races. We make the electronic cards of our vehicle and the design of these cards. I am writing to you because we had a problem while coding. There are many sensors in our vehicle and we have to get data from these sensors with ADC. We use STM32F407VGT6 as the processor. In software, we write our code in the Keil compiler using the STMCUBEMX HAL Library. We need to read ADC value from 13 channels but we cannot read fluent and accurate data. If you think that the problem is caused by hardware, our cards have the necessary filters and Op-Amp circuits. Can you help us with suggestions and sample coding about this subject?

1 REPLY 1
Ozone
Lead II

> We need to read ADC value from 13 channels but we cannot read fluent and accurate data

What exactly you mean with "fluent data" ?

And where does it not match your expectations ?

> If you think that the problem is caused by hardware, our cards have the necessary filters and Op-Amp circuits.

Perhaps. Check the ADC related threads here.

The ADC (in the F407) can basically be reduced to a RC element, design-wise.

Your external circuitry (opamp) and the inherent parameters (S&H capacity, internal impedance) must match your desired sampling frequency, else you get pseudo - crosstalk, and incorrect results.

> Can you help us with suggestions and sample coding about this subject?

Posting some relevant code and the observed results would really help.

In general, I would suggest a timer-triggered sampling sequence (of 13 channels), handled by DMA.

> In software, we write our code in the Keil compiler using the STMCUBEMX HAL Library.

Not a Cube/HAL user, can't help you with that.

Keil is fine, presuming you have a full version.

With the restricted "Lite" version, you might hit the codesize limitation wall soon.