2014-05-20 03:25 PM
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!2014-05-21 05:41 AM
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, Hal2014-05-21 05:57 AM
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.
2014-05-21 06:34 AM
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, Hal2014-05-21 09:15 AM
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.2014-05-22 06:38 AM
It might take a few days to get ti it, but I will try your problem on my F4 Discovery board.
Cheers, Hal2014-05-22 06:39 AM
It might take a few days to get to it, but I will try your problem on my F4 Discovery board.
Cheers, Hal2014-05-26 10:19 AM
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, Hal2014-05-30 08:12 AM
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.