Arduino Mega + 12 servos

Hi!

I have been scratching my head the whole day over a little arduino project: a 4-legged walker. I got 12 cheap servos (MG995) and an Arduino Mega for control... but my current problem is with the power supply.

I made a board with 4x LM2596 (http://www.ti.com/lit/ds/symlink/lm2596.pdf), mostly following the example circuit from the datasheet (except that I have only put 2x 680uF, one was probably enough...)... So, it's a very simple PCB: 12V comes in, goes into the 4 Vin of the LM2596, and each Vout is plugged into 3 servo motors.

I have attached a photo of the board, that should help clarify what's up...

For some reason, 2 of the LM2596 are giving out 2V instead of 5V when I plug in even just one servo motor. When I remove it, the output is back to 5V.... because the whole thing is completly symetric, it makes no sense to me, but maybe I am missing some basic electronics or something? Really, at this point, any idea would help...

Here are the things I tried out:

  • Made sure it wasn't because of a specific servo => a 'good' servo works when put on the 2 working LM2596, and as soon as it's on the 2 LM2596 that have issues, it doesn't work anymore (2V between its + and - ...)

  • Made sure it wasn't because of the load current/power supply inability to cope with so many servos => the drop to 2V happens even when there is just one servo without any load ( I actually measure the current, and it spikes at 100mA when plugging it in and then stays around 5mA, sounds normal...)

  • Checked for short-circuits, correct soldering, etc. It's really hard to mess up considering there is just 3 component for each LM2596, but I did review it about ten times, to be on the safe side...

What I didn't try yet is to replace the LM2596 by new ones, just to make sure that's not the problem, because that'd be a rather painful process (I don't have a desoldering pump), plus all of them were new, and I am really bugged by the fact that only two of them are apparently not working and by chance they happen to be two at the bottom, so my gut feeling is that there is something wrong with my layout rather that the components, but I don't understand what could be the issue.

Help!

Thanks in advance :slight_smile:

Just looking at the top of the board isn't very informative. In such cases I just go over everything several times with a magnifying glass, resolder EVERY connection, check for shorts between traces (quite common with my poor technique) and broken traces or wires using the ohm function of a multimeter.

You probably should invest in some UBECs like below as they are made for powering servos with high current and 6v.

I've never tried to use one of the LM2596 series, but in glancing through the data sheet, there are lots of warning about proper board layout, use of properly placed, short wide circuit traces and appropriate inductors. Those considerations really are important!

This is a high frequency oscillatory circuit and many non-obvious, difficult-to-detect things could go wrong with a hand wired board like yours. In the long run it really is better and will be much more reliable to use a proper PCB. Or, as suggested, buy a well designed module capable of supporting the high current demands of a multiservo system.

Thansk all, great advice!

I wasn't able to figure out what was wrong. I tried to add two 680uF capa as advised, that didn't do much. So, I decided to start from scratch, improving on the layout.

I came up with a new layout that took into account the details for the datasheet, such as making the Cout as close as possible to the feedback loop, using the actual diode they recommended because the one I used easn't fast enough, etc.

Funny thing, it worked for like 20 secs, then I tried to make the servo moves and there was the smell...and it stopped working. The previous board maybe also fried, albeit in smaller increments, and I just hadn't noticed the smell..who knows.

So, the main issue may not be my layout... but the whole design, especially IC ratings? LM2596 is rated for 3A, and the MG995 servo aren't supposed to draw more than 1A under load, so I thought I was fine with 4x LM2595 for those 12 servos. Maybe not (too close to the limit?).

I think I'll rethink the whole thing and either buy something already made as was suggested or aim for a much high current rating, say 1.5A per servo. So that'd be a total of ~18A that the circuit should handle. Any suggestion at what kind of IC could handle this reasonnably? Do you people know any online references that could help with a 'DIY' approach to this? I like the idea of making it myself, so that I can fix it when it breaks :slight_smile:

Thanks!