I have an arduino nano running a servo motor to turn on my light switch. My nano is plugged into my laptop currently, and my servo is running off of 4 AA batteries. The servo is connected to D3, and it is grounded with my arduino. I am controlling the servo through IR and an ultrasonic sensor. When I connect the servo to its power, it makes 1 to 5 turns, but then it stops working. No turning at all. What is causing the servo to fail?
What is causing the servo to fail?
The problem is most likely somewhere in the code or the schematic that you did not post.
Please read: How to use this forum
4 good AA's or 4 cheap and nasty AAs? What is the voltage from them under load? Is the power supply
wiring to the servo solid (it needs to be good connections for high current - breadboards aren't really
designed for lots of current, for instance).