Servo movement resets ATMEGA328

No, I upload the sketches by USB.

I use BlueTooth to get and set data at the AtMega.

I will use the 6AA pack and test how much time it is turn on.

Can you tell me how many amps must be the AA battery ? Because they are in different amps versions.

Also, I have a 12v/4Ah. Do you think if I connect it before the 7805, the 7805 will regulate the voltage and amps to the ATMega328 and doesnt destroy it ?