cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding ADC input source on STM32F3Discovery board

Kye-Hyun Park
Associate II
Posted on November 21, 2017 at 13:27

Dear All,

I'd like to test an ADC conversion using ADC example from STM32F3Discovery's peripheral examples.

I connected ADC1 channel(PC1) and GND to external power supply directly. and It was measured anormalvoltage between PC1 and GND using FLUKE Multimeter 8846A.

But, as attached the ADC value on Terminal I/O, theresults are very unstable. Is that due to the bad connection for ADC input source? or I cannot catch the problem exactly. Could you please help the issue?

1. supplying 0V to ADC1 channel(PC1)

0690X0000060PFEQA2.png

2. supplying 1.0V to ADC1 channel(PC1)

0690X0000060PFFQA2.png

1 ACCEPTED SOLUTION

Accepted Solutions
Reynoso.Salvador
Associate
Posted on November 22, 2017 at 03:44

It could be induced noise from your multimeter. You can filter your signal adding a RC filter to the ADC input.

View solution in original post

14 REPLIES 14
AvaTar
Lead
Posted on November 21, 2017 at 13:49

  /* ADC1 regular channel3 configuration */

  ADC_RegularChannelConfig(ADC1, ADC_Channel_7, 1, ADC_SampleTime_7Cycles5);

I suggest to try a much longer sample time.

Like ADC_SampleTime_181Cycles5 or ADC_SampleTime_601Cycles5.

Posted on November 21, 2017 at 14:23

Thank you for your reply.

I tried a much longer sampling time with ADC_SampleTime_601Cycles5 but, it is still unstable.

Posted on November 21, 2017 at 15:47

... it is still unstable.

How much ?

The F3 discovery is not quite the best analog design, Vdda and Vref on the Disco is connected to Vdd (the digital supply), so you can't expect too much.

Does the input impedance of your source match, and how long are the wires ?

Uwe Bonnes
Principal III
Posted on November 21, 2017 at 23:17

Do some statistics. What is the RMS error?

176119CGIL2
Posted on November 22, 2017 at 01:45

How much is it unstable?

> please refer to below RMSE result

How long are the wires

> about 30cm

Does the input impedance of your source match?

> I don't have technical knowledge about impedance matching.

Reynoso.Salvador
Associate
Posted on November 22, 2017 at 03:44

It could be induced noise from your multimeter. You can filter your signal adding a RC filter to the ADC input.

Posted on November 22, 2017 at 07:48

> I don't have technical knowledge about impedance matching.

You could still learn, or ask a colleague proficient in hardware design.

And, as said, the F3 Discovery is not the optimal platform for analog precision measurements.

Averaging (software filter) might help as well.

Or, if you have the time and means, you can measure the spectre of the noise.

I guess you might see something like mains frequency (50 or 60Hz).

Posted on November 22, 2017 at 11:59

Thank you, ADC conversion result is stable after adding RC filter (1kohm, 0.1uF).

FYI, The Cut-off frequency Fc is 1591.549430919Hz with R=1kohm, C=0.1uF from 

http://sim.okawa-denshi.jp/en/CRtool.php

 .

The problem has disappeared, but I wonder why high-frequency noise was induced to ADC input line.