Arduino Mega support 14+ servos?

Looking at your bot, all the servos in the arms will pull almost no current (relative to the 8Amp ubec capacity) They only support the weight of the arm.

Can you rig up some brace to hold the entire thing up in the air? Then power up the bot.
This will keep the leg servos from bearing the weight. Then you can see if anything works at all when you have more servos plugged in.
14 or 16 servos on a bot suspended in the air will not pull anything close to 8Amp.

Thanks for all inputs.
vinceherman, I remember your bot while ago. So, you are using arduino mega too?

I tried your method with no luck. Something interesting thou. 12 servos work perfectly. But when I add up to 14 or 16, something happens no matter which pin I plug them in.
In my chassis: 6 servos on each leg, 2 servos in each hand so make it 16 servos in total. When I power it up, all servos should goes to position "90". However:

  1. The right feet servo didn't go "90" but remain wherever it start of. for example if I have it in position 60 before power up. It stay 60 and won't go any where even I force to move it. This only happens on this particular servo and no matter which pin I use.

  2. Only left shoulder servo works normal and others were like dead. I don't feel any power on these 3 hand servos. I could move them by hand and they just go where ever you move and drop back. Just like dead body like the video I post above.

any ideas?

The servos that are limp are either not getting power, not getting control signals, or not getting control signals that are within the control range of the servo.

Try to plug the servos as close to the battery screw connector as possible. Even if the uBEC supplies enough current, the traces might not be able to let it pass to the servos that are further away.

Ro-Bot-X:
Try to plug the servos as close to the battery screw connector as possible. Even if the uBEC supplies enough current, the traces might not be able to let it pass to the servos that are further away.

I did try that but actually the servo which moves are further than servos which are not moving closer than power. Thanks for the point thou. :slight_smile:

You say you have trouble when you go above 12 servos. Tell me... when you DON'T have servos 13 and 14 plugged in, are you still creating the servo objects for them in the code, and updating them, or are you commenting out the code that creates those servo objects out and updates them when you go back down to 12 servos?

The reason I ask is because if you create the servo objects for servos 13 and 14, and update them, but don't have the servos plugged in, and the other servos work fine, you know the problem most likely isn't with your code, and is in fact, the power supply.

If on the other hand trying to update those servos without them plugged in breaks the other servos, then the problem is either with your code, or with the servo interrupt not having enough CPU time* to send pulses of the proper length out to the servos.

(* This is unlikely, as others have said they have run more than 12 servos successfully, but if you're doing some other interrupts in your code, they might steal the needed cpu time away from the servo interrupt. I would expect you to see the servos jitter in that case though, as that is what happened when I tried to update a DAC and servos at the same time.)

Oh and one more thing... I don't think you need to avoid using pins 11 and 12 when you have more than 12 servos... you just can't their PWM functionality, because the interrupts that do that are being used to update the servos instead. You should still be able to connect servos and other things to those pins and have them work just fine.

After couple attempts with all kind of possibilities, I might give up using Arduino Mega for machine which used up to 12+ servos.
So, I choose "Renbotics ServoShield" even I don't have 100% confidence to use this board for some reason and I will explain below.
Here is the video when 16 servos all moves at same time.

Where you can get this shield:

http://www.seeedstudio.com/depot/renbotics-servoshield-rev-11-p-498.html

Here are reasons why I don't really like to use this servo board:


I guess it was designed for Seeeduino because they use micro USB connecter that avoid the shortage like regular Arduino.

But still, I don't wanna give up on MEGA. So, if anyone has any better solutions please let us know.

Are the servos now performing as desired? You could trim the header pin bottoms that are contacting the USB connector, then put a piece of electrical tape between the two. You probably also need to sand some on the plastic servo connectors so they fit the header pin spacing. If controlling a lot of servos is needed, the ssc-32 servo controller does a nice job and easy to connect (bit not a "shield" form factor).

zoomkat:
Are the servos now performing as desired? You could trim the header pin bottoms that are contacting the USB connector, then put a piece of electrical tape between the two. You probably also need to sand some on the plastic servo connectors so they fit the header pin spacing. If controlling a lot of servos is needed, the ssc-32 servo controller does a nice job and easy to connect (bit not a "shield" form factor).

Hi zoomkat, I thought of that too but even I sand them to flat it still doesn't fit. About SSC32, it was one of my option and I believe it works better than the one I am using but I don't find much info about how to use it and I am not the guy has electronic background. Perhaps you have any info relate to it?

To connect power to the ssc-32, there is a small +-+- pin header on the ssc-32 that you can connect the arduino +5v and ground to power the ssc-32 (servos will still need an independent power supply). For communication connect the arduino tx/rx to the ssc-32 TTL serial inpit pins and you are done.

zoomkat:
To connect power to the ssc-32, there is a small +-+- pin header on the ssc-32 that you can connect the arduino +5v and ground to power the ssc-32 (servos will still need an independent power supply). For communication connect the arduino tx/rx to the ssc-32 TTL serial inpit pins and you are done.

Sounds good! Do you have an image or any simple code for communication? I'd like to try it. Thanks a million.

Below is some info on the ssc-32. Using the arduino you just form the appropriate control strings per the ssc-32 user's manual and send them to the ssc-32. The strings need to be terminated with a carrage return, but println seems to take care of this. On the Lynxmotion forum there is a lot of info for using their ssc-32 with all types of bots. I'll have to look around and see if I saved any ssc-32 code.

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

http://www.lynxmotion.com/p-395-ssc-32-servo-controller.aspx
http://www.lynxmotion.net/viewtopic.php?f=20&t=6343&start=0

Cool~ thanks for these info. Wondering if that will be conflict if I use Xbee and SSC-32 because both of them uses RX/TX?

There may be some useful info in the below discussion.

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

Best it to use a Arduino Mega if you need both xBee and SSC32. Also do not connect any of them on UART0, so you can program your board without any problems.

If you want to use both with Arduino Uno or Diecimila, I advise you to connect the SSC32 to UART (115200 baud) and xBee to some other pins and use NewSoftSerial (9600 baud or more, to be determined what works best). You will need to unplug the SSC32 (or use a switch) when you program your Arduino board or you will get an error.

Ro-Bot-X:
Best it to use a Arduino Mega if you need both xBee and SSC32. Also do not connect any of them on UART0, so you can program your board without any problems.

If you want to use both with Arduino Uno or Diecimila, I advise you to connect the SSC32 to UART (115200 baud) and xBee to some other pins and use NewSoftSerial (9600 baud or more, to be determined what works best). You will need to unplug the SSC32 (or use a switch) when you program your Arduino board or you will get an error.

I just got my SSC32 yesterday. RoBotX, if you don't mind, could you show me how you wire up SSC32 with mega or uno and some simple code how to control servo? I really need help on this one. Thanks a lot~

Below is the link to the ssc-32 user's manual where you can get info on how it works.

I'm a beginner of using arduino..
I also want to control 16 servos in a servo shield and I've a lot of problems
but don't know how to deal with the power supply...
so I can't go to the coding part....
Is it a must to use lipo battery for the shield?
or I can use other method?
Can anyone give me some suggestions?
thanks

I think you are the same guy I met on Youtube. You don't have to use lipo. As long as you have 6V extra power for servos should be good. You can use NiMa NiCd or whatever you like. over 6V might burned your servo easily. I learned that lesson by burring 4 servos in the row.