# Stepper motor driver question

**URL:** <https://forum.arduino.cc/t/stepper-motor-driver-question/866607>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [May 25, 2021, 6:37pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607 "2021-05-25T18:37:15Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 25, 2021, 6:37pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/1 "2021-05-25T18:37:15Z")

</div>

Hi All,

I'm doing a project and would really appreciate a helping hand (even after searching the web and the forum).  
I require a high speed stepper motor that will oscillate between +/- 10 positions, +/- 3 degrees spaced apart, as fast as possible.

I currently have a small **5V 28BYJ-48** [datasheet](https://www.digikey.be/nl/datasheets/mikroelektronika/mikroelektronika-step-motor-5v-28byj48-datasheet) and a **JK28HS45-0956** [datasheet](https://www.jkongmotor.com/product/28HS-NEMA11-2phase-Stepper-Motor-1-8%C2%B0.html) bought [here](https://nl.aliexpress.com/item/33055746625.html) which has a 3.4 Ohm phase resistance and 1.5° step which would be good if I do 2 steps at a time.

I'm able to drive the 28BYJ-48 with an ULN2003 fast enough when removing the internal gears, but the step is too big. With the internal gears the speed is way too slow.

I didn't succeed in driving the JK28HS45-0956 with the ULN2003. So I thought it might be better to buy an arduino motor shield or a A4988 motor driver and try again with a bigger power supply.

1. Would you advise a motor shield or a A4988 or similar (with a extra capacitor I guess), or is this a silly idea?
2. What kind of speed can I expect from it when I do 2 steps, stop, 2 steps, stop, 2 steps...?
3. What voltage do you recommend for the JK28HS45-0956? (I have a 24V 3A, 12V 3A and 5V 2A)?
4. Will I be able to control it with the normal stepper.h library?
5. Would you suggest a different stepper motor for this purpose?

Somme additional info after feedback in this thread:

- **Speed:** I want to create a laser harp, so the faster the better, the reflected beams should create the illusion of having 8-11 laser beams, in stead of one that is each time reflected at a different angle. I'm unable to find data on how fast that should be. 5 times back and forth per second for 10 beams would mean 100 times 2steps+stop per second.  
That means 1 full rotation including 100 stops per second. Is that realistic?
- **Load:** minimal as stated (just the shaft and a piece of glass of +/- 1cm² attached to it). (if the stepper doesn't like minimal load, I can add friction or weights to it)
- **Precision:** enough so to the eye it seems that the beams are stationary, I will be running in full step mode and I don't accuracy will be a limiting factor?

Much obliged.

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [May 25, 2021, 6:54pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/2 "2021-05-25T18:54:20Z")

</div>

> [@patsak](#):
>
> Would you advise a motor shield or a A4988 or similar (with a extra capacitor I guess), or is this a silly idea?

It may be a good idea if the driver is appropriate for the motor. Post a motor data sheet. A4988 is good for around 1A coil current, so maybe.

> [@patsak](#):
>
> What kind of speed can I expect from it when I do 2 steps, stop, 2 steps, stop, 2 steps...?

Hard to say without knowing anything about the motor, driver, power supply or loading.

> [@patsak](#):
>
> What voltage do you recommend for the JK28HS45-0956?

I have not seen a data sheet, so have no way of knowing for sure. Generally the supply voltage is the highest that the driver can safely handle for best speed. The driver controls current.

> [@patsak](#):
>
> Will I be able to control it with the normal stepper.h library?

I don't see why not,but I have not seen your complete requirements. Or write your own code. It is not hard. [See Robin2's simple stepper code tutorial.](https://forum.arduino.cc/t/simple-stepper-program/268292)

> [@patsak](#):
>
> Would you suggest a different stepper motor for this purpose?

I have not seen your complete requirements. How fast is fast? How much load? What positional precision?

[Robin2's stepper motor basics](https://forum.arduino.cc/t/stepper-motor-basics/275223) may be of interest, too.

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 25, 2021, 7:09pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/3 "2021-05-25T19:09:49Z")

</div>

Hi @groundFungus

Thanks for your swift reply!  
I already posted the datasheet in my first post:

- [datasheet](https://www.jkongmotor.com/product/28HS-NEMA11-2phase-Stepper-Motor-1-8%C2%B0.html)
- [where I bought it](https://nl.aliexpress.com/item/33055746625.html)

The answer to the other questions:

- **Speed:** I want to create a laser harp, so the faster the better, the reflected beams should create the illusion of having 8-11 laser beams, in stead of one that is each time reflected at a different angle. I'm unable to find data on how fast that should be. 5 times back and forth per second for 10 beams would mean 100 times 2steps+stop per second.  
That means 1 full rotation including 100 stops per second. Is that realistic?
- **Load:** minimal as stated (just the shaft and a piece of glass of +/- 1cm² attached to it)
- **Precision:** enough so to the eye it seems that the beams are stationary, I will be running in full step mode and I don't accuracy will be a limiting factor?

Thanks again and let me know if I can provide more information.

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [May 26, 2021, 8:57am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/4 "2021-05-26T08:57:54Z")

</div>

Stepper motors really don't like having no load - they resonate horribly as they have very high mechanical Q-factor. You need some sort of strong mechanical damping to get this tamed. Not a great choice for a laser mirror driver - a critically damped galvonometer is the normal way to drive a laser mirror.

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 26, 2021, 9:23am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/5 "2021-05-26T09:23:21Z")

</div>

Thanks for the reply @MarkT  
I can add as much weight or friction to the shaft as needed, so I don't think this will pose a problem? Everywhere on the net I found people using steppers for this purpose.

A high speed galvanometer mirror system seems to be over my budget 🙂

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [May 26, 2021, 9:28am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/6 "2021-05-26T09:28:38Z")

</div>

Adding mass to the mirror will _increase_ the Q, not reduce it, and will slow the response down - so it will definitely pose a problem.

Damping will greatly reduce the oscillation, as will microstepping at a reasonable factor (reduces step size so reduces oscillation amplitude). Microstepping also reduces noise.

Definitely use a bipolar stepper driver for the JK28HS45-0956 and treat it as 4-wire. It needs 0.95A drive for full torque.

> [@patsak](#):
>
> and 1.5° step which would be good if I do 2 steps at a time.

Not sure what you mean here - you want to use microstepping, so only a fraction of a step at a time!

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 26, 2021, 11:44am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/7 "2021-05-26T11:44:24Z")

</div>

Hi @MarkT

When you recommend a bipolar stepper driver, would you recommend the arduino motorshield or something like the A4988 driver? The motorshield seems "easier" for a beginner like me and more versatile, but only supports 12V.

> Not sure what you mean here - you want to use microstepping, so only a fraction of a step at a time!

What I mean is that I want to do: turn 3 degrees, STOP, turn 3 degrees, STOP, turn 3 degrees, STOP...  
The JK28HS45-0956 has a 1.5° step, so that would mean: turn 2 steps, STOP, turn 2 steps, STOP...  
I don't mind running it in microstepping mode, but won't that slow it down?

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 26, 2021, 12:41pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/8 "2021-05-26T12:41:45Z")

</div>

Hi,  
JK28HS45-0956 data;

 ![step](https://europe1.discourse-cdn.com/arduino/original/4X/5/9/1/591a4acd445c93dfe4be330caab35727542992a8.jpeg)

Tom... 😀 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 26, 2021, 12:49pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/9 "2021-05-26T12:49:01Z")

</div>

Thanks @TomGeorge  
I also posted this spec sheet.  
I'm sadly enough unable to deduce from this data what kind of speed I can expect from this stepper when it performs two steps CW, STOP, two steps CW, stop, two steps CW, stop..... as fast as possible.

Would you advise buying a motorshield or a A4988 to test it out or do you possess some voodoo to deduce what to expect? I find it hard to phantom that it's not possible to calculate it theoretically...

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [May 26, 2021, 2:26pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/10 "2021-05-26T14:26:56Z")

</div>

I would recommend a driver like the A4988 or DRV8825. Personally I would go for the [DRV8825](https://www.pololu.com/product/2133) as it is good for more current than the A4988 (1.5A vs, 1.0A).

The A4988 and DRV8825 drivers are good for 45V motor supply voltage. The [motor shield](https://kjdelectronics.com/products/arduino-motor-shield?variant=29778533896) is only good for 18V. As I said before, the higher the stepper's supply voltage, the faster the stepper's possible speed.

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 26, 2021, 3:26pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/11 "2021-05-26T15:26:06Z")

</div>

Thanks, I'll order a DRV8825 and a capacitor.  
About 100 uF should be fine? Is it important that it's a ceramic one? I'll also have a look what value my fluorescent tube capacitors have, maybe they fit 🙂 .

---

<div class="post-metadata">

**Author:** ![groundFungus](https://avatars.discourse-cdn.com/v4/letter/g/73ab20/32.png) [@groundFungus](https://forum.arduino.cc/u/groundFungus)\
**Post date:** [May 26, 2021, 3:52pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/12 "2021-05-26T15:52:44Z")

</div>

> [@patsak](#):
>
> About 100 uF should be fine? Is it important that it's a ceramic one?

The 100uF cap will be an electrolytic. I have never heard of a ceramic cap over about 1uF. Be sure to observe polarity with electrolytic caps.

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [May 27, 2021, 11:22am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/13 "2021-05-27T11:22:20Z")

</div>

> [@patsak](#):
>
> Thanks, I'll order a DRV8825 and a capacitor.  
> About 100 uF should be fine? Is it important that it's a ceramic one?

If you want to bolster the decoupling of the driver ceramic would be great, but 100uF would be very expensive in ceramic. Better to have say 10uF ceramic and ~4700uF  
electrolytic for bulk - at high currents you need a lot of capacitance to be effective, ceramic is good for high frequencies though, electrolytic much less effective there.

Most people just live with what's on the driver module for decoupling - they assume the  
motor supply rail will be very dirty.

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 27, 2021, 11:35am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/14 "2021-05-27T11:35:26Z")

</div>

So you would recommend the 10uF ceramic and ~4700uF electrolytic in parallel connected?

---

<div class="post-metadata">

**Author:** ![MarkT](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@MarkT](https://forum.arduino.cc/u/MarkT)\
**Post date:** [May 27, 2021, 11:40am UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/15 "2021-05-27T11:40:35Z")

</div>

Why do you think you need the extra decoupling? Is there a need for the motor supply to be especially quiet?

---

<div class="post-metadata">

**Author:** ![patsak](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@patsak](https://forum.arduino.cc/u/patsak)\
**Post date:** [May 27, 2021, 12:24pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/16 "2021-05-27T12:24:43Z")

</div>

Nope, I just read in the specifications of the DRV8825 that it's recommended to include a 47uF capacitor as close to the board as possible.  
I'm not concerned with motor noise at the moment.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 24, 2021, 12:25pm UTC](https://forum.arduino.cc/t/stepper-motor-driver-question/866607/17 "2021-09-24T12:25:32Z")

</div>

Closed on September 24, 2021, 12:25pm UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
