nrf51822 ADC always reads 0.6v

I'm trying to get the ADC running on an nrf51DK, however whatever configuration I use it always outputs a value equivalent to ~0.6v input. I've tried with the basic ADC example in the sdk 12.3 examples folder, and still run into this issue. I have tried all of the input scaling configuration options, NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE, NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD, and NRF_ADC_CONFIG_SCALING_INPUT_TWO_THIRDS, and while the value that is output by the ADC does change, it still is equivalent to ~0.6v  based on the reference voltage. I have tried all of the reference voltage options as well, and while again the ADC value varies, it is still equivalent to 0.6v.

If I set the input to tie to the supply using NRF_ADC_CONFIG_SCALING_SUPPLY_ONE_THIRD, then the ADC does read a value equivalent to the supply voltage. So clearly the ADC is working, it's just that any of the SCALING_INPUT options I use seem to tie it to some source of 0.6v. I have connected the input pin to ground, vdd, and an external power supply, and it always reads the same value. It seems the input pin is ignored entirely in favor of some 0.6v source.

I found this dev zone post 

 ADC result not changing 

But the solution in that was to ensure the config was set to SCALING_INPUT, not a SCALING_SUPPLY option. I verified that I had not mistyped the configuration, so this solution did not help me.

Let me know what I can do to troubleshoot further, I'm at a bit of a wall seeing as I can't even get the example project to work. I tried the adc_timer_driven_scan_mode from the following examples, and still only got 0.6v as the output.

https://github.com/NordicPlayground/nrf51-ADC-examples

Parents
  • Not sure why it took so long to figure this out, but turns out AIN0 and AIN1 on the nrf51 DK cannot be used since they are tied to the 32kHz oscillator. AIN0 is what I was trying to use. This was exacerbated by having a broken signal generator which made it appear like AIN2-7 were having the same issue. After switching to AIN2 and connecting a functioning source, the ADC works as expected.

Reply
  • Not sure why it took so long to figure this out, but turns out AIN0 and AIN1 on the nrf51 DK cannot be used since they are tied to the 32kHz oscillator. AIN0 is what I was trying to use. This was exacerbated by having a broken signal generator which made it appear like AIN2-7 were having the same issue. After switching to AIN2 and connecting a functioning source, the ADC works as expected.

Children
No Data
Related