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.