Search code examples
arduinoarduino-unobatterylevel

How to read battery level from Arduino while it is powered via 9v Battery barrel jack


I would like to know how to read battery level from Arduino while it is powered via 9v Battery barrel jack.

Thanks, Jyoti RAJ


Solution

  • With battery level you mean voltage. You can measure voltage using one of Arduinos analog inputs. As 9V would kill your Arduino you need a voltage divider which allows you to measure a safe voltage that is proportional to the battery voltage.