This battery level indicator offers (5) LEDs that light up progressively as the voltage increases:
Of course, you may select your own colors if desired.
Operation of the battery level indicator
D1 is the voltage reference zener. Tied to this is a string of divider resistors (R2-6) that set the various fixed voltage levels. R7 & 8 form a voltage divider to that reduces the battery voltage by a factor of 3. U1 is an LM339 quad comparator that compares the various voltages from the two dividers. The comparator sections have open collector outputs that simply function as switches to operate the LEDs. D7 protects against reverse battery connection.
The LEDs are biased to operate at about 4mA which is quite bright if modern LEDs are used. This current can be adjusted simply by varying the series resistors (R9 through R13). The overall current drain as shown is about 25mA which tends to be wasteful for continuous operation. For energy conservation, connect to battery via a pushbutton (Push to Test).
Printed Circuit Board
I did a www.expresspcb.com SMT layout using 0805 size components, 1N753 zener and SOIC-14 IC. D7 is in a SOT-23 package. These components are about as small as I like to work with. The layout has not yet been carefully checked or built. Note that surprises abound when constructing prototypes.
The circuit board measures only 0.5” x 1.5”.
More recently, I located an inexpensive SOT-23 zener with a 2% voltage tolerance—this has not yet been incorporated.
I have had good results with 0805 size LEDs purchased from China on eBay. They are both inexpensive and BRIGHT!
The 12v battery level indicator unit in the photo has no reverse polarity diode and R2 is the calibration potentiometer.