Hi,
the key to success is to know about the currents and the current paths.
Frequency, magnitude, impedance.
One way is to seperate the GND paths of both circuits. The separation should be done in a way so that the microcontroller and all it´s sensitive circuit - including - 7805 - works in a small area with a common GND plane.
If you connect the PCB GND and the motor GND with different wires directely form the battery, then the PCB voltage is as clean as can be. But filters in the wires may improve noise additionally.
The problem is when you have a motor power control that needs the same GND reference for any signals, like PWM control signals, analog measurement signals.. Then both system GNDs may have a voltage difference leading to malfuntion.
A solution to this problem could be to wire GND from battery to the motor control and supply the microcontroller with extra wires from the motor control. Since the GND lines from motor control to microcontrolelr won´t have much current then voltage drop is minimized. (It may differ to the battery GND, but this is no problem)
Maybe draw a picture of your circuit: Battery, motor, motor control and microcontroller circuit and additional circuitry, if there is any.
Then with a colored marker show the high current path, especially where is pulsed current.
Then you should see where you can expect voltage drop, and where you can rely on the voltage reference.
Show us your picture and we can better assist you.
Klaus