Replace Bulb for charging battrey
Purple wire for 5 volt input
Green wire for battery output
If you want charge another type battrey like 6v 12v or 24v you can adjust Variable Resistor
Note
If you use high ampere battrey u need a high power mosfet or replace all 100 ohm resistor
There are not short circuit protection but current limit in this circuit