Help with controlling 6 gear motors and 6 servos for a rover project

Hi

I have been toying with Arduino and have among other things built a little autonomous driving robot that have two dc gear motors among other stuff. I have used the SparkFun TB6612FNG motor driver with an arduino UNO to control the stuff. Because of the limited scope of this robot, I have been able to do everything without any other boards than those two.

I'm starting a new rover project which I envision as having 6 wheels with 6 DC gear motors (perhaps these, these are the ones I've been using until now) as well as 6 servos to control driving direction.

This is a bit more elaborate, so I would like a bit of help with what I need for parts for this – driver and so on. I own a single Tower Pro Micro Servo SG90 which IIRC doesn't need a driver to be controlled. However, I don't know if 6 of those guys will be good enough for steering the wheel direction of the rover (is that model too weak?), and if I will need some kind of breakout board to control all 6 of those servos.

Same problem with the motors. I don't believe I can hook up 6 DC gear motors to an UNO and the TB6612FNG. The TB6612FNG can only control two motors. I have looked at other drivers too, like L982N and L932D based drivers, but I think I will need multiple drivers to control that many motors.

And how do I hook up that many things to an UNO? Is there some kind of breakout board I can use or something else to hook all that up? It will need a bit more power than I'm used to, and more GPIO pins. I will also want to be able to hook up other stuff too, like different sensors and other modules too, to add to the capability of the rover.

How do I go about this? I don't want a complete plan for this. I'd rather like some guidance on how to solve this, what to look for, basic knowledge and tips and direction and so on, so I can get to planning and ordering parts for the project.

An Uno can control 12 servos with the Servo library directly (no shield required).

L982N and L932D based drivers

I think that you transposed some numbers there. The L298 and L293 drivers are ancient technology and very inefficient. Anything modern is better than those drivers. The TB6612FNG looks like it would be a good choice. Also Pololu has a wide selection of drivers to suit your needs.

You can use shift registers (ie. 74HC595 for outputs and 74HC164 for inputs) or I2C port expanders (MCP23008 is my favorite) to add digital IO pins.

groundFungus:
An Uno can control 12 servos with the Servo library directly (no shield required).

Interesting! Is the limit of 12 because of voltage draw? Pins available? Something else?

groundFungus:
I think that you transposed some numbers there. The L298 and L293 drivers are ancient technology and very inefficient. Anything modern is better than those drivers. The TB6612FNG looks like it would be a good choice. Also Pololu has a wide selection of drivers to suit your needs.

I might have done that yes, sorry. I will have to look at some of those boards. I'm a bit restrained because I live in Denmark and would like to not have to order from another continent because of shipping cost, customs and so on, so will have to cross reference with local dealers. Any driver in particular you can recommend for my particular needs? Would something like this Adafruit 16-Channel 12-bit PWM/Servo Shield - I2C interface be worth while? As far as I can see, it can drive up to 16 motors, so it can easily control 6 motors and 6 servos.

groundFungus:
You can use shift registers (ie. 74HC595 for outputs and 74HC164 for inputs) or I2C port expanders (MCP23008 is my favorite) to add digital IO pins.

So I can basically keep adding shift registers to serve my needs as long as I don't exceed max voltage draw?

Interesting! Is the limit of 12 because of voltage draw? Pins available? Something else?

Good question. I don’t know the answer though.

I am not saying that you can’t use the L298 or L293 drivers, just that there are much better drivers out there.

So I can basically keep adding shift registers to serve my needs as long as I don’t exceed max voltage draw?

You don’t draw voltage, you draw current. I don’t know the limit. I have used 4 daisy chained 74HC595 shift registers with success, so that is all that I can say for sure.

groundFungus:
Good question. I don't know the answer though.

I am not saying that you can't use the L298 or L293 drivers, just that there are much better drivers out there.

You don't draw voltage, you draw current. I don't know the limit. I have used 4 daisy chained 74HC595 shift registers with success, so that is all that I can say for sure.

Al right, thanks.

Do you think this Adafruit 16-Channel 12-bit PWM/Servo Shield - I2C interface is worth while? It says it can power up to 16 motors/servos/PWM devices, which sounds a bit too good to be true. I am not experienced enough to know if that is because it does a bad job or if it's actually a good driver for my particular project.

I have no experience with that board, but if Adafruit sells it I would expect it to perform as advertised. Plus there are good tutorials for the use of most of their products (a big plus for beginners).

It says it can power

You should be careful with the semantics here. That board can control 16 servos. It will take a substantial power supply to power them. The general rule is 1 Amp per running servo, so the power supply would need to at least capable of 16 Amps if all servos run at the same time. Of course that depends on the servo. Larger servos will need even more power.

groundFungus:
I have no experience with that board, but if Adafruit sells it I would expect it to perform as advertised. Plus there are good tutorials for the use of most of their products (a big plus for beginners).

You should be careful with the semantics here. That board can control 16 servos. It will take a substantial power supply to power them. The general rule is 1 Amp per running servo, so the power supply would need to at least capable of 16 Amps if all servos run at the same time. Of course that depends on the servo. Larger servos will need even more power.

Ah of course. Also, I think I misread, because it seems it can't drive motors, or at least it's not meant to. But I could perhaps get that board for driving the 6 servos, although coming to think of it, since the UNO with the servo library can drive 12 servos, I don't really need it.

It seems most motor drivers supports 2 or 4 motors. I guess what I should look for is a motor driver that can drive for example 2 motors and can be stacked like this Motor Driver 15A IRF7862PBF which I could get three of and then stack them to drive the 6 motors.

Do check on the amount of processing power you need. The Servo library takes time, too, and you have to call the refresh() function at least every 50 ms (preferably <20 ms). Using external controllers makes life just a little easier on your Arduino.

I can’t find a reason for the limit (but no deep search), the library mentions it supports 12 servos on most Arduinos, but 48 on the Mega, so it seems a hardware related thing.

Ah, very good point. Think I'll go with the Adafruit 16-channel 12-bit PWM/Servo shield for the servo. Thanks.