I'm working on a battery powered device and would like an LED to come on when the battery is getting low. In the given schematic, the LED is a red LED having a forward voltage of 2V, Lite-On product number LTL-307EE. I've come up with the following quick and dirty design to check it out:
The battery passes through a switch (so it's not always on), and then a 3V3 buck-boost supply to run the system. I only want the LED to come on when the system is powered and the battery is below a certain threshold (3.4V in the design below for prototyping).
I'm using an LM393 as I have some available and have made sure to attenuate the inputs to not exceed the input limits (Vcc - 2V).
My concern is that when the system is unpowered, the battery will still be feeding up to 4.2V into one of the comparator inputs. The other inputs will be floating about. The current will be very low (uA) but is this likely to cause damage? If so, is there a way to add protection to this design?
Also, is there a better option for the comparator? The input voltage limit on the LM393 is a bit restrictive at such a low supply voltage.