25 servos + 25 RBGs on Megas ... Set up? Power? Advice

Hi all! Long time lurker, first time poster (because I'm lost).

Big picture: I have a grid of 25 servos* in a 5x5 grid; each servo has 1 RGB LED**. The servos move at the same time either to face the same direction (all rotating to the same angle), or to face at a single point within the grid (all different angles). LEDs will turn colors together in two groups (one group of 13 LEDs will always turn colors together & another 12 will turn colors together) but both will be on together. I'm trying to run this on 2 Megas.

I guess I need your advice.

  1. Is the easiest way to just run the LEDs on one board and the Servos on another?
    2a. Is there an easy way to run the group of 13 (&12) LEDs together? Can I just put them in series in two groups?
    2b. How do I get enough power to these 25 LEDs? Any advice?
  2. How do get enough power to all the servos? I could time it so that no more than 5 servos turn at a time (one row at a time) but can how do I get enough power to all of them?

I'm really new to electronics so any help is MOST appreciated!

  1. Is the easiest way to just run the LEDs on one board and the Servos on another?

No, the easiest way is to use a port expander for the LEDs and just use one controller. Do the LEDs have to dim or are they just on and off?

Can I just put them in series in two groups?

Normally RGB LEDs have common anodes or cathodes, therefore you can't connect these in series.

2b. How do I get enough power to these 25 LEDs? Any advice?

Use an external power supply with the port expander. The supply is connected to the anodes of the LEDs.

How do get enough power to all the servos? I

Use an external power supply - this will have to have a high current capacity. Measure what one servo takes, it also takes current when it is not moving.

Grumpy_Mike:

  1. Is the easiest way to just run the LEDs on one board and the Servos on another?

No, the easiest way is to use a port expander for the LEDs and just use one controller. Do the LEDs have to dim or are they just on and off?

The LEDs are always on, but change colors together. I'll look into port expander, but do you have any recommendations?

Grumpy_Mike:

Can I just put them in series in two groups?

Normally RGB LEDs have common anodes or cathodes, therefore you can't connect these in series.

Sorry, I meant in parallel (?), with all the anodes and cathodes in line with each other all connected to the same outs from the Arduino. Am I completely off? Though, the port expander makes this moot in any case.

Grumpy_Mike:

2b. How do I get enough power to these 25 LEDs? Any advice?

Use an external power supply with the port expander. The supply is connected to the anodes of the LEDs.

Grumpy_Mike:

How do get enough power to all the servos? I

Use an external power supply - this will have to have a high current capacity. Measure what one servo takes, it also takes current when it is not moving.

This is probably where I'm most worried. The servos are 4.8-6v. Can I connect them in clusters to a wall wart like this one (12dcv 600mA) with the barrel snipped off and going into a breadboard? Wall Adapter Power Supply - 12VDC, 600mA (Barrel Jack) - TOL-15313 - SparkFun Electronics ?

I really appreciate your advice. I'm really new to electronics and am trying to learn!

I guess I should also be more clear with regard to the LEDs...

Of the 25, 12 all do the same thing and 13 do all the same thing. I could use a port extender to give me more individual control, but is there an easy way to get them all do the same thing? The two groups are always on, and simply change colors together. Thanks!

Sorry, I meant in parallel (?), with all the anodes and cathodes in line with each other all connected to the same outs from the Arduino.

No, if you connect them in parallel they need a resistor in each cathode (assuming common anode).

The LEDs are always on, but change colors together.

If they are always on they can't change colour. It sounds like you want to be able to dim them as just on / off control will only give you 7 different colours. In which case your port expander options are a bit limited. You see 25 RGB LEDs is the same as controlling 25 * 3 = 75 LEDs which is quite a lot to wire up. Simplest would be to use five TLC5940 chips chained together, although that has it's challenges:-
http://www.arduino.cc/playground/Learning/TLC5940
You will need supply decoupling on each chip:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

This is probably where I'm most worried.

Yep me too.

Can I connect them in clusters to a wall wart like this one (12dcv 600mA)

Well no. You would be:-

  1. Feeding them with too much voltage
  2. Each servo could take 600mA so you might need one wall wart per servo.
    It is vital you make measurements of your servos so you can plan this. You will probably need voltage regulator(s) to cut the voltage down from your wall wart to what you need.
    This is scaling up in a grand manor and that brings it's own difficulties. Start off with just one at first.

Late response:-

12 all do the same thing and 13 do all the same thing.

So that is basically 6 different control circuits. Yes you could probably drive those from one TLC5940 and six logic level p-channel FETs.