LM393 2x AA Low Level Battery Indicator?

Hi all!

I am trying to make a one LED low level battery indicator for 2x AA, so 3V. I searched and came up with a AA battery being dead when it hits 1.3V, or 2.6V total. I did make a circuit but I'm not sure it is correct:

The battery level indicator is in the bottom right corner.
The MM3Z2V7 diode is a 2.7V Zener diode.

Thanks in advance!

Would using the XC61CN2702MR be better? Like this:

It is a "2.7V Open Drain Loweffective 1 Voltagedetector SOT-23(SOT-23-3) Monitors & Reset Circuits ROHS"

Maybe I'm looking at it wrong, but I don't see how your circuit can work. First, it looks like you have the comparator inputs reversed. The output will go low if the non-inverting input is lower than the inverting input. So it looks like the LED would be on with new batteries installed, which I assume is the opposite of what you want.

Second, as battery voltage drops, the two inputs become equal, but never reverse. The zener simply becomes irrelevant. Neither input can be higher than Vcc, so you never have a crossover. I think you would need to compare some fraction of Vcc to a reference voltage.

I haven't looked at the rest of your circuit, but could you possibly use the processor to do this? If it has an internal reference voltage of somethiing like 1.1V, you could divide down Vcc and do an analog read, then have another pin drive the LED if the voltage is low. Or, I think the 841 even has two built-in comparators that might work.

Thanks @ShermanP

Yeah, I totally fudged the LM393 circuit, so I assumed it was wrong. I was going to use one of the pins on the Attiny841 to read the voltage, but I am out of pins. So I searched on LCSC.com "Monitors and Reset Circuits" and came up with the XC61.....

It switches its output to 0V when the input voltage drops below Vref, which is 2.7V. That way it can switch an LED when the batteries are dead.

With the battery nearly dead, the LED will not light for long. Do you plan to be there when that happens?

Yes, because this is for a laser gun. Now that I think about it, I probably should add a power switch.

I've never ordered parts from LCSC. How well does it work re shipping times and cost?

Well... shipping has increased quite a bit this last year.

Screen Shot 2022-01-11 at 7.25.47 PM

That is the only option at the moment, although they usually have at least 4 different shippers. That price is for 1.9kg / 148 parts. Shipping is usually on time, although I have had it several days late once.

Thanks. That completely rules them out for me.

1 Like

Is this voltage also powering the Attiny?
Maybe you can read supply voltage internally.
Leo..

1 Like

Hi, @kgray9

Can I suggest rather than use netnames to join ALL your components, you actually draw a circuit with wires.
That way you make a logical schematic that can be logically read with signal flow and power flow.

Just a suggestion.

Tom... :grinning: :+1: :coffee: :australia:

1 Like

A typical alkaline battery will be only about halfway through its useful life at 1.3V, see discharge graphs here;

https://www.powerstream.com/AA-tests.htm

1 Like

Wawa is right. You don't need a pin or any external circuit to measure battery voltage. You are powering the ATtiny directly from the battery, so you can do an ADC reading of the internal 1.1V reference voltage, but using Vcc as the actual reference voltage. So 1.1V is the source you are measuring, and Vcc is the reference. It's kinda backwards, but it tells you the difference between Vcc and the internal 1.1V reference. As the battery discharges, the 1.1V input will measure higher. Section 16 of the datasheet goes into all this, particularly the register descriptions at the end.