Skip to main content
Linda
Associate III
July 24, 2014
Question

ADC reading change rapidly

  • July 24, 2014
  • 6 replies
  • 845 views
Posted on July 25, 2014 at 00:44

In �?y ADC, I use __IO uint32_t uhADCxConvertedValue, but the re�?ding ch�?nge r�?�?dily even th�?ugh the re�?l v�?lt�?ge d�?es n�?t ch�?nge, which is �?.854�?�?.855.

Ple�?se hel�?
    This topic has been closed for replies.

    6 replies

    Tesla DeLorean
    Guru
    July 25, 2014
    Posted on July 25, 2014 at 02:02

    Sample it slower, and less frequently. Reduce the ADC clock, increase the sample time.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Linda
    LindaAuthor
    Associate III
    July 25, 2014
    Posted on July 25, 2014 at 13:51

    Dear Clive 1

    I am using STM32Cube_FW_F4_V1.1.0\Projects\STM32F429I-Discovery\Examples\ADC\ADC_RegularConversion_DMA

    How to change frequently and  sample time?

    Thanks

    Tesla DeLorean
    Guru
    July 25, 2014
    Posted on July 25, 2014 at 14:41

      /* ADC Common Init **********************************************************/

      ADC_CommonInitStructure.ADC_Mode = ADC_Mode_Independent;

      ADC_CommonInitStructure.ADC_Prescaler = ADC_Prescaler_Div2;

      ADC_CommonInitStructure.ADC_DMAAccessMode = ADC_DMAAccessMode_Disabled;

      ADC_CommonInitStructure.ADC_TwoSamplingDelay = ADC_TwoSamplingDelay_5Cycles;

      ADC_CommonInit(&ADC_CommonInitStructure);

      /* ADC3 Init ****************************************************************/

      ADC_InitStructure.ADC_Resolution = ADC_Resolution_12b;

      ADC_InitStructure.ADC_ScanConvMode = DISABLE;

      ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;

      ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_None;

      ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_CC1;

      ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;

      ADC_InitStructure.ADC_NbrOfConversion = 1;

      ADC_Init(ADC3, &ADC_InitStructure);

      /* ADC3 regular channel13 configuration *************************************/

      ADC_RegularChannelConfig(ADC3, ADC_Channel_13, 1, ADC_SampleTime_3Cycles);

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    raptorhal2
    Lead
    July 25, 2014
    Posted on July 25, 2014 at 16:09

    The example uses ADC3 channel 8 on PF10. On the 429 Disco this pin is dedicated to LCD Enable, with a 4.7K pull down resister. Did you modify the example to use one of the 3 freely available ADC channels ?

    Cheers, Hal
    Linda
    LindaAuthor
    Associate III
    July 26, 2014
    Posted on July 26, 2014 at 12:11

    Thanks for help.

    I change ADC3 channel 8 to PC3. I feel something wrong here.

    The voltage being monitored is around 1.4v, but once connect with PC3, the voltage drop to to 0.8v.

    How to fix it?

    Thanks

    Tesla DeLorean
    Guru
    July 26, 2014
    Posted on July 26, 2014 at 13:13

    How to fix it?

    Use an OpAmp, or otherwise figure out why your signal is incapable of providing sufficient current into the unbuffered input.

    What is

    http://www.planetanalog.com/author.asp?section_id=510&doc_id=559252

    ?
    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..