This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

problem with ADC drawing current on nrf51822

Hi all!

I'm working on an nrf51822 (technically right now I'm using the PTR5518 as I'm still prototpying), and trying to set up a voltage divider on my pcb in order to measure an unknown resistance. Basically, I take the voltage measurement across the "lower" resistor (connected to the negative power supply terminal) through the NRF's ADC, and then convert that into an R2 using the known resistance value.

For this to work, that input/ADC pin has to draw minimal current, as a current moving through R1 means a voltage drop means changing my measurement across R2.

The problem is, right now I'm getting a pretty substantial (1.5-2V) voltage drop across that resistor, which must mean that my ADC pin is drawing some current. I've set the pin up as a standard AnalogIn = analog_value(pin#) using mbed, and I'm reading using V_meas = analog_value.read(). Am I going about this wrong? Is there some way that I can set the input impedance higher on my nrf? Or is the resistor I'm using (4.7M) too high? I didn't have this problem when I used a 10k resistor. Any help would be appreciated!

tldr: the ADC on my NRF51822 is drawing current and screwing with my measurement. How do I get it to stop?

Parents
  • Have you read the ADC section in the nRF51 manual? That tells you the input impedence of the ADC is between 100 and 400kOhm and that in order to get the accuracy specified, the output impedence of the connected source should be less than 1kOhm. So yes, 4.7M is too high.

    The reference manual also however suggests using a capacitor to keep the voltage steady during the few microseconds of measurement, that reduces the frequency you can measure as the capacitor has to charge again, but let you have a high impedence voltage divider and still measure accurately.

    If you use the search box you'll find there's a blog post somewhere about measuring lithium cells with a voltage divider of high impedence (so the voltage divider doesn't drain the battery) and a capacitor, perhaps that solution may work for you.

Reply
  • Have you read the ADC section in the nRF51 manual? That tells you the input impedence of the ADC is between 100 and 400kOhm and that in order to get the accuracy specified, the output impedence of the connected source should be less than 1kOhm. So yes, 4.7M is too high.

    The reference manual also however suggests using a capacitor to keep the voltage steady during the few microseconds of measurement, that reduces the frequency you can measure as the capacitor has to charge again, but let you have a high impedence voltage divider and still measure accurately.

    If you use the search box you'll find there's a blog post somewhere about measuring lithium cells with a voltage divider of high impedence (so the voltage divider doesn't drain the battery) and a capacitor, perhaps that solution may work for you.

Children
Related