cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F405RG weird ADC spikes

LLOLO.1
Associate II

Hi I am working on a small project where I need to sample couple of ADC channels.

I am using STM32F405RG. ADC1 is running in continuous and scan mode with DMA. I am using ping pong buffers to send ADC data through USART.

After gathering some data I plot them in MATLAB.

Problem is that there are random spikes in my ADC values an example is shown below.

X axis is Seconds, Y axis is voltage. Graph belongs to an ADC channel where approximately 2.6 volts needs to be read.

0693W000005B0hlQAC.png 

Has anyone encountered this ?

32 REPLIES 32

It's going to be an issue of having grounds which are separated by a potential. Typically this is solved by having a solid ground plane and tying ground pins to it with vias very close to the pin.

Is this a custom board? What does your layout look like? What else is connected to the same power/ground rails?

If you feel a post has answered your question, please click "Accept as Solution".
tkor.1
Associate II

The first think is - you have to have straight line @ 0V when you put ground directly on ADC pin. The spikes comes from your ADC wiring, without drawing and picture of it, it is just guessing work.

ST has AN2834 and AN4073 as guidelines to the ADC.

JW