This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Strange values from ADC

Hello,

I am using simple_adc__pca10028 from 8.0.0 SDK to read values from my sensor, its a kind of tensometer. My configurations are:

  • NRF_ADC_CONFIG_RES_10BIT, --- 10 bits of resolution

  • NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD,--- 1/3 of supply value

  • NRF_ADC_CONFIG_REF_SUPPLY_ONE_HALF --- Am I thinking right, is it 3V/2 = 1,5V?

I suppose my reference voltage should be now 1,5V*3 = 4,5V, right?

I am sending readings to PC through UART, and my Termite shows values ranging from 175 to 680. I can understand that 680 = (3V/4.5V)*1023, but why 175? Why the lowest values aren't equal to zero? I mean lowest, when the current isn't flowing through my sensor.

Reading the GND values gives me 0, but unplugged wire still 175. please help

best regard, tchitchi

Parents
  • If you don't connect anything to the pin then you aren't going to measure anything except the voltage that input pin actually floats to. That appears from your example to be about 0.7v, but it could be anything. You need to supply an externally generated, relative to the same ground, voltage to measure, ie connect your measuring device between +V and GND in some way and then attach it to the ADC pin. The ADC pin doesn't power your device, it just measures (with fairly high input impedance) the voltage which is on that pin. The 1/3 supply voltage is just saying what the internal reference measurement is.

    You need to connect your sensor between 3v and GND in some way, probably with a load resistor and then measure the voltage at the junction, just connecting it between the pin and VCC isn't really doing much.

Reply
  • If you don't connect anything to the pin then you aren't going to measure anything except the voltage that input pin actually floats to. That appears from your example to be about 0.7v, but it could be anything. You need to supply an externally generated, relative to the same ground, voltage to measure, ie connect your measuring device between +V and GND in some way and then attach it to the ADC pin. The ADC pin doesn't power your device, it just measures (with fairly high input impedance) the voltage which is on that pin. The 1/3 supply voltage is just saying what the internal reference measurement is.

    You need to connect your sensor between 3v and GND in some way, probably with a load resistor and then measure the voltage at the junction, just connecting it between the pin and VCC isn't really doing much.

Children
No Data
Related