Appendix D. Power Sources
Monitoring Battery Voltage
The battery voltage can be monitored using an Arduino analog input, but you can't directly connect the battery to an input pin because a fully charged battery can exceed the maximum voltage that the Arduino chip can tolerate.
Another factor to be aware of is that the default voltage reference for
analogRead is the 5 volt output from the regulator on the Arduino board.
This regulator requires more than 6 volts to produce a stable 5 volt output. When the voltage
difference between the regulator input and output (referred to in the regulator datasheet as
the dropout voltage) is less than a volt, the output voltage will drop below the required 5 volt level. Because this voltage is used as the default ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access