Servo movement resets ATMEGA328

Hi everybody, thanks a lot for all your replies. Im happy because Im learning a lot with you :slight_smile:

Look, I will tell you what a I have thinked yesterday night. I have a medium protoboard and two mini-protoboards. I will burn the sketch in three ATMega328 and prepare the three protoboards to work them standalone.

About the things that must be powered, each circuit have the ATMega328 and the necessary components that it must have to work (10k resistor, two 22pf capacitor, crystal oscillator, etc) and also I need a HC-05 Bluettoth and a RTC Module DS1302 (board that already has 3.3v round battery).

About the time that it must work, well I want that it works the greater amount of time that it can. So when I know how long it can work without a recharge or battery replace, after that I will can take other descision. Now if it can work standalone more than one day is ok.

I want ask you about this, I didnt found 6AA battery box, but I have found a cheap 4AA battery box, perhaps you can help me about the mAh of the AA batteries that I must get, so I will can buy 3 4AA battery box and buy 12AA batteries to start my testing on protoboards to improve the code of the sketch.

The RTC module works with 2.0–5.5V full operation and the Bluettoth module works 3.6–6V. Besides there is the ATMega328.

Now for testing on protoboards, I will put a led or a buzzer replacing the servo. So then, when I get the basic elements working I will add the servo and think about how to power supply it.

I have thinked that this month (September) I must have the circuit tested and finished and the code tested. And the code must be without errors or bugs working 24/7.

Like always, best regards to everybody.