The red LED lights up while the battery is charging. The capacitor/resistor circuit is a stand in for a typical 12v battery. When the battery is charged, the green LED turns on, the red turns off, and the circuit stops charging. To reset the simulation, turn off the switch and use the momentary pushbutton to short the capacitor.