A TL431 shunt regulator is a perfect choice for many applications. You can use it as a comparator with hysteresis by taking advantage of its inner voltage reference along with few additional components. You can use this comparator with hysteresis, like a Schmitt trigger, as a simple battery monitor (Figure 1). You calculate the threshold voltage, VT+, of this comparator as VT+=VREF×(1+R1/R3), where VREF, the internal reference voltage of shunt-regulator TL431, is 2.5V.
When the battery voltage is higher than the threshold voltage, the cathode voltage of the TL431 is at its low level of approximately 2V, and transistor Q1 turns on, lighting LED1. You calculate the release voltage, VT–, of the trigger as VT–=VREF×(1+R1×R2/(R1+R2) ×1/R3).
When the battery voltage is less than the release voltage, the cathode voltage of the TL431 goes to its high level—to the battery voltage. Transistor Q1 turns off, and LED1 does not shine. LED1 turns on again when the battery voltage, after recharging, exceeds the threshold voltage.
Read More: Shunt regulator monitors battery voltage