NTC Thermistor in 3.31.1 release

hi, I can see that NTC thermistor is implemented in current working version of 3.31.1 for PCA100004 board project. is this working code? We followed the pin configuration as defined in the config file to connect the thermistor resistor divider circuit to nRF 52 development kit, compiled and downloaded the code. but we are not getting the measurements. Do you have any blog tutorial for the thermistor implementation like you have provided for other sensors? can you please shed some light?

Hi, maybe @otso can shed some light to this question :slight_smile:

Hello,

We supported thermistor and photoresistor years ago for a prototype which never went into a production. The code worked at the time, and I think ADC code has not been updated since so it could work but we have not tested it in ages.

It should be noted that code uses ADC which is also used by battery measurement, and if I recall correctly the battery measurement initialises, reconfigures and uninitialises the ADC on measurement.

My first step would be to disable the battery measurement and then check if you get the ADC reads from the NTC. If you are not getting ADC readings, it’s helpful to step through the code in SES or some other IDE to see what actually is happening.

But battery measurement is through internal SAADC. Not an external voltage input to AIN. correct.

I will try the steps you suggested: disabling the battery measurement, and then I measuring the AIN1 configured for thermistor.

Yes, the battery measurement is done with the internal SAADC.

Internally in the chip, AIN inputs are routed to the SAADC through an analog multiplexer and battery voltage measurement is another multiplexer input. This is why the internal voltage measurement can affect measuring the external AIN pins, they all use the same SAADC hardware.