In remote controlled airplanes, a 4.8V (4 cel) battery is used to power electronics. To prevent flying an airplane with an empty battery, this battery condition checker is developed.
It is based on a PICAXE 08M2, powered from the NIMH battery, measuring the voltage with the A/D converter. The value is compared to set levels in software (4.2V / 4.8V / 5V / 5.2V) and drives 4 LED's. Since the 08M2 is short on IO pins, the LED's are multiplexed.
The software cycles fast enough to detect glitches (if servo's draw much current, and the battery is older (higher internal resistance). Especially these glitches can cause a hard reset of the RC receiver, causing loss of control for up to 2 seconds. (2 seconds is lethal for an RC airplane).