Custom Circuit Makes For Better Battery Level Display

Isn’t it always the way? There’s a circuit right out of the textbooks, or even a chip designed to do exactly what you want — almost exactly. It’s 80% perfect for your application, and rather than accept that 20%, you decide to start from scratch and design your own solution.

That’s the position [Great Scott!] found himself in with this custom LED battery level indicator. As the video below unfolds we learn that he didn’t start exactly from scratch, though. His first pass was the entirely sensible use of the LM3914 10-LED bar graph driver chip, a device that’s been running VU meters and the like for the better part of four decades. With an internal ladder of comparators and 1-kilohm resistors, the chip lights up the 10 LEDs according to an input voltage relative to an upper and lower limit set by external resistors. Unfortunately, the fixed internal resistors make that a linear scale, which does not match the discharge curve of the battery pack he’s monitoring. So, taking design elements from the LM3914 datasheet, [Great Scott!] rolled his own six-LED display from LM324 quad-op amps. Rather than a fixed resistance for each stage, trimmers let him tweak the curve to match the battery, and now he knows the remaining battery life with greater confidence.

Perhaps the 18650 battery pack [Great Scott!] is building is for the e-bike he has been working on lately. If it is, we’re glad to see that he spot-welded the terminals, unlike a recent e-bike battery pack build that may have some problems down the road.

10 thoughts on “Custom Circuit Makes For Better Battery Level Display

      1. … but in the 80’s nobody would have used a DC-DC-converter as a voltage reference. A regulated supply is not necessary here, a TL431 will do if the measured voltage is scaled down.

      2. Battery gauge IC’s (aka gas gauges) are very inaccurate. This has been a problem for decades. A significant part of the problem has to do with non-linearities in terminal voltage vs coulombs stored in the battery. Delta V/1coulomb in != delta V/1coulomb out. When designing a the first “smart phones” in Canada before they were called smart phones) we found that knowing the devices power profile, and the time spent at each stage of that profile, was much more accurate than an battery gauge.

  1. Some folks use Indium (In) solder for aluminium terminals, for low drain/high surface area its fine as long as you use plenty of non corrosive flux, etc. As the melting point is less than 156C its far less damaging than conventional tin/lead or Al solder.
    You can roll your own solders quite simply but try not to get fingerprints on it.

    1. Harris makes a solder set with a special flux that will solder aluminum to aluminum or steel. I dont think it is indium based but I could be wrong. I have used to to make up LiPo packs and it works well.

  2. What about the circuit I suggest?
    Take the LED outputs and feed them back into a regulator through diodes so that the curve with LEDs on matches that of the battery? You would lose some sensitivity at the low end but that would not be too bad.
    Would work best if each diode was selected for a slightly higher voltage ie R–O–Y-G–B-W

  3. Personally, I would have gone all-in, and used a microcontroller to measure both the voltage and the current, so that it can estimate the open-circuit voltage while under load. That way, the display doesn’t bounce up and down whenever the load changes.

    If you wanted something really fancy, the microcontroller could estimate the internal resistance of the pack, since is has both voltage and current measurement, if there are sufficiently large steps in the load current. The internal resistance is a fairly good indication of the state of health, if you compensate for the pack temperature.

    1. There is two OpAmp left in his circuit.
      Maybe you can use on to read the current and the other one to tweak the reference voltage?

      The non-linearity shall be the same whichever the load no? (like, the voltage curve will have the same look, so tuning the pots still have to be done only once)

  4. This is a terrible design.

    Should be using comparators such as LM339 instead of op-amps used as comparators. LM324 works but many op-amps won’t.
    Two op-amps are unused, and could be performing useful functions such as alarm buzzers or display brightness modulation. Also, the inputs aren’t tied down, maybe leading to oscillation.
    Low voltage reference such as dirt cheap TL431 should be used, rather than energy guzzling (2mA quiescent), large and expensive boost converter generating high reference voltage. Should instead use a buck to power most circuitry from low Vcc, perhaps 4 – 5V.
    Trimmers should be stacked, this guarantees sequential illumination of LEDs and affords much more control range for each trimpot. Also, high and low side fixed resistors for dividing out the unused portion of the 0-BV comparison voltage range.
    Trimpots should be higher value, each wastes 2mA while meter is powered.
    Inefficient LEDs driven with high current and a lot of power wasted in dropper resistors, when battery is fully charged the meter might draw 75mA.
    Extremely high current draw, if left connected and powered this circuit might consume as much as 1.8Ahr per day. This could discharge the entire battery pack in a week or less, depending on capacity.

Leave a Reply to BotherSaidPoohCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.