Go Down

### Topic: 28BYJ-48 question (Read 3922 times)previous topic - next topic

#### nass

##### May 14, 2013, 10:56 pmLast Edit: May 15, 2013, 12:08 am by nass Reason: 1
Hello,

I've just 'graduated' from the starter kit so I'm pretty clueless, but branching out and experimenting with a few different things for a device I want to build, which includes steppers. So I bought this 28BYJ-48 stepper and hooked it up as below using the sketch below, from Adafruit. Works great!

I don't get something though, it takes an input value of 2048 to make it go round once. Can anyone explain please how this relates to its specs (Step angle: 5.625 x 1/64. Reduction ratio: 1/64) or the sketch? At Adafruit it states a value of 500 should turn it once... different motor or have I been a bit of a muppet between the sketch and the circuit somewhere?

Thank you

circuit:

sketch:
Code: [Select]
`/*Adafruit Arduino - Lesson 16. Stepper*/ #include <Stepper.h> int in1Pin = 12;int in2Pin = 11;int in3Pin = 10;int in4Pin = 9; Stepper motor(512, in1Pin, in2Pin, in3Pin, in4Pin);   void setup() {     pinMode(in1Pin, OUTPUT);     pinMode(in2Pin, OUTPUT);     pinMode(in3Pin, OUTPUT);     pinMode(in4Pin, OUTPUT);     while (!Serial);     Serial.begin(9600);     motor.setSpeed(30); } void loop() {     if (Serial.available())     {      int steps = Serial.parseInt();              motor.step(steps);     } }`

#### MarkT

#1
##### May 15, 2013, 01:29 am
Ah, I remember playing with this stepper, I believe it takes about 4096 _half_ steps to go round.  If you use full-steps
it takes 2048 (approx), which corresponds to 512 full sequence cycles per revolution.

I say approx because the gear ratio isn't actually 64:1.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#2
Thank you MarkT

#### terryking228

#3
##### May 16, 2013, 02:57 pm
Hi, there is added info / example software here:  http://arduino-info.wikispaces.com/SmallSteppers
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

#### sbright33

#4
##### May 19, 2013, 07:46 pm
Terry, do your motors have exactly 4096 half steps?  I can't remember where I got mine, and people are asking.

#### terryking228

#5
##### May 19, 2013, 11:35 pm
Quote
Terry, do your motors have exactly 4096 half steps?

Hmmm. I ASSumed they did based on Other Stuff I Read.

That's not the same as Knowing.  I think I just sent my last in-USA sample to someone; I'll get more soon, and my reaction is to test them with multiple resolutions (like does it return exactly with 40960 steps??

I also may tear one apart and count teeth??  Anyone done that?

The stated Gear Reduction on the specs I see is 64:1 so 360/5.625=64 steps per revolution on Internal Motor.  And 64*64=4096 steps per output shaft revolution.

Hmmm.... Needs to be Proofed..
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

#### sbright33

#6
##### May 20, 2013, 03:06 am
Some motors are 4096 exactly, others are 4075.123 or something.  Not very convenient.

#### sbright33

#7
##### Jun 03, 2013, 06:40 pm
Still no word Terry?  I have some 4096 motors, but I'm not sure where I got them.

#### MarkT

#8
##### Jun 03, 2013, 11:27 pm

Some motors are 4096 exactly, others are 4075.123 or something.  Not very convenient.

Strong suspicion they are made as cheaply as possible to a common specification with low accuracy
requirements - the original purpose is controlling air-vanes in car air-conditioning systems I believe,
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

#### terryking228

#9
##### Jun 04, 2013, 02:39 am
Hi, I just got 5 more of these in to test with here is USA and I'll try to get to some testing.

Hmmm. I don't believe any of these can have a factor that is not the product of two integers.. they ARE just teeth, right??

So funny numbers make me strongly suspect some dropped pulses.

I need to prototype a small robot using these Real Soon Now....
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

#### scottyjr

#10
##### Jun 04, 2013, 04:30 pm
Quote
I also may tear one apart and count teeth??  Anyone done that?

Although I cannot find the post now, someone had and posted images of rather odd gearing. - Scotty

#### sbright33

#11
##### Jun 05, 2013, 04:20 pm
Yes, but some are 4096, some are 4075.  BOTH EXIST.
I'm am curious about Terry's motors specifically because he is selling them!

Go Up