28BYJ-48 stepper motor


Based off of this post on hackaday about a simple clock using a cheap stepper motor, I decided on a whim to buy some. I chose these on Amazon because they had the desirable combination of being cheap and prime-eligible.

Before they arrived, I did some reading and found that there were different verdicts on the gearing…

  • Adafruit says 32 steps/rev and 1/16.032 gearing (which they round up to 513 steps/rev).
  • Graham Wideman disassembled a few. He confirmed Adafruit’s gearing and also found one with a 1/63.68395 gearing (= 2308 steps/rev)
  • 42 bots didn’t disassemble anything, but agreed with the 1/63.68395 gearing
  • Jangoex found that between 508 and 509 steps resulted in a full revolution (which approximates 1/16, but is a different ratio than Adafruit)
  • The Arduino forums have a lot of discussion (I haven’t read it all), but sounds like there’s just a wide variety of gear ratios, and possibly even a true 1/64 ratio

So, when my steppers arrived, I decided to run experiment to determine which gear ratio I had.

I wrote some code (linked here) to:

  1. move 1 full rotation (2048 steps)
  2. increment counter & print
  3. pause
  4. loop

And here’s the code in action, spinning the motor (with a bit of tape on the motor shaft to make the rotation more visible):

I should point out that I usually power my breadboard from a 9V wall-wart with a linear regulator to bring it down to 5V. This stepper draws enough power, though, that I was having problems with brown-out. So, I switched to using a 4xAA battery pack. The voltage is a bit higher than 5V, but everything seems to tolerate it OK.

Preliminary result

After 5000+ revolutions, there was no noticeable change in end position.  I think I may have the magical “true” 1/64 gearing!

Just to be sure I didn’t fool myself, I changed to code to do 513 sequences (i.e. 4 steps), I noticed it drifting quickly.

NOTE: when I tested all 5 steppers that I bought (all seem to have the same gearing), one seemed to get jammed.  Running it in the opposite direction, and giving it a bit of manual “encouragement” seems to have fixed it, but it’s probably the one I’ll disassemble. It may have also been that my battery pack was running low, and didn’t have enough power to reliably drive the motor.


At this point, I decided to potentially sacrifice one motor to confirm once and for all that I had a true 1/64 gearing.

Getting the case apart was surprisingly difficult. I thought that the little tabs would bend out of the way easily, but they were too small to grab easily, and much tougher than I expected.


Once I got it opened, the gear train looked similar to other photos I had seen.


Of course, even though it looks similar, that doesn’t tell us the gear ratios:


motor out:
9 teeth
(hard to see here)


Gear 1:
32 in, 11 out


Gear 2:
22 in, 9 out


Gear 3:
27 in, 8 out


24 teeth

And the math reduces like this:

$${9 \over 32}\times{11 \over 22}\times{9 \over 27}\times{8 \over 24}$$ $${9 \over 32}\times{1 \over 2}\times{1 \over 3}\times{1 \over 3}$$ $${3 \over 32}\times{1 \over 2}\times{1 \over 3}$$ $${1 \over 32}\times{1 \over 2}$$ $${1 \over 64}$$

So, I do truly have a stepper motor with a 1/64 gearing. This will make any projects in the future much easier, not having to compensate for an odd gearing!

Unfortunately, putting the stepper back together was also difficult. The magnets pull the motor output shaft off-center, so the plate doesn’t really want to click back in place. Additionally, I don’t have a good tool to bend the tabs back in place…so it’s being held together with masking tape for now. Good thing I have four others to use!

Leave a Reply