Skip to main content
bridges
Associate II
May 20, 2014
Question

DAC output changes ADC reading

  • May 20, 2014
  • 8 replies
  • 1456 views
Posted on May 21, 2014 at 00:25

Hi,

I'm using the STM32F4 Discovery board. I have a program that outputs voltages with the onboard DAC and reads voltages with the ADC. For some reason when the DAC is outputs a voltage it lowers the readings of the ADC slightly. This happens even if the DAC output is left unconnected. I've verified with a voltmeter that the actual voltage on the ADC does not change, so it seems like something internal. VDD also does not appear to change. 

Any tips?

Thanks!
    This topic has been closed for replies.

    8 replies

    raptorhal2
    Lead
    May 21, 2014
    Posted on May 21, 2014 at 14:41

    Is the DAC buffer amplifier on ? If yes, try turning it off.

    Is your voltmeter accurate enough to detect a reference change as small as the difference in ADC readings ?

    Cheers, Hal

    bridges
    bridgesAuthor
    Associate II
    May 21, 2014
    Posted on May 21, 2014 at 14:57

    Yes, the voltmeter is plenty accurate. If I have the output buffer on the decrease in ADC reading is proportional to the DAC value, so I can correct for it (but I'd like to solve the problem at its source). If the output buffer is off the change in adc is more like an inverted hump that peaks when the DAC is midrange.

    raptorhal2
    Lead
    May 21, 2014
    Posted on May 21, 2014 at 15:34

    Both DACs are connected to board peripherals. Did you cut the traces to these peripherals for the DAC left unconnected test ? And, is the ADC channel one of the 9 freely available ones ?

    Cheers, Hal

    bridges
    bridgesAuthor
    Associate II
    May 21, 2014
    Posted on May 21, 2014 at 18:15

    Thanks for the responses.

    I'm using ADC3 channel 11 which is listed as a free IO pin. I've tried others and they exhibit the same problem.

    Cutting the trace had no effect.

    raptorhal2
    Lead
    May 22, 2014
    Posted on May 22, 2014 at 15:38

    It might take a few days to get ti it, but I will try your problem on my F4 Discovery board.

    Cheers, Hal

    raptorhal2
    Lead
    May 22, 2014
    Posted on May 22, 2014 at 15:39

    It might take a few days to get to it, but I will try your problem on my F4 Discovery board.

    Cheers, Hal

    raptorhal2
    Lead
    May 26, 2014
    Posted on May 26, 2014 at 19:19

    I set up the following on my F4 Discovery board:

     ADC2 channel 1 input to ground

     ADC2 channel 2 input from resister divider VDD to 55.1K to 53.6K to ground

     ADC2 channel 3 input to VDD

     Sampling time 480 cycles

     DAC1 register to 0, 1024, 2048, 3072, 4095

     DAC1 output trace to ainx input not cut.

    ADC Channel 2 results for 8 conversions per DAC setting:

      DAC = 0         2018 average, range 2014 to 2020

      DAC = 1024   2014 average, range 2010 to 2023

      DAC = 2048   2016 average, range 2010 to 2019 

      DAC = 3072   2014 average, range 2007 to 2020

      DAC = 4095   2016 average, range 2011 to 2018

    If there is any DAC effect here, it is hidden in the noise level.

    If  your results are substantially different from this, describe your setup and data in more detail.

    Cheers, Hal

    bridges
    bridgesAuthor
    Associate II
    May 30, 2014
    Posted on May 30, 2014 at 17:12

    Hal, thanks for the detailed troubleshooting. After your results, I was able to test on another discovery board and it did not seem to exhibit the problem, so it seems to be specific to the board.