Hello,
I have a voltage divider/thermistor circuit where R1 is an NTC thermistor of 100kOhm at 25°C. R2 is 100kOhm right now.
I took peripheral_saadc example for SDK15 and modified it to get the temperature readings in saadc_callback(); Temperature conversion algorithm is equal to the ones used in:
learn.adafruit.com/.../using-a-thermistor
www.jameco.com/.../temperature-measurement-ntc-thermistors.html
https://devzone.nordicsemi.com/f/nordic-q-a/14583/nrf52832-saadc-sampling
The current during my normal measurement should not exceed ~0.4mA (102kOhm over 3.6V) and I was thinking to use a GPIO as the Vin for the divider circuit.
I would like to: Set GPIO high -> get ADC value -> Clear GPIO -> Calculate temperature - > repeat minimum every 1 second;
How to do it? I am able to power the voltage divider from GPIO but I am unsure where should I make the switch? I cannot make it in the saadc_callback() because if I understand correctly, ADC conversion is already done at that point. Switching GPIO high needs to occur probably some time before ADC sample...