How many dc motors (not servo)

(Sorry about my english! I am 9 year old girl from Latvia) How much dc motors (not servo) can be controlled by arduino uno (of course through driver / motor shield)? 10 (ten) is possible? How to do it? Please, help me! Thanks a lot!

Most motor shields are 2 motor, a few are 4, but normally you are limited to a single shield since identical motor shields share the same pins, which means they cannot be independently controlled.

Using separate driver boards you are free to wire them to any pins you like, making it easier to use several drivers, but you still need enough pins on the Arduino. If you want to run lots of motors you should try and find a motor driver that talks I2C or serial, since that requires less pins (and I2C can be piggybacked if each board can be set to a different I2C address).

I don't know if such controllers are readily available.

Note that a "continuous rotation servo" is simply a motor + driver that can be driven using the Servo library using a single pin, this might be suitable.

You could also use daisy-chained 74HC595 shift registers to expand the number of outputs while using only a few pins:

If you only need to turn a motor on (and not control direction), then one output pin will work; otherwise, you'll need two. So - if using the Arduino Uno - you have 19 pins (13 digital and 6 analog) which can be set up as digital output pins (the analog pins can be switched to operate as digital pins). The RX/TX pins (pins 0 and 1 respectively) will be unavailable if you are using all of the pins in this manner, of course. Otherwise, if you drop those (so you can still use USB or hardware serial comms), then you are down to 17 pins.

So - 17 motors (on/off + speed control) or 8 motors (on/off + speed and directional control).

Again, though, by using shift registers, you can set things up to only use 3 pins (or more, if you need finer control of the registers) for as many registers as you want. For instance, this shows how to connect two of the 595 shift registers (for 16 outputs), and only use 3 pins for control:

You can add on further shift registers as needed fairly easily, each register adds 8 outputs. So, with two such registers (as in the link above), you can control 8 or 16 motors (depending on whether you need directional control or not). Each additional register gives you the ability to control 4 or 8 more motors (or anything else you need to control of course).

Note that you can't drive the motors directly from the Arduino's pins or from the shift register pins; you will need to hook up a motor driver of some sort for each motor. In the case of a motor that only needs to control speed (not direction) - a simple NPN transistor (or N-channel mosfet) will do (plus additional parts like a resistor or two, and a diode, etc). If you need to control direction as well, you will need to use an h-bridge controller (as a discrete circuit or as an IC).

Finally - you can also use the 595 to control servos - while not easy, it is possible - google around for some tutorials and demos people have done in the past (not all of them were done with an Arduino - so you might have to do some code translation and such - call it a learning experience).

Your English beats the heck out of my Latvian. :) If you are going to control motor's speed with PWM (analogWrite), the UNO only has 6 PWM pins (3,5,6,9,10 &11).

cr0sh: You could also use daisy-chained 74HC595 shift registers to expand the number of outputs while using only a few pins:

Shift registers are convenient for controlling direction pins on h-bridges but they're generally not used to control speed (PWM).

There are motor control shields for controlling four motors which use two L293D chips and one '595 shift register. The '595 controls the direction pins but each motor uses an analog out pin from the Arduino to control the motors' speed.

It's possible to use '595 shift registers to produce relatively low frequency and relatively low resolution PWM signals but it's probably not a good idea to do this with a single core microcontroller if the program is supposed to do anything more than pulse the shift registers.