I have successfully designed & tested a circuit using arduino uno for controlling a dc motor (MAX 50A,12V,SHORT-DUTY) By using a relay module and current sensor (configuration given in schematic). Then i tried to convert it into a PCB & designed a schematic (given below) & fabricated it, I use the same Micro controller (Atmega328p-pu) which i used in arduino board (program it using arduino uno & put it into PCB). when i tried to run it works for first cycle of my application (when i press switch 1-on & when current reach 5A have to off) but after 1st cycle Atmega328P-PU freezes & it does't get any input from switches (if i use arduino uno instead of Atmega328P-PU means it works well) , i have tried all the possibilities to make it work but failed. Help me!!
My bet is you're inadvertently holding the micro in reset. Remove C3, and short its pads with a piece of wire so the only thing on the reset pin is R3. If you must have a cap on the reset pin, it should be from reset to ground.