Site Contents
Wikispaces topics
Wikispaces topics
- Principles for Addons
- Documentation for Addons
- Addon components on this site
- Utility functions
- SiteTOC
- Remove Addon BRs
- Customizations & Fixes
- Notes about Wikispaces
- Tests
- WS features Test
- CSS
- Javascript
- Misc
- Collaboration/CMSs
- Notes on features
- Drupal investigations
- Drupal docs study
- Software development
- Fonts
- Java
- JavaScript/CSS
- Trees and TreeGrids
- JavaScript frameworks
- PHP
- Python
- Organization for common modules
- Packaging and deployment examined
- Packaging and deployment notes
- Distutils, setuptools, pip sleuthing
- Environment and Launcher
- Python features and libraries
- Miscellaneous
- Arduino and AVR
- Delphi
- Matlab
- ANTLR
- Process management
- Microsoft Access
- Linux
- Visio
- Economics
- "Making"
- Laser cutter notes
- Motor notes
- DIY Bio
- Includes
- For pages
- zhtml_pageinfo
- util_authordate (deprec)
- Test
- For pages
- Admin
- Addon Components, V.old
- Left-overs
Table of Contents
Revised by: gwideman, Oct 26, 2016 4:47 pm (31 revisions)
Overview
This article captures some notes on an inexpensive stepper motor with reduction gear which is available in various forms at several vendors, including Adafruit, robotics retailers, eBay from US sellers and from China etc.Obviously at <$5 these are not intended to be high-precision, high-power motors. Nonetheless, without ballpark specs it's difficult to know where they might be useful. Not finding specs on this motor (at least, specs I believed), I set out to investigate.
Identification
One would think that the part number "28BYJ-48" would identify a specific model, but it does not. There are several different versions associated with this part number. Part of the distinction is made by the voltage rating associated with the motor, either "5V" or "12V". But even for particular voltage ratings, there are different models available with, for example, different winding resistances. There may also be models with different gearing, as the photos below suggest.As some indication of the variety that might be out there, this site lists seven other models with the same part number, all different from the Adafruit and RioRand ones that I tested:
(Typical of internet specs: it seems highly unlikely that the several 12V models with different winding resistances will be able to produce the same pull-in torque, so this table is already suspect.)
Starting Point
I looked at the two models from Adafruit, and one model sold under the brand "RioRand".- 5V Adafruit Product Id 858: Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing
- 12V Adafruit Product Id 918: Small Reduction Stepper Motor - 12VDC 32-Step 1/16 Gearing
- 5V RioRandStepper At Amazon: Motor 5V DC 4-Phase 5-Wire with ULN2003 Driver Board (5 pieces for $17) At RioRand.com: http://www.riorand.com/riorand-stepper-motor-28byj-48-5v-dc-4-phase-5-wire-uln2003-driver-board.html
Note that the Adafruit and RioRand 5V units have indistinguishable part numbers, despite having different gearing and torque specs, as we will see.(The long number at the bottom of the label appears to be a serial number or date code, as it's different on every motor.)
Mechanical
Stepper motor: The stepper motor itself has 32 steps per revolution.Gearing: There are different models of motor which genuinely have different gear ratios. But from there, different sites have a variety of incorrect information about the probably limited variety of actual gearing
There are various claims on different websites about the gearing. Adafruit claims either 16.032 or 16.025. In any case, overall 513 steps per turn of the output shaft.
Gearing
Adafruit's catalog picture (Small Reduction Stepper Motor -5VDC 32-Step 1/16 Gearing. made the claimed 16.something gearing seem quite unlikely. This mystery is explained by comparing Adafruit's catalog picture with my picture of the internals of Adafruit's motor, and that of the RioRand motor. It's evident that Adafruit's catalog picture is actually of the model of motor that RioRand (and many other vendors) sells.Another view of each motor
Actual gearing details
Adafruit gear train[Figure corrected 2015-01-28]
RioRand gear train
Gear trains calculated and compared
Conclusion: These motors share many of the same gears, varying only in one or two of them.
Electrical
The main specs of interest concern the resistance per winding, the consequent current per winding, and the current limit beyond which the motor will get undesirably hot.These specs are prone to confusion because:
- There are two winding circuits.
- As a "unipolar motor", each coil has a center tap, the two center taps are tied together inside the motor and is intended to be the common (V+ pin 5) connection
- To energize a winding, switch its wire (pins 1..4) to ground.
So, when discussing resistance of a winding, it's important to be clear whether talking about one entire winding, or just resistance from the center tap to one end terminal. In the following table, the resistance figures pertain to a half winding; that is from pin (1..4) to common pin 5.1/2 winding
spec
Note 1
half-winding
Note 2
Note 2: Assumes two half-windings driven at all time. Ie: Four-phase stepping pattern.
Note 3: [As of current writing. Hopefully Adafruit will update.] Adafruit spec doesn't say whether this is for a half winding or a whole winding. Adafruit doesn't list a resistance spec for the 12V model
Driving this motor
The default way to drive this motor seems to be with a ULN2003 quad darlington driver, for which there are many cheaply available breakout boards (some with LEDS which are highly convenient for programming), often sold with the motor, as was the case with the RioRand. This driver would be connected via four wires to a controller such as an Arduino, and the sequencing performed by software.When the motor specs say "513 steps per rotation of the output shaft", this refers to using the four-phase sequence below, where one step corresponds to advancing one row in the table. So, 128.25 cycles of the complete stepping sequence.
ULN2003 driver board comments
Annoyance: This popular driver board has a row of 4 input pins for the four phases, and separately, 2 pins for power, which will probably come from a power source other than the Arduino (or other controller). There is no convenient point to which to attach a ground between the Arduino and this driver board. Other similar driver boards avoid this flaw (do provide a ground pin next to the input signals).On this board, a work-around would be to solder in an additional header pin for ground at location "IN5", and under the board solder a wire from this pin to a ground trace (for example, pin 8 of ULN2003). Grounding an unused ULN2003 input will have no ill effect.
Explanation of power pins and jumper
Schematic: http://www.uctronics.com/uln2003-stepper-motor-driver-board-p-637.html
- With jumper absent, the positive supply on pin 2 is routed only to the UNL2003 positive supply pin ("Common").
- With the jumper installed, the same positive supply gets routed also to the motor common (on the motor socket), and the LEDs.
Vendors who provide an explanation for the jumper say it's to conveniently disable the motor. (Install or remove the jumper only with power down, to avoid transients from the motor inductance damaging the ULN2003.)The jumper is not, for example, a way to provide separate supplies for the ULN2003 and the motor. That's not needed and will not work properly. See the ULN2003 internal circuitry, notably the protection diode which is the only function attached to the ULN2003 COM terminal.
The only connection of the ULN2003 to the plus supply (here marked "COM", as in the common positive supply) is via the protection diode.
Four or Eight phases
There is some discussion that the motor works better when driven with eight phases (alternating 2 windings on, 1 winding on...), but I didn't notice the 8-phase sequence to be an improvement. Indeed, I got the impression that the 8-phase sequence may actually produce less torque, though I didn't explore this exhaustively.Sequences vs wiring
For four phases, the following sequence works:And for eight phases:
PWM motor controllers
There are some popular motor controller boards, such as these from Pololu (based on A4988 and similar chips), which are widely used for controlling bipolar stepper motors. These offer clever H-bridge PWM control of stepper current, which allows use with a higher power supply voltage, in turn producing faster rise of current at the onset of each step (hence faster stepping), and also allows microstep positioning. However, those controllers require separate control of the two windings, and are not suited for driving unipolar stepper motors, whose coils are joined by their center taps. The Pololu controllers would thus be unable to control the current to each winding separately.It probably is feasible to use a Pololu driver with a unipolar motor provided that the driver is not allowed to perform PWM (that is, PWM constantly at 100%). In that situation, the controller would apply unchopped full voltage to each winding in one direction or the other, with the center tap at the midpoint voltage, prompting no (or minimal) current between the windings.
To get the driver to operate at 100% PWM requires adjusting its current-setting potentiometer to max. This will also require using a power supply voltage that is what you intend to deliver to the motor. So, the 5V motor could be used with a 5V supply. The driver will supply 5V across each winding, switching the polarity step by step. All four "winding halves" will be energized, compared to the unipolar four-phase situation energizing only two winding halves at a time. The bipolar controller applies the 5V across each series pair of winding halves, so each half winding sees only half the voltage (and thus half the current) compared to the unipolar case. So the overall power supplied to the motor will be the same.
Most of the benefit of a Pololu-style driver will be lost, since no PWM means no faster stepping, and no microstepping (the latter being pointless given the slop in this motor anyway). However, you still get the benefit of control with only two wires (Direction and Step) instead of four.
Note that most of these controller chips (and breakout boards) require a minimum motor supply voltage of >8V. For use with a lower PSU voltage, see the DRV8834-based ones.
Heat dissipation
Example:Torque measurements
Torque is relatively difficult to measure, which is apt to permit a proliferation of specs on the web that are incomplete and highly suspect.I set up a crude apparatus to get a ballpark estimate of torque from these motors, running at different supply voltages.
The apparatus consists of a support for the motor, an arm mounted to the motor shaft, and on the end of the arm (at 10cm from the shaft) a basket into which can be placed weights. I used recent US one-cent coins, which weight 2.5g, and also weighed the various loads on a digital scale.
With this we can make two measurements:
- Pull-in torque: Max torque that the motor can exert when commanded to advance from one position to the next. To test this, with the arm horizontal we place a load in the basket and command the motor to lift it. We increase the load until the motor misses steps upon lifting.
- Holding or pull-out torque. With the motor stationary and the arm horizontal, we add weight to the basket until the motor can no longer support it. This is generally a much higher torque value than the pull-in torque.
The torque values will be in units of gram-force * cm (g-f * cm). Since the basket is located on the arm at 10cm from the motor shaft, a 15g weight corresponds to 10*15 = 150 g-f * cm of torque.I repeated the measurements several times, in both directions (the weight on one or other end of the arm). The results shown below aren't statistically solid (only one 5V and two 12V sample motors), but are perhaps representative, and are certainly interesting to compare to the spec listed by Adafruit.
Note that these are very low speed measurements. At higher speeds, pull-in torque reduces due to there being less time per step for the change in current to "overcome" the winding inductance and reach its full value.
Torque results
All torques in gram-force * cm.(step)
(holding)
Pull-in
Pull-out
Broken teeth while testing pull-out torque
RioRand motor. Because the RioRand motor has so much larger a gear ratio, it is able to withstand more torque without pulling out of position. However, the application of this larger torque is evidently too much for the teeth. So the effective maximum torque that it can withstand while holding position is not determined by the pull-out spec of the stepper, but by the tooth strength.Measurement caveats
Observations; application suggestions
5V? or 12V motor at 7V?
For applications that involve an Arduino or other small controller board, it is likely that the user will avoid running the motor from the board's +5V supply, but instead will wish to attach it to the upstream +7V or higher supply. It is worth noting that the 12V motor running on the >7V supply provides better torque than the 5V supply on 5V, and at lower current consumption.Slop
Because of the gear train, there is- rotational slop in the position of the output shaft, about +/- 3 degrees (total 6 degrees)
- in addition to the slop, some rotational "give" under load. For example, for the 12V motor operating with a 12V PSU, a load slightly less than the pull-out torque created an additional rotation of about 9 degrees.
So, although the reduction gearing creates a rotation rate much slower than that of the basic stepper motor, and at a higher torque, it does not create a proportional increase in precision of position. Compare the just-mentioned slop and give figures to the stepping increment of a typical 200-steps-per-rotation stepper (1.8 degrees -- better with a microstepping driver).Nonetheless, these motors can work quite well to:
Other links
Other folks examining 28BYJ-48's: