This is the schematic that I found while surfing. I was wondering if I could replace the LM339 with an LM311 (sorry, I'm clueless as to what the differences are even after reading the datasheets) since I have some of them laying around from an old project.
Low Voltage Alarm