28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Hi,

I'm facing a similar problem to http://forums.adafruit.com/viewtopic.ph ... 1&start=15, with the difference being my motor seems to be the 12VDC model - I got the motor party pack, and with it came the 28BYJ-48 12VDC. According to the product page, this is a 48 step motor with a 1/16 gearing for a total of 768 steps per revolution.

However, 768 steps seems to be too much. I played around with different values, and 528 seems to be the closest to one revolution (1/11 gearing??)

Here is the code I'm using:

#include <AFMotor.h>

// Connect a stepper motor with 48 steps per revolution (7.5 degree)
// to motor port #2 (M3 and M4)
AF_Stepper motor(528, 2);

void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println("Stepper test!");

motor.setSpeed(20); // 10 rpm
}

void loop() {

motor.step(528, FORWARD, DOUBLE);
motor.step(528, BACKWARD, DOUBLE);


}

I'm powering the arduino and shield with a 12VDC 1A power supply. However 528 steps seems odd, and I'm not sure if it is precisely one revolution, and also, if I just got lucky and some parameters were wrong. 768 seems to be too much - almost a revolution and a half. I'm not sure if it is a problem with the stepper motor, or something else.

Thanks,
Sridhar

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

It may be 512 like the 5v version. Tha manufacturer's specs on those were incorrect as well. Let us know if 512 works. http://forums.adafruit.com/viewtopic.ph ... 0&p=177189

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

I had already tried 512. It almost looks perfect, but if you leave it running, you can see the drift creep up, so it's not exactly 512.

I checked the specs online, and saw it mentioned that it was 5.625 degrees for 64 steps, which translates to 4096 steps per revolution. But if I set it to 4096 steps, the motor just buzzes and does not move.

It would be great if you could check the insides of the 12V model to confirm.

Thanks,
Sridhar

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Also, the motor is getting quite hot when running for a few minutes, at 12 VDC. Is that normal?

Thanks,
Sridhar

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Correction - at 4096 steps, it was moving quite fast with 12 VDC (My earlier statement was when I had it running on USB when I was uploading the sketch (and before I switched over to 12 v supply). With 12v, it does several rotations at 4096 steps, so that does not seem to be it either.

-Sridhar

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

I'll order one up from stock and dissect it as before & let you know. Steppers do tend to run quite warm, so I would not be too concerned about that.

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Ok, great! Looking forward to it!

Thanks,
Sridhar

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Hi Bill,

I was wondering if you got a chance to dissect it?

Thanks!
Sridhar

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

I made a mistake and ordered the wrong part. :oops: I should have the right one in my hands in a couple of days and will post the results here.

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

Thanks Bill!

I came across a couple of interesting posts today when searching for the datasheet to get the dimensions and placements of the mount holes.

http://forum.arduino.cc/index.php?topic=85335.0
http://arduino-info.wikispaces.com/SmallSteppers

These suggest that the 28-BJY48 uses 8 codes, vs. the normal 4 codes, and someone in the first thread tried experiments where switching to 8 codes made a big difference in performance.

I'm not sure if the AF_Motor library supports that or not. I'll take a look at the code tomorrow and see if I can spot something (might be harder being a newbie to the library). This gives another data point to check as well, so I thought I'd mention it here.

Thanks!
Sridhar

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

The '8 step' method in the link you posted is essentially the same thing as the "INTERLEAVE" mode supported by the AF_Motor library.

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

With INTERLEAVE, setting number of steps to 4096 worked, but was having the same issue of drift that I faced with 512 and DOUBLE (my previous posts).

Thanks,
Sridhar

sridhar_rajagopal
 
Posts: 29
Joined: Sun Dec 23, 2012 11:38 pm

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by sridhar_rajagopal »

One more link I came across - http://forum.arduino.cc/index.php?topic ... msg1149466 - with a photo of the innards.

" I highlighted the gear teeth with a red dot and show the teeth/gear. My gear ratio is:
(31*32*26*22)/(11*10*9*9) = 283712/4455 = 25792/405 = 63.68395... If anyone can show 64:1 please similarly pop the face and count teeth. Can anyone find anything but the above ratio of gear teeth. The face is replaceable with a little added Vaseline inside. All motors I've seen pictures of have three intermediate shafts (the shaft ends show through the case) for a total of 4 gear reductions. It is conceivable that someone may have (40*40*20*20)/(10*10*10*10) = 64 or similar. Yes, there is some slop in the nylon gears but I'm using it for a clock so I'm only driving it in one direction. I am driving it many revolutions so I do need to know the ratio precisely. If someone can show me a 64:1 eBay gear source I'd be delighted! Right now for me the total number of steps are (64 * 25792)/405 = 4075.7728395..."

There is a CustomStepper library that Igor Campos has developed to work with non-integer steps - http://playground.arduino.cc/Main/CustomStepper - I'm trying to see if it helps. Will update the thread.

Thanks,
Sridhar

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

I have disassembled and photographed the motor & gearbox. I have not counted the teeth yet to calculate the gear reduction. The motor itself is 8 steps.

User avatar
adafruit_support_bill
 
Posts: 84637
Joined: Sat Feb 07, 2009 10:11 am

Re: 28BYJ-48 12VDC stepper motor number of steps seems to be incorrect

Post by adafruit_support_bill »

OK. Here are the numbers:

The drive shaft gear has 9t.
That drives the 32t side of the blue reduction gear.
The 11t side of the blue gear drives the 22t idler gear (this has no step-up or down)
The 22t idler drives the 16t side of the white reduction gear.
The 10t side of the white gear drives the 31t gear on the output shaft.

Turning the crank on the numbers I get a ratio of 16.032. Feel free to check my eyesight and my math :D
Gear train exposed
Gear train exposed
2013_08_03_IMG_2079-400.jpg (12.28 KiB) Viewed 10902 times
blue gear flipped to show gear reduction
blue gear flipped to show gear reduction
2013_08_03_IMG_2080-400.jpg (10.98 KiB) Viewed 10902 times
8 step motor core
8 step motor core
2013_08_03_IMG_2081-400.jpg (11.17 KiB) Viewed 10902 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”