Issue in getting persistent ADC Reading NCS 2.4.1 (nRF52832)

Hi,

I am using a custom nRF52832 board with multiple ADC channel readings sequentially. I am trying to read thermistor (NTC) value on channel 7 and not getting accurate reading. As soon as I plug the thermistor, the value goes on decreasing/ stabilizing which goes below the actual/ anticipated reading that could be due to hardware/ software issue in my setup.

The schematic of that specific channel is:

The DTS for that specific channel is:

This is the output of channel 7 readouts after 1 sec interval:

The ADC reading falls/ stabilizes from 555 to 505 and I expect a value around 540 (measuring thermistor from meter then converting to raw adc value).

I have tried setting VDD and different ACQ times but didn't help.

Please suggest a solution.

Regards

Parents
  • Hello,

    You may try to set the highest acquisition time 40 us. 

    zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 40)>;

    Ok. you mentioned that you have tried different ACQ time; was the source resistance in accordance to the ACQ time?

  • Is there anything else that I could try in the firmware? My ADC value gradually drops almost 10% then stabilizes but goes below the actual/ desired value.

    Another thing when I place AIN7 to GND, I get adc of 65515 not ideally 0.

  • Remove D26; it is a zener diode and not appropriate for this circuit and will effectively stop any meaningful measurements.

  • Thanks for your reply.

    I have removed made a similar circuit on breadboard with just resistor & thermistor. But, it still behaves in a similar way.

Reply
  • Thanks for your reply.

    I have removed made a similar circuit on breadboard with just resistor & thermistor. But, it still behaves in a similar way.

Children
  • If I account for that gnd offset error i.e. around 21 if I am getting 65515 then it may give somewhat realistic measurement.

  • The differential measurement returns a signed value, and 65515 is a small negative number arising partly due to the way the SAADC calibration handles offsets. Keeping both the N-P and the P-N differential measurements as signed results and taking the average signed result requires no fiddling it is a simple sum. Differential measurement gives half the numeric value of single-ended measurement but the sum of the two differential measurements (N-P and P-N) restores that full numeric value in addition to removing any offset.

    Edit: I should add that thermistors are subject to self-heating and it is normal to only energise (turn on power) when taking a reading; often a port output pin would be used instead of the 3.3V supply. This has the added benefit of being closer to the internal VDD from which the ratiometric reference is derived. Ensure the output pin has a H1 setting to minimise Vrdson, drive high just before the SAADC sample is taken then drive low or float afterwards..

  • Thank you for the detailed explanation.

    I have set the reference to VDD/4 instead of Internal. After obtaining the ADC value across the resistor (461/1024), I obtained the VDD value through ADC (822/1024) which gave me correct values and after tested the response using hot air gun upto 125 deg. C.

    It is working satisfactorily now.

    Thanks