Pages: [1] 2   Go Down
Author Topic: 12 Servo Quadruped - Servo Shield selection discussion  (Read 6353 times)
0 Members and 1 Guest are viewing this topic.
Port Elizabeth
Offline Offline
Newbie
*
Karma: 0
Posts: 7
A moment's insight can be worth a life's experiences...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!

Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've used an SSC-32 from Lynxmotion connected to an Arduino.   http://www.lynxmotion.com/p-395-ssc-32-servo-controller.aspx

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


Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://rcarduino.blogspot.com/2012/10/arduino-serial-servos-20-servos-4-pins.html

Duane B

rcarduino.blogspot.com



Logged


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://www.instructables.com/id/Serial-Servo-Controller-wAduino-Control-Up-To-1/
« Last Edit: February 07, 2013, 02:17:38 pm by oric_dan » Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.

Quote
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".
Logged

denver
Offline Offline
Newbie
*
Karma: 0
Posts: 35
...no matter where you go, there you are
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 29
Posts: 2047
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Dubai, UAE
Offline Offline
Edison Member
*
Karma: 21
Posts: 1670
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://rcarduino.blogspot.com/2012/02/can-i-control-more-than-x-servos-with_03.html

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

Logged


0
Offline Offline
Tesla Member
***
Karma: 118
Posts: 8959
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 149
Posts: 2790
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

http://arduino.cc/en/Reference/Servo
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
#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: http://www.cmhofstede.nl/eigen-projecten-vrije-tijd/project-tachikoma-prototype-ii-2/ Note that this was actually my first time coding an Arduino so its really beginner level stuff.  smiley-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.
Logged

Port Elizabeth
Offline Offline
Newbie
*
Karma: 0
Posts: 7
A moment's insight can be worth a life's experiences...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Pages: [1] 2   Go Up
Jump to: