You are correct, I was wrong at thinking that 5v would be enough, I tought that the voltage dropout of the LM340 was 1.25 and the datasheet says 2v, so I used the 12v output of the power supply Im using and now it works. I used a power supply of an old external drive rated at 2A.
Problem may be overheating for the voltage difference, I will search for a stepdown switcher in my box of parts.
Thanks!