0
\$\begingroup\$

My Arduino project (Pro Mini, two sensors, BT09 BLE module) is powered by a PG1050 3.7V battery via a boost converter that raises the voltage to 5V. To measure the battery and report low battery status via Bluetooth, I've connected a resistor (currently 19K, because that's what I had around) between the battery + terminal and pin A0. A full charge can last up to 8 hours but I would like to extend this further by putting the board to sleep, likely for 90% of the time.

I don't know how to calculate the optimal resistor value, or even if it makes a big difference in this case. What is the best resistance value you recommend?

JRE
75k10 gold badges115 silver badges197 bronze badges
asked Jan 2, 2024 at 13:21
\$\endgroup\$
7
  • 1
    \$\begingroup\$ A buck converter steps down voltage. I think you might mean a boost converter. \$\endgroup\$ Commented Jan 2, 2024 at 13:23
  • \$\begingroup\$ Do you expect the analog input pin to draw a lot of current? \$\endgroup\$ Commented Jan 2, 2024 at 13:27
  • \$\begingroup\$ @Klas-Kenny I think the current drawn is limited by the resistor, but not sure about it, this is why I am asking. The voltage on the analog pin would be read in a loop, while the board is awake. The measurements aren't accurate enough to rely on one measurement, so I will have to do an average over several measurements. \$\endgroup\$ Commented Jan 2, 2024 at 13:36
  • \$\begingroup\$ The requirement of low current consumption will contradict with the requirement of accurate reading. The ADC works best with source impedances below 10k. The more samples you take, the more current you take, so it does not make sense to read the battery voltage constantly in a loop. \$\endgroup\$ Commented Jan 2, 2024 at 13:42
  • 2
    \$\begingroup\$ If you want to save power you could remove the led and the LDO regulator of the board, or deactive with the jumper, if you have not yet done. They waste more miliamps than the resistor. \$\endgroup\$ Commented Jan 2, 2024 at 14:38

1 Answer 1

0
\$\begingroup\$

Take the worst case. If the 19k resistor were connected across the battery terminals, it would draw 0.22 milliamperes of current. For eight hours, that would be about 1.76 milliampere hours. Your PG1050 cell has a capacity of 1050 milliampere hours. That resistor would waste a total of 0.17 percent of the battery capacity.

In actual use, you will never draw that much current. The ATmega 328P ADC input impedance is fairly high.

This answer says 100 megaohm input impedance with a 14pF capacitor to ground - that's very high impedance. The 14pF should only matter when switching ADC inputs. In actual use, the input current will be microamperes.

I'd say you are worried about a non-problem - there are certainly bigger drains to worry about.


That 14pF capacitance matters when switching between ADC channels or when trying to sample a quickly changing input voltage. AVR recommends a signal impedance of 10k or less. If you stay on the same channel and only sample at a slowly changing signal (like the battery voltage) at long intervals then the 14pF is pretty much irrelevant and you can use a higher impedance without problems.

  1. In general, use a signal impedance of 10k or less with the ADC inputs on an ATmega328P.
  2. In some cases (like yours,) you can get away with higher impedance.
  3. In either case, the current through the ADC input is very low. You should take care of other, larger, drains before worrying about the ADC input current.
answered Jan 2, 2024 at 13:58
\$\endgroup\$
2
  • \$\begingroup\$ The 14pF matters each time you take a sample, right? So it does not depend on just switching channels? The AVR data sheet says the ADC is intended for source impedances below 10k. \$\endgroup\$ Commented Jan 2, 2024 at 15:54
  • \$\begingroup\$ As that other answer describes it, the 14pF only really matter when switching between ADC channels. If you stay on the same channel, the capacitance will stay charged to the input voltage - that's assuming a slowly changing input voltage. \$\endgroup\$ Commented Jan 2, 2024 at 16:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.