I've designed a circuit that I've already had tested it on breadboard and it has worked fine. When I did it on a PCB a new issue has appeared. The voltage regulator (I'm currently using a 7805) gives right values at no load, but when I attach the Atmega328 on it the output voltage goes to 1V instead of 5V and input goes to 2.5V, instead of 12V at no load. I've already try to change the capacitors. As specified on DS, after rectify it I put a 330nF on INPUT and another of 100nF on OUTPUT, both ceramics. Can someone, please, figure out what's going on?