But Im using a 3.7V battery that im measuring which the meter clocked at 3.17V. Im using 2 of those same batteries in series (7.4V) as the source that goes into the 7805 regulator.
But when I connect the 3.7V battery (3.17V charged), all 4 LEDs light up instead of just the 1st one which should according to the math.
I uploaded the circuit but i think it'll be quite hard to follow:
I make the voltage thresholds 3.51, 3.86, 4.00 and 4.09V, assuming the regulator is 5.00V and the
resistors are accurate. You can measure the voltages for each divider with a multimeter to confirm these
values.
Well, Tom - for one thing the LEDs wil go out one by one as the voltage rises - you've got the + and - opamp inputs swapped.
But they won't even do that - because the LM324 is only rated with inputs up to Vcc- 1.5 volts, so with a 5v supply this won't work with inputs above 3.5v - most of the cell's working range.
BTW I'd personally use a comparator (which is designed for comparing voltages) like the LM339
quad comparator. Some opamps don't tolerate large voltage differences between their inputs,
since they are designed for negative feedback which keeps them at the same voltage.
Most comparators have open-collector outputs, so you'd have to change to driving the LEDs to the
positive rail and reverse the sense of the inputs.
In fast circuits opamps make poor comparators as they take a while to recover from saturation, not that
that's an issue here(!)
Thanks for the comparator/LM3914 suggestions. Ill try that when those parts arrive (just bought them). But in the meantime Im working with this. Like this and modeled it on iCircuit:
I just want to make sure my connections are correct.
Please assume I figure out a way to route the wires. I havent routed them, I know. Im just thinking about the pin connections at the moment. Ill use hookwire for now.