Go Down

Topic: 12 Servo Quadruped - Servo Shield selection discussion (Read 8543 times) previous topic - next topic

Echalon

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!


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.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Denbo

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



DuaneB

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



Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

oric_dan

#4
Feb 07, 2013, 08:11 pm Last Edit: Feb 07, 2013, 08:17 pm by oric_dan Reason: 1

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/

oric_dan

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

evolion

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.

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.

Denbo


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. 

oric_dan


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.


DuaneB

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

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

zoomkat

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

http://www.lynxmotion.net/viewforum.php?f=8
Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.

oric_dan

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

CasperH

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:


  • Arduino, duh  :P

  • Mapped a creep walking gait from here: www.sjwaller.com/robotics/quadru-pet-1/quadru-pet-1-part-4-gait-test/ to my up/down and front/back servo positions

  • ssc-32 from lynxmotion



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

Code: [Select]

#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.  ;) 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.

Echalon

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


Go Up