I recently got the Robot Rover kit, and having assembled the servos I get a bit of a wierd issue with them. When I run the example program for the servo which is supposed to simply move the servo back and forth across the field of motion, it worked the first time, then completely failed when I tried to run it on another servo, and now the same program merely causes the servos to run all the way to one side and stop. Not exactly sure what would cause this.
I’ve isolated the system so the only things left in the circuit are the battery pack, the arduino, and a single servo, but still no luck. Does anyone have any suggestions as to why the servo just turns all the way in one direction at this point?
First thanks for answering my post - although I’ve already fixed up my servo issue and moved on to new and exciting issues, help is always appreciated. In this case my problem turned out to be bad wireing on my part - I misunderstood how to servos should get their power and hooked them directly to the battery pack rather than though the gnd and 5V pins on the Arduino. Once I updated my wireing, the servo’s worked exactly as I expected when using the Arduino servo library.
Now I just need to learn how to program the motor controller
Can you provide an image of your setup and if possible a wiring diagram? Are you using the Arduino servo library? If you are not using the Arduino library, there could be several issues:
]Do you have a delay of more than 20-30ms in the code (note that a servo needs to receive a signal every 20-30ms or will behave erratically)/:m] ]Do you give the program time to load? During the upload process, the servo may behave randomely./:m] ]If you are using an external supply to power the servo, do you have a common ground?/:m]
Actually, in many cases wiring the servo directly to a battery pack is a good choice. If you connect the servo to the Arduino’s 5V pin, you need to realize that the 5V pin cannot provide much current (it’s great for testing though, or powering small sensors). If you power a servo directly from a battery pack, you would connect the servo’s black (GND) wire to the Arduno’s GND pin as well as the battery’s black (GND) wire (common ground). You would also connect the servo’s red wire to the battery’s red wire.