Pages: 1 2 3 [4] 5 6 ... 10   Go Down
Author Topic: 28BYJ-48 5-Volt Stepper  (Read 76451 times)
0 Members and 2 Guests are viewing this topic.
Wales
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

According to your link, Step 1 and 2 are on my local machine?  But I don't have Linux.  How do I do this with windows?
Should I just start with Gist?  I get it!

Yes, you could certainly do everything you wanted with Gist. There's some more setup info and Windows apps at https://github.com/ if you DID want to make a full repository of it, but a Gist (a sort of "github-lite"!) will do perfectly for this.

Edit: Looks like you've already got an account there! https://github.com/sbright33 - if there's anything I can do to help get the new versions of the library up, please let me know.
« Last Edit: November 29, 2012, 05:03:20 am by lardconcepts » Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here it is at last!  With new features.  Will update Gist from now on.
https://gist.github.com/4178431

Please...
Questions?  Comments?  Requests for new features?  Improvements?
Thanks for looking at my code!
Steve

As a learning exercise or tutorial feel free to check out the older version, which is now obsolete.
https://gist.github.com/4149982
« Last Edit: November 30, 2012, 03:50:30 pm by sbright33 » Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Wales
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, Steve! Great work! Going to bust out some breadboard and have a go later!

Might be an idea to let people know where to get the narcoleptic.h library from: http://code.google.com/p/narcoleptic/

Incidentally, I've just added a note to the top of my old copy to point people to your version of the library.

Thanks again, keep up the good work!
Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a demonstration of related code I've been working on.  It allows the same script format to control both a stepper and servo simultaneously and independently.  The script allows you to do motion easing and mechanical animation with Arduino and cheap servos/steppers.  It's a work in progress. 

https://gist.github.com/4178630
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Last summer I got a new Stepper motor!  It's big and does 1 degree / step.  It's faster 300RPM because there are no gears like the 28BYJ.  I wrote more code to do PWM to make it smoother at slow speeds.  It has no gears so you can't just turn off the power when you stop.  When stepping slowly you need to keep the coils on, at least at a lower voltage.  If you use 12v it will overheat within minutes.  It's all here, view at your own risk?  The 2nd file is smaller and much easier to understand first.

https://gist.github.com/4179366
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there Anybody out there... there... there...

I guess you're the only one lardconcepts!
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 5551
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there Anybody out there... there... there...

I guess you're the only one lardconcepts!

I'm still following the discussion; if I have anything more to add, I will...

smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Wales
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there Anybody out there... there... there...

I guess you're the only one lardconcepts!

I would say that judging by the fact that your post is the 6th most viewed in this forum that there are probably LOADS of people out there appreciating your work. I know I certainly do.

Here's a way to know how many people are out there - shorten the link via somethin like goo.gl or bit.ly that gives you click stats, then stick  "s28BYJ-48 5-Volt Stepper library" in your signature and link to either the forum post, or the github gist where the code is, and I think you'll be pleasantly surprised!

Anyway, *I* thoroughly appreciate the fact that you helped bring my stepper to life without smoke or burning smell smiley
Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks it is great to feel appreciated!  But I'm still in doubt about the number of users.  I know my code is not perfect.  I know it is confusing at times.  Doesn't anyone have suggestions for improvements?  Bugs?  I'm really not that good.  It's been a year now.  Maybe there are many users who used my simple functions, and have not advanced to detecting torque or non-blocking code.  Don't be scared to try them!
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm making a list of enhancements to my code.  I'd like to prioritize them before I start coding.
Any ideas for improvements this week?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey sbright33,

I've been following your tracks and posts for the last 3 hours and think that your work will help me like....a LOT. smiley

I'm trying to build an old school split-flap display, like the ones that we used to see in train stations...

I bought five 28BYJ-48 12 Volt from adafruit (those :  http://www.adafruit.com/products/918) and ULN2003 cards to control them (http://www.electrodragon.com/?product=stepper-motor-driver-uln2003-board) and trying to control all of these with an arduino mega.

Got lot's of problem wiring everything since specs on both of those equipements sucks (inversed wired, no further explanation to use the 5V/12V jumper on the board...etc) but I think everything is ok now regarding hardware...

I tried the "classic" stepper library but I'm getting serious issues with it :
- my stepper doesn't seem to respond the same way clockwise and counterclockwise with the same "step" entered...
- my steppers are getting hot very fast
- the specs of my motor give me 768 steps but it seems to approximately correspond to 1,5 rotation, can't understand why...etc etc

I also tried the AccelStepper library but as your hardware is closer to mine (except my motors are 12V) I'll jump in your code and see where it leads me...

If someone already got back to you on modifications needed on your code with the 12V model of the 28BY J-48 I'll be happy to have their comments... smiley-lol

Anyway, I'll get back to you in few days with questions (many, many questions...) and maybe the biggest THANKS that you ever had for this code !!


Logged

Quand l'appétit va, tout va...

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome! You don't need to modify my code to use it with 12v motors.  If your power supply is 12v then the temperature will be the same as running a 5v motor with 5v PS.  A 12v motor will of course have more torque and speed.  With my "cool" functions you can use your 12v motor with a 18-24v power supply.  Otherwise you will not need the "cool" functions.  They are designed for running a 5v motor at 12v or a 12v motor at 24v.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Wales
Offline Offline
Jr. Member
**
Karma: 0
Posts: 57
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks it is great to feel appreciated!  But I'm still in doubt about the number of users.  I know my code is not perfect.  I know it is confusing at times.  Doesn't anyone have suggestions for improvements?  Bugs?  I'm really not that good.  It's been a year now.  Maybe there are many users who used my simple functions, and have not advanced to detecting torque or non-blocking code.  Don't be scared to try them!

OK, now that the stress of Christmas is almost over, I'm going to get back to this! So, are you saying that you are happy with the functional state of your library, but you'd just like someone to suggest ways of making it more clean and readable for newbies (like me!)

For example, you have:
Code:
const int mp4a = 13; // 13 is not PWM should use 6 todo later
Is that actually OK to go ahead on rely on?
Logged

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, it's a horrible idea to use pin 13 for PWM, since it's not supported.  You should use pin 6 instead?
It works with pin 13 as written in my code.  I used it because it's convenient to connect the wires.
I deserve to be shot for keeping that in the code...  But it works!  It was originally a mistake.
Thanks for pointing it out, and reminding me.  That's what comments are for in my code.
It was a test to see if you're paying attention?  Somebody is actually using that function?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi  Sbright33

I am trying to use your code to experiment with a 28BYJ-48 and uln driver board
and a arduino mega 2560
I compile your sketch and upload it successfully (ts rx lights flash) 

then nothing happens

Probably a dumb Question, what digital pins are you using ( 4. 5. 6. 7. ) ?

Is the anything i have to do with the sketch for it to run

Be patient I am new at this.

cheer Owen 
Logged

Pages: 1 2 3 [4] 5 6 ... 10   Go Up
Jump to: