How to get 5 volts from a higher voltage? Of course by LM7805.
The fact that the chip is the LM7805 linear voltage regulator. This means that all the excess stress she planted on his. That is, when an input voltage of 12 V, she is forced to provide for themselves a voltage drop of 7 volts. Multiply that by at least a current of 100 mA, and already get 0.7 W power dissipation. With a little high currents or the difference between input and output voltage without heat sink is not enough.
Step-down switching regulator – [Link]