Automatic Lead acid charger
The circuit above is a simple circuit that can charge or just maintain a 12v lead acid battery. This circuit uses a Lm317 and the circuit can only supply up to maximum of 2 amps but with a big heatsink. To use the circuit you would connect the power side to a 14 to 18v power supply and the green led turns on. Then you would connect the 12v lead acid battery to the battery side and the red led turns on. Use and turn the 5k potentiometer, so that the output voltage matches 13.3v (which is a fully charged 12v battery). When the battery charges the battery will take in a lot of current causing the transistor to switch on and light the led, but as it continues and gets charged up, the battery takes in less current, causing the transistor and led to turn off.
To increase the current capability to charge larger batteries, parallel another 2 or 3 Lm317 regulators.
On the left shows the pinouts of the Lm317.
Disclaimer: This is just a DIY charging circuit for a lead acid battery, this circuit may not be that reliable, and it can create a lot of heat from the Lm317 which is a fire risk. So do this at your own sake and i suggest buying a proper battery charger, this is just a cheap solution.