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
  • Yes, exactly floating input. You are saying that it should measure a random voltage, but the values are ranging from 173 to 176, for me it's not really random.

    When my sensor is on it's low, it is behaving like an open circuit, so the voltage equals to the floating wire.

    My sensor doesn't require connecting directly to ground, as I said it's a kind of tensometer. Imagine a thermistor, I connected one side to VCC (3V), and the other side to ADC input. Along with applying tension, the resistance of my sensor varies, so do the voltage.


    Maybe I understood something wrong - choosing 1/3 of supply value in config doesn't require connecting power to ADC Refference pin, am I right?

Reply
  • Yes, exactly floating input. You are saying that it should measure a random voltage, but the values are ranging from 173 to 176, for me it's not really random.

    When my sensor is on it's low, it is behaving like an open circuit, so the voltage equals to the floating wire.

    My sensor doesn't require connecting directly to ground, as I said it's a kind of tensometer. Imagine a thermistor, I connected one side to VCC (3V), and the other side to ADC input. Along with applying tension, the resistance of my sensor varies, so do the voltage.


    Maybe I understood something wrong - choosing 1/3 of supply value in config doesn't require connecting power to ADC Refference pin, am I right?

Children
No Data
Related