VinoGiovani
Posts: 2
Joined: Fri Jun 18, 2021 5:34 pm

DC Motor Control Options for a dozen, or more motors

Fri Jun 18, 2021 6:08 pm

I need to control a dozen or more low-power dc motors.
The motors are very small: 1.5-3v and consume no more than 60mw
The motors will need to be addressed and speed-controlled individually
Most often, the motors will run at low-rpm (low power: 15-35mw), but need to consider the case where they all spin up to max speed all at once (i.e. 24 motors x 60mw max) for short intervals (few seconds)

The various options I looked at included options like the L293 motor driver IC, the SparkFun motor driver, and a few others. But these are designed to drive motors which have a much larger power requirement I am using - so they are much larger than I really need. I would really like to keep the foot-print as small as possible. Ideally, I'd like to drive the motors directly from the GPIO but it doesn't look like the bus would handle high surges - for example, if I had two dozen of these tiny motors suddenly spin up all at once. The HATs I found were again, designed for motors with much larger power requirement. It be great if there was a HAT I could drop in (or even stack) that I could drive directly from the GPIO pins directly.

Any ideas as to alternatives to driving a couple of dozen low-power dc motors would be appreciated.

boyoh
Posts: 1637
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: DC Motor Control Options for a dozen, or more motors

Sun Jun 20, 2021 11:02 am

VinoGiovani wrote:
Fri Jun 18, 2021 6:08 pm
I need to control a dozen or more low-power dc motors.
The motors are very small: 1.5-3v and consume no more than 60mw
The motors will need to be addressed and speed-controlled individually
Most often, the motors will run at low-rpm (low power: 15-35mw), but need to consider the case where they all spin up to max speed all at once (i.e. 24 motors x 60mw max) for short intervals (few seconds)

The various options I looked at included options like the L293 motor driver IC, the SparkFun motor driver, and a few others. But these are designed to drive motors which have a much larger power requirement I am using - so they are much larger than I really need. I would really like to keep the foot-print as small as possible. Ideally, I'd like to drive the motors directly from the GPIO but it doesn't look like the bus would handle high surges - for example, if I had two dozen of these tiny motors suddenly spin up all at once. The HATs I found were again, designed for motors with much larger power requirement. It be great if there was a HAT I could drop in (or even stack) that I could drive directly from the GPIO pins directly.

Any ideas as to alternatives to driving a couple of dozen low-power dc motors would be appreciated.

From BoyOh
You have a lot of. learning of understanding Basic Electronics , Before carrying this project, The forum

will give you a lot of advice , but not desinge the project for you you have a lot of research on motors to do

Just use the Pi as the control of the motors using low power signals to switch buffer stages powered

from a separate power supply. Remember code will tell a circuit what to do, but not build it for you .

.

Regards BoyOh


.
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

User avatar
rpdom
Posts: 18871
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: DC Motor Control Options for a dozen, or more motors

Sun Jun 20, 2021 11:26 am

Do you want the motors to be reversible, or just to turn run in one direction?

If one direction, you could control 8 of them with one ULN2801 chip. That will handle the current and protect the GPIOs (which aren't designed to handle anything like a motor).

You will still need software to handle the speed control - the Pi only has two hardware PWM channels, but you can use software PWM or hardware timed PWM depending on the accuracy you want.

For reversible motors you will need to use some form of H-bridge driver, which will take two GPIOs per motor instead of one.
Unreadable squiggle

VinoGiovani
Posts: 2
Joined: Fri Jun 18, 2021 5:34 pm

Re: DC Motor Control Options for a dozen, or more motors

Sun Jun 20, 2021 2:44 pm

Thank you @rpdom, this is the kind if tip I was looking for

One direction is all that I need. I'll take a look at the ULN2801

Thanks again!

pcmanbob
Posts: 11380
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: DC Motor Control Options for a dozen, or more motors

Sun Jun 20, 2021 5:06 pm

VinoGiovani wrote:
Sun Jun 20, 2021 2:44 pm
Thank you @rpdom, this is the kind if tip I was looking for

One direction is all that I need. I'll take a look at the ULN2801

Thanks again!
I would recommend you use the ULN2803A with the pi, it will work directly with the gpio pins and has the correct 2.7K resistor built in for the input, to limit the current drawn from the gpio pin.


The ULN2801 lacks this resistor which you would have to add it externally.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
rpdom
Posts: 18871
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: DC Motor Control Options for a dozen, or more motors

Sun Jun 20, 2021 6:06 pm

pcmanbob wrote:
Sun Jun 20, 2021 5:06 pm
VinoGiovani wrote:
Sun Jun 20, 2021 2:44 pm
Thank you @rpdom, this is the kind if tip I was looking for

One direction is all that I need. I'll take a look at the ULN2801

Thanks again!
I would recommend you use the ULN2803A with the pi, it will work directly with the gpio pins and has the correct 2.7K resistor built in for the input, to limit the current drawn from the gpio pin.


The ULN2801 lacks this resistor which you would have to add it externally.
Good point. :)
Unreadable squiggle

User avatar
Gavinmc42
Posts: 5873
Joined: Wed Aug 28, 2013 3:31 am

Re: DC Motor Control Options for a dozen, or more motors

Mon Jun 21, 2021 1:59 am

Use RC servo driver chips and an i2c servo chip Hat.
They can do 16 RC servos.
Normally servos are for positioning but they can be modified as speed controllers.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

katesimon123
Posts: 48
Joined: Sun Jun 13, 2021 2:45 am

Re: DC Motor Control Options for a dozen, or more motors

Mon Jun 21, 2021 7:01 pm

I prefer L298 motor driver over ULN2003.

emma1997
Posts: 1555
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: DC Motor Control Options for a dozen, or more motors

Mon Jun 21, 2021 7:51 pm

Not to beat a dead horse (meaning that's exactly what I'm doing) but here is simplest and lowest cost solution:

Image

That being said by someone who was product engineer for these very darlington driver chips at Sprague Electric in MA half century ago.

boyoh
Posts: 1637
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: DC Motor Control Options for a dozen, or more motors

Wed Jun 23, 2021 8:33 pm

Ways to control motors.

There are many ways of switching low power DC motors . But switching many motors at the same time

can have have power pull down problems , The power supply must be very low out put impedance.

It would be wise to have a slight time lag between each motor being switched on

Some old fashion electronics could be used, for controlling as you say 20 or more 3vdc motors

One way would be to use a UP / Down counter switching transistors to run the small motors

Use a pulse generator to switch the UP / Down counter at what ever speed you won't , The

UP/Down counter can be cascaded if you wont With some coding you could incorporate the Pi

There are UP / Down counters of all types do you research Take your pick , Get the bread board out

( Decade Counter / Divider 4017 Check this Chip out ) Buffer the out put for High Current

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

emma1997
Posts: 1555
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: DC Motor Control Options for a dozen, or more motors

Thu Jul 01, 2021 5:17 pm

I agree staggering startup times is a good solution for weak PSU. It did work for me to allow attaching 2-3 power hunger HDDs to Pi USB. However strikes me this is best done with code rather than peculiar hardware solutions.

PS IDK what's worse, all caps, wall-of-text, or the new double space technique showing up everywhere on the net lately. Getting really bad on two of the other sites I frequent. Not sure if it's that old Linux vs rest-of-world newline dealie or just a pufferfish thing to intentionally look bigger. lol

Return to “Beginners”