Author Topic: 28BYJ-48 motors  (Read 2321 times)

Stonemull

  • Hero Member
  • *****
  • Posts: 867
    • View Profile
28BYJ-48 motors
« on: May 02, 2017, 07:58:53 AM »
I bought a couple of these to experiment with, the motors I got have 12V on the side and not 5v and measure 100R per coil, on 5v they have no torque..

http://www.aliexpress.com/item/5V-4-Phase-28YBJ-48-DC-Gear-Step-Stepper-Motor-ULN2003-Driver-Board-ULN2003-For/32799490922.html

Mucked around with accelStepper library till I got something useful for testing, I can change speed, accel and lap parameters on the fly and this is my first tests running the stepper at 12V.
I added a pause of 5 seconds to let the motor run a little cooler. it is warm but not hot. Added code I knocked up if anyone wants a play.

Just printed an arm for it and a generic holder is being printed now, I am using bits from this guys model currently http://www.thingiverse.com/thing:733907

So this has been running for about a half hour to see if it loses position, so far so good.

https://youtu.be/NVEQ1HrVIns
« Last Edit: May 02, 2017, 10:42:00 AM by Stonemull »
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5639
    • View Profile
    • T2Laser
Re: 28YBJ-48 motors
« Reply #1 on: May 02, 2017, 08:33:36 AM »
It is very common to drive steppers at much higher voltage than rated to get the necessary torque, of course the driver limits current so it doesn't cause any problems.

Stonemull

  • Hero Member
  • *****
  • Posts: 867
    • View Profile
Re: 28YBJ-48 motors
« Reply #2 on: May 02, 2017, 09:06:25 AM »
Actually the supplied and current driver does not limit in this case, it is a ULN2003 http://www.tij.co.jp/jp/lit/ds/slrs027o/slrs027o.pdf
It is a dumb driver, just activates the coils at full voltage, there is no current feedback.
4 of the 7 darlingtons are used to drive it.

so the plan was to buy a 5v one and drive it with 12v.
At least that was the idea. I was going to throw it on a pololu, however I did not realise the consequence of this being a 5 wire stepper, these are unipolar as the centre of both coils are joined together.

Then i had a think, I am running it in step4 mode, and the code is thus ..

Code: [Select]
void AccelStepper::step4(uint8_t step)
{
    switch (step)
    {
case 0:    // 1010
    digitalWrite(_pin1, HIGH);
    digitalWrite(_pin2, LOW);
    digitalWrite(_pin3, HIGH);
    digitalWrite(_pin4, LOW);
    break;

case 1:    // 0110
    digitalWrite(_pin1, LOW);
    digitalWrite(_pin2, HIGH);
    digitalWrite(_pin3, HIGH);
    digitalWrite(_pin4, LOW);
    break;

case 2:    //0101
    digitalWrite(_pin1, LOW);
    digitalWrite(_pin2, HIGH);
    digitalWrite(_pin3, LOW);
    digitalWrite(_pin4, HIGH);
    break;

case 3:    //1001
    digitalWrite(_pin1, HIGH);
    digitalWrite(_pin2, LOW);
    digitalWrite(_pin3, LOW);
    digitalWrite(_pin4, HIGH);
    break;
    }
}


So at all times I have 2 pins high and 2 pins low. Seems to me that the centre of those 4 coils is going to be pretty close to the mid point at all times. So I reckon I could probably use a regular stepper driver.
Then I found an even better solution, I had not considered pulling the plastic bit off..

http://www.electronicsmayhem.com/?p=13

I will see if I need to do this though, I don't think I will need it actually, it is geared so it holds position pretty well when unpowered, I absolutely do not need microstepping, so I am not sure what advantage I would gain from a driver apart from freeing up one pin, instead of 4 i would need 3 (step,dir and enable). i see people are using these as extruder motors and even axis motors lol.
quite a lot of stuff on thingiverse if you search for the motor number.

I am just trying to knock up a simple and light, drilling Z axis.

I just pulled apart a cheap Nicad 3.6v engraver I had that takes the 1/8 shank high speed PCb drills, so I might add a buck supply and run that off the 12v as well. One of the cells is pretty much shot, and they are like a half length C size or something.

Pikky of bits to date ..









« Last Edit: May 02, 2017, 09:08:20 AM by Stonemull »
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2030
    • View Profile
Re: 28YBJ-48 motors
« Reply #3 on: May 02, 2017, 10:27:48 AM »
I am not at home but I did find 12V versions of that motor. Works (very slowly) with A4988 drivers.
SARCASM - Just one more service we offer here.

pedwards2932

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: 28YBJ-48 motors
« Reply #4 on: May 02, 2017, 10:36:52 AM »
This is interesting to me since I am designing a z axis for my unit.  My prototype will use 1/4 20 threads so it would move .050 inch per revolution but at 41 sec per revolution that would be pretty slow for z axis?  Am I figuring this correct?

Stonemull

  • Hero Member
  • *****
  • Posts: 867
    • View Profile
Re: 28BYJ-48 motors
« Reply #5 on: May 03, 2017, 04:11:01 AM »
I saw that 41s per rev comment on a page and have no idea how he came up with thst figure.
The motor is handling 1000 steps per second, above that it gets glitchy but I think it is actually the accelStepper code, it even says unreliable above 1000 steps per second.
So that is 1 rev every 2 seconds, at least at 12v supply.
Still pretty slow but that is 25 thou a second, 40 seconds for an inch.

I am up to here so far. Designing a cam for the motor and a cam follower for the top of the motor currently.

A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

pedwards2932

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: 28BYJ-48 motors
« Reply #6 on: May 03, 2017, 04:32:55 AM »
For z axis control of the laser that should be fast enough as it should only have to change the z axis after each cut pass.  Once I get it to work mechanically then I am going to see if I can use a motor.  It may be that mechanical manipulation of the z axis is enough.  Will this motor work with this controller: https://www.banggood.com/3-Axis-Stepper-Motor-Driver-Board-Controller-Laser-board-For-DIY-Laser-Engraver-p-1015947.html?rmmds=search

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2030
    • View Profile
Re: 28BYJ-48 motors
« Reply #7 on: May 03, 2017, 05:03:18 AM »
I have seen different specs for this motor. Digikey shows 4096 steps per revolution (assuming the included gear reduction). At 1000 steps / second pulse rate this is 4 seconds per revolution.
SARCASM - Just one more service we offer here.

pedwards2932

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: 28BYJ-48 motors
« Reply #8 on: May 03, 2017, 05:08:55 AM »
It may just be easier for me to use one of the standard steppers.....I just thought weight wise and cost on this was good.  I don't think the z axis needs to move real fast because it would only have to change after each cut cycle not requiring continuous adjustment.

Stonemull

  • Hero Member
  • *****
  • Posts: 867
    • View Profile
Re: 28BYJ-48 motors
« Reply #9 on: May 03, 2017, 05:29:30 AM »
You coukd use that driver board linked above however you will need to cut the track inside the motor (mod linked above) as those pololus will microstep it. It comes with a driver board probably, however not a step/direction type board.
I think this motor is too slow for a screw drive axis.
The other isssue with using them a lot is they have limited heat distribution, not intended for 100% duty.

People are doing amazing things with them for a few bucks though, check this one out.

http://www.thingiverse.com/thing:945156
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2030
    • View Profile
Re: 28BYJ-48 motors
« Reply #10 on: May 03, 2017, 08:35:55 AM »
I have been using the 12V version for about 6 months now. It is Sloooooow but extremely useful. Tried the "standard" NEMA17 but it was too heavy. Extra inertia caused problems with both X & Y motors plus the laser module tilted and/or wiggled more.
SARCASM - Just one more service we offer here.


Stonemull

  • Hero Member
  • *****
  • Posts: 867
    • View Profile
Re: 28BYJ-48 motors
« Reply #12 on: May 03, 2017, 09:04:59 AM »
max shaft speed will be around 60 degrees/second. If you are happy with the 10mm long M3 thread which will be 0.5mm pitch i assume then 12 seconds per mm.

A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

pedwards2932

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: 28BYJ-48 motors
« Reply #13 on: May 03, 2017, 10:15:42 AM »
I'll need to play around with the manual prototype to see how much z motion will be needed.  I am guessing with plywood it would be about 1 mm per cutting pass.  Once I have that figured out then maybe it will be easier to decide.  Thanks.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2030
    • View Profile
Re: 28BYJ-48 motors
« Reply #14 on: May 03, 2017, 08:43:22 PM »
If I am reading the specs correctly, it has a max pulse rate of 900 ppm and a gear ratio almost 1:300. Each pulse is 18 degrees which is 270 degrees / sec at the motor or 1.3 sec per rev at the motor, 400 seconds at the shaft.
SARCASM - Just one more service we offer here.