Ralph’s simple battery charger is essentially this simple voltage regulator circuit. He chose the voltage-setting resistors R1 and R2 to give him 2.5 V on the TL431 when the output sees 3.6 V ...