How to control 5 dc motors with Arduino using transistors

I've seen that you can use transistors to control a dc motor with transistors, though nothing I could find was thorough enough.

Is there certain specs I need for the transistor? Do I need a transistor for each motor I'm trying to control?

I've seen some people use resistors, does the resistor they use depend on what transistor they use? Are resistors even necessary at all?

And how do I do the wiring? I haven't seen anyone control more than 1 motor with transistors, would I be able to control 5?

This may help

Depending on your particular motors and supply requirements.

A "motor" may be anything from a clock hand movement to an electric vehicle motor, they do have different requirements for control.

Post the spec and a link to the data sheet for the motors you are using.

I don't know exactly what the specs are, they just look like generic dc motors like this:

I've powered them with two AA batteries with I think means that its is a 3V dc motor, so I would think that the specs would be similar to something like this:

You might use a chip like this.
[EDIT] Link to 7407 removed, (under rated)
If you're looking for something more sophisticated there's SPI 8-motor driver.

Hi,
What do you want to do with the motor?
Run it full speed in one direction.
Control its speed?
Change its direction?

Thanks.. Tom... :slight_smile:

If you posted the Pololu link, why didn't you look at it ?
They have brushed dc motor controllers at the bottom of the "Related Products" page.

TomGeorge:
Hi,
What do you want to do with the motor?
Run it full speed in one direction.
Control its speed?
Change its direction?

Thanks.. Tom... :slight_smile:

I don't want to control it's speed or change it's direction, just be able to run it at full speed in one direction and stop it.

Its not "generic" its a toy motor.

The circuit on the page I linked will allow you to turn it on & off and also speed control via PWM if you wish.

Full details there. The FET will need a heat sink (bit of aly).

Or use an 'old school' TTL 7407 OPEN COLLECTOR driver.

.. and enjoy the smoke.

Yeah, your right John, the 7407 is only rated for about 50mA.

johnerrington:
This may help

I don't really understand what this website says, would you mind explaining what it is saying?

It's John's website so out of professional courtesy I must defer to him to answer that question but suffice it to say it is DC Motors101. It deals with the
inductive nature of motors and how they store energy but unlike capacitors which also store energy, inductors resist the flow of current based on their inductance. At DC, inductors are a short whereas capacitors are an open circuit. At high frequency inductors are an open circuit and capacitors are a short. The extent to which this is true depends on the frequency and their reactance, which is their impedance as a function of frequency. Inductive reactance is 2Pi * f L | where Pi =3.14159265359, f=frequency, L= inductance in Henrys (H)
Capacitive reactance is 1/(2Pi f* C ) | where C=capacitance in Farads (F).
In order to understand the snubber you need to understand Ohm's Law V= I*R=>I=V/R.
Since the motor rotates and has RPM, it must also
have frequency. Since the capacitor stores energy
and the resistor 'resists' current flow, the two combined in series will absorb the backEMF of the motor when the switch is open. I think I've said too much already..
"This may help..."
"https://www.quora.com/If-a-capacitor-blocks-DC-then-why-is-DC-used-to-charge-a-capacitor"

Thanks @raschemmel;

I don't really understand what this website says, would you mind explaining what it is saying?

Well, its a big site. Without knowing your background I cant explain further. Tell me all you DO understand and I'll try to fill in the gaps.

However if you just want to get the motor working go to this page

scroll down to A better way - Pulse Width Modulation (PWM)

and connect up the circuit you see there. All values shown.

The connector you will see above R1 (marked "control") goes to a digital output pin of your arduino

You can use the "blink " example to turn the motor on and off.

johnerrington:
However if you just want to get the motor working go to this page

Controlling DC motors with an Arduino microcontroller

scroll down to A better way - Pulse Width Modulation (PWM)

and connect up the circuit you see there. All values shown.

The connector you will see above R1 (marked "control") goes to a digital output pin of your arduino

You can use the "blink " example to turn the motor on and off.

Thanks! All I wanted was to get the motor working, and well, now it does, finally! I didn't realise it already had all the values shown there before.

And, I want to thank everyone else who helped me with this. You were kind enough to help out someone you don't even know with a problem they have. Thanks guys :smiley:

Read reply #5

Surely there is something about using transistors somewhere here.

If you want to use motor with transistors, you need to know your motor first and choose a transistor that can handle it.
You need to know the voltage the motor is made for. (or what you voltage you are going to use.)
Then you need look up how much current your motor takes.

Then you choose a transistor whose voltage and current are higher. If voltage multiplied by current is more than one (watt), you need some cooling too.

There are several types of transistors: Mosfets, bipolar power transistors and Darlington types and maybe more.

Some ICs can also handle motors.

A simple RC snubber uses a small resistor (R) in series with a small capacitor (C). This combination can be used to suppress the rapid rise in voltage across a thyristor, preventing the erroneous turn-on of the thyristor; it does this by limiting the rate of rise in voltage (dV/dt) across the thyristor to a value which will not trigger it. Sep 8 2019

Snubbers-101

FYI, as somebody has probably already mentioned, the idea of using transistors to drive motors is antiquated and
obsolete. It would have been appropriate about the time you were born, but they didn't have cheap mosfets with
low on resistance.