Motor Controller - Buy or build.

I want to start working with motors which I haven’t done yet. I’ve read there are a number of chips you can use to build your own circuit and I’m sure I’ll build one myself eventually but to get started should I just buy one or try building one?

A lot of the chips I’ve read about and some notes:

L293 - Seems this would work for small low-powered DC motors
L298 - Seems much more popular but has staggered pins
ULN2003A - Seen this one used for stepper motors

I guess I really have no idea what I’m doing. For example it seems a heatsink is very important but I don’t have any idea how to hook one up. Not sure what parts get hot. Also can these run both DC and steppers or are they specialized. I “learn by doing” so I’m sure after frying a few chips and motors and burning myself a few times I’d get it. Just wondering if I am setting my sights a little too high.

I know I can look this info up (and plan to) but just wanted a nudge in the right direction.

Thanks in advance.

P.S. If buying I was looking at this guy…

I’ve read there are a number of chips you can use to build your own circuit and I’m sure I’ll build one myself eventually but to get started should I just buy one or try building one?

It depends upon what your goals are. Certainly building your own is a better educational experience. If you miswire something you could destroy a chip or two, but education isn’t free :slight_smile:

The real do-it-yourself option is to build a motor driver out of discrete transistors or MOSFET’s. The chips you list really just package these transistors into a single device for convenience, and these chips are often further packaged into entire “motor driver” boards for even more convenience.

L293 - Seems this would work for small low-powered DC motors
L298 - Seems much more popular but has staggered pins
ULN2003A - Seen this one used for stepper motors

That’s a pretty good summary. What matters most for motors is current: the greater the current the greater the torque. Or, for the same torque, the greater the current the greater the speed.

The L293 is good for motors of a few hundred milliamps (~500mA or so max), while the L298 is good for about double that. Note: do not be mislead by the “maximum current” limits printed for each device (600mA for the L293 and 2A for the L298). These are “marketing” numbers that represent absolute best-case conditions with lots of heatsinking or cooling. These chips will enter thermal shutdown long before pumping out the current they claim as the maximum – see our Motor Driver Myth application note for an example.

I guess I really have no idea what I’m doing. For example it seems a heatsink is very important but I don’t have any idea how to hook one up.

Heatsinks have to be attached very firmly (mechanically) using some kind of high-conductivity thermal transfer material, like silicone grease or thermal tape. The smallest air pocket will reduce heat sinking performance. How to hook one up very much depends upon what you are hooking it up to!

Also can these run both DC and steppers or are they specialized.

The L293 and L298 can run two brush DC motors or one bipolar stepper. The ULN2003A can run unipolar stepper motors.

P.S. If buying I was looking at this guy…

http://www.hobbyengineering.com/H1918.html

That is a “motor driver” that provides the maximum amount of convenience so you won’t have to build anything yourself. If you are worried about burning stuff up please consider our own product, the Rugged Motor Driver which has extra protection circuitry to keep it alive and kicking even if you make some mistakes. It’s also a shield so it plugs in directly to an Arduino.


The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons

well of course building one will be better it will cost a much lesser but nevertheless give you good knowledge if you browse about them this one(link below) can serve upto 10 amps ( if you build it you probably wont need any other model ( 10 amps id huge for dc motors used in small applications ) ) http://www.pocketmagic.net/?p=508

Great info. Thanks to both. I'll mull it over for a bit before I decide.

Great info. Thanks to both. I'll mull it over for a bit before I decide.

Something else to keep in mind: Beyond about 15A of current needs, it is generally better to buy than to build, simply because to design at those levels, you need a very good understanding of how to design such h-bridges to avoid burning up your components. Unless you are attempting to gain such experience (vs just wanting an h-bridge that will "do the job"), it can end up being a very expensive endeavour (particularly if you are going the "discrete" component route - burning up $15-20.00 USD MOSFETs can be an expensive learning experience).

At a certain point, you need to weigh the component costs vs a pre-built board, and whether you are willing to burn up a few; you can still smoke a pre-built board, but generally if you take the time to research your needs and the specs of the devices you are hooking up, and hook up everything properly (and program for it properly), pre-built motor drivers are fairly rugged and forgiving.

For very large motors (>25A or so) - pre-built is likely the best way to go; building your own driver for this size is possible, but you likely won't save any money (and you may even spend more) - and your driver may or may not be any better in performance (depending on your design skill, of course).

For small projects (like a robot platform made using a small R/C tank chassis or similar), using an L298 or other type of small driver (even a small discrete component h-bridge) is probably the cheaper method, especially if you can find the components for the bridge surplus. It can also be a great learning experience that, if you wanted to, could be used as a good foundation to design and build larger h-bridges...

:)

Thanks Cr0sh.

Ya, I'd just be building small robot platforms and maybe hacking a cheap R/C car. Nothing near the 25A area. We have a great surplus store around here (Halted in Santa Clara) and they have a great selection of small motors. Even very large ones too but a ton of $1 - $5 kind of stuff.

I know a guy from high school who would be able to help with bigger stuff. He builds battle bots. Was actually part of Robot Wars in the 90's with his entry Mauler and knows and battled against Grant Imahara and Jamie Hyneman. Planning on getting together soon.

I'll probably buy one for now, learn and someday try to build one.

Thanks for all the input.

I just received the Adafruit motor shield kit I ordered a few days ago, it looks quite easy to assemble. It caters for several different type of motor.

For small robots i like this IC a lot..

http://www.sparkfun.com/products/315

It can supply up to amp and can handle higher voltage motors and is easy to use...

@Leon... Strange seeing you here :)

I like to try to build my own stuff because the knowledge is what is valuable, but if you want to just order one, here is a +1 for ruggedcircuits shield. I've ordered components from a ton of different places (since im newb also) and have found customer service to be really hit or miss, which is extremely important to a newb. RuggedCircuits answers my questions in FAQ forum, and I haven't even bought a shield from him!