Welcome! Log In Create A New Profile

Advanced

Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor

Posted by boylucky 
Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 04, 2016 12:33AM
Hello,

I am looking for somebody who would like to help with firmware modification for 3D delta printer. Currently there are firmwares mostly for NEMA17 and similar steppers with Pololu A4988 driver. I do a construction of 3D printer using the low cost 28BYJ-48 stepper motor with ULN2003 driver. The hardware constuction is already done but now I need to deal with the firmware. The concept is a 3D delta printer (similar to Kossel, Rostock). The printer will be more a toy or working small model of the printer then something with perfect printing results. It should be something like a first possible contact with 3D printing for kids or anybody who would like to play with and can not or does not want to spend big amount of money.
There is option to do a small modification of 28BYJ-48 stepper which will be then used with A4988 driver. This allow bigger torque and higher speed. But I would like to make a minimum hardware configuration for the printer. So my goal is to use modified 3D delta printer firmware (for example Marlin available here - [github.com] ). My intention is to use Arduino Mega + ULN2003 driver + 28BYJ-48 stepper.

Would be there anybody able to help with this?

Thanks in advance.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 05, 2016 12:29AM
You can modify the 28BYJ-steppers to run as bipolar steppers. Then you get more torque and can use standard Ramps/Marlin to run your printer.

Just open the blue plastic cover, cut through the trace of the red wire on the PCB and call it done.

If you're interested, I've created a NEMA17_to_28BYJ adapter with fan mount.
Attachments:
open | download - Nema_28byj-light.stl (119.4 KB)
open | download - 28BYJ_cutoff.jpg (198.2 KB)
open | download - 28byj-nema17_1.jpg (151.4 KB)
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 05, 2016 12:34AM
Thanks for your reply. Yes I already red about this modification. It is nicely described on this link:
[www.jangeox.be]

But I would like to use it without the RAMPS if possible + the ULN2003 driver. I just want to give it a try.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 05, 2016 12:45AM
The stepping sequence of the ULN driver is pretty complex, plus you'd need more pins from the controller.
Making it run synchronously with 4 steppers = 20 pins for a delta is a nightmare.

I've made some tests with two 28BYJ running a std. GT2 belt and a Kossel carrier. They were barely able to pull the carrier without load and the gears inside the stepper started to slip at some point. ( Inbuilt overload protection )

Edited 1 time(s). Last edit at 03/05/2016 12:46AM by o_lampe.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 05, 2016 12:52AM
By the way, when I tryed that modification described above on the link, then the 28BYJ-48 (5V) stepper get quite hot after a while. Even I try to reduce the current on the Pololu A4988 by the wheel. Do you have any idea how can I suppress this? I use 12V power supply.

And for the stepping sequence and number of pins you are right. I was thinking to use this library to reduce modification of the firmware a bit:
[playground.arduino.cc]

There is setDirection function and rotateDegree which I wanted to use in the modified firmware.

Edited 1 time(s). Last edit at 03/05/2016 12:52AM by boylucky.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 10, 2016 01:06AM
I reduced current to 300-400mA.
The NEMA17 Adapter has a fan to cool the stepper. Also you can tell Marlin to disable the stepper when not used.

// Disables axis when it's not being used.
#define DISABLE_X true
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 10, 2016 02:25AM
I will try that. Thanks.

Edited 1 time(s). Last edit at 03/10/2016 02:25AM by boylucky.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 15, 2017 06:49PM
I've also started working on the same situation but using a Cartesian Design. Have there been any new/updated advances to firmware that supports the 28BYJ uni-polar stepper motors since the forum was active?

After digging around a while it seems there are a few routes to get a solution -
1) Turning it into bi-polar as shown
2) There is one Arduino motor shield that would create a uni-polar control from DIR and STEP pins using the L297 but only supports (2) motors per shield ( see [www.adafruit.com] )
3) Adjusting the Firmware of course is the ideal cheapest, cleanest and non-technical setup.

As far as adjusting firmware I've found this adjustment to 'grbl' which I hear is "the roots of Marlin" - see [www.youtube.com]
And the modified 'grbl' at [github.com]

I guess I'm planning on finding the changes made above and implementing them to the 'grbl-Mega' code since I'm using the Mega instead of the Uno; but before getting started, I just wanted to check if anyone knew or heard of other alternative to this scenario???

Here's a picture of what I'm trying to control.


Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 19, 2017 04:41PM
In case anyone else is interested it appear the modification in the "https://github.com/ruizivo/GRBL-28byj-48-Servo" GRBL firmware was made in stepper.c file as shown below..

I've added 28BYJ routine to the Z-Axis; Project is at [github.com]
Also the picture above project can be found at: [github.com]

if (st.counter_x > st.exec_block->step_event_count) {
st.step_outbits |= (1<step_event_count;
if (st.exec_block->direction_bits & (1< 8) costyx=1;
if (costyx==1) PORTD=0B100000;
if (costyx==2) PORTD=0B110000;
if (costyx==3) PORTD=0B010000;
if (costyx==4) PORTD=0B011000;
if (costyx==5) PORTD=0B001000;
if (costyx==6) PORTD=0B001100;
if (costyx==7) PORTD=0B000100;
if (costyx==8) PORTD=0B100100;

}
} }

Edited 1 time(s). Last edit at 02/21/2017 01:55AM by tgit23.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 24, 2017 02:34AM
Hi tgit23,

thanks for your post. Currently I am not working on this design. But I can get back to it in the future as it looks like a great opportunity to get closer to 3D printing for people not involved in it yet. Like a first step with 3D printing as the printer would be really as cheap as possible. Nowadays I build my first delta printer based on the Kossel mini with magnetic rode ends. I can imagine to use it also on these cheap variant of 3D printer but anyway there can be completely different joins to make it really really cheap. I can imagine price of such printer to be up to 50$ or even less. If you would be interested in it we can make some cooperation on the development.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 25, 2017 05:53AM
Hi boylucky,

I had ran across the magnetic rod ends for delta printers and found it quite a fascinating replacement for ball joints. I'm not really sure how the model above will turn out; general motion so far works good but I have my worries about precision especially on the Y-Gantry getting torqued from Z-pressures. So far its only been a $16 adventure without having a hot-end or extruder or considering the minimal amount of filament cost smiling smiley.

Recently, the 'Stewart Platform' was brought to my attention during a thought posted here [forums.reprap.org] - and couldn't help but think about implementing a stewart platform with a swinging bed ( giving 5-axis support for massive overhangs; all mentioned in the discussion thread ) - which of course led into the thought of using Rack & Pinion prints for the lead-screws. Couldn't help but wonder if it could be cheaply assembled with just plastic prints and (6) 28BYJ stepper motors ( @$2/ea ).

We can certainly get together on a project both of us would be interested in. If you have a github project or place - drop a link and I'd be more than happy to make some contributions. You can contact me via email too; the address is on my github page bio ( links above ).
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 25, 2017 11:35PM
One question about the overall cost estimation:
What controller do want to use? An 8bit Arduino would have a hard time driving the steppers fast enough with 4096 steps/turn eye popping smiley
I had trouble with 0.9° steppers and marlin on my delta and they only have 400steps/turn
Any controller with 32bit will bust your budged. ( except the yet relatively unknown MKS Sbase mini for 16$+PP )
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 26, 2017 12:32AM
Hi tgit23,

yes, I agree with you that the magnetic joins looks like a great replacement for others options like traxxas etc.
About the precision of such printer - I was not expecting a high resolution from the design. I just wanted to build the printer as cheap as possible to make it available for people which would be interested in 3D printing without previous knowledge and wants to give it a try. Not investing big amount of money but just to make first experience with it. Later on they can decide to go for a better printer with better resolution and possibilities. That was the basic intention. I attached also the let's say a model toy what I build some time ago for about 20$. Like I said it was only a toy and my first delta yawning smiley] build. I did not know anything about it before. Anyway it was only model without the print head. That is the point which is till opened as I did not find the right solution for such printer. To keep the cost low and also to be able to drive it with the small 28BYJ-48 steppers. The model on the picture was driven by the arduino uno. But if the model will develope I expected to use the Arduino Mega board. The question about the github - I currently do not have this project placed there as there would be only the printed parts available as the firmware was not created. For testing I only used predefine sequences of the move which means it was not taking complete G-CODE for the moving of effector.
Attachments:
open | download - model1.jpg (115.9 KB)
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 26, 2017 12:37AM
Hi o_lampe,

you are right that 32bit controller would be much more suitable for such printer. But like you said the cost would be higher. Like I already said in my previous post, the basic aim was to build as for as less money as possible to open 3D printing for enybody who would be interested in it without investing big amount of money. That is why I tried the model with 28BYJ-48 steppers and why I would only use the Arduino Mega in such project if it will develope. I will check the board which you mentioned MKS Sbase mini. Thanks for it.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
February 26, 2017 06:57AM
Quote

What controller do want to use? An 8bit Arduino would have a hard time driving the steppers fast enough

Is that why I can't get any torque out of these 28BYJ's past a feed rate of 100? I kind of figured it was the magnetic s in correlation with the step-down gears in the 28BYJ. I was planning on shifting to the Mega2560 once I had some good success with the UNO & GRBL.

Quote

I currently do not have this project placed there as there would be only the printed parts available as the firmware was not created.

So modifying Marlin for 28BYJ sounds like a good next step; since 'grbl' I'm pretty sure doesn't support the delta kinematics. As soon as I get to a point of using the Mega, I'll be trying to get a Marlin build for the 28BYJ's. How much did you figure costs were on your delta printer (looks awesome BTW) without the head of course - what you have pictured? What do you think about the stewart platform? Minus the fact I don't think even Marlin has support for it's kinematics smiling smiley could be a real hurdle to getting it operational; but maybe after the Marlin guys/gals see a cheap setup - they'll get excited about implementing it.

If either of you want to jump in on the [github.com] project; certainly do so. I'll upload what I have currently on my clone later today. I just have an UNO wired according to the firmware here [github.com] to (4)ULN2003 and (4)28BYJ motors. I'm using #6-32 x 1-1/4" machine screws and a ton of nuts smiling smiley.

Currently, I'm trying to figure out the best way to get a gear with pressure on it to run smoothly ( since the gears - point-to-point isn't actually a circle ). Thinking about running a bushing ring on both the rack & pinion. I'll also make an issue on the github repository of this - to prevent reprap forum from becoming a github issue board smiling smiley.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 03, 2017 04:51AM
Hi tgit23,

if somebody would be able to modify the Marlin firmware that would be great. I am not able to do so.

The estimate cost of the delta printer on the picture is less then 20$.

About the Steward platform - it is first time I see such design. Looks interesting but I have not red much about it yet. I will try to get more info. For now I would not go to build such design probably. But would be interesting to see it in the action.

Your project looks good. I think it can be interesting for people new in 3D printing especially to learn something new. About 28BYJ and the torque - hard to say if these steppers can really support some reliable 3D printers or can only give a try in machines like we are trying to build smiling smiley I hope it can but we will see. The option is to do simple modification of these unipolar steppers and make a bipolar stepper from it. But then you also have to use different drivers, same as on the standard RAMPS and then the price is going higher. Not such a big deal but depend if the price is the key factor of such machine. Currently I was using only 5V 28BYJ steppers but 12V are also available on the market for a bit higher price. With the 28BYJ steppers there is also one interesting project called ToyREP = [reprap.org] or build manual on [reprap.org]
Here files for download and video of printing - [www.thingiverse.com]
That is really nice project I would say. The price should be something round 70$ if I found correct info.
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 03, 2017 09:52AM
Hi boylucky - Good to hear from you. Thanks so much for posting those links; reviewing the build instructions which I hadn't taken the time to do before has sprouted some new ideas.

Quote

less then 20$

That's amazing. I thought for sure those long bolts, belts, motors would've added up to more than that. I had ran into the ToyREP previously; looks like its cost is around $110 by the BOM I downloaded. I've recently ran into the 101hero [www.101hero.com] - It is a delta - A couple videos claimed the kick-start model was only $80. Reviews are calling it the 101Zero lol... but find it very intriguing as a toy model that has marked a significant point in time.

I also found this video here most intriguing [www.youtube.com] ( 3d printed carriage with delrin balls ). Might prove to be quite a worthy savings against expensive bearings and polished rods. Now if only I could find some acrylic T-Slot framing system smiling smiley for 1/4 the price of aluminum.

I think I'll have a decent working model of the RPieces-TabeTopXYZ in a week but will probably lean more towards drilling / plotting to start with - since a pen is cheaper than an extruder smiling smiley. I also have this mini drill sitting around [www.ebay.com] that I'd got quite some time ago to drill PCB.

I guess my thinking in starting this item was the ability for 3d printer owners to mill some PCB boards or etch them via plots - probably should've just made changing tool-head system for my 3d printer but; too late in the process to give up now smiling smiley
Re: Delta 3D printer firmware for ULN2003 driver and 28BYJ-48 stepper motor
March 10, 2017 06:33AM
Hi tgit23,

thanks for the post and also for those 2 links. The printer 101hero looks good smiling smiley . I did not know that somebody already sell such printers with 28BYJ steppers. Hard to say how long can last the steppers in the printer. Have you ever search about some replacement of the 28BYJ steppers? I tried couple of times some time ago but did not find anythink reliable for similar price.

The idea about milling the PCB smiling smiley with the 3D printer - looks we have similar direction. Currently I only tried the possibility to change the print head for the pen and draw the PCB. Not the drill instead of the head. I think the construction must be more stable to be able to use the drill in it. That was the reason why I only tried with the pen to draw the PCB. I was also thinking to later try the possibility to even place the electronics parts by the printer to the correct positions and even solder them smiling smiley . But that is only a sci-fi now for me smiling smiley as not even time for such developement.

Edited 1 time(s). Last edit at 03/10/2017 06:33AM by boylucky.
Sorry, only registered users may post in this forum.

Click here to login