12 Servo Quadruped - Servo Shield selection discussion

I'm in the design phase of a quadruped walker/earthmover. I'd like to initiate a discussion regarding which servo shield is preferred by members of our forum and why. I'd really appreciate any input...I'm here to learn.

I'm using the Power HD1501MG and Hitec HS-422 servos. Current drain at 6V for these is 500mA(stall)/5mA(idle) and 150mA(stall)/8mA(idle), respectively. Now we use a power supply independent of the Arduino board with the ground common with that of the Arduino board. So that aspect does not necessarily require a servo shield unless the shield also provides a more stable, regulated supply to the servos.

I find it frustrating that servo manufacturers do not specify the signal pin's current drain. I assume it is in the uA range and does not vary much with servo load changes. So, if the board I'm using - the Arduino Mega 2560 R3 - can safely source/sink 40mA per I/O pin, why should I be using a servo shield? What advantages does the extra cost buy me besides the fact that I could hook up >12 servos?

Also, I can't find the total maximum current sunk by all ports combined for the Mega 2560 in the Atmel datasheet, can anyone tell me what this is?

Thanks!

The Mega can control 48 servos. Even the UNO can control 12. The main reason to use a shield would be if you need more pins for other things or you need the PWM pins that the Servo library disables.

I've used an SSC-32 from Lynxmotion connected to an Arduino. Products - Lynxmotion

They use it for controlling a number of their hexapods. I have it connected to 18 Hitec HS-645MG

I have published two libraries that will get you 20 servos on an Uno. One drives the servos directly, the other uses just two digital pins and a 30 cent 4017 chip to drive each bank of ten servos.

There are a few people using the library in different projects at the moment, not sure if anyone is using all 20 servo but there available if you need them.

The counter version is here, if you use the direct version you will run out of pins before you use all the available servos

Duane B

rcarduino.blogspot.com

johnwasser:
The Mega can control 48 servos. Even the UNO can control 12. The main reason to use a shield would be if you need more pins for other things or you need the PWM pins that the Servo library disables.

No, the main reason to use a shield is to get one that you can directly plug the servo
3-pin female connectors into, and to provide power to the servo power pins.Trying to
directly connect 12 or 48 servos to a Mega or UNO board with their single-row female
headers is utterly ridiculous.

I find it frustrating that servo manufacturers do not specify the signal pin's current drain. I assume it is in the uA range and does not vary much with servo load changes.

It's tiny, probably less than 1 mA. No one ever worries about it. Any microcontroller
I/O pin can drive it.

Also, I can't find the total maximum current sunk by all ports combined for the Mega 2560 in the Atmel datasheet, can anyone tell me what this is?

For the 2560, look in the section of the d/s called "Electrical Characteristics".

DuaneB and oric_dan:

Thank you for posting some links on servo control, I've been trying to figure out how to do it for a while now.

The reason people use devices such as the SSC-32, is that it enables you to subdivide your code
into manageable parts.

It is simply very difficult to manage all the low-level details of servo control and the high level
details of controlling some kind of insect-robot in one piece of code. It can be too difficult
to manage all the de-bugging and perhaps too much work for one processor.

michinyon:
The reason people use devices such as the SSC-32, is that it enables you to subdivide your code
into manageable parts.

Absolutely. Combining the servo controller logic with autonomous logic and sensor data processing into one program is difficult. Separating them improves both manageability and performance.

michinyon:
The reason people use devices such as the SSC-32, is that it enables you to subdivide your code
into manageable parts.

It is simply very difficult to manage all the low-level details of servo control and the high level
details of controlling some kind of insect-robot in one piece of code. It can be too difficult
to manage all the de-bugging and perhaps too much work for one processor.

Subdividing code into functional parts is definitely the choice way to go.

However, the second part here is not truly the case. If you use timer interrupts, as I believe
Arduino does, then the overhead involved in controlling servos is very minimal. Years ago,
I wrote my own servo controller chip firmware using a 20Mhz PIC, which actually executes
at about (20/4)/16 = 31% the speed of the AVR chips, and using timer interrupts, I was
able to control 20 servos and the overhead was only about 5-10% of the processor cycles.

Later on, I added full gait control to the same chip using lookup tables and up to 44
movements per gait [limited by available RAM], and there was still plenty of horsepower
left over to do user interface, RS232 comms, EEPROM work, and A/D sampling.

OTOH, the overall coding is definitely easier if you offload the servo timing stuff to a
slave chip.

Hi, I measured the standard servo libaray as using aroung 1% Of available processing to control 12 servos.

Using the RCArduino serial servos library will be even lower because it only has a clock pin to deal with so no pin mapping or masking is required - all of the decoding is done by the simple 4017 counter.

Duane B
rcarduino.blogspot.com

Some reading material on multilegged bots. Study up on how others have built their successful bots.

http://www.lynxmotion.net/viewforum.php?f=8

Another reason to use a dedicated servo chip/board is because they usually do servo
velocity computation, which is very useful for controlling the speed of a walker. The
Arduino servo library does not do this. To compute velocity, you have to interpolate
points inbetween the servo initial and target positions, and this isn't difficult, but it
takes some processor overhead.

Hi,

I made a Quadropod with 8 servo's for walking (2 x 4 additional ones for steering and driving) using an arduino. I combined the following:

From the Arduino I send a group move to the SSC-32 and that takes care of the servo movements. Looks something like:

#15 P1500 #3 P1500 #31 P1500 #19 P1500
#12 P1844 #13 P1855 #14 P911 #0 P1155 #1 P1033 #2 P1866 #28 P888 #29 P1355 #30 P2133 #16 P1755 #17 P1644 #18 P700 T72
#15 P1500 #3 P1500 #31 P1500 #19 P1500
#12 P1833 #13 P1855 #14 P911 #0 P1155 #1 P1022 #2 P1855 #28 P888 #29 P1322 #30 P2100 #16 P1755 #17 P1644 #18 P700 T72
#15 P1500 #3 P1500 #31 P1500 #19 P1500
#12 P1833 #13 P1844 #14 P900 #0 P1144 #1 P1011 #2 P1844 #28 P888 #29 P1288 #30 P2066 #16 P1755 #17 P1655 #18 P711 T72
#15 P1500 #3 P1500 #31 P1500 #19 P1500
#12 P1833 #13 P1833 #14 P888 #0 P1144 #1 P1000 #2 P1833 #28 P888 #29 P1255 #30 P2033 #16 P1766 #17 P1666 #18 P722 T72
#15 P1500 #3 P1500 #31 P1500 #19 P1500

The longer line of the two is the walking gait, the shorter is for the continues rotation servos to stay non moving (otherwise they become 'unpowered').

For pictures, a video of the walking gait and source code, go here: Project Tachikoma, prototype II – Portfolio C.M.Hofstede Note that this was actually my first time coding an Arduino so its really beginner level stuff. :wink: Its been a few months since then and I made a ton of improvements for speed and IK. Did'nt post the code for that cause its getting very long.

Thanks for the tremendous support and input. Any comments: SSC-32 servo controller (http://www.bizoner.com/arduino-usb-ssc32-servo-motors-controller-with-bluetooth-apc220-p-215.html) VS. Spider Controller (http://www.netram.co.za/Electronics/Dev-Boards/Arduino/Spider-Controller-Atmega-1280.html) in terms of ease of use, performance and features? I would prefer the SSC-32, but it is rather difficult to source locally (South Africa).

Thanks again

If you can get hold of a prototyping shield, you can solder up a bunch of 3-row
headers yourself. Will only take about half an hour. I have used a couple of these
shields on projects, sold locally at Radio Shack, but Seeed Studio is a chinese
company, I believe,

BTW, I am testing one of my boards, and FYI, I have a 33K series-R in one of the
I/O lines going to a servo [normally used as part of a voltage divider on Vin], and
the servo moves just fine. In general, though, I would use much lower values,
largely for noise considerations, eg, 220-330 ohms.