If I understand what I read you were trying to connect a Voltage regulator 7805 with a 12v input.
I've used them in power supplies and many other apps and you have to use a 7v to 9v max input voltage. 12v is too much and it will fry the IC.
Correct me if I'm wrong.