Using DC Motors directly with arduino

Hi, I want to use 5 high torque dc analog motors with arduino. I am aware you can't use them directly as they take alot of power. I want to know If there is any other way in which I can use external power for motors and connect then directly to arduino. P.S I know about the H-bridge and diode method but I am looking for something more direct. :)

It cannot be done. You can only use the arduino as a control signal device whose output is used to control the motor drive circuit. As a minimum you could use an FET to drive the motor but that will only control in one direction. If you want to reverse the motor then you need an H-Bridge circuit.

A relay will work if you only want on-off control (no speed control). And, a 2nd DPDT relay can be used to reverse the motor. (If you use a relay, choose one that can be directly connected to the Arduino.)

If you get a solid-state relay, make sure it's designed to DC (an AC solid state relay won't work).

Ritvik9: I am aware you can use them directly as they take alot of power

Do you mean can in this sentence, or can't? These words have somewhat differing meanings in the English language.

Anyway, you can't use motors directly with Arduino or almost any microcontroller (there are a few available which integrate a motor driver with a microcontroller, such as by Freescale, but that is another subject). But the Arduino can be a signal source for some type of external switching arrangement such as a power transistor, MOSFET, relay, or a dedicated motor driver IC which will switch the actual load current for the Arduino.

This is a starter tutorial and solution, not appropriate for more than an amp:

https://itp.nyu.edu/physcomp/labs/motors-and-transistors/dc-motor-control-using-an-h-bridge/

Perhaps you could use this, it's a little bit beefier:

http://www.ebay.com/itm/Dual-H-Bridge-L298N-DC-Stepper-Motor-Driver-Module-Controller-Board-for-Arduino-/281386970739

A little beefier but a poor, dated choice. Why buy something that gives away 3V of your motor supply. That old Darlington configuration is a toaster. Look at this link and the connection diagrams: http://www.pololu.com/product/2507

JoeN: Perhaps you could use this, it's a little bit beefier:

http://www.ebay.com/itm/Dual-H-Bridge-L298N-DC-Stepper-Motor-Driver-Module-Controller-Board-for-Arduino-/281386970739

Thanks, I will buy it..

rmetzner49: A little beefier but a poor, dated choice. Why buy something that gives away 3V of your motor supply. That old Darlington configuration is a toaster. Look at this link and the connection diagrams: http://www.pololu.com/product/2507

I need to use 5 motors but it supports only 2

Ritvik9: I want to know If there is any other way in which I can use external power for motors and connect then directly to arduino. P.S I know about the H-bridge and diode method but I am looking for something more direct.

That is the direct method.

Ritvik9: Look at this link and the connection diagrams: http://www.pololu.com/product/2507 I need to use 5 motors but it supports only 2

Then simple mathematics indicates you need three of them.

Paul__B:

Ritvik9: I want to know If there is any other way in which I can use external power for motors and connect then directly to arduino. P.S I know about the H-bridge and diode method but I am looking for something more direct.

That is the direct method.

Yeah, but how to do it?

Paul__B:

Ritvik9: Look at this link and the connection diagrams: http://www.pololu.com/product/2507 I need to use 5 motors but it supports only 2

Then simple mathematics indicates you need three of them.

but there is no option of external power in those shields so i doubt 5 motors will get enough power

It has a Vin, so you can use an external power supply I guess. The only downside on these shields is that, for your 5 motors, that's about 150$ instead of the 25$ for the darlingtons. So Ican imagine if this is for a hobby project that this can be a limiting factor. Hey I would take the darlingtons as well if

a) the 3V drop wouldn't cause an issue and b)I had to finance this out of my own pocket ;)

LievenV: It has a Vin, so you can use an external power supply I guess. The only downside on these shields is that, for your 5 motors, that's about 150$ instead of the 25$ for the darlingtons. So Ican imagine if this is for a hobby project that this can be a limiting factor. Hey I would take the darlingtons as well if

a) the 3V drop wouldn't cause an issue and b)I had to finance this out of my own pocket ;)

yup that's the reason i am planning taking darlingtons. also, you use vin to power the arduino using battery

LievenV: It has a Vin, so you can use an external power supply I guess. The only downside on these shields is that, for your 5 motors, that's about 150$ instead of the 25$ for the darlingtons. So Ican imagine if this is for a hobby project that this can be a limiting factor. Hey I would take the darlingtons as well if

a) the 3V drop wouldn't cause an issue and b)I had to finance this out of my own pocket ;)

When I saw the $50 cost on that board I thought the exact same thing! :)

If you want single direction and a current of not higher than 0.5 A , ULNs are good choices , simple and cheap . Like uln2003 , which is just a bunch of transistors . You could use driver ICs (uln is a driver too) like L293D but uln2003 has 1/10the price ...

i need direction

Arman5592: If you want single direction and a current of not higher than 0.5 A , ULNs are good choices , simple and cheap . Like uln2003 , which is just a bunch of transistors . You could use driver ICs (uln is a driver too) like L293D but uln2003 has 1/10the price ...

i need direction

Then you need a h-bridge either a solid state one or a relay.

You could use driver ICs (uln is a driver too) like L293D but uln2003 has 1/10the price ...

Since the OP never stated the current draw of his motors, only that they are "high powered", and he was considering the L298 made me believe he needed on the order of an Amp.

You get what you pay for. Take a careful look at the ULN2003 and thoroughly examine that 500mA spec and how long it will do it before melting. You still have the 1.5V Darlington drop at 500mA which is 3/4W!

You certainly won't be turning all the channels on at once. For a robust design, you NEVER, NEVER, NEVER run a device at its absolute maximum rating.

As for the $50 price tag, did you bother at all to look at other offerings on the Pololu site? They have dual controllers for as little as $4.95 with FET outputs. The OP never stated the current draw nor the applied voltage. One would hope a simple study of the data sheet(s) would allow you to select the right device.

If you need direction control , you should use H-bridge . H-bridge is a sort of circuit that allows 'driving' in both directions (H bridge)and is rarely made and usually bought as ICs . Now the uln2003 I mentioned is useful for LEDs , as they don't have direction and don't need much current . You can simply buy ICs such as L293D which are easier to use on breadboards and etc etc etc . You can buy L298N or you can also buy a ready-made module which just requires wiring .. or a shield , which doesn't even need that .

You can buy L298N

Or you can buy a decent H-bridge that is not a bit crappy.