Recommendations on how many Arduinos to use

Ok, so I have been working on a robot. I have seen many with wheels, and quadrapeds, so I decided to make a hexapod walking robot. I made all the parts using epoxy resin as I do not have a 3D printer. Initially the robot was going to be about the size of an 11oz coffee can, give or take, but has now evolved to be the size of a small to medium dog.

I am using MG995 servos to control the legs. 3 servos per leg. So, all told there are 18 servos just for the legs. Now, originally I was just going to use an ATmega2650 for the entire robot, then decided on using that board to control the legs, and a Nano for the 'head', which will have 3 sonic sensors and a PIR sensor, a 9g servo to turn the head side to side, as well as, for fun, a 9g servo to open/close a set of mandibles much like an Army Ant has.

Each leg is made up of over 25 parts and takes awhile to assemble, wire, test, and calibrate. I have also added a limit switch with home made spring loaded push rods to trigger the limit switch when the leg touches down when walking on uneven terrain. So, after thinking about this and watching videos on how arthropods like Ants walk, I started wondering if I should add a Nano for each set of 3 legs, or even a Nano for each leg since there are so many moving parts, I dont want the robot to move at a snails pace.

So, sorry for the long post but wanted to give a short gist of what I am building. Software efficiency is not an issue, I have been writing software since 1989, am an expert in C, C++, Java, Perl, PHP, etc, and have worked on many high performance embedded software projects. But, I am not as adept at making custom from-scratch hardware systems like this. If anyone has any thoughts, I would appreciate any input. I dont have many pics that I can post as I am saving the main reveals for my YouTube channel.

One Arduino or if you want to use WiFi, an ESP8266. :grinning:

These servo controllers will operate 16 servos per controller.

eBay!

Saves an awful lot of mucking about trying to control multiple servos with just an Arduino.

Yes no need to use more than one Arduino.

Actually I made my own servo control module. I am using a Lithium-Ion 10000mAh USB battery pack as the power source. I made the servo PCB so that it has an independant USB power cable, and has a 470uF capacitor for each leg (set of 3 servos) as well as a diode per leg. I read a lot of horror stories about people having feedback/surges from servos under load that fried their Arduino. So doing it this way there is a lot of redundancies between the leg diodes, the built-in voltage regulation/surge protection in the battery pack itself, and the Arduinos own built-in protection.

read a lot of horror stories about people having feedback/surges from servos under load that fried their Arduino

The use of those words imply the authors have no idea what they are talking about or why they fried their Arduino. Power surges are something that happens on mains electricity, not from loads on a power supply.

You can get back EMF when switching off a motor but that is not a power serge, and any way that is protected against by. Diode inside the servo assembly.

Feedback could be a slack jawed way of saying power insufficient power supply decoupling and while that would cause erratic behaviour it will not cause an Arduino to fry.

Grumpy_Mike:
The use of those words imply the authors have no idea what they are talking about or why they fried their Arduino.

+1 to that!

Rather than be dogmatic (pun intended) I suggest the answer to the question in your title is "as few as possible" because every interface between Arduinos add considerable extra complexity.

If you have made a servo-control module that actually generates the signals that control the servos then I would expect that to take a huge part of the computation load from the Arduino(s) to such an extent that a single Mega might be more than sufficient. Unless you have a space constraint I can't see any advantage in using a board smaller than a Mega.

...R