Comment on How to improve my battery measurement circuit?
WaterWaiver@aussie.zone 1 year ago
You could probably increase the 82K and 10K resistors to be much bigger (by a factor of 10x or maybe even 100x). Lookup the input impedance for the ADC of your model of ATmega, as long as it’s approx >10x the size of your resistors then your circuit will probably be accurate enough.
A couple more things to keep in mind:
- a fresh alkaline 9V battery is actually 9.6V or more, not 9V.
- 9V battery voltages droop noticeably when under load because of their high internal resistance. Make sure to measure under the same conditions.
nilclass@discuss.tchncs.de 1 year ago
That’s what I thought initially, but this stackoverflow post dissuaded me. The argument there is that the measurement will be wrong, if the input current is not enough to charge the internal cap within the measurement period. But I’ve done some testing now, and measurements done with 820k and 100k agree well with what my voltmeter measures, so I’ll go with this solution!
Indeed!
9.6V * 10k/92k = 1.04V
is still below 1.1V, so I should be fine in this case :)This is a good point!
My firmware will be pretty monotonic though, basically:
So, the load should be always the same at step (2).
brendan@mastodon.brendans-bits.com 1 year ago
@nilclass
@WaterWaiver
From the stack exchange post: " 10 kΩ or less source resistance is recommended, otherwise the low pass filter effect of the capacitor with the source resistance becomes a major issue, requiring a longer sampling time for conversion and as a result limiting the maximum frequency."
In other words: a higher source impedance (caused by large resistors) is only going to drastically affect the results when you need to take fast repeated measurements (e.g. an AC source)