# Battery level indicator with LM3914 - need help

#### Pabert

Joined Mar 8, 2020
20
Hello,

I need to create a battery level indicator for a personnal programming project. I want to use the LM3914 IC as I have one in my possession (https://www.ti.com/lit/ds/symlink/lm3914.pdf). The problem is that I don't really know how to use this IC with my battery (it is a 4 cells NiMH battery, so the voltage range goes from arround 3.6V when empty to 6V when fully charged) as I'm pretty bad at designing circuits
Can someone help me by giving me a working circuit for a 3.6V to 6V battery ? That would be awesome !
Also, I need this IC to be powered up from the battery as I can't have an other power source. Is it possible ?

Thanks

#### KeithWalker

Joined Jul 10, 2017
1,397
The voltage across a NiMH battery is not a very good indicator of the remaining capacity. The discharge curve is fairly flat but varies in slope depending on the load; see attached:
Regards,
Keith

#### Pabert

Joined Mar 8, 2020
20
I see, anyway I don't need it to be very precise. Only to have an "idea" of whether the battery is close to full charge or low charge.
As I have a load that varies from 500mA to 2A, the range would be something from 3.6V to 5.2V

#### Pabert

Joined Mar 8, 2020
20
Yes I have seen them. My problem is that I don't really get how to adapt them for the voltage range I need

#### Alec_t

Joined Sep 17, 2013
11,797

#### ericgibbs

Joined Jan 29, 2010
11,582
hi alec,
Since I left ETO I have not been able to keep the Tools I created up to date.
They now look yuk!!!
Eric

#### Alec_t

Joined Sep 17, 2013
11,797

#### Pabert

Joined Mar 8, 2020
20
This looks nice but I can't change the RLO voltage :/ It is fixed at 0V

#### ericgibbs

Joined Jan 29, 2010
11,582
hi P,
This zip has a LM3914_20.exe file that will run in XP or Win10, you will need to download/install VB6 runtime files.
E

#### Attachments

• 17.6 KB Views: 11
• 20.8 KB Views: 13

#### Pabert

Joined Mar 8, 2020
20
I'm not sure to understand how this tool works.
I entered 5.2V in supply voltage, Vled, Vsig and Vext HI. And 3.6V in Vext LO but I don't get how to get good resistor values.
I mean, is it possible to take for example this schematics and adapt resistors values ?

#### ericgibbs

Joined Jan 29, 2010
11,582
hi P,
Note that circuit has a 10k pot and a 4k7 resistor , used to reduce the 12V to a lower value.
Your problem is that you want to supply the project with the 3.3V thru 6V battery you are testing.

Do you plan to keep the LM3914 permanently connected to the battery, as it will draw current.

E

#### Pabert

Joined Mar 8, 2020
20
Yes that's what I plan to do.
It won't be a problem. The project will not be powered on permanently so the current consumption of the LM3914 and leds will be OK for me.

#### Alec_t

Joined Sep 17, 2013
11,797
This should do what you want :-

R3 and R4 halve the battery voltage going to the Sig pin, because the Sig voltage must be at least 1.5V less than the V+ voltage.
R1 sets the LED current at about 8mA.

Here's the sim result :-

Last edited:

#### Pabert

Joined Mar 8, 2020
20
That seems great !
But if I understand correctly the simulation, it will measure voltages from 1.6V. What should I change for it to measure from 3.6 to 5.2V?
By the way, may I ask you the spice model of the LM3914 ?

#### Pabert

Joined Mar 8, 2020
20
"R3 and R4 halve the battery voltage going to the Sig"
I guess I don't know how to read I will test it whenever I can and tell you the result, thanks ! Still, I would like to have the LM3914 spice model if you can provide it, as I can't find a working one. I want to train on LTSpice in the future

#### Alec_t

Joined Sep 17, 2013
11,797
Here's my LM3914 model sub and asy files, together with a Test asc file.

#### Attachments

• 1.9 KB Views: 5
• 1.5 KB Views: 3
• 5.5 KB Views: 5

#### Pabert

Joined Mar 8, 2020
20
Okay so that seems to work ! Thanks, I tested with a voltage source.
But I have an other (and last one, I think) question. Your circuit works for 3.6 to 6V. But the full voltage of my battery seems to be closer to something like arround 5.2V. How can I adapt this circuit to measure from 3.6V to 5.2V ?

And thanks for the spice files !

#### Janis59

Joined Aug 21, 2017
1,245
Generally for battery level indicating there may be two conflicting ways to act. First is let the Atmel-328 (or Arduino) uses one analog channel to make the Vcc digitalisation, thus soft is those making a figures on display and/or buzzing and/or alarm blackouting. Other way is to remembe that even most cheapest NE555 may serve well and rather precise as comparator, thus igniting the green lamp when voltage is over alarm and red when below alarm and yellow when in-between margins of unsafe level. Red lamp may use for disabling needs at wish. Yet similar functionality is already in-built in plethora of charge controllers, at least with dozen I have already gamed with. Just turn-on the Octopart search engine.

#### Alec_t

Joined Sep 17, 2013
11,797
How can I adapt this circuit to measure from 3.6V to 5.2V ?
Like this :-

You may need to tweak the value of R5, depending on component tolerances.