Running 12 motors with arduino mega

Dear Arduino community people,

I have a question about the maximum quantaty of motors that can be runned on one arduino. Would it be possible to run 12 x 5 V DC motors (speed would be individually controlled with pot's) with one arduino mega 2560 or do I need additional power supply coming in to power all of the motors ?

do I need additional power supply coming in to power all of the motors ?

Yes, definitely.

There should be enough analog inputs (for pots) and PWM outputs (for speed) to control 12 motors, but you will need drivers for the motors. A MOSFET per motor for uni-directional control or an H-bridge per motor for bi-directional control. The number of pins required depends on which drivers you choose.

You need a Mega if you need 12 analog inputs. (By my understanding of your wording)

You could also use a transistor to drive the motors. WARNING!!! The transistors can get hot. I like to put 2 transistors in parallel. Much more reliable.

Get a BIG power supply. You'll need it. :slight_smile:

Thanks for the responses, yeah I am planning on using transistor and diode as motor drivers. Good advice on paraller transistors, will do that for sure.

What you mean by getting a big power supply ? What would your recommend? And do you think that it would be possible to power it without main outs with power bank?

hdxn:
Thanks for the responses, yeah I am planning on using transistor and diode as motor drivers. Good advice on paraller transistors, will do that for sure.

Wouldn't it be a lot simpler to use a single logic-level MOSFET that has a very low ON resistance (so it doesn't waste energy and overheat) and the correct current capacity for your motor - ideally capable of carrying the motor's stall current.

The only reason a transistor overheats is because it is not suitable for the job it is being asked to do.

...R

Robin2:
Wouldn't it be a lot simpler to use a single logic-level MOSFET that has a very low ON resistance.

The only reason a transistor overheats is because it is not suitable for the job it is being asked to do.

...R

I actually used PN2222 transistor (runned by 1n4001 diode) for multiple (most i used for one arduino was 4 motors) and it worked fine, not sure what will happen with 12, but will have low resistence MOSFET in mind for sure.

Talking about powering arduino mega, what would you recommend ? Ideal solution would be something portable so that it wouldnt have to plug into the mains.

hdxn:
Talking about powering arduino mega, what would you recommend ? Ideal solution would be something portable so that it wouldnt have to plug into the mains.

A pack of 3 x AA alkaline cells (4.5v) connected to the Arduino 5v pin ?

...R

Robin2:
A pack of 3 x AA alkaline cells (4.5v) connected to the Arduino 5v pin ?

...R

That would work, but would last for very long, would it ? What about connecting this kind of hobby rechargable battery to Vin pin ? https://www.amazon.co.uk/Capacity-Security-Rechargeable-Discharge-Helicopter/dp/B00ZW1613C/ref=sr_1_8?ie=UTF8&qid=1530307015&sr=8-8&keywords=Rechargable+Battery+Pack

hdxn:
That would work, but would last for very long, would it ?

If it is only powering the Mega it should last a good many hours. My Mega draws about 50 mA from 3 x AA cells. How many hours do you need?

One of the nice things about alkaline cells is that it just takes a minute to change to a new set when they run flat.

...R

Robin2:
If it is only powering the Mega it should last a good many hours. My Mega draws about 50 mA from 3 x AA cells. How many hours do you need?

...R

I need at least 6 hours running time.

Also, talking about Mosfet, which type would work best for 3-5v motors ? would any of these work ? MOS-N-Ch LogL 55V 89A 170W 0.01R TO220A or MOS-N-Ch LogL 55V 47A 110W 0.022R TO220

The motor voltage is less relevant than the motor stall current in the choosing of a motor driver. You must choose a driver that can handle the starting (stall) current. If you don't have data sheet for the motor that lists the stall current, you can estimate the stall current of a brushed motor by measuring the winding resistance and dividing the motor supply voltage by the measured resistance. So until we know the stall current we cannot recommend a driver.

hdxn:
I actually used PN2222 transistor (runned by 1n4001 diode) for multiple (most i used for one arduino was 4 motors) and it worked fine, not sure what will happen with 12, but will have low resistence MOSFET in mind for sure.

You may think it was fine, but it wasn't fine, you were lucky the transistor didn't fail. Its probably stressed,
you exceeded the absolute maximum ratings so all bets are off as to its future behaviour/lifetime.

hdxn:
I need at least 6 hours running time.

I would expect a pack of 3 x AA cells to last for maybe 24 hours if they are only powering the Mega.

...R

groundFungus:
The motor voltage is less relevant than the motor stall current in the choosing of a motor driver. You must choose a driver that can handle the starting (stall) current. If you don't have data sheet for the motor that lists the stall current, you can estimate the stall current of a brushed motor by measuring the winding resistance and dividing the motor supply voltage by the measured resistance. So until we know the stall current we cannot recommend a driver.

So I am not sure if this would be enough for recommending drivers but I will be using three different type of motors all DC : 5V current draw 100mA, 11000 RPM ; other one 4.2V 50000RPM ; and third one 1.5-3V 24000RPM

Motors eat batteries like kids eating candy.