Voltage indicator transitions between colours
This Design Idea gives two versions of an indicator light that changes from green to red as a battery discharges. There are many circuits that do this sort of thing, but all the ones I have seen are too complex and costly for my taste. This DI shows a method that uses an absolute minimum of low cost parts: a dual-color LED and four other parts.
Figure 1 shows the simplest version. With 9V on B+ only the green LED is lit because the voltage at the base of Q1 is 1.58V and the voltage at the emitter is the diode voltage VD (1.8V typ.), keeping Q1 off. As the battery voltage drops, the voltage across D2 stays nearly constant, but the voltage at the base drops to the point where Q1 starts conducting. This starts shunting current into D1, the red LED, which receives an increasing portion until all the current goes to the red LED.
Figure 1 Basic voltage/battery monitor
For the typical dual-color LED, the difference in forward voltages is 0.25V, which is also the transition voltage from green to red. The change on B+ that causes a complete color change is 0.25V times the divider of R1 and R2:
This transition is centered around a voltage that is VD minus VBE; about 1.2V (most of the change in VD with temperature is also subtracted out). Taken together, a change on B+ from 7.1V to 5.8V will cause a change from green to red.
Different LED combinations will have different voltage differences, which may not be large enough to effect a complete color transition, but you can still use this design by putting a diode in series with D2.
Figure 2 replaces R1 with a Zener diode, creating a circuit with a much narrower transition. There is no longer a divider effect; a change of 0.25V on B+ will change color. The transition point will be 1.2V + VZ (about 7.2V for the parts shown).
Figure 2 Zener-based circuit
A disadvantage is that you are limited to standard Zener voltages. This is further complicated by the fact that low voltage Zeners can have very soft knees, making it hard to predict what VZ will be at the low current in this circuit. A variation to avoid this problem would use a resistor in series with the Zener to allow some adjustment of the voltage at the expense of a somewhat greater transition voltage.
The resistor values shown produce a current drain of 1mA. With high brightness LEDs, this will be enough for indoor use. But even this low a current is significant with a 9V battery, and you will want to consider the trade-off of the extra current versus the risk of leaving a unit on when it is not needed (you generally need to replace a battery only once because you forgot to turn a circuit off to feel this voltage monitor is useful).
This method will also produce a green to red transition for excess voltage by changing Q1 to a NPN (and swapping emitter and collector). A window comparator can be created with both an NPN and a PNP.
For more detail: Voltage indicator transitions between colours