I have a circuit containing an atmega328p microcontroller with hc-05 bluetooth module. microcontroller is powered via 7805 regulator. When 7805 is supplied the source voltage by a 9V battery, the circuit works fine on a breadboard, but the same circuit fails on a PCB. I have tried two different PCB designs, but they have the same problem. The battery input voltage falls from 9V to less than 1V. I have verified multiple times that the PCB design is the same as the breadboard design. Is that a fundamental rule to PCB designing that i am missing?
Is that a fundamental rule to PCB designing that i am missing?
Simple as that.
There are, however, differences. The breadbord is pretty bad, from an electrical engineering perspective. It adds stray inductance, capacitance and resistance everywhere. This usually makes your circuit worse. In this case, maybe by pure luck, the exact same design on the PCB oscillates because it now lacks the stray capacitance and inductance, but I wouldn't bet on it.
Oscillation in a circuit can make things draw much more power than expected, but you won't be able to verify this easily without an oscilloscope¹. Without an oscilloscope you have limited means to debug this issue.
If you power this with a battery, it sounds to me that you don't have a well-equipped lab, but you do have a multimeter. I don't know what you mean by "verified" that the PCB and breadboard are the same, but you should check for shorts with a multimeter, not just look at the PCB.
1. pun not guaranteed