# Cheapest way to detect low voltage of a battery

I have 29V battery which drops to 24V at about 30% capacity.
I want to detect when the battery goes lower than 24V and generate a 12V signal. (I have 12V auxiliary supply for lights etc)

Since I'm good with only 555, I tried below and it seems to work in simulation.
Do you see any issues in implementing it practically? (Like, are the exact resistor values 1k, 4k available in market and do tolerances mess up...)

Appreciate any better suggestions different from this circuit.

• Comments are not for extended discussion; this conversation has been moved to chat. Jun 20, 2022 at 15:43

Sometimes, it's just fun to mentally play some games. This is one of those few, for me. So I'm going with it.

The LMx39 comes in a quad package. All of them share the same $$\V_+\$$ and $$\V_-\$$ supply pins. So all four of them are powered or else none of them are.

The current drawn from the $$\V_+\$$ should be constant. (Not so with $$\V_-\$$, which may be sinking output currents.) So in the following text, I'll focus on what can be done on the $$\V_+\$$ side, as turning an LED on and off will impact the $$\V_-\$$ side, way too much.

Let's look at the TI LM139/LM239/LM339 datasheet

For the area you are considering, roughly where the battery voltage is between about $$\20\:\text{V}\$$ and $$\30\:\text{V}\$$, the supply current ranges from $$\700\:\mu\text{A}\$$ (at $$\125^\circ\,\text{C}\$$) to more than twice that at around $$\1.5\:\text{mA}\$$ (at $$\-55^\circ\,\text{C}\$$), starting at $$\20\:\text{V}\$$ and rising a bit from there as the supply voltage increases. Not exactly a constant current supply. But interesting, nonetheless.

Keeping in mind that these are typical values and that the ICs will indeed vary one from another, let's drill in to a temperature range from $$\-20^\circ\,\text{C}\$$ to $$\+55^\circ\,\text{C}\$$ (as shown with added lines and circles), which is usually more than good enough for many purposes. Here, mid-voltage, I think we need to deal with from about $$\1.05\:\text{mA}\$$ to about $$\1.40\:\text{mA}\$$ (typical.) This is $$\-27\%\$$ for a $$\+75^\circ\:\text{K}\$$ range, or $$\\frac{-27\%}{75^\circ\:\text{K}}=-3,600\:\frac{\text{ppm}}{\circ\:\text{K}}\$$.

That's actually quite interesting as it is quite close to various values given for copper (of varying purities) that may range from about $$\+3,300\:\frac{\text{ppm}}{\circ\:\text{K}}\$$ to about $$\+3,900\:\frac{\text{ppm}}{\circ\:\text{K}}\$$. Perhaps it is possible to consider using a wire-wound resistor to temperature-compensate some circuit in order to yield a useful voltage reference??

It does cross my mind.

Let's check out Vishay's datasheet on the Mills wire-wound resistors:

The TC=B looks interesting. (So does TC=E, but I prefer using the value I recall as more typical of copper.) Suppose we plan for about $$\I_{V_+}=1.2\:\text{mA}\$$ and use a $$\3.3\:\text{k}\Omega\$$ MR106 resistor from Vishay and force $$\I_{V_+}\$$ through it?

At minimum-temp ($$\-20^\circ\,\text{C}\$$), this is a voltage drop of about:

$$1.40\:\text{mA}\cdot 3.3\:\text{k}\Omega\cdot\left(1+ \left[-20^\circ\,\text{C}-25^\circ\,\text{C}\right]\cdot 3,900\:\frac{\text{ppm}}{\circ\:\text{K}}\right)=3.81\:\text{V}$$

At maximum-temp ($$\55^\circ\,\text{C}\$$), this is a voltage drop of about:

$$1.05\:\text{mA}\cdot 3.3\:\text{k}\Omega\cdot\left(1+ \left[55^\circ\,\text{C}-25^\circ\,\text{C}\right]\cdot 3,900\:\frac{\text{ppm}}{\circ\:\text{K}}\right)=3.87\:\text{V}$$

So... That's not bad. We can at least at first blush imagine that we can generate a pretty nice constant voltage drop using this device and a wire-wound resistor.

Let's go with that!!!

simulate this circuit – Schematic created using CircuitLab

This should get the job done! I've obviously not tried it. Cripes. I just made it up a few minutes ago. But... I think it may work okay. And you have a potentiometer you can use to adjust the threshold.

There's no hysteresis in the above (I could add some, with one resistor, but I didn't want to explain that part, for now. So I'm holding short on that, unless you indicate you want something like that. It's easy. It's cheap. But it requires more talking. And I wanted to just stop at this point and get a response, first.)

Keep in mind that you have four of these in a package. So you could set up multiple thresholds and multiple LEDs if you wanted. This could allow you to use an LED bar to give you more information into the battery voltage. Up to four distinct LEDs and four distinct thresholds, if you wanted.

Anyway, it's a thought.

Keep in mind that I've made an assumption about the supply current. This means you may want a few wire-wound resistor values. Not just the one mentioned ($$\3.3\:\text{k}\Omega\$$.) Some nearby values may be helpful. These allow you to adjust the thresholds of all four of the LM139 opamp sections at one time. So, while you have separate potentiometers for each section (if you go that far), you also have a global control mechanism that allows you to adapt to any particular package behavior by changing the value of $$\R_1\$$. This means this would be a quite flexible design, I think.

Here's a simulation. (Temperature variation isn't part of it as: [1] the point is to show that the basic topology does what I say it does; and, [2] I'd need to create a more sophisticated LM139 model and a better model isn't the point of this added simulation; and, [3] if I added a better model to handle temperature, all the model would do is what I tell it to do and the results would be what I said, so it wouldn't really help to prove anything -- only building one of these will do that.)

The idea is cute enough that I actually intend to try it out here. I need to order some wire-wound resistors, first. And some LMx39's, too. (But they are useful enough that ordering a few hundred or thousand just makes sense to me. So I'll do it.) It's fun to see how these kinds of things test out in practice. I have a heat-gun to apply. So I shall have some fun, if someone doesn't poke a huge hole in my thoughts.

I love playing with ideas like this. It is what wakes me up and puts me to sleep. Nice question, really. You made my day. And considering a way to get both temperature compensation of the LM139 and using that fact to create a needed temperature-stable voltage reference for the comparator behavior is pleasant.

• Wow. This is going to be very hard to beat, especially on the bang for buck (I mean, cent) front. A transistor and a Zener might be a tiny bit cheaper but definitely way less stable. Jun 20, 2022 at 18:07
• @TooTea I think it is also kind of fun that one can actually make a sort-of bar-graph using LEDs since there are four sections and each one can target a different voltage. Also, if one can find a (variable) wire-wound potentiometer (with copper), then all four sections can be slewed back and forth, together and as a whole piece. It's something worth a little playing, just for fun, I think.
– jonk
Jun 20, 2022 at 18:13
• Just ordered some (100) of the LM239N (DIP14) version direct from TI. Very, very cheap!!
– jonk
Jun 21, 2022 at 4:11