Appropriate driver for stepper motor


I have a 42BYGHW609 stepper motor (12V, 1.7A/phase) and a L298N Dual H-Bridge Stepper Motor driver. Is this driver appropriate for the motor? What should the current rating on my 12V power supply be?


Using L298Ns is kinda tricky; it'll work but it's difficult to get good control of the motor. I'd recommend a driver based on the DRV8825.

With the L298N you'll want a 12V supply and the DRV8825 is happy with anything up to 40V (higher voltage = faster speeds). In both cases you need enough current to satisfy the 1.7A/phase rating and then double it so you have some margin of error (i.e. greater than 3A).

It would be much easier and better to control that motor with a proper stepper motor driver such as a Pololu A4988 or a Sparkfun BigEasydriver. They allow the motor to be operated with higher voltages (they can limit the current to protect the motor) and they only require step and direction signals from the Arduino.


PS or the Pololu DRV8825

From the datasheet that's a 2 ohm 1.7A motor, nothing to do with 12V. For bipolar
stepper motors there isn't a voltage rating(*) but some manufacturers include an
erroneous one anyway.

You need to drive it with a bipolar chopper driver capable of 1.7A, and if you want it
to go fast a high supply voltage is needed - it will work at 12V but the top speed
is roughly proportional to supply.

(*) except for insulation strength

Exactly the reason why I'm on here tonight. I'm a noob trying to get started with stepper motors. I have a 24v 2a motor, a 24v 10a supply, and the L298N.

So, I wrote the basic possible code just to spin the motor in one direction using the Stepper class. For a while, nothing would happen, so I decided to check my breadboard wires. I made the decision to power the Arduino Nano from the 5v supply from the L298N board I have. As soon as I did that and grounded it all the same, the motor began spinning exactly as it should.

HOWEVER, after powering down and then back up the motor twisted sporadically in random directions. Nothing had changed. Nothing in the circuit and nothing in the code. I then noticed when powered down the motor was locked. One of the coils was somehow still charged even though there was no power in the system. If I disconnected the coil from the L298 the motor would turn freely by hand. Weird and unexpected behavior of things.

My question is this, should I be looking at another driver like the ones mentioned above? Are there any recommendations for this power range?

I'm guessing the L298 got fried even though it's rated up to 48v and 4a. The motor would only pull as many amps as needed right? I guess I have a bit to learn about amperage consumption. My understand is that it only uses what it draws, so having a 10 amp supply should be fine.

I would really, REALLY like to get moving with my little project. It's very frustrating to get stuck on the very basic things, but I'm guessing I just don't have a capable driver. For a while I thought it was my code. Before that I thought it was my power supply, so I got the one mentioned above.

Totally noob, any info is GREATLY appreciated.

My question is this, should I be looking at another driver like the ones mentioned above? Are there any recommendations for this power range?

This has already been answered.


Well, yes; you are absolutely correct. However, the question about amperage and a compatible driver is still open. As is the question of whether or not I overpowered the L298n.

From the suggested driver options above:

DRV8825: 45v; 2.2a/phase max
Pololu A4988: 35v; 2a/phase max
BigEasyDriver: 35v; 2a/phase max

I'm a little confused about amps per phase and how the motor is rated. This confusion stems from being a beginner in the hardware world. Two phase motor has two coils. So, is the 2a rating telling me that it draws 1a per coil or 2a per coil?

As suggested above, we should double the amp rating to allow for a margin of error/load. With the 2a motor, I'm not sure if that means I need a 2a or 4a per phase driver. If it's 4a, then none of the suggested drivers are compatible. That's the only clarification I need, really.

If the rating of 2a per phase is compatible for the motor, then I guess I don't understand what the issue is with the L298n. At this point, I'm assuming I need a higher rated driver. I'm hoping someone can help me out with the rating confusion.

One last question, are these driver chips capable of handling load/surges? Is the rating only a constant current limit? Can heatsinks/fans be added to increase durability and reliability?

I'm new to hardware and new to the forum. If my questions are out of line let me know. I felt a little attitude with that response, Robin2.

I'm just here to learn and contribute. I will be compiling this information and posting it for other people on my blog. I'll probably title it "Just Spin the Bitch." Because, while digging for information on stepper motor control, I feel as though the explanations are not thorough enough, and the examples are too complex for understanding simple circuits and motor control. I feel others would get up to speed faster in their projects with this information...

EDIT: While I want to keep this thread about the actual hardware, ratings, and choosing the proper driver, I'm pasting this fantastic post Robin2 made for reference on code for testing motors.

I felt a little attitude with that response, Robin2.

It seemed like you were asking for the same information to be repeated or perhaps hadn't read the earlier replies (which, alas, is not uncommon).

You say you motor draws 1.7A. Normally this means "per coil".

All of the drivers you have listed can deal with that current so just pick one. The DRV8825 will have a bigger margin of current and it can work at a higher voltage if you want the best possible high-speed performance from the motor.

I have some Pololu A4988 drivers but my motors draw a much lower current. I have found the info on the Pololu web pages very good.

The chips are designed to work at a high temperature (you could burn your finger) but a heatsink would be beneficial. I think they all cutout if the temperature is too high.

Also the driver boards have a small potentiometer to allow you to set the maximum current to protect your motor.


Haha My bad. I had read every post, I guess I was just reiterating it in my head and it came out as a question.

And 10-4. So, to sum it up:

A motor rated at 24v and 2amp is suggesting each coil is to be supplied 24v and draw 2a. So, a driver that is rated for 2a per phase is sufficient enough for powering this motor.

And, the above drivers listed have current protection.

I guess the L298n is just junk?? I have two of these boards, one has obviously failed/shorted on outs 1 and 2. Because, when hooking up the motor it's as if I've connected the coil leads (the motor becomes hard to spin by hand). I'm assuming this happened because of the lack of protection on current. The motor drew so much it cooked something on the board.

I'm going to pick up some DRV8825's, and use your testing code to get myself off the ground with this project. I've been so frustrated with it, and I think the only issue is a shotty driver board. Which is not something I would've considered as the cause of issues until now.

A motor rated at 24v and 2amp is suggesting each coil is to be supplied 24v and draw 2a.

Hold on a moment --- where did the 24v come from?

Are you sure it is not 2.4 (two point four) volts?

The voltage specified for stepper motors is usually irrelevant. It is the voltage that would drive the rated current through the coil while the motor is stationary just based on Ohm's law V = RI

I would be very surprised if your motor is rated at 24v and 1.7 amps whereas 2.4v and 1.7 amps would be common. Post a link to the motor datasheet if you have doubts.

The proper stepper drivers (such as DRV8825) can limit the current so that a high voltage cannot drive too much current through the coils and let the smoke out.

If you don't use a high voltage the inductance and back-emf created by the rotation will limit the current and the torque even at low speeds. The high voltage allows the rated current to be achieved at higher speeds.


I'll repeat what I said. Bipolar motors are rated by winding resistance and operating current,
NOT VOLTAGE. If there is a voltage rating you should IGNORE IT.

Unless the motor has high resistance windings (usually somewhere in region 15 to 50 ohms)
it is just not designed for being driven from a dual-H-bridge. You should employ a bipolar
motor driver that's a chopping driver - these control the current, not the voltage, and automatically
give DC-DC buck conversion so operate from the large supply voltages needed to overcome
back-EMF from the motor when its turning. Stepper motors have effectively 50 pole-pairs or
more so back EMF is much higher than for regular motors even at quite low rotation speeds.

For 1.7A using single-chip chopper driver you will need heatsinking and probably
a cooling fan - single chip drivers really struggle above 1A due to the high MOSFET
on-resistance of integrated DMOS FETs. Industrial stepper drivers use discrete
MOSFET bridges and are available upto 8A or more and to supply voltages > 100V.

That's the motor. 12-36v at 2a.

MarkT, I get what you're saying about not rating a motor with voltage, but most manufacturers have a rated voltage listed. I think this is merely a suggested mid-point to achieve the expected performance/abilities of the motor. Yes, you can drive it more or less, but I think using that voltage rating is a great way to plan out your project.

So, with that motor can I drive it with a DRV8825, or will I need the other type MarkT mentioned?

Is there an example or recommendation you can share of a discreet MOSFET bridge, Mark?

I have looked at your link but it does not quote the coil resistance which is unusual. It would be wise to measure it.

The spec sheet does not mention the torque either.

If you haven't already bought the motor I suggest you look for a supplier who provides full data about its products.

The DRV8825 should be able to drive it at 2 amps.


We shall see. Just ordered some of the DRV8825's.

I really can't wait to start writing the code and interfacing (the stuff I'm pretty good at) for my project. I've been stuck with this driver issue for a while... like I mentioned before, the motor spun exactly as programmed for a moment, then something changed. I'm guessing the L298 died. We shall see!!

I'll get some resistance readings when the DRV8825's come in. I can't remember the reading from when I separated the wire pairs.

I'll get some resistance readings when the DRV8825's come in. I can't remember the reading from when I separated the wire pairs.

Sorry, I had got mixed up between Threads. You already have your motors. You can read the coil resistance now - just use a cheap digital multimeter. You don't need the driver to check the resistance.

Let us know what reading you get.


I don't think the DRV8825's are going to work for this motor because it is a unipolar, not a bipolar stepper.

There are ways although to wire a 6 wire unipolar motor like this one as a bipolar motor, but it's one more complication in setting it up. There may be some penalties in lost torque also, but I'm not sure of this.

It usually pays to research first, buy second.

To use a 6-wire motor as a 4-wire bipolar motor all you need to do is ignore the wires that go to the centres of the coils. There should be no performance penalty.


It's been a while since I followed the discussions on cnczone about wiring unipolar motors as bipolar, but it may be that you usually end up with higher resistance and inductance per coil than with a true hybrid bipolar stepper, which means needing more power to start the motor moving. Also, IIRC, higher phase coil inductance means needing higher voltage to get the full torque and maybe acceleration from the motor.

There is a formula that calculates the maximum voltage you can apply to the motor based on the coil inductance per phase. I don't remember it off hand, but I think you can find it in the FAQ section of the Gecko drivers site.

I looked some more at the motor specs on the cncsuperstore link and it's a bit confusing, the description and specifications tabs for the motor give completely conflicting specs for the motor. The description tab says unipolar, but the specifications tabs says bipolar!. Some of the most important specs, phase resistance, phase inductance and motor torque are missing. But the picture shows 6 wires which indicates a unipolar motor.

It doesn't seem to be a particularly good price for a reconditioned motor of this size either.


it may be that you usually end up with higher resistance and inductance per coil than with a true hybrid bipolar stepper,

I can't see how adding a connection to the centre of a coil could have that effect?