Sunday, August 12, 2012

28YBJ-48 Stepper Motor with Gear Reduction


I have browsed eBay to look for inexpensive items to hook up to my Arduinos. Having seen Adafruit carry a gear-reduced stepper (http://www.adafruit.com/products/858 $4.95 for the 5 volt unit), when I saw on eBay an identical motor with a ULN2003 driver board going for less than $4. I bought my first set for $3.79, a second a month later for $2.60 (both included shipping). They come in 12 volt and 5 volt versions. It is reported to have good torque for its size, but relatively slow motion (due to the internal gear reduction). These motors/drivers are apparently mass-produced (in China) for A/C units, fans, duct controls etc. which is why they are very inexpensive. They are nice in that they have two milled edges to connect to other things.

Looking for documentation, I found the following the most helpful if you are looking for interface information:
  1. YourDuino - http://arduino-info.wikispaces.com/SmallSteppers (spot on for handling this motor & driver including Arduino sketch)
  2. Utopia Mechanicus - http://www.utopiamechanicus.com/article/arduino-stepper-motor-setup-troubleshooting/ (note comments also)
  3. Arduino.cc - http://arduino.cc/en/Reference/Stepper (Stepper library used in nearly all sketches for this stepper)
  4. arduino.cc - http://arduino.cc/playground/Main/InterfacingWithHardware#Physical_Mechanical (more advanced stepper libraries)
To save grief, you should note 

1) Power the motor board from a separate power supply - the Arduino power is not enough (learned this after disappointment and reading).

2) The control board IN1, IN2, IN3, and IN4 sould connect to 4 digital pins on the Arduino (sequential is good but not required), then in your initialization, you will put them in slightly different order - for using Arduino pins 8, 9, 10, and 11 you declare as Stepper small_stepper(STEPS, 8, 10, 9, 11); (sequence 1-3-2-4) for proper sequencing. 

If your motor vibrates but does not move, check your sequencing.

It looks like the max speed setting may be 200 or so small_stepper.setSpeed(200); (I have not seen an example higher, see http://arduino.cc/forum/index.php?topic=82009.0 for discussion)

With the internal reduction gears, only telling it to do one (or a handful) of steps will not rotate it far, making you think it is not connected - fear not, set more steps.

I like these packages - the driver is preassembled and it works with the Arduino stepper library.  Each takes 4 pins so controlling several can eat up outputs.  If you need to contaol many, perhaps an Arduino Mega would be a good choice but in theory you could connect 5 to a standard Arduino Uno (not connecting much else).

Projects using this stepper and controller:
  1. Bajdi.com - http://www.bajdi.com/joystick-and-2-28ybj-48-stepper-motors/ (basic usage)
  2. Bajdi.com - http://www.bajdi.com/wireless-control-of-2-stepper-motors/ (wireless control of two motors via a NRF24L01 RF link)
  3. Youtube - http://www.youtube.com/watch?v=uqk4I1q0JK4

No comments:

Post a Comment