Possible power issue with robot.

I recently bought the book "Make Arduino Bot's and Gadgets" since it had some projects I figured would be fun to try. The first one I'm trying is the insect robot shown here.

I've build the robot almost exactly to the specifications. I did change one thing, though maybe that could be the source of my issues. The books says to hook the 9v battery leads into my Vin and GND pins. However, I have several 2.1mm power jack heads that I soldered my 9v battery snap to like I've done with other projects. I figured this would be the same as connecting them to Vin and Groun, but save me pinouts on the Arduino correct?

Anyway, I have written some test code to see If I could get it to walk, and it does it fine while it's hooked up via USB. However, when I try to run it off of the battery the legs either dont move at all, or make one small rotation every 5-10 seconds. I'm assuming it's a power issue, but the book and videos I've seen online seem to suggest it is possible to run this thing off of a single 9v. Was I wrong to connect the battery in the fashion I did or am I going to need something like 4AAs to power the servos while powering the rest off of the 9v?

Parts I used:

HC-SR04 Ultra Sonic Sensor
Arduino Uno Rev 3
Lots of jumper wires and connectors
2x Servo Motors
9v Battery

My first guess is you are not getting enough power with the 9V battery.
Try a bigger battery.

Pauly:
My first guess is you are not getting enough power with the 9V battery.
Try a bigger battery.

Thats what my suspicions are as well. Do you think it would work if I got a second 9v battery and wired both servos to that one, and then ran the Arduino + Ultra Sonic off of the other 9v? Or would the servos need more power than that, like from 4AAs? I suppose I can just buy both and try both to see what works better but I'm all about reducing cost and troubleshooting time so input is appreciated :slight_smile:

Mtors can be power hogs and usually require their own power supply.

I would probably try using 6 AA batteries.

That's a rather marginal design. First off, those dinky 9V batteries won't run
servos for very long. Secondly, in general, it's not the best idea to power
servos off the 5V pin of the Arduino, even though many people show it
that way, including the official Arduino tutorials.

However, the saving grace here is that, if you use standard servos like
the Parallax part - basic 44 oz-in servo - then they should have plenty of
torque to still move the robot, even if you add 4 AA-cells to power the
servos. You can still use the 9V battery to power the Arduino board,
although it may run out of energy fairly quickly.

If you use mini-servos, then they may not have enough torque to move
the robot, Arduino board, 9V battery, and AA-cells all.

Hi,

Check the links in my signature for an idea of what is happening and the previously suggested solutions in action

Duane B

rcarduino.blogspot.com