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 ...

Get Make an Arduino-Controlled Robot now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.