Tomorrow I have an exam in which I want to use Arduino, but I encountered a problem just tonight .. All circuits on the board are
in place, and connected to USB, it works perfectly (I use a Arduino nano, 1piezobuzzer, 3 LED RGB, 1 Microservo, a vibration motor, a sensor IR)
The problem arose when the connection to the batteries, so, basically, it starts the cycle, but when is the servomotor time, it stops (a small LED on arduinonano lights up red) and all restarts from beginning (to end the cycle lasts 5 seconds!).
What could it be? I trust it is silly easy to solve ...
It 'a shame because I am not able to close my model!
ps, I have got 3 batteries CR2 type... total 9Volt :(
Batteries are too flat / weak.
The servo needs too much power, the batteries stop providing power to the arduino, and it resets
Need new batteries? or different type?
May I remove 1 rgb led?
I'm not an expert, but CR2 battery seem they are intended for camera flashes, not high drain applications like yours.
Anyway you could use a tester to see if the voltage drops. But I think you solve it quickly with Trialex suggestion, change batteries!
CR2 cells should be fine for driving a small servo, I use them to drive two servos in a small radio controlled glider and have had no problems. My guess is that the problem is caused by trying to use 3 cells through the onboard regulator. Try it with two cells and see if that works. You may need to find the datasheet for the regulator on your board to see what the dropout voltage is to make sure two cells provides enough voltage for the regulator. Also I suggest you connect the servo power lead (the red center wire on the servo) directly to the battery rather than through the regulator, but only do this with 2 cells and check that your servo can handle 6 volts