I found this diagram on the internet which seems to divide the voltage down to 5V and still be able to deliver 1A with the 7805 just like I want.
It will use a 12V lead acid battery and a 12V IN transformator. The 5V OUT is for the RPi and the 12V OUT is for a solenoid I'll be using in my project.
My question is, why do we need the 1k resistor in this? Also, does the 1N4007's make the battery charge from the 12V IN or what are their purpose?