1

I want to use 21 servo (SG5010) motors using Mega board. Is it possible to do this?

A possibility is all the servos will be operating at the same time, with average load of ~3.5 KG, and each using 1A, so 21 servos will use 21A.

Will be able to supply power? If yes then how do I go about it?

2

There is a servo/sensor shield for the Arduino Mega that can control up to 54 servos. This shield will only fit the Mega, unlike the usual 14 servo Arduino shield, which is shaped to fit most Arduino boards.

Photo of Arduino Mega servo shield

Here is an easier to view diagram:

Diagram of Arduino Mega servo shield

It is possible, and advisable, to supply power via the screw terminals from an external power source, rather than use the Arduino's own power. Even just one servo can have difficulty in working from the Arduino's on board power supply, especially if just using USB to power the Arduino. However, even with the use of an external power source powering the shield, I have my doubts as to whether the shield could support 21A without burning out. Someone may be able to clarify this.

You may find this page, Servo Shield, useful:

MEGA Sensor Shield

The Arduino MEGA has many more I/O pins (54 Digital pins and 16 Analog pins)than a standard Arduino. This shield also has connectors specifically for some external devices like an SD Card, Radio communications (Bluetooth and others). It also has an option to power the "V" pins on all the Digital I/O 3-pin groups from an external power supply instead of the Arduino +5V. This is good for large numbers of servos etc. The "Analog" 3-pin groups still use the Arduino +5V which is better from an electrical noise perspective.

This version has two options of +5V supply to all the "V" pins:

  • Jumper on: +5 comes from the Arduino. Should be limited to about 300 ma
  • Jumper off: +5 (or other appropriate voltage) comes from an external supply connected to the blue terminal strip. External power Ground must also be connected to the blue terminal strip.

Using an external supply allows more current than the Arduino or Mega can supply, such as current for control of many servos or relays, and other attached devices. Usually this is +5V because most external devices require it. It is possible to use +6 volts if ALL the attached devices are the same such as Servos with that rating.

0

The Mega board will not be able to supply that much current, no. If you consult the schematic, you will see that the 5V regulator is rated for a maximum current of 800mA.

A computer PSU would be an appropriate power supply (a typical 350W PSU will happily supply >30A on the 5V rail). Be aware that some PSUs have a minimum load; you may need to add a power resistor or other load.

Also note that if you want individual control of all the servos, the ATmega1280 only has 16 PWM outputs (IIRC), so you would need software PWM or an external PWM IC.

  • As for the power supply, I agree with you. But I really hope the OP wasn't thinking of attaching them to the arduino power supply, was he? As for the PWM, the serial library should not use the PWM pins (I'm not really sure about it). Anyway, they explicitely say here that The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. – frarugi87 Feb 9 '16 at 9:14
  • frarugi87: I was thinking in terms of timers on the m1280 (although the Mega only has 15 "official" PWM outputs, I think), but yes, the Servo library provides software PWM and can handle up to 48 servos. – uint128_t Feb 9 '16 at 14:53
  • Yes, also because using the hardware PWM is inefficient in this case (the default PWM resolution is 8bit and the servos require a signal between 1 and 2ms every 20ms, so you would end up with a servo using only values between 12 and 24 for the positioning (and so you would be able to set a servo position to just 12 discrete positions) – frarugi87 Feb 9 '16 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.