LED Battery Gauge board wiring help

Thread Starter

Kdonald525

Joined Jan 6, 2019
7
Hello, I am trying to re-use an existing push button voltage meter/gauge. The board contains 4 red SMD LEDS each running off 1.8 volts wired in parallel with a common ground (through push button). What I'm trying to do is use it monitor 18650 lithium cells and have the leds light up progressively based on input voltage so the first one would light up if voltage on that led is over 21 volts, the second if over 23, the third 25, and the last 27-29 volts. The batteries are wired in a 7 series configuration. Basically, I need something to convert the higher input voltage to 1.8 volts for each LED. Anything I use will be in an enclosure so I need something that won't get too hot if possible. Thanks for any suggestions,
-Kevin
 

MrChips

Joined Oct 2, 2009
21,367
I think it would be simple to use an LM3914 LED bar display driver IC.
You can design in the desired range and offset and have as many as ten LED indicator lights.
 

dl324

Joined Mar 30, 2015
10,998
Welcome to AAC!
I am trying to re-use an existing push button voltage meter/gauge. The board contains 4 red SMD LEDS each running off 1.8 volts wired in parallel with a common ground (through push button).
What does this mean? Please post a schematic.

Do you want a bar graph or moving dot?
 

MisterBill2

Joined Jan 23, 2018
6,348
If the LEDs are wired in parallel then some circuit revision is in order. There would seem to be two options, one to use just a different resistor for each LED to adjust the voltage versus intensity relationship, the second option is to be much more complex and use an active device or assembly to detect the battery voltage. This method will require an external power supply, or at least some form of regulated reference arrangement.
So before going into an analysis and design any farther we need to know in more detail just what the TS actually is hoping for.
 

Thread Starter

Kdonald525

Joined Jan 6, 2019
7
Thanks for responding. This switch will be running off lithium cells inside an ebike battery so the source voltage will vary based on the charge state of the series wired cells. This is why I need a something that would keep each Led's voltage at 1.8 volts even thought a specific cell has a varying voltage range.. For example, based on the possible voltage range of 15-21v on cell #5 I would like led #2 to light up only if the voltage on that cell is between 19-21 volts. Cell 6 would light up led #3 if between 22-25 volts and cell 7 lights up led #4 if between 26-29 volts. Please see attached photo.
Thanks
 

Attachments

dl324

Joined Mar 30, 2015
10,998
The board contains 4 red SMD LEDS each running off 1.8 volts wired in parallel with a common ground (through push button).
From the picture, the LEDs aren't wired in parallel. They have a common ground and are only in parallel if you short the pins on the connector.

leds light up progressively based on input voltage so the first one would light up if voltage on that led is over 21 volts, the second if over 23, the third 25, and the last 27-29 volts.
If a bar graph indication will do, you can do it with 4 opamps.

For example, based on the possible voltage range of 15-21v on cell #5 I would like led #2 to light up only if the voltage on that cell is between 19-21 volts. Cell 6 would light up led #3 if between 22-25 volts and cell 7 lights up led #4 if between 26-29 volts.
Seems like you changed the requirements.

This would require 4 window comparators (2 comparators for each window) and you'd have to use comparators with internal pull up resistors or use opamps as comparators (as I suggested for the bar display).
 

MisterBill2

Joined Jan 23, 2018
6,348
Use comparators, not op-amps, and there is no need for the window function, just let it run as a bar-graph display, with 1,2,3 or 4 leds on. And it should be possible to do the whole measuring thing with a diode stack to serve as the negative reference. Or put the diode stack in the positive side. As the voltage rises more diodes go into conduction and so more LRDs illuminate. But they will come on gradually and so it will give you even better resolution. Calculating the current limiting resistors will be a bit complex, though.

Has the original driver assembly for this array failed, or are you seeking a different range?
 

dl324

Joined Mar 30, 2015
10,998
Use comparators, not op-amps, and there is no need for the window function,
The LEDs are wired as common cathode; most comparators are open collector. (mis)Using an opamp as a comparator gives current source capability.

It's the OP's project. It's his choice if he wants a moving dot window function.
 

Thread Starter

Kdonald525

Joined Jan 6, 2019
7
Yes, sorry I mistakenly said they were in parallel. I'm trying to use this board because it is built in to the original case of the battery. It appears this is more complicated than I expected. The original battery management system is what controlled this board and that was defective and replaced with an aftermarket unit that has no led board controller on it. Is it possible instead to wire the leds in parallel and just reference total voltage of the pack instead of individual cells? For example, if the pack voltage is at 28v all leds would light, if pack is at 26v the first 3 lights, 24v the first 2, and 22v the first light only....
 

Thread Starter

Kdonald525

Joined Jan 6, 2019
7
Thanks for the recommendation but I'm really trying to use the factory led board to make it easier for the owner to use as he's had this for many years..
 

dl324

Joined Mar 30, 2015
10,998
Is it possible instead to wire the leds in parallel and just reference total voltage of the pack instead of individual cells?
That's what I assumed you meant. Accessing the voltage of individual cells wouldn't give you the total voltage.
For example, if the pack voltage is at 28v all leds would light, if pack is at 26v the first 3 lights, 24v the first 2, and 22v the first light only....
My first circuit suggestion in post #7 would do that.

Here's a circuit suggestion that I did based on your original requirements (which you've now changed twice):
upload_2019-1-8_8-36-55.png
The labels on the non-inverting inputs are the trip point voltages. The labels on the opamp outputs (under the pin number) are the actual voltages, assuming a 1/3 divider on the non-inverting inputs.

I used an opamp as a comparator which is normally frowned upon, but you need current source capability because you have common cathode LEDs and I don't think the extra cost of using some special comparator with an internal pull-up was worth it.

It was designed for the voltages you specified in your first post. It's simple arithmetic to change the trip points.

The way this works is that I chose a 12V supply for the opamp (from the zener). I set up a voltage divider that puts 1/3 of the total battery voltage at the opamp inputs. A voltage divider on the inputs puts the desired switching points on the inverting opamp inputs. Whenever the voltage on the non-inverting input is above the inverting input, the corresponding LED would be turned on.

The resistor values I used in the voltage reference divider are not standard; they're the actual resistances needed to implement the trip points you specified. For example, R8 is 670 ohms. You could cherry pick from a batch of 680's (5% tolerance) and look for one that's 670, or you could put a 47k resistor in parallel with a 680 to get 670. Only R5 is a standard value. Or you could use 1% tolerance resistors.

The value of the LED current limiting resistors is your choice. You probably want the current to be as low as possible to avoid unnecessary battery drain.
 

dl324

Joined Mar 30, 2015
10,998
Thanks Dennis, I appreciate your persistence and patience :)
If you use that circuit, be aware that the maximum voltage on any input is limited to VCC-1.7V (I chose a more conservative 3V), the high output voltage in only guaranteed to be VCC-1.7V (use this value when calculating the LED current limit resistors), and you should use a decoupling capacitor.

The zener voltage will affect the trip points and you should adjust the resistances on the voltage divider for the inverting inputs based on the voltage of the zener you choose. Keep the zener current high enough so that varying battery voltage won't have a significant effect on the trip points.
 

MisterBill2

Joined Jan 23, 2018
6,348
This circuit will draw a fair amount of current and so it should be connected through a momentary switch for checking the battery voltage, rather than being powered continually.
 

dl324

Joined Mar 30, 2015
10,998
Understood - thanks guys!
If you're going to have a switch, you should increase the zener current to 20mA.

Also note that the tightest tolerance zener will probably be 5%, so the voltage will be 11.4-12.6V. The resistive divider needs to be adjusted appropriately.
 
Last edited:
Top