7805 linear voltage regulator is an inexpensive solution. But the ic doesnt include any form of protection. So, the voltage and current protection should be externally added.
There is high chance of reversing the polarity if you dont keep which wire is what. I did the same mistake and blown the aluminium electrolytic capacitors with 7805 ic.
Below is the revised circuit from 5V voltage regulator using 7805 | Complete Process.