Hi,
Can someone confirm what is the max input voltage for ADC input on nrf9160?
Documentation says
The AIN0-AIN7 inputs cannot exceed VDD_GPIO, or be lower than VSS.
But in several places I've seen that it can't exceed VDD.
In my case VDD is 3.7v, but VDD_GPIO - 1.8v
I'm trying to read a voltage on P0.13, P0.16 and P0.17 from sensors, which can vary from 1.2v to 2.6v.
I don't have any voltage dividers and use gain 1/5 with ADC_REF_INTERNAL. I also read once per minute.
Sensors get enabled via n-channel mosfet, which is driven by another GPIO output switch pin.
So the algorithm is: set switch pin to 1 to enable sensors, wait 10ms, read through ADC, set switch pin to 0 to disable sensors, sleep a minute.
So far I'm getting very weird behaviour:
1. Readings are significantly inaccurate and fluctuate (but actually follow the sensors` actual value).
2. Entire GPIO voltage raises to approx. 2.1v from 1.8v when I set completely different pin to 1 (P0.19) which is not connected anywhere on my custom board.
Sorry, it is hard to explain better without digging into details, so I'm seeking for general advice of:
1. What's the maximum ADC input voltage?
2. Can I avoid using voltage divider if input ranges from 1.2v to 2.6v?
3. In what cases GPIO voltage raises above levels I provide via VDD_GPIO pin? It seems that voltage from my sensors somehow do that.
4. Why readings may fluctuate a lot. In my case even if sensors are constantly connected to AINs there is no circuit as mosfet doesn't let current to flow. It makes me feel that it may be some sort of a floating input. But if so, why reading are wrong even after I enable mosfet and wait 10ms (tried to wait for longer with the same issue). Also how completely irrelevant pin may affect on the overall GPIO voltage.
Thanks