Lithium Battery level indicator with Arduino Uno and LCD

battery level - steinacoz

This will be my first post in this new month but before I forget: Happy new month to my lovely readers and followers. This post/tutorial is on how to create a simple battery level indicator with LCD screen and Arduino uno. This setup have been ON in my home for the past few days without setting anywhere on fire so i guess, it is fine.

NOTE: I do charge the battery with a 5volts TP4056 Battery charger and I can’t guarantee you an optimum outcome if you make use of another method of charging. I made a post on charging lithium battery with TP4056, feel free to check it out HERE.

See also:

The materials/components for this post/tutorial are very simple and can easily be gathered, some of them are available in our store:



  • battery +ive –> via R1 to Arduino A0 pin and TP4056 +ive
  • battery -ive –> Arduino GND and TP4056 -ive
  • Connection for LCD:
    * LCD RS pin to digital pin 12
    * LCD Enable pin to digital pin 11
    * LCD D4 pin to digital pin 5
    * LCD D5 pin to digital pin 4
    * LCD D6 pin to digital pin 3
    * LCD D7 pin to digital pin 2
    * LCD R/W pin to ground
    * LCD VSS pin to ground
    * LCD VCC pin to 5V
    * 10K resistor:
    * ends to +5V and ground
    * wiper to LCD VO pin (pin 3)



Download Code from github



The gist here is to read the battery voltage from the Arduino analog pin since it won’t exceed 5volts. Then map the analog value between 614 and 860 (3.0volts and 4.2volts) to 0 and 100. This setup I assume can only work for a lithium battery.


battery level - steinacoz
battery level – steinacoz



battery level - steinacoz
battery level – steinacoz



Feel free to add your comments about this post and follow our blog and social media outlets for tutorials like this.

Leave a Reply

Your email address will not be published. Required fields are marked *