Author Topic: Awesome printable pan tilt, but uses 28BYJ-48 motors.  (Read 6467 times)

Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Awesome printable pan tilt, but uses 28BYJ-48 motors.
« on: April 30, 2014, 06:19:38 PM »
Some guy just uploaded a supernice pan tilt thingie:
http://www.thingiverse.com/thing:314027

Ive already started printing one on my repstrap, looks like a fairly hard thing to print succesfully.
The motors are 28BYJ-48 that are supercheap.

Problem:
The drivers dont take step/dir, you have to pulse them.
Is this something that can be done in the software?
I found some libraries for them, but my coding skills are nil.

To me it looks like the perfect setup for a small mirror.

thoughts?
« Last Edit: February 09, 2015, 12:30:02 PM by Storhemulen »


Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #1 on: April 30, 2014, 07:32:50 PM »
Looks like it should work. It would probably be hard to print like you said, but from the video it looks like they did it with a similar machine to yours for the first prototype.

Where does it describe the drivers? I couldn't find it. Technically, the step pin is already pulsed,  but even if it is different somehow compared to most driver boards I don't see any reason why you couldn't just use a different driver board.

The code could of course be changed too if needed, but that may be more work than it's worth. I would need to know more about the drivers and library to be able to tell.

It would definitely be cool to see you build it!


Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #2 on: May 01, 2014, 03:54:03 AM »
Gabriel,

The ULN2003 drivers don't seem very sophisticated, but motor+driver for 4usd is hard to beat:
http://www.aliexpress.com/item/Free-shipping-1pcs-DC-Gear-Stepper-Step-Motor-with-ULN2003-Driver-Board-5V-4-Phase-28YBJ/1245709721.html

The library that looks most promising to me is:
http://playground.arduino.cc/Main/CustomStepper
It seems like its made for the 28YBJ-48 with ULN2003.

Also this seems to be good info:
http://arduino-info.wikispaces.com/SmallSteppers

My hope is to be able to put a 30*30 cm mirror on it.(http://www.ikea.com/us/en/catalog/products/39151700/)

Gotta brag a little :) the print is coming along nicely, takes forever though.

/Peter

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #3 on: May 01, 2014, 05:23:47 AM »
Peter,

It's definitely coming along!

The drivers could be made to work with the program, but if you are using the Arduino Uno you would have to cut out some features. Basically, that driver board is based on old technology and requires 4 signal wires instead of the 2 signal wires required of more modern driver boards.
So you would need to use up 4 extra pins on the Arduino, and I think there are only 2 that aren't used by default.
If you are using the Arduino Mega though it's not as big of a deal.

You might consider using the stepper.h library over the Custom Stepper motor. Unless I'm missing something, the Custom Stepper library expects input to be in the number degrees to turn, not the number of steps to take. This could of course be compensated for, but why bother if the stepper.h library doesn't require them.


Are you using the Sun Harvester Shield? Just curious.

Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #4 on: May 01, 2014, 06:45:26 AM »
Gabriel,

Im using a Mega and your Sun Harvester Shield.

Will stepper.h work with your program?

First goal is to get one working, then I'm going to try and litter my whole backyard with them :)

/Peter


Paul L

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #5 on: May 01, 2014, 05:52:08 PM »
Hey Storhemulen,

   With a 3d printer, do you have the option to change the size of the object you're printing?  It'd be nice to have a larger machine than the one that's in the video.  I do have one concern though and it's that I would guess that since it's using bevel gears, the drive boards would need to be powered on all the time for holding torque.  Obviously, this wouldn't be ideal since it would be wasting a whole whack of power.  But if the mirror/solar panel you plan on mounting is small enough, this may not be a concern for you....

Thanks for sharing - I'm really amazed by what we can do now with 3D printing.  I'm holding out until they can print metal - that'll be a game changer! 

Cheers,

Paul   

P.S - I seem to remember a version of Gabriel's sun tracker program that we were using "back in the day" when he was using a DIY stepper board with transistors to drive the motors - that older version of the program would probably be what you'd want for the ULN2003 drivers.  Not sure if it's still available on this site though...comments Gabriel?
« Last Edit: May 01, 2014, 06:01:56 PM by Paul L »

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #6 on: May 03, 2014, 07:32:22 PM »
The stepper.h library could be made to work with the program. There might be some issues with things like joystick control, but for basic tracking there shouldn't be too much involved. I can swap up the code once you have the driver wired up and working with a test program.

Since you have a lot of extra pins on the Mega, you can use them instead of the ones on the shield since you don't have enough. Were you planning on using one driver board for each heliostat. It's possible if you do it right, but you would need some way to enable/disable power to the driver boards. I'm not sure if that features is built into those driver boards or not.

I guess you can just try to get the one working for now and figure out where to go from there.

Good luck!
Gabriel

Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #7 on: May 10, 2014, 04:48:00 PM »
Hmm, this has turned into a drawn out 3d printer tuning session for me.
Not a single part fits with the other parts.
I have ordered some more plastic to try again.

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #8 on: May 11, 2014, 04:21:30 AM »
Yeah that definitely looks like a complicated print. I'm sure you'll figure out something though.

Bernard

  • New Member
  • *
  • Posts: 24
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #9 on: May 14, 2014, 06:12:05 AM »
Hi,
in case some needs it: here in Leiden, The Netherlands, is a DIY (or maybe DIM) stepper board from the cave ages available. Storhemulen maybe?

Bernard

Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28YBJ-48 motors.
« Reply #10 on: February 09, 2015, 12:29:23 PM »
Well, almost a year has passed!

I've gone through at least 5 different versions of 3d printers and finally achieved found a printer capable of printing this thing.
Prusa i3 Steel(http://www.thingiverse.com/thing:157303).

Yesterday I had movement at last!

A lot of cut and paste from different example codes ended up as my biggest programming effort ever.
I used the AccelStepper library with a mod I found in the arduino forums.
_2xBYJ_1xJoystick.ino took me all weekend to put together. Obviously programming isn't part of my skill set.

Im unsure if the drivers pull current when all pins are low, otherwise cutting power somehow is the only way I can think of putting the motors to rest.
Since they have ~64/1 gear ratio I think cutting power wont make them loose their position.

/Storhemulen
« Last Edit: February 13, 2015, 10:57:09 AM by Storhemulen »

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 654
    • View Profile
Re: Awesome printable pan tilt, but uses 28BYJ-48 motors.
« Reply #11 on: February 09, 2015, 05:32:37 PM »
Oh wow, that thing prints really well. If I ever get around to building a 3D printer, it will probably be like this one. I have always liked the Prusa design best in general, and the steel version looks even better still.

It won't be too long before you are up and tracking. Definitely let us know how it goes!

Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28BYJ-48 motors.
« Reply #12 on: February 11, 2015, 12:53:17 PM »
Today I had movement that could almost be called tracking!
I found the old 0.911 version of the tracking program, and it works with the uln2003 drivers!
Took a while to figure out that i needed to use arduino IDE 0023...
I'm trying to calculate the right gear ratios now, not so easily done it seems :(
Backlash is going to be a problem I think.
I also have some trouble with the limit switches.
The program doesn't back up after hitting the az switch, making the alt reset cycle end prematurely.

I've ditched the mega for now. I fried the one in my printer so the one in the heliostat became a spare part  :(
However i've got things running on a nano clone with a noname RTC on a breadboard. ;D





Storhemulen

  • New Member
  • *
  • Posts: 11
    • View Profile
Re: Awesome printable pan tilt, but uses 28BYJ-48 motors.
« Reply #13 on: February 12, 2015, 05:44:50 AM »
Just found out that the 28BYJ-48 steppers can be converted from unipolar to bipolar by cutting a trace on the conector.
This means that I can drive them from a normal 4988 stepper driver.
Id love to keep using the uln2003 drivers since the cost for motor+driver is insanely low:
http://www.aliexpress.com/item/Free-shiping-1lot-5V-Stepper-Motor-28BYJ-48-With-Drive-Test-Module-Board-ULN2003-5-Line/32279104223.html
On the other hand 4988's are crazy cheap now thanks to the 3d printer market growing:
http://www.aliexpress.com/item/Nes-product-Reprap-Stepper-Driver-A4988-stepper-motor-driver-with-Heatsink-Free-Shipping/1941383834.html