LM3914 Battery Monitor



This is a bar-graph voltmeter for a 12V battery based on the well known LM3914 IC.

I have a 12V car battery attached to a regular 500VA UPS and, because the UPS is old and doesn't have any management options, this is how I measure the amount of charge in the battery.

It was developed mainly because it gives a nice look to the UPS, with its red, yellow and green leds. It is also easier to read than conventional digital or analog voltmeters.



LEDs: To be visually attractive it needs a bar of leds with several colors. The HDSP-4832 is a led bar with 10 leds, 3 reds on one side, 3 greens on the other side and 4 yellow leds in-between.


Power supply: The circuit needs to be powered from the battery being measured and to be able to adjust the lower and upper voltages that light the first and last leds on the led bar.

For the 12V battery, the first led in the bar will lit at 10V and the last one at 13.5V, giving 0.35V per led. These thresholds may be set to other values by adjusting two trimmers in the circuit.

These two adjustment points make the circuit flexible enough to use it for other purposes like measuring the charge in NiCd and NiMH batteries. The thresholds can be set to Vmin = 0.9 * Ncells and Vmax = 1.45 * Ncells and a power resistor has to be placed between the battery + and - terminals during the measurement. This resistor should draw at least 0.5A from the battery to simulate a real load. But this is just an idea.


Led mode: The LM3914 can be configured to work in dot mode, with only one led is lit at a time, and in bar mode where it lights leds progressively when the voltage increases. The circuit works in bar mode to create a greater visual impact. Its pin 9 is connected to the positive supply to select this mode.



Example: dot mode on the left and bar mode on the right

Bar mode increases current consumption on the LM3914. When all leds are lit, the LM3914 consumes 10 times more current than when it is in dot mode. This means the individual led current will have to stay low to prevent the LM3914 from burning.

Its maximum power dissipation should be kept under 1.365W and assuming the battery supply voltage will never go above 14.4V, the maximum current admissible is I = P/V = 1.365/14.4 = 94.8mA. With all 10 leds lit, their individual currents cannot be greater than 9.4mA. So a current of 2.6mA per led is small enough to keep the IC cool. The current is set by R3 = 4K7. The current per led is approximately 10 times the current flowing in this resistor, IR3 = 1.25 / 4700 = 266uA.

The input stage: To be able to read the supply voltage from which the circuit is also powered, a 1:2 voltage divider was placed at the input pin 5. This voltage divider consists of two 10KΩ resistors and the LM3914 will read voltages that range from 5V to 6.75V, when the battery voltage swings from 10V to 13.5V. These are the values that will be used to calibrate the LM3914.



The schematic is made of two circuits; the one on the left is the voltmeter with all the control resistors. The other on the right is the display panel with the led bar. They connect using a 11 pin SIL header.

Main circuit parts are:

This is how their values are determined:

R3 - defines the current flowing through the individual leds

As stated in the design section, R3 = 4K7 thus limiting the current to 2.6mA.

R4 - defines the upper limit voltage of the voltmeter (pin 6)

We need to make the voltage at pins 6 and 7 stay at 6.75V (which represents 13.5V / 2 after the input divider of pin 5, when the battery is full). To determine the value of R4 we know the current flowing in R3 will also flow in R4 and will be added to the error current (120uA) from the adjust pin (pin 8). Using KVL, we arrive to the formula:

6.75V = 1.25V + R4(120uA+266uA) <=> 
R4 = (6.75 - 1.25)/(386uA) <=>
R4 = 14K2 or more (a 22K trimmer is a good choice)

With the 22K trimmer we are able to change the voltage on pin 7 from 1.25V up to 9.74V which represents 2.5V up to 19.5V. Our required voltage of 6.75 falls well within this range.

R5 - defines the lower limit voltage (pin 4)

Using the voltage divider formula VO = VI * RB/(RA + RB) replacing its parameters with:

RA = 10 * 1K internal LM3914 resistors
RB = R5
VI = the upper voltage limit 6.75V  (corresponds to 13.5V)
VO = the voltage for the lower led 5V  (corresponds to 10.0V)

we get:

5 = 6.75 * R5/(R5 + 10K)
R5 = 28.5K or above (I had an adjustable 100k trimmer laying around!)



List of Components


Amount Part Description
1 IC1 LM3914 10 stage voltmeter
1   DIL socket with 18 pins for LM3914
1 F1 Fuse holder for PCB and a 500mA fuse
1   500mA fuse
2 R1, R2 10K resistor
1 R3 4K7 resistor
1 R4 22K trimmer
1 R5 100K trimmer (47K is also ok)
1 C1 2.2uF/25V capacitor
1 K1 connector with 2 pins, 3.81mm grid
1 CON1 SIL male connector with 11 pins, 90º angle
1 CON1 SIL female connector with 11 pins
1 BAR1 HDSP-4832, 3 colors led bar
1   DIL socket with 20 pins for HDSP-4832



There are two PCBs, the main with all the components except the HDSP-4832 and the panel with the HDSP-4832. This enables you to place the panel anywhere you like or attached to the main PCB.

 There's only one wire jumper that needs to be placed under IC1. All other components should be easy to place



After adjusting the voltage at R5's middle pin to 5V and the voltage at R4's middle pin to 6.75V, the circuit performed as expected, measuring voltages from 10V to 13.5V. The prototype photo is below.

Voltages below 10V will turn off all leds and above 13.5V will maintain all leds lit.


Files available for download:



  1. LM3914 datasheet


Published on Thursday 2010/09/16, last modified on Friday 2018/12/07