I'm building a portable desktop weather station using an Arduino Nano micro-controller. The system is being powered by a consumer 9V alkaline battery, with the voltage being regulated by the Nano's on-board regulator.
I want to have a rough battery level displayed on the LCD screen.
The initial approach I have taken is by using a voltage divider which scales the input 9V to 3.3V. This signal is then input into to the
Analogue IN (A6) of the Nano, (
AREF is set to 3.3V due to other analogue input device requirements).
From this I was assuming that ranges of voltage readings could correspond to FULL, HALF and LOW battery indications.
I understand that the battery terminal voltage will change with current draw. I expect a peak current draw of 350mA with a typical draw of about 100-150mA.
What is a good scheme/algorithm/cutoff values I should use to roughly measure battery level?
EDIT: -My Estimated power draw was wildly inaccurate. After measuring the current draw of the final device, consumption was approximately 30-40mA continuous, with rare peaks of 50mA.
-I ended up using a simple battery percentage using AnalogRead(). I calibrated a fresh battery to display ~90% by adding a fudge factor. It was fairly successful as a rough estimation.