28BYJ-48 5V stepper - 100 RPM !

OK the title is somewhat clickbaity but it's true, I have one of the ubiquitous devices spinning at 100 RPM. That is, of course, with nothing more that a popsicle stick attached, used as a pointer to indicate start and stop positions. And converted to bipolar and running at 15+V using a H-bridge (8833) "driver".

Just how much of a load, what level of torque can it provide is a question I will answer in a future post as I've not yet completed that test set. I have done a lot of other testing and the purpose of this post, and a few to follow in the coming days, is to publish those results for people to use and comment on.

To start let me say that the motors I got from China (where else) seem to be fairly routine, run of the mill 28BYJ's except for 1 parameter ... they appear to have a true 64:1 gear reduction, not the 63.68+ discovered and posted in another thread in this forum. I say this after doing a lot of testing using 4076 halfsteps as "the number" to get a full 360 deg rotation of the output shaft. What I noticed was that the indicator (popsicle stick) would stop just shy of the starting mark (for a single 360 rotation) but yet reversing the motor would bring it back exactly (to my eye) the starting mark. This was repeatable. I then ran the MUT (motor under test) for 4 rotations before stopping. This time the shortfall was distinctly noticable. I thought that just perhaps the batch of 28BYJ I got mine from had gone back (?) to the 64:1 gears and so I changed the code to run 4096 halfsteps per rotation. Sure enough the indicator now stops "exactly" on the starting mark after 4 rotations, and does so repeatably. Where it the usual 63+:1 gearing it should have stopped ~7 deg short. I can think of no other explanation for the above other than gearing, can anyone ?

Otherwise the MUT has the usual 50 ohm coils (measured 43.6, 43.3 ohms) given the 7% tolerance on the spec I've seen. They came with the usual ULN2003 Darlington board, perhaps a bit nicer than usual as these had LEDs on them (some don't). I used one of these board during all my unipolar testing, which started with a 4AA cell battery pack (my bench supply was down). I then went on to characterize the torque vs speed at various supply voltages, from 5V to 9V applied. Note I say applied voltage as the ULN "driver" will claim about 1V of drop at these current levels.

My test rig was a printed drum, 20 mm in diameter, cradled by 2 supports, one of which also held the MUT. The rig was clamped to a table with the drum hanging over the side. Below it I dangled a thread attached to the drum and then to a water bucket, that I could fill with varying amounts of water. The testing would add/subtract water in 10CC increments until I found (by ear or eye) that the MUT was either missing steps ... or not. That later was considered a pass, and the weight of the water plus bucket (etc) was weighed with a postal scale. This directly translates into the sustainable torque (g-cm) at that speed and applied voltage. Does this sound like a reasonable test methodology to you ? After all I was trying to get a ballpark idea of the torque curve not a uber rigorous measurement. That said I think my results compare to other measured results if not the spec (which is ambiguous by itself, not even counting the 6+ variations of 28BYJs there seem to be).

The attachment is a plot of the MUT torque curve vs speed in PPS (pulse per second) when powered by a 4 cell AA pack. The pack voltage varied from 5.5V to 5.3V during the test period and this slight difference could be seen to make noticeably different results. I use PPS (terminology) to make a distinction from steps, which might be full or half or some other microstepping method. For all my tests I used the preferred halfstepping method, even though full stepping might have produced more torque. Thus a pulse per second equals a halfstep of 5.625deg/64 per second on the output shaft. I note that the spec lists 1000 Hz (?steps?) as the max running frequency and I (and others) have achieved a bit more than that at the usual voltage. The spec also calls for 34.3 mN-m of intraction torque (at 120 Hz, no stepping method given), which is what I think I've measured ... the max torque output at speed allowing for a ramp up (acceleration) to that speed. This is different from the max torque the motor can put out starting from no speed and instantly trying to get to speed. That 34.3 number translates into ~350 g-cm. I measured much more than that, as you can see, but inline with what Solar Robotics lists for their similar motor. So who is right ?

In any case I have more data for the unipolar case (vs voltage) and then again some more (incomplete) for the bipolar case (converted MUT to bipolar winding). I'll post those later after I've had some time to review them. I'll also post the code I used to do the tests as I couldn't use the otherwise excellent AccelStepper library to do some of the bipolar tests (per it's author it's sketchy past 4000 PPS).

Is anyone interested in this data or should I not bother ? I hope I have the right forum for the topic, if not perhaps a Mod can move it as deemed appropriate.

Hi,

YES that data is very valuable! There are 10s of thousands of those steppers that Arduino,enthisiasts have gotten one way or another. I have shipped over 8000 in kits that went to universities and schools over the past 5 years. You can see one in the upper right of this kit:

https://arduinoinfo.mywikis.net/wiki/YourDuinoEngStarter

I'd be very interested in your gear-reduction tests and the exact label on those motors..

These motors are used in almost every room air conditioner and also in ductwork vanes and that's why they are so inexpensive: millions are made...

Thanks for your details on this stuff.. I have this page about them:

https://arduinoinfo.mywikis.net/wiki/SmallSteppers

And I hope you can add to that. Let me know how I can help...

terryking228:
Hi,

YES that data is very valuable!
...

I'd be very interested in your gear-reduction tests and the exact label on those motors..

If I've done it correctly there should be a pic of the backside label of the motor I'm using. I'm a bit tied up with snow removal ATM but should be able to get everything tested this weekend.

Here's a question I've not seen asked yet ... Can a gear ratio change be accomplished by removing the 2nd gearset and then moving the 1st gearset (the one that meshes with the rotor) from it's post to the 2'nds post ? It looks possible (maybe) from the pics I've seen but I won't know for sure until I open one up myself. And I want to finish testing before I do that. The final ratio would then be about 26:1.

Has anyone ever posted a pic of the gear train for a 16:1 motor ?

The "standard" 28BYJ-48 has a 32 step per rev motor with a 64:1 gearbox, so 1 rotation of the output shaft takes 32 * 64 = 2048 steps or 4096 half steps. Adafruit sells one with the same part number with a different gear ratio, takes about 513.04 steps per rev, so a ratio of about 16.0325.

Sorry this took at bit longer than expected and Life got in the way.

What should be attached are plots of torque for a 28BYJ stepper, modified to be bipolar. The simple mod to do this is on the WWW and I won't bother to repeat it. Given the coils are now driven from end to end vs from center-tap to end, higher voltages can be used to run the motor. I had an Adafruit '8833 "dumb" H-bridge driver that I used in lieu of a "smart" driver that knows half and other microstepping details and needs only a pulse to step (full, half or otherwise) and a direction line. The 8833 is more like the ULN2003 that came with the motors, the Arduino has to command the half-H's to be on/off. This has repercussions I'll discuss later (another post ?) but what I found was that the code had to be very consistent in it's timing or the motor would miss steps at lower loads than it was later proven capable of. I note that the voltage loss through the H-bridges was a lot less than for the ULN2003, about 0.3 V vs 1.0 V so when comparing data, uni- to bi-, you should account for that.

As far as the data goes I can say that the timing (PPS) is accurate to better than 1% and the load applied (= torque) to about +/- 2 g (gf). At any voltage and speed (PPS) I would say the result is good to within 10%, and often much better. It seemed that the geartrain, especially at higher loads, was prone to binding up and pushing the motor over the edge into missing a step. And missing one step at 1+ kg resulted in a quick drop of the load to the floor ! A better geartrain might have yielded higher torque measurements. Then again perhaps my MUT has one of the better geartrains !?!

I note that the unpowered holding (detent) torque was about 630-650 gf-cm.

Because the 8833 driver is only rated for 10.8V, I stopped at 14V supplied (13.7V across the coil) and I only enabled the driver when the test was running. Thus I noticed no heat buildup at the case of the MUT, as I did when doing the unipolar testing (which I am planning to redo), which left the current on for the most part. That said I think heat dissipation is a real concern for usage in bipolar mode. Consider that 5V across the center-tap to end of a coil results in about 220 mA of current and just over 1 W dissipated. In continuous use the half-step method has 1, then 2, then 1 ... "half-coils" energized in sequence. Over 1 rotation that averages to 1.6W of heat to be dealt with. In bipolar mode, again half-stepping, and with 10V across the full coil, there is the same 220 mA but now 2x the watts. You could reduce the voltage and sacrifice some speed and torque and that's why I started my testing at 6V. Alas I kept running into large discrepancies for some reason and gave up on that line. I also wonder (hmmm) if drilling some holes into the case to pump in/out some cooling air might mitigate high wattage duty cycles. Has anyone tried that ?

So what I have are plots of (pull-out) torque vs PPS (half-steps / second) for various supply voltages, starting at 8V applied and ending at 14V. I also stopped testing when the weight to be lifted exceed 1.4 kg !! I was concerned the tiny little plastic gears I've seen in pics of a gutted 28BYJ would strip at any higher load. I didn't bother testing below 26g of load as that data would little use for me. People can interpolate and extrapolate from the data as they please.

So far as I know I've not seen any other data, short of a point or two, for these motors in bipolar mode so I hope others will find the data as useful as I know I will. And as I said I'll (re)do a similar test routine (with my now tuned code) for the unipolar case using the ULN2003, as I've not seen much of that data either. Frankly I was impressed by how well the MUT improved, torque and speed -wise. If anyone has any questions re: the data or testing, post away and I'll answer the best that I can.

FWIW I have a wedding to attend this weekend so don't hold your breath awaiting more data just yet.

outsider:
The "standard" 28BYJ-48 has a 32 step per rev motor with a 64:1 gearbox, so 1 rotation of the output shaft takes 32 * 64 = 2048 steps or 4096 half steps. Adafruit sells one with the same part number with a different gear ratio, takes about 513.04 steps per rev, so a ratio of about 16.0325.
Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing : ID 858 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits

Well, in this case ADA is full of horse pucky. Take the gear box apart. Count the teeth on each gear. The count of one divided by the count of the other is the GEAR RATIO! Cant' be anything but whole numbers!

If you are counting the number of MOTOR steps for one revolution of the gear output shaft, that is another ration, but NOT the gear ratio.

Paul

Well, in this case ADA is full of horse pucky. Take the gear box apart. Count the teeth on each gear. The count of one divided by the count of the other is the GEAR RATIO! Cant' be anything but whole numbers!

Yes, there have been MANY discussions about this. And somewhere?? a very detailed teardown. As Far As I Know all those ended up agreeing that the gear ratio was not an integer.

My experiments showed that:

  • Running the same 2048 steps backwards and forwards hundreds of times, always returned to the same point
  • Running 2048 steps forward, again and again, caused a creep of the endpoint. It was a lot after 100's of runs.

terryking228:
Yes, there have been MANY discussions about this. And somewhere?? a very detailed teardown. As Far As I Know all those ended up agreeing that the gear ratio was not an integer.

My experiments showed that:

  • Running the same 2048 steps backwards and forwards hundreds of times, always returned to the same point
  • Running 2048 steps forward, again and again, caused a creep of the endpoint. It was a lot after 100's of runs.

That thread is here, have a look at post #21.

http://forum.arduino.cc/index.php?topic=71964.0

It seems from various posts that a number of overall gear ratios are in the wild, including the true 64:1 I think I have and the 63.68395:1 seen in that teardown. I note both Adafruit and SolarRobotics sell the "16":1 motor. And IIRC I've seen one listed as having a 7.5 deg stride angle, an error perhaps ? There are also 12V and 5V flavors and I'm not sure how much the coil resistance varies as people don't tell whether they are measuring across the full coil or from the centertap to end. Notheless I've seen 35 ohms listed which is neither 25 +/- (CT-end) or 50 (end-end) as listed in the few specs I've seen.

If anyone has a secret decoder ring with -numbers that indicate which is which, I'd pay good money to see it !

For that matter I'd like to be able to know, ahead of time, that if I buy one set of 28BJYs, that they will exactly (within stated tolerances) match another set.

As for gear ratios, I believe it's a matter of how you express it. Obviously the number of teeth on any gear is a whole number (Nx). And the gear ratio can be expressed as N1:N2 or as a decimal fraction (N1/N2):1. Same goes for an geartrain; either N1N3N5:N2N4N6 or it's decimal equivalent. The decimal equivalent does not have to be a whole number, and for good reason (wear, NVH), generally isn't.

For anyone who is interested here's the code I've been using to do the bipolar tests. It has "evolved" over the course of testing and therefore isn't as cohesive and well thought out as something that was designed and engineered from the start. And then there's my software code monkey level, which I rate more like marmoset rather than orangutan. For that matter I forgot how to get user input from the keyboard (though having done so in years past) and had to copy'n'paste, and then modify, some code I found on the WWW. I'd have listed that author in the comments but I forgot to save a link to the site I stole it from. So have a laugh at it if you wan't but don't be cruel on post it here. :smiley: That said corrections and improvements are welcome.

I think my code is reasonably well commented so I won't dwell much on it here other than to caution that it was written for the Arduino Micro that I had handy and so it probably has some oddities that may not play well on a 328P based Arduino. In particular I used timer3 to generate interrupts to take a half-step. I don't think timer3 on a 32U4 based board is used for much but YMMV. I found it was necessary to use a timer (CTC mode, clk divider is 2) and use direct writes to the IO port inorder to get fast, short, stable and consistent step timing. Failure to do this meant I couldn't get much past 3500 PPS and the small variability due to using digitalWrite() was killing the stepper at high step rates.

I note that getting inputs from the keyboard has some bugs features. If I cared to I'd flush the buffer immediately upon sensing that the user has pushed the button to start a new test cycle. That way fat fingers wouldn't screw up the desired inputs with prior clumsiness. I'd also like to include a backspace/erase feature as I am note a good typr. But given it's single ended use, it just isn't worth my time. One other bug is that the minimum PPS is something above 32. It should be less but it seems there's an int rather than an usigned int somewhere in my PPS and/or timer code. Meh.

I'll finish by saying the unipolar code is pretty much the same code, except that pin assignments will be different and maybe the on/off sequence. Perhaps I'll include a switch to choose one or the other. Or not. :grin:

28BYJTorqueTest-Bipolar-Int3.ino (12.1 KB)

Hi, ForWhatIt'sWorth let's several of us take a photo of the LABEL on the motor(s) we have. I WISH I had been organized and done this with each batch; I've bought over 8000 of these motors in the past 5 years or so.

Students have been using them to understand STEPPER MOTORS, which are "in all those CNC machines we hear about like 3D printers and CNC Routers and Laser Cutters". So the schools require them to write Code to do various moves, eventually including acceleration and deceleration, NOT using any libraries. Turn in your code as Homework.

Aside: I'm working on stuff to teach younger students (maybe grades 4-9?) about Physical Computing. It's under construction, but I'd appreciate feedback: [HERE] OOPS I shouldn't do this here in this thread.. I'll put up a post soon in the EDucation section.

But ThingsThatMove are so cool...

Sorry...

Somewhere out there must the actual design specification for this motor - its made by several manufacturers,
and its purpose is moving vanes in car air heating/airconn systems as far as I remember. The exact gear ratio
is thus not important, its probably specified as 64:1 +/- 1% or something like that, and the torque specification is likely to be only for low speed operation, so different versions may differ at higher speeds.

The reason its cheap is the volume of production, probably in the range 10^6 to 10^8 units/year taking
a wild guess. I suspect many are 12V, but some are 5V which is convenient for hobby use.

Though a lot of the above may be based on rumour, it does explain the variations seen and the easy availability.

MarkT:
Somewhere out there must the actual design specification for this motor - its made by several manufacturers ...

Being sourced from multiple manufacturers would explain the difference between a true 64:1 geartrain and the almost64:1 geartrain. I also wonder if, when getting them from China, we aren't getting rejects from some production line where (for example) the winding machine put too few or too many loops into the coil(s) resulting in a lower or higher coil resistance. And then there's the case where one Chinese vendor might "optimize" his product to save a few pennies (ie - fewer windings) and still keep it "in spec", if only just barely.

As far as a single parent design spec for them ... I've searched and can't find it. Here's one that I think is as complete as I've seen, with electrical and mechanical properties listed. That said I doubt it's a true design spec, just what this vendor could find and put into a document to sell his wares. I have no idea of who, or how many, actual manufacturers there are.

28BYJ-48.pdf (193 KB)

I had some free time tonight so I did a shorter data set for the unipolar case and the plots should be below. All the caveats, tolerances and error ranges are as discussed previously. I may try to fill in some of the gaps at 6V but I'm not sure there's much value there.

What's attached are plots of (pull-out) torque vs PPS (half-steps / second) for various supply voltages, starting at 6V applied and ending at 10V. I also stopped testing when the weight to be lifted exceed 1.4 kg !! I was concerned the tiny little plastic gears I've seen in pics of a gutted 28BYJ would strip at any higher load. I didn't bother testing below 26g of load as that data would little use for me. People can interpolate and extrapolate from the data as they please. Be wary of extrapolating off the low speed/high torque end of the curves though. There is a max torque limit due to the magnetic field strength and I have reason to believe I was flirting with it during some of these tests. At the high speed/low torque end be aware that the geartrain friction subtracts from the available torque and may do so rapidly.

I would again warn that at 8V and higher the usage must be intermittant due to heat build up in the coils. They are so poorly "heat sunk" (as in not) that the inner coil wires may melt off their insulation if used at high currents (voltages) for too long. Just how long for what currents I can't say ATM. But I did see a 45C case temp at 9V during early (prior) testing !

What I think needs to be done next is a proper apples - apples comparison of the unipolar torques vs the bipolar torques. This means (IMO) a comparison of torque vs current level, as magnetic field strength is proportional to current and number of windings (to first order approximation). I think a similar comparison of torque per watt might be useful as well.

Lastly I will also try to put the data into some text (CSV) files so y'all can run whatever analysis you care to on them. One thing that comes to mind is a curve fit to come up with a general equation for torque vs current as that may prove to be the most useful when/if using a smart driver, one that accepts a wide range of supply voltages but sets current limits for the coils.

Really really lastly I would opine that while a ULN2003 board is nice to have, it sucks as a stepper driver. Waaay too much Vloss, especially at low/spec voltages. If I were to use a 28BYJ and be constrained to "low" voltages, I'd find a good FET and use some protection for the inductive spike.

MeBeMac:
What I think needs to be done next is a proper apples - apples comparison of the unipolar torques vs the bipolar torques. This means (IMO) a comparison of torque vs current level, as magnetic field strength is proportional to current and number of windings (to first order approximation).

I've gone and taken a stab at the above. I say a stab because I realize it's not complete and I am not quite sure how to complete it. What's attached below is another plot that takes all the data sets and re-scales each measured torque to what I'd expect IF the current had been set to 1A (vs what was actually used during the test set). I've also accounted for the windings difference by multiplying the unipolar sets by a factor of 2. IF there was no loss in the gear train (or elsewhere) then I'd expect all the curves to cluster together and lie on top of each other, with the only deviations being due to test inaccuracies. That would have been a nice way to average those inaccuracies out and get a curve fit to come up with a generalized equation (as mentioned previously) of torque vs speed and current.

If you squint a bit and have a few beers first, you can kinda envision the higher torque curves clustering together, at least at the higher torques. The low current, thus low torque, sets tend to diverge more and all sets diverge as torque decreases at higher RPM. If someone knows of a good model for this sort of gear train loss, please point me to it. From what I've read so far, it's non-trivial.

So the best way to estimate the torque you'll get from a 28BYJ is to use the prior plots, finding one or two of the curves that most resemble your situation. At least for now. I do think the curves below indicate my data is good, at least for that one motor.

Now I think it's time to open up the MUT and count some gears, pics to come when I do. Later on I think a few sparse data sets for the other 28BYJs I have would be another good thing, just to see how consistent they are.

I'm not sure how to embed a pic in the post here but attached is a pic of the gear train in place. I did disassemble it and then count the teeth. Sure enough this 28BYJ has a ratio of 64:1 !! The details are;

Rotor - 9 teeth
GearPair#1 - 11/32 teeth
GearPair#2 - 9/22 teeth
GearPair#3 - 8/27 teeth
OutShaft - 24 teeth

This jives with my testing so I trust my counting. It seems odd to me to have 2 nearly the same ratios in the wild. I might guess the original design had a 64:1 ratio until someone pointed out that a hunting ratio would wear better. Perhaps new motors have the almost64:1 ratio and old ones the 64:1 ?? Maybe it's an IP thing, with cloners using the old design ?? As pointed out above it makes no difference in the intended use.