Servo Controllers and Arduino

Hi there,
I'm planning on working on an 18 servo hexapod, just to help myself get into complex walkers etc.
Slightly afraid i might f it up.
I have and arduino uno available, and to my knowledge this isn't good enough to control 18 servos.
Now i'd like to get a servo controller to work with the arduino to control the servos, my question is how do they work?
Can i just simply write the same code in the arduino compiler or will i need to learn a whole lot more code?
How do controllers connect to the arduino? ETC just a basic guide before i buy 1. I've tried to do my research but haven't been able to come up with much.

Thanks in Advance.

It might help your search if you look for servo shield as well as servo controller.

The ones I looked at had a very simple interface. A few functions that did the same thing as the servo writes from the Arduino servo library.

But rather than using a shield, I went with a Mega, which can directly drive the 18 servos I wanted to talk to. I did also purchase a generic prototyping shield and solder up connections to plug the servos in and provide power.

One example of a shield:
http://www.renbotics.com/products/servoshield.php

I always recommend the controllers put out by Pololu:

For an 18-servo setup, you'd probably want this one:

They sell it as an "unassembled" kit as well, if you want it a bit cheaper (or don't need the "plug-n-play" convenience).

You basically hook it up to the Arduino via a couple of digital pins, which are controlled by the software serial library; you then communicate with it using serial commands (which are well detailed).

The advantage of using a standalone controller is that you can send the commands to move the servos where they need to go, and after sending the commands, your Arduino can then perform other processing; I know that depending on the complexity of the code and the number of servos being controlled at one time can cause the servos to "twitch" because the timing pulses don't stay within the correct range.

Also - this leaves a ton of pins open to do other things with; you can also daisy-chain more Pololu servo controllers off the first one, and address the new servos in the same manner as the first (all the servos are addressable) - that way it is easy in the future to add, say (for instance), a controlled arm, or maybe a pan/tilt for a camera or some kind of IR or ultrasonic sensor - you get the idea.

The Pololu command structure is fairly easy to deal with; there's examples out there for the Arduino that detail how to set up the interface and use it. You would want to abstract this out to come up with something similar to the Servo library, if you wanted to make it easier to work with (or transferrable to other methods of servo control), but that's basic stuff.

Hope this helps! :slight_smile:

A project that might be of interest

http://www.lynxmotion.net/viewtopic.php?f=20&t=6730

very much appreciated guys, think i'm gonna go with the pololu controllers, now i can worry about servo choice and inverse kinematics.