cancel
Showing results for 
Search instead for 
Did you mean: 

SDADC problem in single-ended mode.

txmsszd
Associate II
Posted on September 04, 2016 at 10:02

Hi,

I meet a problem with my project in which a STM32F373 MCU is used to collect singnal in single-ended mode.I short the pin with GND to test the board,the ADC values I get seems to fluctuate like saw-tooth.0690X00000603BzQAI.jpg

The graph above shows what I get with my board.The signal is moving averaged.

But if I chang SDADC module into differential mode,the saw-tooth liked pattern disappears.

The single passes through a RC network before it arrives at the SDADC pin.

Has anyone encountered such a prolem?

Thanks

10 REPLIES 10
mark239955_stm1
Associate II
Posted on September 04, 2016 at 15:28

It looks to me like you're treating a signed int as unsigned, or vice versa.

txmsszd
Associate II
Posted on September 04, 2016 at 17:01

Hi,markt

In single-ended zero reference mode,SDADC output data is from -32768 to 32767(set gain as 1),so I treat the data as signed.

The data is transferred to PC throungh USART Port and is parsed in Matlab.

I when debug my code,I could see the data fluctuates in KEIL MDK as the graph showed.

mark239955_stm1
Associate II
Posted on September 05, 2016 at 01:28

You're showing less than a single cycle of the sawtooth.  Can you show a larger sample, perhaps 3 or 4 cycles?

What does the signal that you're trying to capture look like?  Have you verified with an oscilloscope that it is what you expect it to be, both before and after the RC network?

Does the SDADC have a very high input impedance?  Is it possible that your RC network is being loaded down by a low-impedance ADC input and distorting the signal in unexpected ways?

txmsszd
Associate II
Posted on September 05, 2016 at 18:02

markt,

Sorry for that small data,larger sample is showed in the attached picture.

Currently,I just short the signal input with GND.Thus,the captured data should show a shape as straight line with a narrow variation range.

As for the SDADC impedance you mentioned, I have changed the SDADC CLOCK and GAIN setting sevaral times to change the input impedance,but the results stay the same.

By the way,from the picture attached, it can be seen that the sawtooth cycles at a certain period,about 30s. This is puzzling.

0690X00000603C9QAI.jpg

mark239955_stm1
Associate II
Posted on September 06, 2016 at 02:25

It may simply be noise - consider that +/-35 or so is only 0.1% of full scale for an int16.  That could easily be caused by variations in Vref or power supply.

Maybe try feeding the circuit with an actual signal, say a 1Vp-p sine wave, and see how it behaves.

txmsszd
Associate II
Posted on September 06, 2016 at 03:02

markt,

There are cases where the data is free of saw-tooth variations,but not many.When I put the SDADC into differential mode, the saw-tooth also disappears. In my opinion,if it is noise, it should not totally disappear in differential mode.And if it is something like common-mode interface, why it dose not come up every time absolutely ?

Thanks

mark239955_stm1
Associate II
Posted on September 06, 2016 at 04:34

Given that it disappears when you use the ADC in a differential mode, I would say it's almost certainly noise.  My guess is still power supply noise; did you supply your F3's analog section with relatively quiet power and reference voltage, either or both by passive filtering or a separate low-noise regulator?

txmsszd
Associate II
Posted on September 06, 2016 at 07:07

The analog power is fed with a LDO regulator(TPS73633,TI),and reference voltage with another LDO(ADR 4410,ADI).

mark239955_stm1
Associate II
Posted on September 06, 2016 at 08:52

They both look like good choices to me, for what it's worth, particularly the Analog Devices voltage reference.

Have you inspected the user manual carefully, with particular attention to the electrical characteristics of the SDADC?  p110 of v7 indicates that you should expect a typical offset error of around 2mV in single-ended mode, which is in the ballpark of what you're seeing.  That thought is backed up by the typical offset error in differential mode of around 100uV, which matches up to your seeing little or no noise in differential mode.

I don't suppose you could post your circuit schematic, at least of the analog section?